@c-code/c-code-fw 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -104
- package/fesm2022/c-code-c-code-fw-ui.mjs +586 -141
- package/fesm2022/c-code-c-code-fw-ui.mjs.map +1 -1
- package/package.json +1 -1
- package/ui/lib/components/button/button.component.d.ts +24 -0
- package/ui/lib/components/category-menu/category-menu.component.d.ts +12 -3
- package/ui/lib/components/faq/faq.component.d.ts +11 -4
- package/ui/lib/components/faq-item/faq-item.component.d.ts +21 -0
- package/ui/lib/components/gallery/gallery.component.d.ts +7 -3
- package/ui/lib/components/info-item/info-item.component.d.ts +10 -2
- package/ui/lib/components/lightbox/lightbox.component.d.ts +18 -3
- package/ui/lib/components/notice/notice.component.d.ts +17 -0
- package/ui/lib/components/page-banner/page-banner.component.d.ts +9 -3
- package/ui/lib/components/plan-card/plan-card.component.d.ts +29 -6
- package/ui/lib/components/plan-catalog/plan-catalog.component.d.ts +43 -19
- package/ui/lib/components/plan-details/plan-details.component.d.ts +26 -11
- package/ui/lib/components/plan-filter-form/plan-filter-form.component.d.ts +15 -5
- package/ui/lib/components/promo-modal/promo-modal.component.d.ts +39 -7
- package/ui/lib/components/search-box/search-box.component.d.ts +6 -1
- package/ui/lib/components/section-heading/section-heading.component.d.ts +34 -0
- package/ui/lib/components/social-links/social-links.component.d.ts +10 -6
- package/ui/lib/components/whatsapp-button/whatsapp-button.component.d.ts +12 -2
- package/ui/lib/utils/text.utils.d.ts +10 -0
- package/ui/public-api.d.ts +4 -0
- package/ui/theme/component-base.css +136 -0
- package/ui/theme/tokens.css +111 -45
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, makeEnvironmentProviders, inject, Injectable, input, ChangeDetectionStrategy, Component, model, output,
|
|
3
|
+
import { InjectionToken, makeEnvironmentProviders, inject, Injectable, input, booleanAttribute, ChangeDetectionStrategy, Component, model, output, viewChild, computed, DestroyRef, afterNextRender, effect, untracked, signal, Directive, contentChild, TemplateRef } from '@angular/core';
|
|
4
4
|
import { shareReplay, forkJoin, map, of } from 'rxjs';
|
|
5
|
-
import { DOCUMENT, NgTemplateOutlet
|
|
5
|
+
import { DOCUMENT, NgTemplateOutlet } from '@angular/common';
|
|
6
6
|
import { Title, Meta } from '@angular/platform-browser';
|
|
7
7
|
import { RouterLink } from '@angular/router';
|
|
8
8
|
|
|
@@ -60,6 +60,16 @@ function whatsappUrl(phone, message) {
|
|
|
60
60
|
params.set('app_absent', '0');
|
|
61
61
|
return `https://api.whatsapp.com/send/?${params.toString()}`;
|
|
62
62
|
}
|
|
63
|
+
/** Formats a price with `Intl.NumberFormat`: formatPrice(259900) -> "$ 259.900". */
|
|
64
|
+
function formatPrice(value, { locale = 'es-CO', currency = 'COP', digits = 0 } = {}) {
|
|
65
|
+
return new Intl.NumberFormat(locale, {
|
|
66
|
+
style: 'currency',
|
|
67
|
+
currency,
|
|
68
|
+
currencyDisplay: 'narrowSymbol',
|
|
69
|
+
minimumFractionDigits: digits,
|
|
70
|
+
maximumFractionDigits: digits,
|
|
71
|
+
}).format(value);
|
|
72
|
+
}
|
|
63
73
|
|
|
64
74
|
/** Fills `plan.additionalServices` from `additionalServicesId`. Unknown ids are skipped. */
|
|
65
75
|
function joinAdditionalServices(plans, additionals) {
|
|
@@ -262,59 +272,305 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
262
272
|
args: [{ providedIn: 'root' }]
|
|
263
273
|
}] });
|
|
264
274
|
|
|
275
|
+
/**
|
|
276
|
+
* Shared button look for links and buttons. Every component in the library uses it,
|
|
277
|
+
* so all calls to action share size, focus and colors.
|
|
278
|
+
*
|
|
279
|
+
* ```html
|
|
280
|
+
* <a ccButton [href]="whatsapp" target="_blank">Reservar</a>
|
|
281
|
+
* <button ccButton variant="secondary" size="sm" type="button">Limpiar</button>
|
|
282
|
+
* ```
|
|
283
|
+
*
|
|
284
|
+
* Tokens: --cc-btn-bg, --cc-btn-color, --cc-btn-hover-bg, --cc-btn-hover-color,
|
|
285
|
+
* --cc-btn-border, --cc-btn-radius, --cc-btn-padding-x, --cc-btn-font-weight,
|
|
286
|
+
* --cc-btn-letter-spacing, --cc-btn-text-transform.
|
|
287
|
+
*/
|
|
288
|
+
class ButtonComponent {
|
|
289
|
+
variant = input('primary');
|
|
290
|
+
size = input('md');
|
|
291
|
+
/** Full width. */
|
|
292
|
+
block = input(false, { transform: booleanAttribute });
|
|
293
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
294
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.6", type: ButtonComponent, isStandalone: true, selector: "a[ccButton], button[ccButton]", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, block: { classPropertyName: "block", publicName: "block", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cc-btn--secondary": "variant() === 'secondary'", "class.cc-btn--ghost": "variant() === 'ghost'", "class.cc-btn--whatsapp": "variant() === 'whatsapp'", "class.cc-btn--inverse": "variant() === 'inverse'", "class.cc-btn--sm": "size() === 'sm'", "class.cc-btn--lg": "size() === 'lg'", "class.cc-btn--block": "block()" }, classAttribute: "cc-btn" }, ngImport: i0, template: "<ng-content />\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_btn-bg: var(--cc-btn-bg, var(--_accent));--_btn-color: var(--cc-btn-color, var(--_on-accent));--_btn-hover-bg: var(--cc-btn-hover-bg, var(--_accent-hover));--_btn-hover-color: var(--cc-btn-hover-color, var(--_btn-color));--_btn-border: var(--cc-btn-border, transparent);--_btn-padding-x: var(--cc-btn-padding-x, var(--_space-6));--_btn-height: var(--_control-height);display:inline-flex;align-items:center;justify-content:center;gap:var(--_space-2);min-height:var(--_btn-height);padding:var(--_space-2) var(--_btn-padding-x);border:2px solid var(--_btn-border);border-radius:var(--cc-btn-radius, var(--_radius));font:inherit;font-size:var(--_text-md);font-weight:var(--cc-btn-font-weight, var(--_weight-semibold));letter-spacing:var(--cc-btn-letter-spacing, var(--_tracking-wide));line-height:var(--_leading-tight);text-align:center;text-decoration:none;text-transform:var(--cc-btn-text-transform, none);color:var(--_btn-color);background:var(--_btn-bg);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--_duration) var(--_ease),color var(--_duration) var(--_ease),border-color var(--_duration) var(--_ease),box-shadow var(--_duration) var(--_ease)}:host(:hover){color:var(--_btn-hover-color);background:var(--_btn-hover-bg)}:host(:focus-visible){outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}:host(:disabled),:host([aria-disabled=\"true\"]){opacity:.5;cursor:not-allowed;pointer-events:none}:host(.cc-btn--secondary){--_btn-bg: var(--cc-btn-bg, transparent);--_btn-color: var(--cc-btn-color, var(--_accent-text));--_btn-border: var(--cc-btn-border, var(--_accent));--_btn-hover-bg: var(--cc-btn-hover-bg, var(--_accent));--_btn-hover-color: var(--cc-btn-hover-color, var(--_on-accent))}:host(.cc-btn--ghost){--_btn-bg: var(--cc-btn-bg, transparent);--_btn-color: var(--cc-btn-color, var(--_text));--_btn-hover-bg: var(--cc-btn-hover-bg, color-mix(in srgb, var(--_text) 8%, transparent));--_btn-padding-x: var(--cc-btn-padding-x, var(--_space-3));text-decoration:underline;text-underline-offset:.2em}:host(.cc-btn--whatsapp){--_btn-bg: var(--cc-btn-bg, var(--_whatsapp));--_btn-color: var(--cc-btn-color, var(--_on-whatsapp));--_btn-hover-bg: var(--cc-btn-hover-bg, var(--_whatsapp-hover))}:host(.cc-btn--inverse){--_btn-bg: var(--cc-btn-bg, var(--_inverse));--_btn-color: var(--cc-btn-color, var(--_on-inverse));--_btn-hover-bg: var(--cc-btn-hover-bg, var(--_inverse-hover))}:host(.cc-btn--sm){--_btn-height: var(--_control-height-sm);--_btn-padding-x: var(--cc-btn-padding-x, var(--_space-4));font-size:var(--_text-sm)}:host(.cc-btn--lg){--_btn-height: var(--_control-height-lg);--_btn-padding-x: var(--cc-btn-padding-x, var(--_space-10));font-size:var(--_text-lg)}:host(.cc-btn--block){display:flex;width:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
295
|
+
}
|
|
296
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
297
|
+
type: Component,
|
|
298
|
+
args: [{ selector: 'a[ccButton], button[ccButton]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
299
|
+
class: 'cc-btn',
|
|
300
|
+
'[class.cc-btn--secondary]': "variant() === 'secondary'",
|
|
301
|
+
'[class.cc-btn--ghost]': "variant() === 'ghost'",
|
|
302
|
+
'[class.cc-btn--whatsapp]': "variant() === 'whatsapp'",
|
|
303
|
+
'[class.cc-btn--inverse]': "variant() === 'inverse'",
|
|
304
|
+
'[class.cc-btn--sm]': "size() === 'sm'",
|
|
305
|
+
'[class.cc-btn--lg]': "size() === 'lg'",
|
|
306
|
+
'[class.cc-btn--block]': 'block()',
|
|
307
|
+
}, template: "<ng-content />\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_btn-bg: var(--cc-btn-bg, var(--_accent));--_btn-color: var(--cc-btn-color, var(--_on-accent));--_btn-hover-bg: var(--cc-btn-hover-bg, var(--_accent-hover));--_btn-hover-color: var(--cc-btn-hover-color, var(--_btn-color));--_btn-border: var(--cc-btn-border, transparent);--_btn-padding-x: var(--cc-btn-padding-x, var(--_space-6));--_btn-height: var(--_control-height);display:inline-flex;align-items:center;justify-content:center;gap:var(--_space-2);min-height:var(--_btn-height);padding:var(--_space-2) var(--_btn-padding-x);border:2px solid var(--_btn-border);border-radius:var(--cc-btn-radius, var(--_radius));font:inherit;font-size:var(--_text-md);font-weight:var(--cc-btn-font-weight, var(--_weight-semibold));letter-spacing:var(--cc-btn-letter-spacing, var(--_tracking-wide));line-height:var(--_leading-tight);text-align:center;text-decoration:none;text-transform:var(--cc-btn-text-transform, none);color:var(--_btn-color);background:var(--_btn-bg);cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--_duration) var(--_ease),color var(--_duration) var(--_ease),border-color var(--_duration) var(--_ease),box-shadow var(--_duration) var(--_ease)}:host(:hover){color:var(--_btn-hover-color);background:var(--_btn-hover-bg)}:host(:focus-visible){outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}:host(:disabled),:host([aria-disabled=\"true\"]){opacity:.5;cursor:not-allowed;pointer-events:none}:host(.cc-btn--secondary){--_btn-bg: var(--cc-btn-bg, transparent);--_btn-color: var(--cc-btn-color, var(--_accent-text));--_btn-border: var(--cc-btn-border, var(--_accent));--_btn-hover-bg: var(--cc-btn-hover-bg, var(--_accent));--_btn-hover-color: var(--cc-btn-hover-color, var(--_on-accent))}:host(.cc-btn--ghost){--_btn-bg: var(--cc-btn-bg, transparent);--_btn-color: var(--cc-btn-color, var(--_text));--_btn-hover-bg: var(--cc-btn-hover-bg, color-mix(in srgb, var(--_text) 8%, transparent));--_btn-padding-x: var(--cc-btn-padding-x, var(--_space-3));text-decoration:underline;text-underline-offset:.2em}:host(.cc-btn--whatsapp){--_btn-bg: var(--cc-btn-bg, var(--_whatsapp));--_btn-color: var(--cc-btn-color, var(--_on-whatsapp));--_btn-hover-bg: var(--cc-btn-hover-bg, var(--_whatsapp-hover))}:host(.cc-btn--inverse){--_btn-bg: var(--cc-btn-bg, var(--_inverse));--_btn-color: var(--cc-btn-color, var(--_on-inverse));--_btn-hover-bg: var(--cc-btn-hover-bg, var(--_inverse-hover))}:host(.cc-btn--sm){--_btn-height: var(--_control-height-sm);--_btn-padding-x: var(--cc-btn-padding-x, var(--_space-4));font-size:var(--_text-sm)}:host(.cc-btn--lg){--_btn-height: var(--_control-height-lg);--_btn-padding-x: var(--cc-btn-padding-x, var(--_space-10));font-size:var(--_text-lg)}:host(.cc-btn--block){display:flex;width:100%}\n"] }]
|
|
308
|
+
}] });
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* Section title with optional eyebrow, icon, subtitle and decorative rule.
|
|
312
|
+
* Use one per page section so every page shares the same heading rhythm.
|
|
313
|
+
*
|
|
314
|
+
* ```html
|
|
315
|
+
* <cc-section-heading title="Planes" subtitle="Para ti, en pareja o en grupo" iconSrc="assets/images/trebol.png" />
|
|
316
|
+
* <cc-section-heading title="Contacto" tone="inverse" align="center" level="h3" />
|
|
317
|
+
* ```
|
|
318
|
+
*
|
|
319
|
+
* Tokens: --cc-section-heading-color, --cc-section-heading-size, --cc-section-heading-rule,
|
|
320
|
+
* --cc-section-heading-gap, --cc-section-heading-icon-size.
|
|
321
|
+
*/
|
|
322
|
+
class SectionHeadingComponent {
|
|
323
|
+
title = input.required();
|
|
324
|
+
subtitle = input('');
|
|
325
|
+
/** Small text above the title. */
|
|
326
|
+
eyebrow = input('');
|
|
327
|
+
iconSrc = input('');
|
|
328
|
+
/** Heading level. The visual size does not change with the level. */
|
|
329
|
+
level = input('h2');
|
|
330
|
+
align = input('start');
|
|
331
|
+
/** `default` for light backgrounds, `inverse` for dark ones, `accent` for brand-colored titles. */
|
|
332
|
+
tone = input('default');
|
|
333
|
+
/** Shows a short accent line under the title. */
|
|
334
|
+
rule = input(false, { transform: booleanAttribute });
|
|
335
|
+
/** `sm` for sub-sections, `md` (default) for page sections, `lg` for heroes. */
|
|
336
|
+
size = input('md');
|
|
337
|
+
italic = input(false, { transform: booleanAttribute });
|
|
338
|
+
/** Id of the heading element, for anchors. */
|
|
339
|
+
headingId = input(null);
|
|
340
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SectionHeadingComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
341
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: SectionHeadingComponent, isStandalone: true, selector: "cc-section-heading", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, eyebrow: { classPropertyName: "eyebrow", publicName: "eyebrow", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, level: { classPropertyName: "level", publicName: "level", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, rule: { classPropertyName: "rule", publicName: "rule", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, italic: { classPropertyName: "italic", publicName: "italic", isSignal: true, isRequired: false, transformFunction: null }, headingId: { classPropertyName: "headingId", publicName: "headingId", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cc-sh--center": "align() === 'center'", "class.cc-sh--inverse": "tone() === 'inverse'", "class.cc-sh--accent": "tone() === 'accent'", "class.cc-sh--rule": "rule()", "class.cc-sh--sm": "size() === 'sm'", "class.cc-sh--lg": "size() === 'lg'", "class.cc-sh--italic": "italic()" } }, ngImport: i0, template: "<div class=\"cc-sh\">\r\n @if (eyebrow()) {\r\n <p class=\"cc-sh__eyebrow\">{{ eyebrow() }}</p>\r\n }\r\n <div class=\"cc-sh__row\">\r\n @if (iconSrc()) {\r\n <img class=\"cc-sh__icon\" [src]=\"iconSrc()\" alt=\"\" />\r\n }\r\n @switch (level()) {\r\n @case ('h1') {\r\n <h1 class=\"cc-sh__title\" [attr.id]=\"headingId()\">{{ title() }}</h1>\r\n }\r\n @case ('h3') {\r\n <h3 class=\"cc-sh__title\" [attr.id]=\"headingId()\">{{ title() }}</h3>\r\n }\r\n @default {\r\n <h2 class=\"cc-sh__title\" [attr.id]=\"headingId()\">{{ title() }}</h2>\r\n }\r\n }\r\n </div>\r\n @if (rule()) {\r\n <span class=\"cc-sh__rule\" aria-hidden=\"true\"></span>\r\n }\r\n @if (subtitle()) {\r\n <p class=\"cc-sh__subtitle\">{{ subtitle() }}</p>\r\n }\r\n</div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_sh-color: var(--cc-section-heading-color, var(--_accent-text));--_sh-sub-color: var(--_text);display:block;margin-bottom:var(--cc-section-heading-gap, var(--_space-8))}:host(.cc-sh--inverse){--_sh-color: var(--cc-section-heading-color, var(--_on-inverse));--_sh-sub-color: var(--_on-inverse)}:host(.cc-sh--sm){--cc-section-heading-size: var(--_text-2xl)}:host(.cc-sh--lg){--cc-section-heading-size: var(--_text-4xl)}:host(.cc-sh--accent){--_sh-color: var(--cc-section-heading-color, var(--_heading))}.cc-sh{display:flex;flex-direction:column;gap:var(--_space-2)}:host(.cc-sh--center) .cc-sh{align-items:center;text-align:center}.cc-sh__eyebrow{margin:0;font-size:var(--_text-sm);font-weight:var(--_weight-semibold);letter-spacing:var(--_tracking-wide);text-transform:uppercase;color:var(--_sh-sub-color)}.cc-sh__row{display:flex;align-items:center;gap:var(--_space-3)}.cc-sh__icon{flex:none;width:var(--cc-section-heading-icon-size, 2.5rem);height:auto}.cc-sh__title{margin:0;font-family:var(--_font-heading);font-size:var(--cc-section-heading-size, var(--_text-3xl));font-style:var(--_heading-style);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);color:var(--_sh-color)}:host(.cc-sh--italic) .cc-sh__title{font-style:italic}.cc-sh__rule{display:block;width:3.5rem;height:3px;background:var(--cc-section-heading-rule, var(--_accent))}.cc-sh__subtitle{max-width:42rem;margin:0;font-size:var(--_text-lg);line-height:var(--_leading-body);color:var(--_sh-sub-color)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
342
|
+
}
|
|
343
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SectionHeadingComponent, decorators: [{
|
|
344
|
+
type: Component,
|
|
345
|
+
args: [{ selector: 'cc-section-heading', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
346
|
+
'[class.cc-sh--center]': "align() === 'center'",
|
|
347
|
+
'[class.cc-sh--inverse]': "tone() === 'inverse'",
|
|
348
|
+
'[class.cc-sh--accent]': "tone() === 'accent'",
|
|
349
|
+
'[class.cc-sh--rule]': 'rule()',
|
|
350
|
+
'[class.cc-sh--sm]': "size() === 'sm'",
|
|
351
|
+
'[class.cc-sh--lg]': "size() === 'lg'",
|
|
352
|
+
'[class.cc-sh--italic]': 'italic()',
|
|
353
|
+
}, template: "<div class=\"cc-sh\">\r\n @if (eyebrow()) {\r\n <p class=\"cc-sh__eyebrow\">{{ eyebrow() }}</p>\r\n }\r\n <div class=\"cc-sh__row\">\r\n @if (iconSrc()) {\r\n <img class=\"cc-sh__icon\" [src]=\"iconSrc()\" alt=\"\" />\r\n }\r\n @switch (level()) {\r\n @case ('h1') {\r\n <h1 class=\"cc-sh__title\" [attr.id]=\"headingId()\">{{ title() }}</h1>\r\n }\r\n @case ('h3') {\r\n <h3 class=\"cc-sh__title\" [attr.id]=\"headingId()\">{{ title() }}</h3>\r\n }\r\n @default {\r\n <h2 class=\"cc-sh__title\" [attr.id]=\"headingId()\">{{ title() }}</h2>\r\n }\r\n }\r\n </div>\r\n @if (rule()) {\r\n <span class=\"cc-sh__rule\" aria-hidden=\"true\"></span>\r\n }\r\n @if (subtitle()) {\r\n <p class=\"cc-sh__subtitle\">{{ subtitle() }}</p>\r\n }\r\n</div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_sh-color: var(--cc-section-heading-color, var(--_accent-text));--_sh-sub-color: var(--_text);display:block;margin-bottom:var(--cc-section-heading-gap, var(--_space-8))}:host(.cc-sh--inverse){--_sh-color: var(--cc-section-heading-color, var(--_on-inverse));--_sh-sub-color: var(--_on-inverse)}:host(.cc-sh--sm){--cc-section-heading-size: var(--_text-2xl)}:host(.cc-sh--lg){--cc-section-heading-size: var(--_text-4xl)}:host(.cc-sh--accent){--_sh-color: var(--cc-section-heading-color, var(--_heading))}.cc-sh{display:flex;flex-direction:column;gap:var(--_space-2)}:host(.cc-sh--center) .cc-sh{align-items:center;text-align:center}.cc-sh__eyebrow{margin:0;font-size:var(--_text-sm);font-weight:var(--_weight-semibold);letter-spacing:var(--_tracking-wide);text-transform:uppercase;color:var(--_sh-sub-color)}.cc-sh__row{display:flex;align-items:center;gap:var(--_space-3)}.cc-sh__icon{flex:none;width:var(--cc-section-heading-icon-size, 2.5rem);height:auto}.cc-sh__title{margin:0;font-family:var(--_font-heading);font-size:var(--cc-section-heading-size, var(--_text-3xl));font-style:var(--_heading-style);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);color:var(--_sh-color)}:host(.cc-sh--italic) .cc-sh__title{font-style:italic}.cc-sh__rule{display:block;width:3.5rem;height:3px;background:var(--cc-section-heading-rule, var(--_accent))}.cc-sh__subtitle{max-width:42rem;margin:0;font-size:var(--_text-lg);line-height:var(--_leading-body);color:var(--_sh-sub-color)}\n"] }]
|
|
354
|
+
}] });
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Highlighted note for important conditions, warnings or tips. The content is projected.
|
|
358
|
+
*
|
|
359
|
+
* ```html
|
|
360
|
+
* <cc-notice tone="warning" title="Importante">Su bono tiene vigencia de 30 días.</cc-notice>
|
|
361
|
+
* ```
|
|
362
|
+
*
|
|
363
|
+
* Tokens: --cc-notice-bg, --cc-notice-border, --cc-notice-color.
|
|
364
|
+
*/
|
|
365
|
+
class NoticeComponent {
|
|
366
|
+
/** `info` uses the brand colors, `warning` a red accent, `success` the primary color. */
|
|
367
|
+
tone = input('info');
|
|
368
|
+
title = input('');
|
|
369
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
370
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: NoticeComponent, isStandalone: true, selector: "cc-notice", inputs: { tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "note" }, properties: { "class.cc-notice--warning": "tone() === 'warning'", "class.cc-notice--success": "tone() === 'success'" } }, ngImport: i0, template: "@if (title()) {\r\n <p class=\"cc-notice__title\">{{ title() }}</p>\r\n}\r\n<div class=\"cc-notice__body\"><ng-content /></div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_notice-accent: var(--cc-notice-border, var(--_accent));--_notice-bg: var(--cc-notice-bg, var(--_surface));--_notice-color: var(--cc-notice-color, var(--_text));display:block;padding:var(--_space-4) var(--_space-5);border-left:4px solid var(--_notice-accent);border-radius:var(--_radius);color:var(--_notice-color);background:var(--_notice-bg);line-height:var(--_leading-body)}:host(.cc-notice--warning){--_notice-accent: var(--cc-notice-border, var(--_danger));--_notice-bg: var(--cc-notice-bg, var(--_danger-surface));--_notice-color: var(--cc-notice-color, var(--_on-danger-surface))}:host(.cc-notice--success){--_notice-accent: var(--cc-notice-border, var(--_inverse));--_notice-bg: var(--cc-notice-bg, var(--_surface-alt))}.cc-notice__title{margin:0 0 var(--_space-1);font-weight:var(--_weight-bold)}.cc-notice__body{font-size:var(--_text-md)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
371
|
+
}
|
|
372
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: NoticeComponent, decorators: [{
|
|
373
|
+
type: Component,
|
|
374
|
+
args: [{ selector: 'cc-notice', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
375
|
+
role: 'note',
|
|
376
|
+
'[class.cc-notice--warning]': "tone() === 'warning'",
|
|
377
|
+
'[class.cc-notice--success]': "tone() === 'success'",
|
|
378
|
+
}, template: "@if (title()) {\r\n <p class=\"cc-notice__title\">{{ title() }}</p>\r\n}\r\n<div class=\"cc-notice__body\"><ng-content /></div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_notice-accent: var(--cc-notice-border, var(--_accent));--_notice-bg: var(--cc-notice-bg, var(--_surface));--_notice-color: var(--cc-notice-color, var(--_text));display:block;padding:var(--_space-4) var(--_space-5);border-left:4px solid var(--_notice-accent);border-radius:var(--_radius);color:var(--_notice-color);background:var(--_notice-bg);line-height:var(--_leading-body)}:host(.cc-notice--warning){--_notice-accent: var(--cc-notice-border, var(--_danger));--_notice-bg: var(--cc-notice-bg, var(--_danger-surface));--_notice-color: var(--cc-notice-color, var(--_on-danger-surface))}:host(.cc-notice--success){--_notice-accent: var(--cc-notice-border, var(--_inverse));--_notice-bg: var(--cc-notice-bg, var(--_surface-alt))}.cc-notice__title{margin:0 0 var(--_space-1);font-weight:var(--_weight-bold)}.cc-notice__body{font-size:var(--_text-md)}\n"] }]
|
|
379
|
+
}] });
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* One question of `cc-faq`. The answer is projected, so it can contain links.
|
|
383
|
+
*
|
|
384
|
+
* ```html
|
|
385
|
+
* <cc-faq title="Preguntas frecuentes">
|
|
386
|
+
* <cc-faq-item question="¿Qué planes tienen?">
|
|
387
|
+
* Míralos todos en <a routerLink="/planes">planes</a>.
|
|
388
|
+
* </cc-faq-item>
|
|
389
|
+
* </cc-faq>
|
|
390
|
+
* ```
|
|
391
|
+
*
|
|
392
|
+
* Tokens: --cc-faq-bg, --cc-faq-question-color, --cc-faq-answer-color.
|
|
393
|
+
*/
|
|
394
|
+
class FaqItemComponent {
|
|
395
|
+
question = input.required();
|
|
396
|
+
/** Starts expanded. */
|
|
397
|
+
open = input(false);
|
|
398
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FaqItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
399
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.6", type: FaqItemComponent, isStandalone: true, selector: "cc-faq-item", inputs: { question: { classPropertyName: "question", publicName: "question", isSignal: true, isRequired: true, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<details class=\"cc-faq-item\" [open]=\"open()\">\r\n <summary>\r\n <span>{{ question() }}</span>\r\n <svg class=\"cc-faq-item__chevron\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path d=\"m6 9 6 6 6-6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </summary>\r\n <div class=\"cc-faq-item__answer\"><ng-content /></div>\r\n</details>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:block}.cc-faq-item{border-radius:var(--_radius);background:var(--cc-faq-bg, var(--_surface))}summary{display:flex;align-items:center;justify-content:space-between;gap:var(--_space-4);min-height:var(--_control-height);padding:var(--_space-4) var(--_space-5);font-size:var(--_text-md);font-weight:var(--_weight-semibold);line-height:var(--_leading-snug);color:var(--cc-faq-question-color, var(--_text));list-style:none;cursor:pointer}summary::-webkit-details-marker{display:none}.cc-faq-item__chevron{flex:none;width:1.25rem;height:1.25rem;transition:transform var(--_duration) var(--_ease)}.cc-faq-item[open] .cc-faq-item__chevron{transform:rotate(180deg)}.cc-faq-item__answer{padding:0 var(--_space-5) var(--_space-5);line-height:var(--_leading-body);color:var(--cc-faq-answer-color, var(--_text))}.cc-faq-item__answer ::ng-deep a{color:inherit;font-weight:var(--_weight-semibold);text-decoration:underline;text-underline-offset:.2em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
400
|
+
}
|
|
401
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FaqItemComponent, decorators: [{
|
|
402
|
+
type: Component,
|
|
403
|
+
args: [{ selector: 'cc-faq-item', changeDetection: ChangeDetectionStrategy.OnPush, template: "<details class=\"cc-faq-item\" [open]=\"open()\">\r\n <summary>\r\n <span>{{ question() }}</span>\r\n <svg class=\"cc-faq-item__chevron\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path d=\"m6 9 6 6 6-6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n </summary>\r\n <div class=\"cc-faq-item__answer\"><ng-content /></div>\r\n</details>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:block}.cc-faq-item{border-radius:var(--_radius);background:var(--cc-faq-bg, var(--_surface))}summary{display:flex;align-items:center;justify-content:space-between;gap:var(--_space-4);min-height:var(--_control-height);padding:var(--_space-4) var(--_space-5);font-size:var(--_text-md);font-weight:var(--_weight-semibold);line-height:var(--_leading-snug);color:var(--cc-faq-question-color, var(--_text));list-style:none;cursor:pointer}summary::-webkit-details-marker{display:none}.cc-faq-item__chevron{flex:none;width:1.25rem;height:1.25rem;transition:transform var(--_duration) var(--_ease)}.cc-faq-item[open] .cc-faq-item__chevron{transform:rotate(180deg)}.cc-faq-item__answer{padding:0 var(--_space-5) var(--_space-5);line-height:var(--_leading-body);color:var(--cc-faq-answer-color, var(--_text))}.cc-faq-item__answer ::ng-deep a{color:inherit;font-weight:var(--_weight-semibold);text-decoration:underline;text-underline-offset:.2em}\n"] }]
|
|
404
|
+
}] });
|
|
405
|
+
|
|
265
406
|
/**
|
|
266
407
|
* Floating WhatsApp button, fixed to a corner of the screen.
|
|
267
408
|
*
|
|
409
|
+
* `variant`:
|
|
410
|
+
* - `icon` (default): round button with the logo.
|
|
411
|
+
* - `extended`: pill with the logo and `label` as visible text.
|
|
412
|
+
*
|
|
268
413
|
* ```html
|
|
269
414
|
* <cc-whatsapp-button [href]="whatsappLink" />
|
|
270
|
-
* <cc-whatsapp-button [href]="whatsappLink"
|
|
415
|
+
* <cc-whatsapp-button [href]="whatsappLink" variant="extended" label="Reservar" position="left" />
|
|
271
416
|
* ```
|
|
417
|
+
*
|
|
418
|
+
* Tokens: --cc-whatsapp, --cc-whatsapp-hover, --cc-whatsapp-size, --cc-whatsapp-offset-x,
|
|
419
|
+
* --cc-whatsapp-offset-y.
|
|
272
420
|
*/
|
|
273
421
|
class WhatsappButtonComponent {
|
|
274
422
|
/** WhatsApp link. Build it with `whatsappUrl(phone, message)`. */
|
|
275
423
|
href = input.required();
|
|
276
424
|
/** Custom icon. Without it, the WhatsApp logo is drawn as SVG. */
|
|
277
425
|
iconSrc = input('');
|
|
426
|
+
/** Accessible name, and the visible text in the `extended` variant. */
|
|
278
427
|
label = input('Escríbenos por WhatsApp');
|
|
428
|
+
variant = input('icon');
|
|
429
|
+
size = input('md');
|
|
279
430
|
position = input('right');
|
|
280
431
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: WhatsappButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
281
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: WhatsappButtonComponent, isStandalone: true, selector: "cc-whatsapp-button", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: true, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } },
|
|
432
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: WhatsappButtonComponent, isStandalone: true, selector: "cc-whatsapp-button", inputs: { href: { classPropertyName: "href", publicName: "href", isSignal: true, isRequired: true, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cc-wa--left": "position() === 'left'", "class.cc-wa--extended": "variant() === 'extended'", "class.cc-wa--sm": "size() === 'sm'" } }, ngImport: i0, template: "<a class=\"cc-wa\" [href]=\"href()\" target=\"_blank\" rel=\"noopener\" [attr.aria-label]=\"variant() === 'icon' ? label() : null\">\r\n @if (iconSrc()) {\r\n <img [src]=\"iconSrc()\" alt=\"\" class=\"cc-wa__icon\" />\r\n } @else {\r\n <svg class=\"cc-wa__icon\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\r\n <circle cx=\"16\" cy=\"16\" r=\"16\" style=\"fill: var(--_whatsapp)\" />\r\n <path\r\n fill=\"#fff\"\r\n d=\"M23.3 8.7A10.3 10.3 0 0 0 7 21.1L5.6 26.4l5.4-1.4a10.3 10.3 0 0 0 4.9 1.3 10.3 10.3 0 0 0 7.4-17.6Zm-7.3 15.8a8.5 8.5 0 0 1-4.3-1.2l-.3-.2-3.2.8.9-3.1-.2-.3a8.5 8.5 0 1 1 7.1 4Zm4.7-6.4c-.3-.1-1.5-.7-1.8-.8-.2-.1-.4-.1-.6.1l-.8 1c-.2.2-.3.2-.6.1a7 7 0 0 1-3.5-3c-.3-.5.3-.4.7-1.4.1-.2 0-.3 0-.4l-.8-2c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.8 11.9 11.9 0 0 0 4.6 4c1.7.7 2.4.8 3.2.7a2.8 2.8 0 0 0 1.8-1.3 2.3 2.3 0 0 0 .2-1.3c-.1-.1-.3-.2-.6-.3Z\"\r\n />\r\n </svg>\r\n }\r\n @if (variant() === 'extended') {\r\n <span class=\"cc-wa__label\">{{ label() }}</span>\r\n }\r\n</a>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_wa-size: var(--cc-whatsapp-size, 3.5rem);--_wa-offset-x: var(--cc-whatsapp-offset-x, var(--_space-5));--_wa-offset-y: var(--cc-whatsapp-offset-y, var(--_space-6));position:fixed;right:var(--_wa-offset-x);bottom:var(--_wa-offset-y);z-index:var(--_z-float);display:block}:host(.cc-wa--left){right:auto;left:var(--_wa-offset-x)}:host(.cc-wa--sm){--_wa-size: var(--cc-whatsapp-size, var(--_control-height))}.cc-wa{display:flex;align-items:center;gap:var(--_space-2);border-radius:var(--_radius-pill);text-decoration:none;box-shadow:var(--_shadow-lg);transition:transform var(--_duration) var(--_ease),box-shadow var(--_duration) var(--_ease)}.cc-wa:hover{transform:scale(1.08);box-shadow:var(--_shadow-xl)}.cc-wa__icon{display:block;flex:none;width:var(--_wa-size);height:var(--_wa-size);border-radius:var(--_radius-pill)}:host(.cc-wa--extended) .cc-wa{padding:var(--_space-1) var(--_space-5) var(--_space-1) var(--_space-1);font-weight:var(--_weight-semibold);color:var(--_on-whatsapp);background:var(--_whatsapp)}:host(.cc-wa--extended) .cc-wa:hover{background:var(--_whatsapp-hover);transform:translateY(-2px)}:host(.cc-wa--extended) .cc-wa__icon{width:calc(var(--_wa-size) - var(--_space-2));height:calc(var(--_wa-size) - var(--_space-2))}@media (min-width: 1024px){:host{right:var(--cc-whatsapp-offset-x-lg, var(--_space-10));bottom:var(--cc-whatsapp-offset-y-lg, var(--_space-8))}:host(.cc-wa--left){right:auto;left:var(--cc-whatsapp-offset-x-lg, var(--_space-10))}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
282
433
|
}
|
|
283
434
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: WhatsappButtonComponent, decorators: [{
|
|
284
435
|
type: Component,
|
|
285
|
-
args: [{ selector: 'cc-whatsapp-button', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
436
|
+
args: [{ selector: 'cc-whatsapp-button', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
437
|
+
'[class.cc-wa--left]': "position() === 'left'",
|
|
438
|
+
'[class.cc-wa--extended]': "variant() === 'extended'",
|
|
439
|
+
'[class.cc-wa--sm]': "size() === 'sm'",
|
|
440
|
+
}, template: "<a class=\"cc-wa\" [href]=\"href()\" target=\"_blank\" rel=\"noopener\" [attr.aria-label]=\"variant() === 'icon' ? label() : null\">\r\n @if (iconSrc()) {\r\n <img [src]=\"iconSrc()\" alt=\"\" class=\"cc-wa__icon\" />\r\n } @else {\r\n <svg class=\"cc-wa__icon\" viewBox=\"0 0 32 32\" aria-hidden=\"true\">\r\n <circle cx=\"16\" cy=\"16\" r=\"16\" style=\"fill: var(--_whatsapp)\" />\r\n <path\r\n fill=\"#fff\"\r\n d=\"M23.3 8.7A10.3 10.3 0 0 0 7 21.1L5.6 26.4l5.4-1.4a10.3 10.3 0 0 0 4.9 1.3 10.3 10.3 0 0 0 7.4-17.6Zm-7.3 15.8a8.5 8.5 0 0 1-4.3-1.2l-.3-.2-3.2.8.9-3.1-.2-.3a8.5 8.5 0 1 1 7.1 4Zm4.7-6.4c-.3-.1-1.5-.7-1.8-.8-.2-.1-.4-.1-.6.1l-.8 1c-.2.2-.3.2-.6.1a7 7 0 0 1-3.5-3c-.3-.5.3-.4.7-1.4.1-.2 0-.3 0-.4l-.8-2c-.2-.5-.4-.4-.6-.4h-.5a1 1 0 0 0-.7.3 3 3 0 0 0-.9 2.2 5.2 5.2 0 0 0 1.1 2.8 11.9 11.9 0 0 0 4.6 4c1.7.7 2.4.8 3.2.7a2.8 2.8 0 0 0 1.8-1.3 2.3 2.3 0 0 0 .2-1.3c-.1-.1-.3-.2-.6-.3Z\"\r\n />\r\n </svg>\r\n }\r\n @if (variant() === 'extended') {\r\n <span class=\"cc-wa__label\">{{ label() }}</span>\r\n }\r\n</a>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_wa-size: var(--cc-whatsapp-size, 3.5rem);--_wa-offset-x: var(--cc-whatsapp-offset-x, var(--_space-5));--_wa-offset-y: var(--cc-whatsapp-offset-y, var(--_space-6));position:fixed;right:var(--_wa-offset-x);bottom:var(--_wa-offset-y);z-index:var(--_z-float);display:block}:host(.cc-wa--left){right:auto;left:var(--_wa-offset-x)}:host(.cc-wa--sm){--_wa-size: var(--cc-whatsapp-size, var(--_control-height))}.cc-wa{display:flex;align-items:center;gap:var(--_space-2);border-radius:var(--_radius-pill);text-decoration:none;box-shadow:var(--_shadow-lg);transition:transform var(--_duration) var(--_ease),box-shadow var(--_duration) var(--_ease)}.cc-wa:hover{transform:scale(1.08);box-shadow:var(--_shadow-xl)}.cc-wa__icon{display:block;flex:none;width:var(--_wa-size);height:var(--_wa-size);border-radius:var(--_radius-pill)}:host(.cc-wa--extended) .cc-wa{padding:var(--_space-1) var(--_space-5) var(--_space-1) var(--_space-1);font-weight:var(--_weight-semibold);color:var(--_on-whatsapp);background:var(--_whatsapp)}:host(.cc-wa--extended) .cc-wa:hover{background:var(--_whatsapp-hover);transform:translateY(-2px)}:host(.cc-wa--extended) .cc-wa__icon{width:calc(var(--_wa-size) - var(--_space-2));height:calc(var(--_wa-size) - var(--_space-2))}@media (min-width: 1024px){:host{right:var(--cc-whatsapp-offset-x-lg, var(--_space-10));bottom:var(--cc-whatsapp-offset-y-lg, var(--_space-8))}:host(.cc-wa--left){right:auto;left:var(--cc-whatsapp-offset-x-lg, var(--_space-10))}}\n"] }]
|
|
286
441
|
}] });
|
|
287
442
|
|
|
288
443
|
/**
|
|
289
|
-
* Modal over the page, for example a promotion
|
|
290
|
-
*
|
|
291
|
-
*
|
|
444
|
+
* Modal over the page, for example a promotion. Shows `imageSrc`, or the projected
|
|
445
|
+
* content when there is no image, plus an optional call to action.
|
|
446
|
+
*
|
|
447
|
+
* It decides by itself when to open:
|
|
448
|
+
* - `autoOpen` opens it in the browser after `delayMs` (never during SSR, so it is not
|
|
449
|
+
* part of the prerendered page).
|
|
450
|
+
* - `rememberKey` stores the dismissal in localStorage for `rememberDays` days, so it
|
|
451
|
+
* does not reopen on every visit.
|
|
452
|
+
*
|
|
453
|
+
* Closes with the ✕ button, a backdrop click or Escape. Focus moves into the modal,
|
|
454
|
+
* stays inside while open and returns to the previous element on close.
|
|
292
455
|
*
|
|
293
456
|
* ```html
|
|
294
|
-
* <cc-promo-modal
|
|
457
|
+
* <cc-promo-modal imageSrc="assets/images/pop.jpeg" imageAlt="Promoción" [delayMs]="6000"
|
|
458
|
+
* rememberKey="promo-octubre" ctaLabel="Reservar la promo" [ctaHref]="whatsapp" />
|
|
295
459
|
* ```
|
|
460
|
+
*
|
|
461
|
+
* Tokens: --cc-modal-backdrop, --cc-modal-radius, --cc-modal-close-bg, --cc-modal-close-color.
|
|
296
462
|
*/
|
|
297
463
|
class PromoModalComponent {
|
|
298
|
-
/** Whether the modal is visible. Use `[(open)]` to
|
|
299
|
-
open = model(
|
|
464
|
+
/** Whether the modal is visible. Use `[(open)]` to control it from outside. */
|
|
465
|
+
open = model(false);
|
|
466
|
+
/** Opens the modal by itself in the browser after `delayMs`. */
|
|
467
|
+
autoOpen = input(false);
|
|
468
|
+
delayMs = input(0);
|
|
469
|
+
/** localStorage key to remember the dismissal. Change it for each new promotion. */
|
|
470
|
+
rememberKey = input('');
|
|
471
|
+
rememberDays = input(7);
|
|
300
472
|
imageSrc = input('');
|
|
301
473
|
imageAlt = input('');
|
|
302
|
-
/** Makes the image a link
|
|
474
|
+
/** Makes the image a link. */
|
|
303
475
|
link = input('');
|
|
476
|
+
/** Button under the image. Hidden when `ctaHref` is empty. */
|
|
477
|
+
ctaLabel = input('Quiero esta promoción');
|
|
478
|
+
ctaHref = input('');
|
|
479
|
+
ctaVariant = input('primary');
|
|
304
480
|
closeOnBackdrop = input(true);
|
|
305
481
|
closeLabel = input('Cerrar');
|
|
306
482
|
closed = output();
|
|
483
|
+
document = inject(DOCUMENT);
|
|
484
|
+
box = viewChild('box');
|
|
485
|
+
closeButton = viewChild('closeButton');
|
|
486
|
+
isOpen = computed(() => this.open());
|
|
487
|
+
constructor() {
|
|
488
|
+
const destroyRef = inject(DestroyRef);
|
|
489
|
+
afterNextRender(() => {
|
|
490
|
+
if (!this.autoOpen() || this.wasDismissed())
|
|
491
|
+
return;
|
|
492
|
+
const timer = setTimeout(() => this.open.set(true), Math.max(this.delayMs(), 0));
|
|
493
|
+
destroyRef.onDestroy(() => clearTimeout(timer));
|
|
494
|
+
});
|
|
495
|
+
effect((onCleanup) => {
|
|
496
|
+
if (!this.isOpen())
|
|
497
|
+
return;
|
|
498
|
+
untracked(() => {
|
|
499
|
+
const body = this.document.body;
|
|
500
|
+
const previousOverflow = body.style.overflow;
|
|
501
|
+
const opener = this.document.activeElement;
|
|
502
|
+
body.style.overflow = 'hidden';
|
|
503
|
+
queueMicrotask(() => this.closeButton()?.nativeElement.focus());
|
|
504
|
+
onCleanup(() => {
|
|
505
|
+
body.style.overflow = previousOverflow;
|
|
506
|
+
opener?.focus?.();
|
|
507
|
+
});
|
|
508
|
+
});
|
|
509
|
+
});
|
|
510
|
+
}
|
|
307
511
|
close() {
|
|
308
512
|
this.open.set(false);
|
|
513
|
+
this.remember();
|
|
309
514
|
this.closed.emit();
|
|
310
515
|
}
|
|
516
|
+
/** Keeps Tab and Shift+Tab inside the modal. */
|
|
517
|
+
trapFocus(event) {
|
|
518
|
+
if (event.key !== 'Tab')
|
|
519
|
+
return;
|
|
520
|
+
const focusable = this.box()?.nativeElement.querySelectorAll('a[href], button');
|
|
521
|
+
if (!focusable?.length)
|
|
522
|
+
return;
|
|
523
|
+
const first = focusable[0];
|
|
524
|
+
const last = focusable[focusable.length - 1];
|
|
525
|
+
const active = this.document.activeElement;
|
|
526
|
+
if (event.shiftKey && active === first) {
|
|
527
|
+
event.preventDefault();
|
|
528
|
+
last.focus();
|
|
529
|
+
}
|
|
530
|
+
else if (!event.shiftKey && active === last) {
|
|
531
|
+
event.preventDefault();
|
|
532
|
+
first.focus();
|
|
533
|
+
}
|
|
534
|
+
}
|
|
535
|
+
storage() {
|
|
536
|
+
try {
|
|
537
|
+
return this.document.defaultView?.localStorage ?? null;
|
|
538
|
+
}
|
|
539
|
+
catch {
|
|
540
|
+
return null;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
wasDismissed() {
|
|
544
|
+
const key = this.rememberKey();
|
|
545
|
+
if (!key)
|
|
546
|
+
return false;
|
|
547
|
+
try {
|
|
548
|
+
const until = Number(this.storage()?.getItem(`cc-promo:${key}`) ?? 0);
|
|
549
|
+
return until > Date.now();
|
|
550
|
+
}
|
|
551
|
+
catch {
|
|
552
|
+
return false;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
remember() {
|
|
556
|
+
const key = this.rememberKey();
|
|
557
|
+
if (!key)
|
|
558
|
+
return;
|
|
559
|
+
try {
|
|
560
|
+
const until = Date.now() + this.rememberDays() * 24 * 60 * 60 * 1000;
|
|
561
|
+
this.storage()?.setItem(`cc-promo:${key}`, String(until));
|
|
562
|
+
}
|
|
563
|
+
catch {
|
|
564
|
+
// Storage can be unavailable (private mode, blocked cookies); the modal still works.
|
|
565
|
+
}
|
|
566
|
+
}
|
|
311
567
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PromoModalComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
312
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PromoModalComponent, isStandalone: true, selector: "cc-promo-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null }, imageAlt: { classPropertyName: "imageAlt", publicName: "imageAlt", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { listeners: { "document:keydown.escape": "open() && close()" } }, ngImport: i0, template: "@if (open()) {\n <div class=\"cc-modal\" (click)=\"closeOnBackdrop() && close()\">\n <div\n class=\"cc-modal__box\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"imageAlt() || null\"\n (click)=\"$event.stopPropagation()\"\n >\n <button type=\"button\" class=\"cc-modal__close\" [attr.aria-label]=\"closeLabel()\" (click)=\"close()\">\n \
|
|
568
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PromoModalComponent, isStandalone: true, selector: "cc-promo-modal", inputs: { open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, autoOpen: { classPropertyName: "autoOpen", publicName: "autoOpen", isSignal: true, isRequired: false, transformFunction: null }, delayMs: { classPropertyName: "delayMs", publicName: "delayMs", isSignal: true, isRequired: false, transformFunction: null }, rememberKey: { classPropertyName: "rememberKey", publicName: "rememberKey", isSignal: true, isRequired: false, transformFunction: null }, rememberDays: { classPropertyName: "rememberDays", publicName: "rememberDays", isSignal: true, isRequired: false, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null }, imageAlt: { classPropertyName: "imageAlt", publicName: "imageAlt", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaHref: { classPropertyName: "ctaHref", publicName: "ctaHref", isSignal: true, isRequired: false, transformFunction: null }, ctaVariant: { classPropertyName: "ctaVariant", publicName: "ctaVariant", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdrop: { classPropertyName: "closeOnBackdrop", publicName: "closeOnBackdrop", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { open: "openChange", closed: "closed" }, host: { listeners: { "document:keydown.escape": "open() && close()" } }, viewQueries: [{ propertyName: "box", first: true, predicate: ["box"], descendants: true, isSignal: true }, { propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (open()) {\r\n <div class=\"cc-modal\" (click)=\"closeOnBackdrop() && close()\">\r\n <div\r\n #box\r\n class=\"cc-modal__box\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"imageAlt() || null\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"trapFocus($event)\"\r\n >\r\n <button #closeButton type=\"button\" class=\"cc-modal__close\" [attr.aria-label]=\"closeLabel()\" (click)=\"close()\">\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6 6l12 12M18 6 6 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" /></svg>\r\n </button>\r\n @if (imageSrc()) {\r\n @if (link()) {\r\n <a [href]=\"link()\" target=\"_blank\" rel=\"noopener\" class=\"cc-modal__media\">\r\n <img [src]=\"imageSrc()\" [alt]=\"imageAlt()\" class=\"cc-modal__img\" />\r\n </a>\r\n } @else {\r\n <img [src]=\"imageSrc()\" [alt]=\"imageAlt()\" class=\"cc-modal__img\" />\r\n }\r\n } @else {\r\n <div class=\"cc-modal__content\"><ng-content /></div>\r\n }\r\n @if (ctaHref()) {\r\n <a ccButton [variant]=\"ctaVariant()\" size=\"lg\" block class=\"cc-modal__cta\" [href]=\"ctaHref()\" target=\"_blank\" rel=\"noopener\" (click)=\"close()\">\r\n {{ ctaLabel() }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ".cc-modal{position:fixed;inset:0;z-index:var(--_z-overlay);display:flex;align-items:center;justify-content:center;padding:var(--_space-4);background:var(--cc-modal-backdrop, var(--_overlay));animation:cc-modal-fade var(--_duration) var(--_ease)}.cc-modal__box{position:relative;display:flex;flex-direction:column;gap:var(--_space-3);width:fit-content;max-width:min(92vw,36rem)}.cc-modal__media{display:block}.cc-modal__img{display:block;max-width:100%;max-height:calc(85vh - var(--_control-height-lg));border-radius:var(--cc-modal-radius, var(--_radius-md));box-shadow:var(--_shadow-xl)}.cc-modal__content{padding:var(--_space-6);border-radius:var(--cc-modal-radius, var(--_radius-md));color:var(--_text);background:var(--_canvas);box-shadow:var(--_shadow-xl)}.cc-modal__close{position:absolute;top:calc(-1 * var(--_space-3));right:calc(-1 * var(--_space-3));z-index:1;display:flex;align-items:center;justify-content:center;width:var(--_control-height);height:var(--_control-height);padding:0;border:0;border-radius:var(--_radius-pill);color:var(--cc-modal-close-color, var(--_heading));background:var(--cc-modal-close-bg, var(--_canvas));box-shadow:var(--_shadow-lg);cursor:pointer;transition:transform var(--_duration-fast) var(--_ease)}.cc-modal__close:hover{transform:scale(1.08)}.cc-modal__close svg{width:1.25rem;height:1.25rem}@keyframes cc-modal-fade{0%{opacity:0}to{opacity:1}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "a[ccButton], button[ccButton]", inputs: ["variant", "size", "block"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
313
569
|
}
|
|
314
570
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PromoModalComponent, decorators: [{
|
|
315
571
|
type: Component,
|
|
316
|
-
args: [{ selector: 'cc-promo-modal', changeDetection: ChangeDetectionStrategy.OnPush, host: { '(document:keydown.escape)': 'open() && close()' }, template: "@if (open()) {\n <div class=\"cc-modal\" (click)=\"closeOnBackdrop() && close()\">\n <div\n class=\"cc-modal__box\"\n role=\"dialog\"\n aria-modal=\"true\"\n [attr.aria-label]=\"imageAlt() || null\"\n (click)=\"$event.stopPropagation()\"\n >\n <button type=\"button\" class=\"cc-modal__close\" [attr.aria-label]=\"closeLabel()\" (click)=\"close()\">\n \
|
|
317
|
-
}] });
|
|
572
|
+
args: [{ selector: 'cc-promo-modal', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { '(document:keydown.escape)': 'open() && close()' }, template: "@if (open()) {\r\n <div class=\"cc-modal\" (click)=\"closeOnBackdrop() && close()\">\r\n <div\r\n #box\r\n class=\"cc-modal__box\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"imageAlt() || null\"\r\n (click)=\"$event.stopPropagation()\"\r\n (keydown)=\"trapFocus($event)\"\r\n >\r\n <button #closeButton type=\"button\" class=\"cc-modal__close\" [attr.aria-label]=\"closeLabel()\" (click)=\"close()\">\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6 6l12 12M18 6 6 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" /></svg>\r\n </button>\r\n @if (imageSrc()) {\r\n @if (link()) {\r\n <a [href]=\"link()\" target=\"_blank\" rel=\"noopener\" class=\"cc-modal__media\">\r\n <img [src]=\"imageSrc()\" [alt]=\"imageAlt()\" class=\"cc-modal__img\" />\r\n </a>\r\n } @else {\r\n <img [src]=\"imageSrc()\" [alt]=\"imageAlt()\" class=\"cc-modal__img\" />\r\n }\r\n } @else {\r\n <div class=\"cc-modal__content\"><ng-content /></div>\r\n }\r\n @if (ctaHref()) {\r\n <a ccButton [variant]=\"ctaVariant()\" size=\"lg\" block class=\"cc-modal__cta\" [href]=\"ctaHref()\" target=\"_blank\" rel=\"noopener\" (click)=\"close()\">\r\n {{ ctaLabel() }}\r\n </a>\r\n }\r\n </div>\r\n </div>\r\n}\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ".cc-modal{position:fixed;inset:0;z-index:var(--_z-overlay);display:flex;align-items:center;justify-content:center;padding:var(--_space-4);background:var(--cc-modal-backdrop, var(--_overlay));animation:cc-modal-fade var(--_duration) var(--_ease)}.cc-modal__box{position:relative;display:flex;flex-direction:column;gap:var(--_space-3);width:fit-content;max-width:min(92vw,36rem)}.cc-modal__media{display:block}.cc-modal__img{display:block;max-width:100%;max-height:calc(85vh - var(--_control-height-lg));border-radius:var(--cc-modal-radius, var(--_radius-md));box-shadow:var(--_shadow-xl)}.cc-modal__content{padding:var(--_space-6);border-radius:var(--cc-modal-radius, var(--_radius-md));color:var(--_text);background:var(--_canvas);box-shadow:var(--_shadow-xl)}.cc-modal__close{position:absolute;top:calc(-1 * var(--_space-3));right:calc(-1 * var(--_space-3));z-index:1;display:flex;align-items:center;justify-content:center;width:var(--_control-height);height:var(--_control-height);padding:0;border:0;border-radius:var(--_radius-pill);color:var(--cc-modal-close-color, var(--_heading));background:var(--cc-modal-close-bg, var(--_canvas));box-shadow:var(--_shadow-lg);cursor:pointer;transition:transform var(--_duration-fast) var(--_ease)}.cc-modal__close:hover{transform:scale(1.08)}.cc-modal__close svg{width:1.25rem;height:1.25rem}@keyframes cc-modal-fade{0%{opacity:0}to{opacity:1}}\n"] }]
|
|
573
|
+
}], ctorParameters: () => [] });
|
|
318
574
|
|
|
319
575
|
/**
|
|
320
576
|
* Title strip at the top of a page, with an optional back link and icon.
|
|
@@ -322,24 +578,36 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
322
578
|
*
|
|
323
579
|
* ```html
|
|
324
580
|
* <cc-page-banner title="Reserva tu plan - Pareja" />
|
|
325
|
-
* <cc-page-banner [title]="plan.name" backLink="/planes" iconSrc="assets/icons/hoja.png"
|
|
581
|
+
* <cc-page-banner [title]="plan.name" backLink="/planes" iconSrc="assets/icons/hoja.png" size="lg" italic />
|
|
326
582
|
* ```
|
|
583
|
+
*
|
|
584
|
+
* Tokens: --cc-banner-bg, --cc-banner-color, --cc-banner-padding.
|
|
327
585
|
*/
|
|
328
586
|
class PageBannerComponent {
|
|
329
587
|
title = input.required();
|
|
330
|
-
|
|
588
|
+
subtitle = input('');
|
|
589
|
+
/** `band` draws a surface-colored strip; `plain` has no background. */
|
|
331
590
|
variant = input('band');
|
|
591
|
+
size = input('md');
|
|
592
|
+
italic = input(false, { transform: booleanAttribute });
|
|
593
|
+
align = input('center');
|
|
332
594
|
iconSrc = input('');
|
|
333
595
|
/** Shows a back arrow that links here. */
|
|
334
596
|
backLink = input(null);
|
|
335
597
|
backIconSrc = input('');
|
|
336
598
|
backLabel = input('Volver');
|
|
337
599
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PageBannerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
338
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PageBannerComponent, isStandalone: true, selector: "cc-page-banner", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, backLink: { classPropertyName: "backLink", publicName: "backLink", isSignal: true, isRequired: false, transformFunction: null }, backIconSrc: { classPropertyName: "backIconSrc", publicName: "backIconSrc", isSignal: true, isRequired: false, transformFunction: null }, backLabel: { classPropertyName: "backLabel", publicName: "backLabel", isSignal: true, isRequired: false, transformFunction: null } },
|
|
600
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PageBannerComponent, isStandalone: true, selector: "cc-page-banner", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, italic: { classPropertyName: "italic", publicName: "italic", isSignal: true, isRequired: false, transformFunction: null }, align: { classPropertyName: "align", publicName: "align", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null }, backLink: { classPropertyName: "backLink", publicName: "backLink", isSignal: true, isRequired: false, transformFunction: null }, backIconSrc: { classPropertyName: "backIconSrc", publicName: "backIconSrc", isSignal: true, isRequired: false, transformFunction: null }, backLabel: { classPropertyName: "backLabel", publicName: "backLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cc-banner--plain": "variant() === 'plain'", "class.cc-banner--sm": "size() === 'sm'", "class.cc-banner--lg": "size() === 'lg'", "class.cc-banner--italic": "italic()", "class.cc-banner--start": "align() === 'start'" } }, ngImport: i0, template: "<div class=\"cc-banner\">\r\n @if (backLink()) {\r\n <a class=\"cc-banner__back\" [routerLink]=\"backLink()\" [attr.aria-label]=\"backLabel()\">\r\n @if (backIconSrc()) {\r\n <img [src]=\"backIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path d=\"M15 18l-6-6 6-6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n }\r\n </a>\r\n }\r\n <div class=\"cc-banner__text\">\r\n <div class=\"cc-banner__title\">\r\n <h1>{{ title() }}</h1>\r\n @if (iconSrc()) {\r\n <img [src]=\"iconSrc()\" alt=\"\" class=\"cc-banner__icon\" />\r\n }\r\n </div>\r\n @if (subtitle()) {\r\n <p class=\"cc-banner__subtitle\">{{ subtitle() }}</p>\r\n }\r\n </div>\r\n @if (backLink()) {\r\n <span class=\"cc-banner__spacer\" aria-hidden=\"true\"></span>\r\n }\r\n</div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_banner-color: var(--cc-banner-color, var(--_heading));--_banner-size: var(--_text-3xl);display:block;margin-bottom:var(--_space-6)}:host(.cc-banner--sm){--_banner-size: var(--_text-2xl)}:host(.cc-banner--lg){--_banner-size: var(--_text-4xl)}.cc-banner{display:flex;align-items:center;gap:var(--_space-3);width:100%;padding:var(--cc-banner-padding, var(--_space-4) var(--_space-5));border-radius:var(--_radius);background:var(--cc-banner-bg, var(--_surface))}:host(.cc-banner--plain) .cc-banner{padding-left:0;padding-right:0;background:var(--cc-banner-bg, transparent)}.cc-banner__text{display:flex;flex:1;flex-direction:column;align-items:center;gap:var(--_space-1);min-width:0;text-align:center}:host(.cc-banner--start) .cc-banner__text{align-items:flex-start;text-align:start}.cc-banner__title{display:flex;align-items:center;gap:var(--_space-2)}h1{margin:0;font-family:var(--_font-heading);font-size:var(--_banner-size);font-style:var(--_heading-style);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);color:var(--_banner-color);overflow-wrap:anywhere}:host(.cc-banner--italic) h1{font-style:italic}.cc-banner__subtitle{margin:0;font-size:var(--_text-md);color:var(--_text-muted)}.cc-banner__icon{flex:none;width:2rem;height:2rem}.cc-banner__back{display:flex;flex:none;align-items:center;justify-content:center;width:var(--_control-height);height:var(--_control-height);border-radius:var(--_radius-pill);color:var(--_banner-color);transition:background-color var(--_duration-fast) var(--_ease)}.cc-banner__back:hover{background:color-mix(in srgb,var(--_banner-color) 10%,transparent)}.cc-banner__back img,.cc-banner__back svg{width:1.75rem;height:1.75rem}.cc-banner__spacer{flex:none;width:var(--_control-height)}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
339
601
|
}
|
|
340
602
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PageBannerComponent, decorators: [{
|
|
341
603
|
type: Component,
|
|
342
|
-
args: [{ selector: 'cc-page-banner', imports: [RouterLink], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
604
|
+
args: [{ selector: 'cc-page-banner', imports: [RouterLink], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
605
|
+
'[class.cc-banner--plain]': "variant() === 'plain'",
|
|
606
|
+
'[class.cc-banner--sm]': "size() === 'sm'",
|
|
607
|
+
'[class.cc-banner--lg]': "size() === 'lg'",
|
|
608
|
+
'[class.cc-banner--italic]': 'italic()',
|
|
609
|
+
'[class.cc-banner--start]': "align() === 'start'",
|
|
610
|
+
}, template: "<div class=\"cc-banner\">\r\n @if (backLink()) {\r\n <a class=\"cc-banner__back\" [routerLink]=\"backLink()\" [attr.aria-label]=\"backLabel()\">\r\n @if (backIconSrc()) {\r\n <img [src]=\"backIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path d=\"M15 18l-6-6 6-6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\" />\r\n </svg>\r\n }\r\n </a>\r\n }\r\n <div class=\"cc-banner__text\">\r\n <div class=\"cc-banner__title\">\r\n <h1>{{ title() }}</h1>\r\n @if (iconSrc()) {\r\n <img [src]=\"iconSrc()\" alt=\"\" class=\"cc-banner__icon\" />\r\n }\r\n </div>\r\n @if (subtitle()) {\r\n <p class=\"cc-banner__subtitle\">{{ subtitle() }}</p>\r\n }\r\n </div>\r\n @if (backLink()) {\r\n <span class=\"cc-banner__spacer\" aria-hidden=\"true\"></span>\r\n }\r\n</div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_banner-color: var(--cc-banner-color, var(--_heading));--_banner-size: var(--_text-3xl);display:block;margin-bottom:var(--_space-6)}:host(.cc-banner--sm){--_banner-size: var(--_text-2xl)}:host(.cc-banner--lg){--_banner-size: var(--_text-4xl)}.cc-banner{display:flex;align-items:center;gap:var(--_space-3);width:100%;padding:var(--cc-banner-padding, var(--_space-4) var(--_space-5));border-radius:var(--_radius);background:var(--cc-banner-bg, var(--_surface))}:host(.cc-banner--plain) .cc-banner{padding-left:0;padding-right:0;background:var(--cc-banner-bg, transparent)}.cc-banner__text{display:flex;flex:1;flex-direction:column;align-items:center;gap:var(--_space-1);min-width:0;text-align:center}:host(.cc-banner--start) .cc-banner__text{align-items:flex-start;text-align:start}.cc-banner__title{display:flex;align-items:center;gap:var(--_space-2)}h1{margin:0;font-family:var(--_font-heading);font-size:var(--_banner-size);font-style:var(--_heading-style);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);color:var(--_banner-color);overflow-wrap:anywhere}:host(.cc-banner--italic) h1{font-style:italic}.cc-banner__subtitle{margin:0;font-size:var(--_text-md);color:var(--_text-muted)}.cc-banner__icon{flex:none;width:2rem;height:2rem}.cc-banner__back{display:flex;flex:none;align-items:center;justify-content:center;width:var(--_control-height);height:var(--_control-height);border-radius:var(--_radius-pill);color:var(--_banner-color);transition:background-color var(--_duration-fast) var(--_ease)}.cc-banner__back:hover{background:color-mix(in srgb,var(--_banner-color) 10%,transparent)}.cc-banner__back img,.cc-banner__back svg{width:1.75rem;height:1.75rem}.cc-banner__spacer{flex:none;width:var(--_control-height)}\n"] }]
|
|
343
611
|
}] });
|
|
344
612
|
|
|
345
613
|
/**
|
|
@@ -348,109 +616,177 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
348
616
|
*
|
|
349
617
|
* ```html
|
|
350
618
|
* <cc-info-item title="Pagos" text="Aceptamos Nequi, Daviplata y efectivo." />
|
|
351
|
-
* <cc-info-item title="
|
|
619
|
+
* <cc-info-item title="Bonos Spa" [text]="texto" headingId="bonos">
|
|
352
620
|
* <ul><li>…</li></ul>
|
|
353
621
|
* </cc-info-item>
|
|
354
622
|
* ```
|
|
623
|
+
*
|
|
624
|
+
* Tokens: --cc-info-title-color, --cc-info-text-color, --cc-info-text-align, --cc-info-max-width.
|
|
355
625
|
*/
|
|
356
626
|
class InfoItemComponent {
|
|
357
627
|
title = input.required();
|
|
358
628
|
text = input('');
|
|
629
|
+
/** `accent` colors the title with the accent text color, `neutral` with the heading color. */
|
|
630
|
+
tone = input('accent');
|
|
631
|
+
size = input('md');
|
|
632
|
+
headingLevel = input('h2');
|
|
633
|
+
/** Id of the heading, for anchors from a table of contents. */
|
|
634
|
+
headingId = input(null);
|
|
359
635
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: InfoItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
360
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: InfoItemComponent, isStandalone: true, selector: "cc-info-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<h2 class=\"cc-info__title\">{{ title() }}</h2>\n@if (text()) {\n <p class=\"cc-info__text\">{{ text() }}</p>\n}\n<ng-content
|
|
636
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: InfoItemComponent, isStandalone: true, selector: "cc-info-item", inputs: { title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, headingId: { classPropertyName: "headingId", publicName: "headingId", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cc-info--neutral": "tone() === 'neutral'", "class.cc-info--sm": "size() === 'sm'" } }, ngImport: i0, template: "@if (headingLevel() === 'h3') {\r\n <h3 class=\"cc-info__title\" [attr.id]=\"headingId()\">{{ title() }}</h3>\r\n} @else {\r\n <h2 class=\"cc-info__title\" [attr.id]=\"headingId()\">{{ title() }}</h2>\r\n}\r\n@if (text()) {\r\n <p class=\"cc-info__text\">{{ text() }}</p>\r\n}\r\n<div class=\"cc-info__extra\"><ng-content /></div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_info-title-color: var(--cc-info-title-color, var(--_accent-text));--_info-title-size: var(--_text-2xl);display:flex;flex-direction:column;gap:var(--_space-3);width:100%;max-width:var(--cc-info-max-width, 70ch);scroll-margin-top:var(--cc-info-scroll-margin, var(--_space-24))}:host(.cc-info--neutral){--_info-title-color: var(--cc-info-title-color, var(--_heading))}:host(.cc-info--sm){--_info-title-size: var(--_text-lg)}.cc-info__title{margin:0;font-family:var(--_font-heading);font-size:var(--_info-title-size);font-style:var(--_heading-style);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);color:var(--_info-title-color);scroll-margin-top:var(--cc-info-scroll-margin, var(--_space-24))}.cc-info__text{margin:0;font-size:var(--_text-md);line-height:var(--_leading-body);text-align:var(--cc-info-text-align, start);color:var(--cc-info-text-color, var(--_text))}.cc-info__extra:empty{display:none}.cc-info__extra{line-height:var(--_leading-body);color:var(--cc-info-text-color, var(--_text))}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
361
637
|
}
|
|
362
638
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: InfoItemComponent, decorators: [{
|
|
363
639
|
type: Component,
|
|
364
|
-
args: [{ selector: 'cc-info-item', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
640
|
+
args: [{ selector: 'cc-info-item', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
641
|
+
'[class.cc-info--neutral]': "tone() === 'neutral'",
|
|
642
|
+
'[class.cc-info--sm]': "size() === 'sm'",
|
|
643
|
+
}, template: "@if (headingLevel() === 'h3') {\r\n <h3 class=\"cc-info__title\" [attr.id]=\"headingId()\">{{ title() }}</h3>\r\n} @else {\r\n <h2 class=\"cc-info__title\" [attr.id]=\"headingId()\">{{ title() }}</h2>\r\n}\r\n@if (text()) {\r\n <p class=\"cc-info__text\">{{ text() }}</p>\r\n}\r\n<div class=\"cc-info__extra\"><ng-content /></div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_info-title-color: var(--cc-info-title-color, var(--_accent-text));--_info-title-size: var(--_text-2xl);display:flex;flex-direction:column;gap:var(--_space-3);width:100%;max-width:var(--cc-info-max-width, 70ch);scroll-margin-top:var(--cc-info-scroll-margin, var(--_space-24))}:host(.cc-info--neutral){--_info-title-color: var(--cc-info-title-color, var(--_heading))}:host(.cc-info--sm){--_info-title-size: var(--_text-lg)}.cc-info__title{margin:0;font-family:var(--_font-heading);font-size:var(--_info-title-size);font-style:var(--_heading-style);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);color:var(--_info-title-color);scroll-margin-top:var(--cc-info-scroll-margin, var(--_space-24))}.cc-info__text{margin:0;font-size:var(--_text-md);line-height:var(--_leading-body);text-align:var(--cc-info-text-align, start);color:var(--cc-info-text-color, var(--_text))}.cc-info__extra:empty{display:none}.cc-info__extra{line-height:var(--_leading-body);color:var(--cc-info-text-color, var(--_text))}\n"] }]
|
|
365
644
|
}] });
|
|
366
645
|
|
|
367
646
|
/**
|
|
368
|
-
* Frequently asked questions as native `<details>` elements, so the answers
|
|
369
|
-
*
|
|
647
|
+
* Frequently asked questions as native `<details>` elements, so the answers stay in
|
|
648
|
+
* the prerendered HTML for search engines. Pass plain `items`, or project
|
|
649
|
+
* `<cc-faq-item>` elements when an answer needs links.
|
|
370
650
|
*
|
|
371
651
|
* ```html
|
|
372
|
-
* <cc-faq title="
|
|
652
|
+
* <cc-faq title="Preguntas frecuentes" [items]="faq" />
|
|
653
|
+
* <cc-faq title="Preguntas frecuentes">
|
|
654
|
+
* <cc-faq-item question="¿Qué planes tienen?">Míralos en <a routerLink="/planes">planes</a>.</cc-faq-item>
|
|
655
|
+
* </cc-faq>
|
|
373
656
|
* ```
|
|
657
|
+
*
|
|
658
|
+
* Tokens: --cc-faq-title-color, --cc-faq-gap, plus the ones of `cc-faq-item`.
|
|
374
659
|
*/
|
|
375
660
|
class FaqComponent {
|
|
376
|
-
items = input
|
|
661
|
+
items = input([]);
|
|
377
662
|
title = input('');
|
|
663
|
+
headingLevel = input('h2');
|
|
378
664
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FaqComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
379
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: FaqComponent, isStandalone: true, selector: "cc-faq", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired:
|
|
665
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: FaqComponent, isStandalone: true, selector: "cc-faq", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (title()) {\r\n @if (headingLevel() === 'h3') {\r\n <h3 class=\"cc-faq__title\">{{ title() }}</h3>\r\n } @else {\r\n <h2 class=\"cc-faq__title\">{{ title() }}</h2>\r\n }\r\n}\r\n<div class=\"cc-faq__list\">\r\n @for (item of items(); track item.question) {\r\n <cc-faq-item [question]=\"item.question\">{{ item.answer }}</cc-faq-item>\r\n }\r\n <ng-content />\r\n</div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:flex;flex-direction:column;gap:var(--_space-6)}.cc-faq__title{font-style:var(--_heading-style);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);margin:0;font-family:var(--_font-heading);font-size:var(--_text-3xl);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);color:var(--cc-faq-title-color, var(--_accent-text))}.cc-faq__list{display:flex;flex-direction:column;gap:var(--cc-faq-gap, var(--_space-3))}\n"], dependencies: [{ kind: "component", type: FaqItemComponent, selector: "cc-faq-item", inputs: ["question", "open"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
380
666
|
}
|
|
381
667
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FaqComponent, decorators: [{
|
|
382
668
|
type: Component,
|
|
383
|
-
args: [{ selector: 'cc-faq', changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (title()) {\n <h2 class=\"cc-faq__title\">{{ title() }}</h2>\n}\n@for (item of items(); track item.question) {\n
|
|
669
|
+
args: [{ selector: 'cc-faq', imports: [FaqItemComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (title()) {\r\n @if (headingLevel() === 'h3') {\r\n <h3 class=\"cc-faq__title\">{{ title() }}</h3>\r\n } @else {\r\n <h2 class=\"cc-faq__title\">{{ title() }}</h2>\r\n }\r\n}\r\n<div class=\"cc-faq__list\">\r\n @for (item of items(); track item.question) {\r\n <cc-faq-item [question]=\"item.question\">{{ item.answer }}</cc-faq-item>\r\n }\r\n <ng-content />\r\n</div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:flex;flex-direction:column;gap:var(--_space-6)}.cc-faq__title{font-style:var(--_heading-style);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);margin:0;font-family:var(--_font-heading);font-size:var(--_text-3xl);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);color:var(--cc-faq-title-color, var(--_accent-text))}.cc-faq__list{display:flex;flex-direction:column;gap:var(--cc-faq-gap, var(--_space-3))}\n"] }]
|
|
384
670
|
}] });
|
|
385
671
|
|
|
386
672
|
/**
|
|
387
|
-
* Row of social network icons that open in a new tab.
|
|
673
|
+
* Row of social network icons that open in a new tab. Each link has a 44px tap area
|
|
674
|
+
* even when the icon is smaller.
|
|
388
675
|
*
|
|
389
676
|
* ```html
|
|
390
|
-
* <cc-social-links [links]="socials" size="
|
|
677
|
+
* <cc-social-links [links]="socials" size="sm" tone="inverse" />
|
|
391
678
|
* ```
|
|
679
|
+
*
|
|
680
|
+
* Tokens: --cc-social-icon-size, --cc-social-gap.
|
|
392
681
|
*/
|
|
393
682
|
class SocialLinksComponent {
|
|
394
683
|
links = input.required();
|
|
395
|
-
/** Icon
|
|
396
|
-
size = input('
|
|
397
|
-
|
|
684
|
+
/** Icon size: `sm` 1rem, `md` 1.5rem, `lg` 2.5rem. */
|
|
685
|
+
size = input('md');
|
|
686
|
+
/** `inverse` for dark backgrounds: changes the hover and focus colors. */
|
|
687
|
+
tone = input('default');
|
|
398
688
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SocialLinksComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
399
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: SocialLinksComponent, isStandalone: true, selector: "cc-social-links", inputs: { links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null },
|
|
689
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: SocialLinksComponent, isStandalone: true, selector: "cc-social-links", inputs: { links: { classPropertyName: "links", publicName: "links", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tone: { classPropertyName: "tone", publicName: "tone", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.cc-social--sm": "size() === 'sm'", "class.cc-social--lg": "size() === 'lg'", "class.cc-social--inverse": "tone() === 'inverse'" } }, ngImport: i0, template: "<ul class=\"cc-social\">\r\n @for (link of links(); track link.href) {\r\n <li>\r\n <a class=\"cc-social__link\" [href]=\"link.href\" target=\"_blank\" rel=\"noopener\" [attr.aria-label]=\"link.label\">\r\n <img [src]=\"link.iconSrc\" alt=\"\" />\r\n </a>\r\n </li>\r\n }\r\n</ul>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_social-size: var(--cc-social-icon-size, 1.5rem);--_social-hover: color-mix(in srgb, var(--_text) 10%, transparent);display:block}:host(.cc-social--sm){--_social-size: var(--cc-social-icon-size, 1rem)}:host(.cc-social--lg){--_social-size: var(--cc-social-icon-size, 2.5rem)}:host(.cc-social--inverse){--_social-hover: rgb(255 255 255 / .15);--_focus-ring: var(--cc-focus-ring, var(--_on-inverse))}.cc-social{display:flex;align-items:center;gap:var(--cc-social-gap, var(--_space-1));margin:0;padding:0;list-style:none}.cc-social__link{display:flex;align-items:center;justify-content:center;min-width:var(--_control-height);min-height:var(--_control-height);border-radius:var(--_radius-pill);transition:background-color var(--_duration-fast) var(--_ease)}.cc-social__link:hover{background:var(--_social-hover)}.cc-social__link img{display:block;width:var(--_social-size);height:var(--_social-size);object-fit:contain}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
400
690
|
}
|
|
401
691
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SocialLinksComponent, decorators: [{
|
|
402
692
|
type: Component,
|
|
403
|
-
args: [{ selector: 'cc-social-links', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
693
|
+
args: [{ selector: 'cc-social-links', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
694
|
+
'[class.cc-social--sm]': "size() === 'sm'",
|
|
695
|
+
'[class.cc-social--lg]': "size() === 'lg'",
|
|
696
|
+
'[class.cc-social--inverse]': "tone() === 'inverse'",
|
|
697
|
+
}, template: "<ul class=\"cc-social\">\r\n @for (link of links(); track link.href) {\r\n <li>\r\n <a class=\"cc-social__link\" [href]=\"link.href\" target=\"_blank\" rel=\"noopener\" [attr.aria-label]=\"link.label\">\r\n <img [src]=\"link.iconSrc\" alt=\"\" />\r\n </a>\r\n </li>\r\n }\r\n</ul>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_social-size: var(--cc-social-icon-size, 1.5rem);--_social-hover: color-mix(in srgb, var(--_text) 10%, transparent);display:block}:host(.cc-social--sm){--_social-size: var(--cc-social-icon-size, 1rem)}:host(.cc-social--lg){--_social-size: var(--cc-social-icon-size, 2.5rem)}:host(.cc-social--inverse){--_social-hover: rgb(255 255 255 / .15);--_focus-ring: var(--cc-focus-ring, var(--_on-inverse))}.cc-social{display:flex;align-items:center;gap:var(--cc-social-gap, var(--_space-1));margin:0;padding:0;list-style:none}.cc-social__link{display:flex;align-items:center;justify-content:center;min-width:var(--_control-height);min-height:var(--_control-height);border-radius:var(--_radius-pill);transition:background-color var(--_duration-fast) var(--_ease)}.cc-social__link:hover{background:var(--_social-hover)}.cc-social__link img{display:block;width:var(--_social-size);height:var(--_social-size);object-fit:contain}\n"] }]
|
|
404
698
|
}] });
|
|
405
699
|
|
|
406
700
|
/**
|
|
407
|
-
* Plan card:
|
|
408
|
-
* With `link
|
|
701
|
+
* Plan card: photo, name, details, price and a call to action.
|
|
702
|
+
* With `link`, the whole card is clickable and navigates with the router; without it,
|
|
703
|
+
* the button emits `ctaClick`. With `skeleton`, it renders a loading placeholder.
|
|
409
704
|
*
|
|
410
705
|
* ```html
|
|
411
|
-
* <cc-plan-card [name]="plan.name" [imageSrc]="plan.imgPath" [
|
|
706
|
+
* <cc-plan-card [name]="plan.name" [imageSrc]="plan.imgPath" [price]="plan.price"
|
|
707
|
+
* meta="2 h · 2 personas" [link]="['/planes', slug]" />
|
|
412
708
|
* ```
|
|
709
|
+
*
|
|
710
|
+
* Tokens: --cc-plan-card-bg, --cc-plan-card-color, --cc-plan-card-border,
|
|
711
|
+
* --cc-plan-card-radius, --cc-plan-card-shadow, --cc-plan-card-image-ratio,
|
|
712
|
+
* --cc-plan-card-price-color.
|
|
413
713
|
*/
|
|
414
714
|
class PlanCardComponent {
|
|
415
|
-
name = input
|
|
416
|
-
imageSrc = input
|
|
715
|
+
name = input('');
|
|
716
|
+
imageSrc = input('');
|
|
417
717
|
/** Defaults to `name`. */
|
|
418
718
|
imageAlt = input('');
|
|
419
|
-
/**
|
|
420
|
-
|
|
719
|
+
/** Short line under the name, for example "2 h 20 min · 2 personas". */
|
|
720
|
+
meta = input('');
|
|
721
|
+
/** Price to show. Leave it null to hide it. */
|
|
722
|
+
price = input(null);
|
|
723
|
+
/** Text before the price, for example "Desde". */
|
|
724
|
+
priceLabel = input('');
|
|
725
|
+
priceFormat = input({});
|
|
421
726
|
link = input(null);
|
|
422
|
-
|
|
727
|
+
/** Query params of `link`, for example `{ categoria: 'pareja' }`. */
|
|
728
|
+
queryParams = input(null);
|
|
729
|
+
ctaLabel = input('Ver plan');
|
|
730
|
+
ctaVariant = input('primary');
|
|
731
|
+
/** `filled` uses the surface color, `outlined` a border on white, `plain` no box. */
|
|
732
|
+
appearance = input('filled');
|
|
733
|
+
/** Heading level of the name inside the page outline. */
|
|
734
|
+
headingLevel = input('h2');
|
|
735
|
+
/** Renders a loading placeholder instead of the content. */
|
|
736
|
+
skeleton = input(false);
|
|
423
737
|
ctaClick = output();
|
|
738
|
+
formattedPrice = computed(() => {
|
|
739
|
+
const price = this.price();
|
|
740
|
+
return price === null ? '' : formatPrice(price, this.priceFormat());
|
|
741
|
+
});
|
|
424
742
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlanCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
425
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PlanCardComponent, isStandalone: true, selector: "cc-plan-card", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: true, transformFunction: null }, imageAlt: { classPropertyName: "imageAlt", publicName: "imageAlt", isSignal: true, isRequired: false, transformFunction: null }, subtitle: { classPropertyName: "subtitle", publicName: "subtitle", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, ngImport: i0, template: "<article class=\"cc-card\">\n <img\n class=\"cc-card__img\"\n [src]=\"imageSrc()\"\n [alt]=\"imageAlt() || name()\"\n loading=\"lazy\"\n decoding=\"async\"\n />\n <h2 class=\"cc-card__name\">{{ name() }}</h2>\n @if (subtitle()) {\n <p class=\"cc-card__subtitle\">{{ subtitle() }}</p>\n }\n @if (link()) {\n <a class=\"cc-card__cta\" [routerLink]=\"link()\" (click)=\"ctaClick.emit()\">{{ ctaLabel() }}</a>\n } @else {\n <button type=\"button\" class=\"cc-card__cta\" (click)=\"ctaClick.emit()\">{{ ctaLabel() }}</button>\n }\n</article>\n", styles: [":host{display:block;width:100%;max-width:var(--cc-plan-card-width, 22rem)}.cc-card{box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:space-around;width:100%;height:var(--cc-plan-card-height, 24rem);padding:1.25rem;background:var(--cc-plan-card-bg, var(--cc-surface, var(--cc-secondary-light, #f8f4ee)));border-radius:var(--cc-radius, 0);box-shadow:var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1))}@media (min-width: 1024px){:host{max-width:var(--cc-plan-card-width-lg, 15rem)}}.cc-card__img{width:13rem;max-width:100%;box-shadow:var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1))}.cc-card__name{margin:0;font-size:1rem;font-weight:400;text-align:center;color:var(--cc-plan-card-color, inherit)}.cc-card__subtitle{margin:0;font-weight:600;color:var(--cc-heading, var(--cc-primary, #4c6b4a))}.cc-card__cta{padding:.5rem 1.5rem;border:0;font:inherit;text-decoration:none;color:var(--cc-on-accent, var(--cc-bg, #f0ffef));background:var(--cc-plan-card-cta-bg, var(--cc-accent, var(--cc-secondary, #ceab5d)));cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color .3s ease-in,color .3s ease-in}.cc-card__cta:hover{background:var(--cc-plan-card-cta-hover-bg, var(--cc-accent-hover, var(--cc-secondary-dark, #9a7521)))}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
743
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PlanCardComponent, isStandalone: true, selector: "cc-plan-card", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, imageSrc: { classPropertyName: "imageSrc", publicName: "imageSrc", isSignal: true, isRequired: false, transformFunction: null }, imageAlt: { classPropertyName: "imageAlt", publicName: "imageAlt", isSignal: true, isRequired: false, transformFunction: null }, meta: { classPropertyName: "meta", publicName: "meta", isSignal: true, isRequired: false, transformFunction: null }, price: { classPropertyName: "price", publicName: "price", isSignal: true, isRequired: false, transformFunction: null }, priceLabel: { classPropertyName: "priceLabel", publicName: "priceLabel", isSignal: true, isRequired: false, transformFunction: null }, priceFormat: { classPropertyName: "priceFormat", publicName: "priceFormat", isSignal: true, isRequired: false, transformFunction: null }, link: { classPropertyName: "link", publicName: "link", isSignal: true, isRequired: false, transformFunction: null }, queryParams: { classPropertyName: "queryParams", publicName: "queryParams", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaVariant: { classPropertyName: "ctaVariant", publicName: "ctaVariant", isSignal: true, isRequired: false, transformFunction: null }, appearance: { classPropertyName: "appearance", publicName: "appearance", isSignal: true, isRequired: false, transformFunction: null }, headingLevel: { classPropertyName: "headingLevel", publicName: "headingLevel", isSignal: true, isRequired: false, transformFunction: null }, skeleton: { classPropertyName: "skeleton", publicName: "skeleton", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { ctaClick: "ctaClick" }, host: { properties: { "class.cc-card--outlined": "appearance() === 'outlined'", "class.cc-card--plain": "appearance() === 'plain'", "class.cc-card--skeleton": "skeleton()", "attr.aria-busy": "skeleton() || null" } }, ngImport: i0, template: "@if (skeleton()) {\r\n <article class=\"cc-card\" aria-hidden=\"true\">\r\n <div class=\"cc-card__media cc-card__shimmer\"></div>\r\n <div class=\"cc-card__body\">\r\n <span class=\"cc-card__line cc-card__shimmer\"></span>\r\n <span class=\"cc-card__line cc-card__line--short cc-card__shimmer\"></span>\r\n <span class=\"cc-card__line cc-card__line--button cc-card__shimmer\"></span>\r\n </div>\r\n </article>\r\n} @else {\r\n <article class=\"cc-card\" [class.cc-card--linked]=\"!!link()\">\r\n <div class=\"cc-card__media\">\r\n <img\r\n class=\"cc-card__img\"\r\n [src]=\"imageSrc()\"\r\n [alt]=\"imageAlt() || name()\"\r\n width=\"400\"\r\n height=\"400\"\r\n loading=\"lazy\"\r\n decoding=\"async\"\r\n />\r\n </div>\r\n <div class=\"cc-card__body\">\r\n @if (headingLevel() === 'h3') {\r\n <h3 class=\"cc-card__name\">{{ name() }}</h3>\r\n } @else {\r\n <h2 class=\"cc-card__name\">{{ name() }}</h2>\r\n }\r\n @if (meta()) {\r\n <p class=\"cc-card__meta\">{{ meta() }}</p>\r\n }\r\n @if (formattedPrice()) {\r\n <p class=\"cc-card__price\">\r\n @if (priceLabel()) {\r\n <span class=\"cc-card__price-label\">{{ priceLabel() }}</span>\r\n }\r\n {{ formattedPrice() }}\r\n </p>\r\n }\r\n <div class=\"cc-card__actions\">\r\n @if (link()) {\r\n <a ccButton [variant]=\"ctaVariant()\" block class=\"cc-card__cta\" [routerLink]=\"link()\" [queryParams]=\"queryParams()\" (click)=\"ctaClick.emit()\">\r\n {{ ctaLabel() }}<span class=\"cc-sr-only\">: {{ name() }}</span>\r\n </a>\r\n } @else {\r\n <button ccButton [variant]=\"ctaVariant()\" block type=\"button\" (click)=\"ctaClick.emit()\">{{ ctaLabel() }}</button>\r\n }\r\n </div>\r\n </div>\r\n </article>\r\n}\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_card-bg: var(--cc-plan-card-bg, var(--_surface));--_card-border: var(--cc-plan-card-border, transparent);--_card-shadow: var(--cc-plan-card-shadow, var(--_shadow));display:block;width:100%;height:100%}:host(.cc-card--outlined){--_card-bg: var(--cc-plan-card-bg, var(--_canvas));--_card-border: var(--cc-plan-card-border, var(--_border));--_card-shadow: var(--cc-plan-card-shadow, none)}:host(.cc-card--plain){--_card-bg: var(--cc-plan-card-bg, transparent);--_card-shadow: var(--cc-plan-card-shadow, none)}.cc-card{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;border:1px solid var(--_card-border);border-radius:var(--cc-plan-card-radius, var(--_radius));color:var(--cc-plan-card-color, var(--_text));background:var(--_card-bg);box-shadow:var(--_card-shadow);transition:box-shadow var(--_duration) var(--_ease),transform var(--_duration) var(--_ease)}.cc-card--linked:hover{box-shadow:var(--_shadow-lg);transform:translateY(-2px)}.cc-card--linked:hover .cc-card__img{transform:scale(1.03)}.cc-card__media{aspect-ratio:var(--cc-plan-card-image-ratio, 1);overflow:hidden;background:var(--_surface-alt)}.cc-card__img{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--_duration) var(--_ease)}.cc-card__body{display:flex;flex:1;flex-direction:column;gap:var(--_space-2);padding:var(--_space-5)}.cc-card__name{font-style:var(--_heading-style);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);margin:0;font-family:var(--_font-heading);font-size:var(--_text-lg);font-weight:var(--_weight-bold);line-height:var(--_leading-snug);color:var(--_heading)}.cc-card__meta{margin:0;font-size:var(--_text-sm);color:var(--_text-muted)}.cc-card__price{display:flex;align-items:baseline;gap:var(--_space-2);margin:var(--_space-1) 0 0;font-size:var(--_text-xl);font-weight:var(--_weight-bold);color:var(--cc-plan-card-price-color, var(--_heading))}.cc-card__price-label{font-size:var(--_text-sm);font-weight:var(--_weight-regular);color:var(--_text-muted)}.cc-card__actions{margin-top:auto;padding-top:var(--_space-3)}.cc-card__cta:after{content:\"\";position:absolute;inset:0}.cc-card__shimmer{background:linear-gradient(90deg,color-mix(in srgb,var(--_text) 6%,transparent) 25%,color-mix(in srgb,var(--_text) 12%,transparent),color-mix(in srgb,var(--_text) 6%,transparent) 75%);background-size:200% 100%;animation:cc-shimmer 1.2s linear infinite}.cc-card__line{display:block;height:1rem;width:80%;border-radius:var(--_radius-sm)}.cc-card__line--short{width:45%}.cc-card__line--button{width:100%;height:var(--_control-height);margin-top:auto}:host(.cc-card--skeleton) .cc-card__body{gap:var(--_space-3);min-height:9rem}@keyframes cc-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"], dependencies: [{ kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ButtonComponent, selector: "a[ccButton], button[ccButton]", inputs: ["variant", "size", "block"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
426
744
|
}
|
|
427
745
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlanCardComponent, decorators: [{
|
|
428
746
|
type: Component,
|
|
429
|
-
args: [{ selector: 'cc-plan-card', imports: [RouterLink], changeDetection: ChangeDetectionStrategy.OnPush,
|
|
747
|
+
args: [{ selector: 'cc-plan-card', imports: [RouterLink, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
748
|
+
'[class.cc-card--outlined]': "appearance() === 'outlined'",
|
|
749
|
+
'[class.cc-card--plain]': "appearance() === 'plain'",
|
|
750
|
+
'[class.cc-card--skeleton]': 'skeleton()',
|
|
751
|
+
'[attr.aria-busy]': 'skeleton() || null',
|
|
752
|
+
}, template: "@if (skeleton()) {\r\n <article class=\"cc-card\" aria-hidden=\"true\">\r\n <div class=\"cc-card__media cc-card__shimmer\"></div>\r\n <div class=\"cc-card__body\">\r\n <span class=\"cc-card__line cc-card__shimmer\"></span>\r\n <span class=\"cc-card__line cc-card__line--short cc-card__shimmer\"></span>\r\n <span class=\"cc-card__line cc-card__line--button cc-card__shimmer\"></span>\r\n </div>\r\n </article>\r\n} @else {\r\n <article class=\"cc-card\" [class.cc-card--linked]=\"!!link()\">\r\n <div class=\"cc-card__media\">\r\n <img\r\n class=\"cc-card__img\"\r\n [src]=\"imageSrc()\"\r\n [alt]=\"imageAlt() || name()\"\r\n width=\"400\"\r\n height=\"400\"\r\n loading=\"lazy\"\r\n decoding=\"async\"\r\n />\r\n </div>\r\n <div class=\"cc-card__body\">\r\n @if (headingLevel() === 'h3') {\r\n <h3 class=\"cc-card__name\">{{ name() }}</h3>\r\n } @else {\r\n <h2 class=\"cc-card__name\">{{ name() }}</h2>\r\n }\r\n @if (meta()) {\r\n <p class=\"cc-card__meta\">{{ meta() }}</p>\r\n }\r\n @if (formattedPrice()) {\r\n <p class=\"cc-card__price\">\r\n @if (priceLabel()) {\r\n <span class=\"cc-card__price-label\">{{ priceLabel() }}</span>\r\n }\r\n {{ formattedPrice() }}\r\n </p>\r\n }\r\n <div class=\"cc-card__actions\">\r\n @if (link()) {\r\n <a ccButton [variant]=\"ctaVariant()\" block class=\"cc-card__cta\" [routerLink]=\"link()\" [queryParams]=\"queryParams()\" (click)=\"ctaClick.emit()\">\r\n {{ ctaLabel() }}<span class=\"cc-sr-only\">: {{ name() }}</span>\r\n </a>\r\n } @else {\r\n <button ccButton [variant]=\"ctaVariant()\" block type=\"button\" (click)=\"ctaClick.emit()\">{{ ctaLabel() }}</button>\r\n }\r\n </div>\r\n </div>\r\n </article>\r\n}\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_card-bg: var(--cc-plan-card-bg, var(--_surface));--_card-border: var(--cc-plan-card-border, transparent);--_card-shadow: var(--cc-plan-card-shadow, var(--_shadow));display:block;width:100%;height:100%}:host(.cc-card--outlined){--_card-bg: var(--cc-plan-card-bg, var(--_canvas));--_card-border: var(--cc-plan-card-border, var(--_border));--_card-shadow: var(--cc-plan-card-shadow, none)}:host(.cc-card--plain){--_card-bg: var(--cc-plan-card-bg, transparent);--_card-shadow: var(--cc-plan-card-shadow, none)}.cc-card{position:relative;display:flex;flex-direction:column;height:100%;overflow:hidden;border:1px solid var(--_card-border);border-radius:var(--cc-plan-card-radius, var(--_radius));color:var(--cc-plan-card-color, var(--_text));background:var(--_card-bg);box-shadow:var(--_card-shadow);transition:box-shadow var(--_duration) var(--_ease),transform var(--_duration) var(--_ease)}.cc-card--linked:hover{box-shadow:var(--_shadow-lg);transform:translateY(-2px)}.cc-card--linked:hover .cc-card__img{transform:scale(1.03)}.cc-card__media{aspect-ratio:var(--cc-plan-card-image-ratio, 1);overflow:hidden;background:var(--_surface-alt)}.cc-card__img{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--_duration) var(--_ease)}.cc-card__body{display:flex;flex:1;flex-direction:column;gap:var(--_space-2);padding:var(--_space-5)}.cc-card__name{font-style:var(--_heading-style);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);margin:0;font-family:var(--_font-heading);font-size:var(--_text-lg);font-weight:var(--_weight-bold);line-height:var(--_leading-snug);color:var(--_heading)}.cc-card__meta{margin:0;font-size:var(--_text-sm);color:var(--_text-muted)}.cc-card__price{display:flex;align-items:baseline;gap:var(--_space-2);margin:var(--_space-1) 0 0;font-size:var(--_text-xl);font-weight:var(--_weight-bold);color:var(--cc-plan-card-price-color, var(--_heading))}.cc-card__price-label{font-size:var(--_text-sm);font-weight:var(--_weight-regular);color:var(--_text-muted)}.cc-card__actions{margin-top:auto;padding-top:var(--_space-3)}.cc-card__cta:after{content:\"\";position:absolute;inset:0}.cc-card__shimmer{background:linear-gradient(90deg,color-mix(in srgb,var(--_text) 6%,transparent) 25%,color-mix(in srgb,var(--_text) 12%,transparent),color-mix(in srgb,var(--_text) 6%,transparent) 75%);background-size:200% 100%;animation:cc-shimmer 1.2s linear infinite}.cc-card__line{display:block;height:1rem;width:80%;border-radius:var(--_radius-sm)}.cc-card__line--short{width:45%}.cc-card__line--button{width:100%;height:var(--_control-height);margin-top:auto}:host(.cc-card--skeleton) .cc-card__body{gap:var(--_space-3);min-height:9rem}@keyframes cc-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}\n"] }]
|
|
430
753
|
}] });
|
|
431
754
|
|
|
432
755
|
/**
|
|
433
|
-
*
|
|
434
|
-
*
|
|
756
|
+
* Category selector with a single selected option. Each option is a toggle button
|
|
757
|
+
* (`aria-pressed`), so it works with Tab and Enter/Space.
|
|
758
|
+
*
|
|
759
|
+
* `layout`:
|
|
760
|
+
* - `list`: vertical list, for sidebars.
|
|
761
|
+
* - `chips`: one scrollable row of pills, for small screens.
|
|
762
|
+
* - `auto` (default): chips below 1024px, list from 1024px.
|
|
435
763
|
*
|
|
436
764
|
* ```html
|
|
437
765
|
* <cc-category-menu [options]="categories" [(selected)]="category" />
|
|
438
766
|
* ```
|
|
767
|
+
*
|
|
768
|
+
* Tokens: --cc-category-color, --cc-category-hover-bg, --cc-category-active-bg,
|
|
769
|
+
* --cc-category-active-color, --cc-category-chip-border.
|
|
439
770
|
*/
|
|
440
771
|
class CategoryMenuComponent {
|
|
441
772
|
options = input.required();
|
|
442
773
|
/** Selected value. Use `[(selected)]` to bind both ways. */
|
|
443
774
|
selected = model(null);
|
|
444
|
-
title = input('
|
|
775
|
+
title = input('Categorías');
|
|
776
|
+
layout = input('auto');
|
|
445
777
|
select(value) {
|
|
446
778
|
this.selected.set(value);
|
|
447
779
|
}
|
|
448
780
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CategoryMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
449
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: CategoryMenuComponent, isStandalone: true, selector: "cc-category-menu", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, ngImport: i0, template: "<
|
|
781
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: CategoryMenuComponent, isStandalone: true, selector: "cc-category-menu", inputs: { options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: true, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, title: { classPropertyName: "title", publicName: "title", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selectedChange" }, host: { properties: { "class.cc-cat--list": "layout() === 'list'", "class.cc-cat--chips": "layout() === 'chips'", "class.cc-cat--auto": "layout() === 'auto'" } }, ngImport: i0, template: "<nav class=\"cc-cat\" [attr.aria-label]=\"title() || null\">\r\n @if (title()) {\r\n <p class=\"cc-cat__title\">{{ title() }}</p>\r\n }\r\n <ul class=\"cc-cat__list\">\r\n @for (option of options(); track option.value) {\r\n <li>\r\n <button\r\n type=\"button\"\r\n class=\"cc-cat__item\"\r\n [class.cc-cat__item--active]=\"option.value === selected()\"\r\n [attr.aria-pressed]=\"option.value === selected()\"\r\n (click)=\"select(option.value)\"\r\n >\r\n <span>{{ option.label }}</span>\r\n @if (option.count !== undefined && option.count !== null) {\r\n <span class=\"cc-cat__count\"><span class=\"cc-sr-only\">(</span>{{ option.count }}<span class=\"cc-sr-only\"> planes)</span></span>\r\n }\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n</nav>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_cat-color: var(--cc-category-color, var(--_text));--_cat-hover-bg: var(--cc-category-hover-bg, color-mix(in srgb, var(--_text) 6%, transparent));--_cat-active-bg: var(--cc-category-active-bg, var(--_accent));--_cat-active-color: var(--cc-category-active-color, var(--_on-accent));display:block}.cc-cat__title{margin:0 0 var(--_space-3);font-size:var(--_text-sm);font-weight:var(--_weight-semibold);letter-spacing:var(--_tracking-wide);text-transform:uppercase;color:var(--_cat-color)}.cc-cat__list{display:flex;margin:0;padding:0;list-style:none}.cc-cat__item{display:flex;align-items:center;justify-content:space-between;gap:var(--_space-3);width:100%;min-height:var(--_control-height);padding:var(--_space-2) var(--_space-4);border:0;border-radius:var(--_radius);font:inherit;font-size:var(--_text-md);color:var(--_cat-color);background:transparent;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--_duration-fast) var(--_ease),color var(--_duration-fast) var(--_ease)}.cc-cat__item:hover{background:var(--_cat-hover-bg)}.cc-cat__item--active,.cc-cat__item--active:hover{font-weight:var(--_weight-bold);color:var(--_cat-active-color);background:var(--_cat-active-bg)}.cc-cat__count{min-width:1.75rem;padding:0 var(--_space-2);border-radius:var(--_radius-pill);font-size:var(--_text-sm);font-weight:var(--_weight-semibold);line-height:1.5rem;text-align:center;background:color-mix(in srgb,currentColor 12%,transparent)}:host(.cc-cat--list) .cc-cat__list{flex-direction:column;gap:var(--_space-1)}:host(.cc-cat--list) .cc-cat__item{min-height:3.5rem}:host(.cc-cat--chips) .cc-cat__title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}:host(.cc-cat--chips) .cc-cat__list{gap:var(--_space-2);overflow-x:auto;scrollbar-width:none;padding:var(--_space-1);margin:calc(-1 * var(--_space-1))}:host(.cc-cat--chips) .cc-cat__item{width:auto;white-space:nowrap;border:1px solid var(--cc-category-chip-border, var(--_border-strong));border-radius:var(--_radius-pill)}:host(.cc-cat--chips) .cc-cat__item--active{border-color:var(--_cat-active-bg)}:host(.cc-cat--auto) .cc-cat__list{gap:var(--_space-2);overflow-x:auto;scrollbar-width:none;padding:var(--_space-1);margin:calc(-1 * var(--_space-1))}:host(.cc-cat--auto) .cc-cat__title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}:host(.cc-cat--auto) .cc-cat__item{width:auto;white-space:nowrap;border:1px solid var(--cc-category-chip-border, var(--_border-strong));border-radius:var(--_radius-pill)}:host(.cc-cat--auto) .cc-cat__item--active{border-color:var(--_cat-active-bg)}@media (min-width: 1024px){:host(.cc-cat--auto) .cc-cat__title{position:static;width:auto;height:auto;overflow:visible;clip:auto}:host(.cc-cat--auto) .cc-cat__list{flex-direction:column;gap:var(--_space-1);overflow:visible;padding:0;margin:0}:host(.cc-cat--auto) .cc-cat__item{width:100%;min-height:3.5rem;border:0;border-radius:var(--_radius)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
450
782
|
}
|
|
451
783
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CategoryMenuComponent, decorators: [{
|
|
452
784
|
type: Component,
|
|
453
|
-
args: [{ selector: 'cc-category-menu', changeDetection: ChangeDetectionStrategy.OnPush,
|
|
785
|
+
args: [{ selector: 'cc-category-menu', changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
786
|
+
'[class.cc-cat--list]': "layout() === 'list'",
|
|
787
|
+
'[class.cc-cat--chips]': "layout() === 'chips'",
|
|
788
|
+
'[class.cc-cat--auto]': "layout() === 'auto'",
|
|
789
|
+
}, template: "<nav class=\"cc-cat\" [attr.aria-label]=\"title() || null\">\r\n @if (title()) {\r\n <p class=\"cc-cat__title\">{{ title() }}</p>\r\n }\r\n <ul class=\"cc-cat__list\">\r\n @for (option of options(); track option.value) {\r\n <li>\r\n <button\r\n type=\"button\"\r\n class=\"cc-cat__item\"\r\n [class.cc-cat__item--active]=\"option.value === selected()\"\r\n [attr.aria-pressed]=\"option.value === selected()\"\r\n (click)=\"select(option.value)\"\r\n >\r\n <span>{{ option.label }}</span>\r\n @if (option.count !== undefined && option.count !== null) {\r\n <span class=\"cc-cat__count\"><span class=\"cc-sr-only\">(</span>{{ option.count }}<span class=\"cc-sr-only\"> planes)</span></span>\r\n }\r\n </button>\r\n </li>\r\n }\r\n </ul>\r\n</nav>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_cat-color: var(--cc-category-color, var(--_text));--_cat-hover-bg: var(--cc-category-hover-bg, color-mix(in srgb, var(--_text) 6%, transparent));--_cat-active-bg: var(--cc-category-active-bg, var(--_accent));--_cat-active-color: var(--cc-category-active-color, var(--_on-accent));display:block}.cc-cat__title{margin:0 0 var(--_space-3);font-size:var(--_text-sm);font-weight:var(--_weight-semibold);letter-spacing:var(--_tracking-wide);text-transform:uppercase;color:var(--_cat-color)}.cc-cat__list{display:flex;margin:0;padding:0;list-style:none}.cc-cat__item{display:flex;align-items:center;justify-content:space-between;gap:var(--_space-3);width:100%;min-height:var(--_control-height);padding:var(--_space-2) var(--_space-4);border:0;border-radius:var(--_radius);font:inherit;font-size:var(--_text-md);color:var(--_cat-color);background:transparent;cursor:pointer;-webkit-user-select:none;user-select:none;transition:background-color var(--_duration-fast) var(--_ease),color var(--_duration-fast) var(--_ease)}.cc-cat__item:hover{background:var(--_cat-hover-bg)}.cc-cat__item--active,.cc-cat__item--active:hover{font-weight:var(--_weight-bold);color:var(--_cat-active-color);background:var(--_cat-active-bg)}.cc-cat__count{min-width:1.75rem;padding:0 var(--_space-2);border-radius:var(--_radius-pill);font-size:var(--_text-sm);font-weight:var(--_weight-semibold);line-height:1.5rem;text-align:center;background:color-mix(in srgb,currentColor 12%,transparent)}:host(.cc-cat--list) .cc-cat__list{flex-direction:column;gap:var(--_space-1)}:host(.cc-cat--list) .cc-cat__item{min-height:3.5rem}:host(.cc-cat--chips) .cc-cat__title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}:host(.cc-cat--chips) .cc-cat__list{gap:var(--_space-2);overflow-x:auto;scrollbar-width:none;padding:var(--_space-1);margin:calc(-1 * var(--_space-1))}:host(.cc-cat--chips) .cc-cat__item{width:auto;white-space:nowrap;border:1px solid var(--cc-category-chip-border, var(--_border-strong));border-radius:var(--_radius-pill)}:host(.cc-cat--chips) .cc-cat__item--active{border-color:var(--_cat-active-bg)}:host(.cc-cat--auto) .cc-cat__list{gap:var(--_space-2);overflow-x:auto;scrollbar-width:none;padding:var(--_space-1);margin:calc(-1 * var(--_space-1))}:host(.cc-cat--auto) .cc-cat__title{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}:host(.cc-cat--auto) .cc-cat__item{width:auto;white-space:nowrap;border:1px solid var(--cc-category-chip-border, var(--_border-strong));border-radius:var(--_radius-pill)}:host(.cc-cat--auto) .cc-cat__item--active{border-color:var(--_cat-active-bg)}@media (min-width: 1024px){:host(.cc-cat--auto) .cc-cat__title{position:static;width:auto;height:auto;overflow:visible;clip:auto}:host(.cc-cat--auto) .cc-cat__list{flex-direction:column;gap:var(--_space-1);overflow:visible;padding:0;margin:0}:host(.cc-cat--auto) .cc-cat__item{width:100%;min-height:3.5rem;border:0;border-radius:var(--_radius)}}\n"] }]
|
|
454
790
|
}] });
|
|
455
791
|
|
|
456
792
|
/**
|
|
@@ -459,10 +795,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
459
795
|
* ```html
|
|
460
796
|
* <cc-search-box placeholder="Buscar plan" [(value)]="query" (search)="onSearch($event)" />
|
|
461
797
|
* ```
|
|
798
|
+
*
|
|
799
|
+
* Tokens: --cc-search-bg, --cc-search-border, --cc-search-btn-bg, --cc-search-btn-color,
|
|
800
|
+
* --cc-search-radius.
|
|
462
801
|
*/
|
|
463
802
|
class SearchBoxComponent {
|
|
464
803
|
value = model('');
|
|
465
804
|
placeholder = input('Buscar plan');
|
|
805
|
+
/** Accessible name of the field. Defaults to `placeholder`. */
|
|
806
|
+
label = input('');
|
|
466
807
|
buttonLabel = input('Buscar');
|
|
467
808
|
iconSrc = input('');
|
|
468
809
|
search = output();
|
|
@@ -470,35 +811,50 @@ class SearchBoxComponent {
|
|
|
470
811
|
this.value.set(event.target.value);
|
|
471
812
|
}
|
|
472
813
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SearchBoxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
473
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: SearchBoxComponent, isStandalone: true, selector: "cc-search-box", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", search: "search" }, ngImport: i0, template: "<form class=\"cc-search\" role=\"search\" (submit)=\"$event.preventDefault(); search.emit(value())\">\n <input\n type=\"search\"\n class=\"cc-search__input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"placeholder()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n />\n <button type=\"submit\" class=\"cc-search__btn\" [attr.aria-label]=\"buttonLabel()\">\n @if (iconSrc()) {\n <img [src]=\"iconSrc()\" alt=\"\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"m20 20-3.5-3.5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n </button>\n</form>\n", styles: [":host{display:block}.cc-search{display:flex;width:100%;margin:0}.cc-search__input{flex:1;min-width:0;padding:0
|
|
814
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: SearchBoxComponent, isStandalone: true, selector: "cc-search-box", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, buttonLabel: { classPropertyName: "buttonLabel", publicName: "buttonLabel", isSignal: true, isRequired: false, transformFunction: null }, iconSrc: { classPropertyName: "iconSrc", publicName: "iconSrc", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", search: "search" }, ngImport: i0, template: "<form class=\"cc-search\" role=\"search\" (submit)=\"$event.preventDefault(); search.emit(value())\">\r\n <input\r\n type=\"search\"\r\n class=\"cc-search__input\"\r\n [placeholder]=\"placeholder()\"\r\n [attr.aria-label]=\"label() || placeholder()\"\r\n [value]=\"value()\"\r\n (input)=\"onInput($event)\"\r\n />\r\n <button type=\"submit\" class=\"cc-search__btn\" [attr.aria-label]=\"buttonLabel()\">\r\n @if (iconSrc()) {\r\n <img [src]=\"iconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <circle cx=\"11\" cy=\"11\" r=\"7\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"m20 20-3.5-3.5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n }\r\n </button>\r\n</form>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_search-border: var(--cc-search-border, var(--_border-strong));--_search-radius: var(--cc-search-radius, var(--_radius));display:block}.cc-search{display:flex;width:100%;margin:0;border-radius:var(--_search-radius)}.cc-search:focus-within{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-search__input{flex:1;min-width:0;min-height:var(--_control-height);padding:0 var(--_space-4);border:1px solid var(--_search-border);border-right:0;border-radius:var(--_search-radius) 0 0 var(--_search-radius);font:inherit;font-size:var(--_text-md);color:var(--_text);background:var(--cc-search-bg, var(--_canvas))}.cc-search__input::placeholder{color:var(--_text-muted);opacity:1}.cc-search__input:focus,.cc-search__input:focus-visible{outline:none}.cc-search__btn{display:flex;flex:none;align-items:center;justify-content:center;width:var(--_control-height);min-height:var(--_control-height);padding:0;border:0;border-radius:0 var(--_search-radius) var(--_search-radius) 0;color:var(--cc-search-btn-color, var(--_on-accent));background:var(--cc-search-btn-bg, var(--_accent));cursor:pointer;transition:background-color var(--_duration-fast) var(--_ease)}.cc-search__btn:hover{background:var(--_accent-hover)}.cc-search__btn:focus-visible{outline:none}.cc-search__btn img,.cc-search__btn svg{width:1.25rem;height:1.25rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
474
815
|
}
|
|
475
816
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: SearchBoxComponent, decorators: [{
|
|
476
817
|
type: Component,
|
|
477
|
-
args: [{ selector: 'cc-search-box', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form class=\"cc-search\" role=\"search\" (submit)=\"$event.preventDefault(); search.emit(value())\">\n <input\n type=\"search\"\n class=\"cc-search__input\"\n [placeholder]=\"placeholder()\"\n [attr.aria-label]=\"placeholder()\"\n [value]=\"value()\"\n (input)=\"onInput($event)\"\n />\n <button type=\"submit\" class=\"cc-search__btn\" [attr.aria-label]=\"buttonLabel()\">\n @if (iconSrc()) {\n <img [src]=\"iconSrc()\" alt=\"\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"11\" cy=\"11\" r=\"7\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"m20 20-3.5-3.5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n </button>\n</form>\n", styles: [":host{display:block}.cc-search{display:flex;width:100%;margin:0}.cc-search__input{flex:1;min-width:0;padding:0
|
|
818
|
+
args: [{ selector: 'cc-search-box', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form class=\"cc-search\" role=\"search\" (submit)=\"$event.preventDefault(); search.emit(value())\">\r\n <input\r\n type=\"search\"\r\n class=\"cc-search__input\"\r\n [placeholder]=\"placeholder()\"\r\n [attr.aria-label]=\"label() || placeholder()\"\r\n [value]=\"value()\"\r\n (input)=\"onInput($event)\"\r\n />\r\n <button type=\"submit\" class=\"cc-search__btn\" [attr.aria-label]=\"buttonLabel()\">\r\n @if (iconSrc()) {\r\n <img [src]=\"iconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <circle cx=\"11\" cy=\"11\" r=\"7\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"m20 20-3.5-3.5\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n }\r\n </button>\r\n</form>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_search-border: var(--cc-search-border, var(--_border-strong));--_search-radius: var(--cc-search-radius, var(--_radius));display:block}.cc-search{display:flex;width:100%;margin:0;border-radius:var(--_search-radius)}.cc-search:focus-within{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-search__input{flex:1;min-width:0;min-height:var(--_control-height);padding:0 var(--_space-4);border:1px solid var(--_search-border);border-right:0;border-radius:var(--_search-radius) 0 0 var(--_search-radius);font:inherit;font-size:var(--_text-md);color:var(--_text);background:var(--cc-search-bg, var(--_canvas))}.cc-search__input::placeholder{color:var(--_text-muted);opacity:1}.cc-search__input:focus,.cc-search__input:focus-visible{outline:none}.cc-search__btn{display:flex;flex:none;align-items:center;justify-content:center;width:var(--_control-height);min-height:var(--_control-height);padding:0;border:0;border-radius:0 var(--_search-radius) var(--_search-radius) 0;color:var(--cc-search-btn-color, var(--_on-accent));background:var(--cc-search-btn-bg, var(--_accent));cursor:pointer;transition:background-color var(--_duration-fast) var(--_ease)}.cc-search__btn:hover{background:var(--_accent-hover)}.cc-search__btn:focus-visible{outline:none}.cc-search__btn img,.cc-search__btn svg{width:1.25rem;height:1.25rem}\n"] }]
|
|
478
819
|
}] });
|
|
479
820
|
|
|
480
821
|
/**
|
|
481
822
|
* Filter by included service and price range. The options come in as inputs,
|
|
482
823
|
* so the form does not load data by itself.
|
|
483
824
|
*
|
|
825
|
+
* `mode`:
|
|
826
|
+
* - `instant` (default): emits `filterChange` as soon as an option changes.
|
|
827
|
+
* - `submit`: emits when the user presses the submit button.
|
|
828
|
+
*
|
|
484
829
|
* ```html
|
|
485
830
|
* <cc-plan-filter-form [services]="services" [priceRanges]="ranges" (filterChange)="apply($event)" />
|
|
486
831
|
* ```
|
|
832
|
+
*
|
|
833
|
+
* Tokens: --cc-filter-field-bg, --cc-filter-field-border, --cc-filter-label-color.
|
|
487
834
|
*/
|
|
488
835
|
class PlanFilterFormComponent {
|
|
489
836
|
services = input([]);
|
|
490
837
|
priceRanges = input([]);
|
|
838
|
+
mode = input('instant');
|
|
491
839
|
serviceLabel = input('Servicio incluido');
|
|
492
840
|
priceLabel = input('Rango de precio');
|
|
493
841
|
anyLabel = input('Todos');
|
|
494
842
|
submitLabel = input('Filtrar');
|
|
495
|
-
resetLabel = input('Limpiar');
|
|
496
|
-
/** Emits
|
|
843
|
+
resetLabel = input('Limpiar filtros');
|
|
844
|
+
/** Emits the current filter, and an empty filter on reset. */
|
|
497
845
|
filterChange = output();
|
|
498
846
|
serviceIndex = signal(-1);
|
|
499
847
|
rangeIndex = signal(-1);
|
|
500
|
-
|
|
501
|
-
|
|
848
|
+
hasSelection = computed(() => this.serviceIndex() !== -1 || this.rangeIndex() !== -1);
|
|
849
|
+
onServiceChange(event) {
|
|
850
|
+
this.serviceIndex.set(this.toIndex(event));
|
|
851
|
+
if (this.mode() === 'instant')
|
|
852
|
+
this.submit();
|
|
853
|
+
}
|
|
854
|
+
onRangeChange(event) {
|
|
855
|
+
this.rangeIndex.set(this.toIndex(event));
|
|
856
|
+
if (this.mode() === 'instant')
|
|
857
|
+
this.submit();
|
|
502
858
|
}
|
|
503
859
|
submit() {
|
|
504
860
|
this.filterChange.emit({
|
|
@@ -511,12 +867,15 @@ class PlanFilterFormComponent {
|
|
|
511
867
|
this.rangeIndex.set(-1);
|
|
512
868
|
this.filterChange.emit({ service: null, priceRange: null });
|
|
513
869
|
}
|
|
870
|
+
toIndex(event) {
|
|
871
|
+
return Number(event.target.value);
|
|
872
|
+
}
|
|
514
873
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlanFilterFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
515
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PlanFilterFormComponent, isStandalone: true, selector: "cc-plan-filter-form", inputs: { services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, priceRanges: { classPropertyName: "priceRanges", publicName: "priceRanges", isSignal: true, isRequired: false, transformFunction: null }, serviceLabel: { classPropertyName: "serviceLabel", publicName: "serviceLabel", isSignal: true, isRequired: false, transformFunction: null }, priceLabel: { classPropertyName: "priceLabel", publicName: "priceLabel", isSignal: true, isRequired: false, transformFunction: null }, anyLabel: { classPropertyName: "anyLabel", publicName: "anyLabel", isSignal: true, isRequired: false, transformFunction: null }, submitLabel: { classPropertyName: "submitLabel", publicName: "submitLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: "<form class=\"cc-filter\" (submit)=\"$event.preventDefault(); submit()\">\n @if (services().length) {\n <label class=\"cc-filter__field\">\n <span>{{ serviceLabel() }}</span>\n <select (change)=\"
|
|
874
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PlanFilterFormComponent, isStandalone: true, selector: "cc-plan-filter-form", inputs: { services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, priceRanges: { classPropertyName: "priceRanges", publicName: "priceRanges", isSignal: true, isRequired: false, transformFunction: null }, mode: { classPropertyName: "mode", publicName: "mode", isSignal: true, isRequired: false, transformFunction: null }, serviceLabel: { classPropertyName: "serviceLabel", publicName: "serviceLabel", isSignal: true, isRequired: false, transformFunction: null }, priceLabel: { classPropertyName: "priceLabel", publicName: "priceLabel", isSignal: true, isRequired: false, transformFunction: null }, anyLabel: { classPropertyName: "anyLabel", publicName: "anyLabel", isSignal: true, isRequired: false, transformFunction: null }, submitLabel: { classPropertyName: "submitLabel", publicName: "submitLabel", isSignal: true, isRequired: false, transformFunction: null }, resetLabel: { classPropertyName: "resetLabel", publicName: "resetLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { filterChange: "filterChange" }, ngImport: i0, template: "<form class=\"cc-filter\" (submit)=\"$event.preventDefault(); submit()\">\r\n @if (services().length) {\r\n <label class=\"cc-filter__field\">\r\n <span>{{ serviceLabel() }}</span>\r\n <select (change)=\"onServiceChange($event)\">\r\n <option value=\"-1\" [selected]=\"serviceIndex() === -1\">{{ anyLabel() }}</option>\r\n @for (service of services(); track $index) {\r\n <option [value]=\"$index\" [selected]=\"serviceIndex() === $index\">{{ service.name }}</option>\r\n }\r\n </select>\r\n </label>\r\n }\r\n @if (priceRanges().length) {\r\n <label class=\"cc-filter__field\">\r\n <span>{{ priceLabel() }}</span>\r\n <select (change)=\"onRangeChange($event)\">\r\n <option value=\"-1\" [selected]=\"rangeIndex() === -1\">{{ anyLabel() }}</option>\r\n @for (range of priceRanges(); track $index) {\r\n <option [value]=\"$index\" [selected]=\"rangeIndex() === $index\">{{ range.description }}</option>\r\n }\r\n </select>\r\n </label>\r\n }\r\n <div class=\"cc-filter__actions\">\r\n @if (mode() === 'submit') {\r\n <button ccButton size=\"sm\" type=\"submit\">{{ submitLabel() }}</button>\r\n }\r\n @if (mode() === 'submit' || hasSelection()) {\r\n <button ccButton variant=\"ghost\" size=\"sm\" type=\"button\" (click)=\"reset()\">{{ resetLabel() }}</button>\r\n }\r\n </div>\r\n</form>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:block}.cc-filter{display:flex;flex-direction:column;gap:var(--_space-4)}.cc-filter__field{display:flex;flex-direction:column;gap:var(--_space-2);font-size:var(--_text-sm);font-weight:var(--_weight-semibold);color:var(--cc-filter-label-color, var(--_text))}select{min-height:var(--_control-height);padding:0 var(--_space-3);border:1px solid var(--cc-filter-field-border, var(--_border-strong));border-radius:var(--_radius);font:inherit;font-size:var(--_text-md);font-weight:var(--_weight-regular);color:var(--_text);background:var(--cc-filter-field-bg, var(--_canvas))}.cc-filter__actions{display:flex;flex-wrap:wrap;gap:var(--_space-3)}.cc-filter__actions:empty{display:none}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "a[ccButton], button[ccButton]", inputs: ["variant", "size", "block"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
516
875
|
}
|
|
517
876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlanFilterFormComponent, decorators: [{
|
|
518
877
|
type: Component,
|
|
519
|
-
args: [{ selector: 'cc-plan-filter-form', changeDetection: ChangeDetectionStrategy.OnPush, template: "<form class=\"cc-filter\" (submit)=\"$event.preventDefault(); submit()\">\n @if (services().length) {\n <label class=\"cc-filter__field\">\n <span>{{ serviceLabel() }}</span>\n <select (change)=\"
|
|
878
|
+
args: [{ selector: 'cc-plan-filter-form', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<form class=\"cc-filter\" (submit)=\"$event.preventDefault(); submit()\">\r\n @if (services().length) {\r\n <label class=\"cc-filter__field\">\r\n <span>{{ serviceLabel() }}</span>\r\n <select (change)=\"onServiceChange($event)\">\r\n <option value=\"-1\" [selected]=\"serviceIndex() === -1\">{{ anyLabel() }}</option>\r\n @for (service of services(); track $index) {\r\n <option [value]=\"$index\" [selected]=\"serviceIndex() === $index\">{{ service.name }}</option>\r\n }\r\n </select>\r\n </label>\r\n }\r\n @if (priceRanges().length) {\r\n <label class=\"cc-filter__field\">\r\n <span>{{ priceLabel() }}</span>\r\n <select (change)=\"onRangeChange($event)\">\r\n <option value=\"-1\" [selected]=\"rangeIndex() === -1\">{{ anyLabel() }}</option>\r\n @for (range of priceRanges(); track $index) {\r\n <option [value]=\"$index\" [selected]=\"rangeIndex() === $index\">{{ range.description }}</option>\r\n }\r\n </select>\r\n </label>\r\n }\r\n <div class=\"cc-filter__actions\">\r\n @if (mode() === 'submit') {\r\n <button ccButton size=\"sm\" type=\"submit\">{{ submitLabel() }}</button>\r\n }\r\n @if (mode() === 'submit' || hasSelection()) {\r\n <button ccButton variant=\"ghost\" size=\"sm\" type=\"button\" (click)=\"reset()\">{{ resetLabel() }}</button>\r\n }\r\n </div>\r\n</form>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:block}.cc-filter{display:flex;flex-direction:column;gap:var(--_space-4)}.cc-filter__field{display:flex;flex-direction:column;gap:var(--_space-2);font-size:var(--_text-sm);font-weight:var(--_weight-semibold);color:var(--cc-filter-label-color, var(--_text))}select{min-height:var(--_control-height);padding:0 var(--_space-3);border:1px solid var(--cc-filter-field-border, var(--_border-strong));border-radius:var(--_radius);font:inherit;font-size:var(--_text-md);font-weight:var(--_weight-regular);color:var(--_text);background:var(--cc-filter-field-bg, var(--_canvas))}.cc-filter__actions{display:flex;flex-wrap:wrap;gap:var(--_space-3)}.cc-filter__actions:empty{display:none}\n"] }]
|
|
520
879
|
}] });
|
|
521
880
|
|
|
522
881
|
/** Marks an `<ng-template>` inside `cc-plan-catalog` as the card to render for each plan. */
|
|
@@ -531,25 +890,34 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
531
890
|
type: Directive,
|
|
532
891
|
args: [{ selector: 'ng-template[ccPlanCard]' }]
|
|
533
892
|
}] });
|
|
893
|
+
/** Default detail line of a card: "2 horas 20 minutos · 2 personas". */
|
|
894
|
+
function defaultPlanMeta(plan) {
|
|
895
|
+
const people = Math.max(plan.cuantity || 1, 1);
|
|
896
|
+
const duration = plan.duration ? plan.duration.toLowerCase() : '';
|
|
897
|
+
return [duration, `${people} ${people > 1 ? 'personas' : 'persona'}`].filter(Boolean).join(' · ');
|
|
898
|
+
}
|
|
534
899
|
/**
|
|
535
900
|
* Full plan list page: title, name search, category menu, filter and card grid.
|
|
536
901
|
* It only needs the plans; the rest has Spanish defaults you can override.
|
|
537
902
|
*
|
|
538
|
-
*
|
|
539
|
-
*
|
|
903
|
+
* - `plans` set to `null` means "loading" and shows placeholder cards.
|
|
904
|
+
* - `[(category)]` is two-way, so a page can keep it in the URL (`?categoria=pareja`).
|
|
905
|
+
* - Selecting a category shows its plans. Searching by name or filtering looks across
|
|
906
|
+
* every category; clearing the search goes back to the selected category.
|
|
540
907
|
*
|
|
541
908
|
* ```html
|
|
542
|
-
* <cc-plan-catalog
|
|
543
|
-
* [plans]="plans()"
|
|
544
|
-
* [services]="services()"
|
|
545
|
-
* [priceRanges]="ranges()"
|
|
546
|
-
* imageAltSuffix=" - Laurel Spa Medellín"
|
|
547
|
-
* />
|
|
909
|
+
* <cc-plan-catalog [plans]="plans()" [services]="services()" [priceRanges]="ranges()" [(category)]="category" />
|
|
548
910
|
* ```
|
|
911
|
+
*
|
|
912
|
+
* Tokens: --cc-catalog-panel-bg, --cc-catalog-sidebar-width, --cc-catalog-column-min,
|
|
913
|
+
* --cc-catalog-gap.
|
|
549
914
|
*/
|
|
550
915
|
class PlanCatalogComponent {
|
|
916
|
+
/** The plans, or `null` while they load. */
|
|
551
917
|
plans = input.required();
|
|
552
918
|
categories = input(DEFAULT_PLAN_CATEGORIES);
|
|
919
|
+
/** Selected category. Use `[(category)]` to bind it; `null` means `initialCategory`. */
|
|
920
|
+
category = model(null);
|
|
553
921
|
initialCategory = input(PlanCategory.Individual);
|
|
554
922
|
/** Shows how many plans each category has, counted from `plans`. */
|
|
555
923
|
showCounts = input(true);
|
|
@@ -558,46 +926,51 @@ class PlanCatalogComponent {
|
|
|
558
926
|
priceRanges = input([]);
|
|
559
927
|
/** Where each card links to. Defaults to `/planes/<slug>`. */
|
|
560
928
|
detailsLink = input((plan) => ['/planes', planSlug(plan)]);
|
|
929
|
+
// Cards
|
|
930
|
+
showPrice = input(true);
|
|
931
|
+
priceLabel = input('');
|
|
932
|
+
priceFormat = input({});
|
|
933
|
+
/** Detail line of each card. Defaults to duration and number of people. */
|
|
934
|
+
planMeta = input(defaultPlanMeta);
|
|
935
|
+
cardAppearance = input('filled');
|
|
936
|
+
ctaLabel = input('Ver plan');
|
|
937
|
+
ctaVariant = input('primary');
|
|
938
|
+
/** Added after the plan name in each image's alt text. */
|
|
939
|
+
imageAltSuffix = input('');
|
|
940
|
+
skeletonCount = input(6);
|
|
941
|
+
// Texts and layout
|
|
561
942
|
showBanner = input(true);
|
|
562
943
|
showSearch = input(true);
|
|
563
944
|
titlePrefix = input('Reserva tu plan');
|
|
564
945
|
resultsTitle = input('Resultados');
|
|
565
|
-
categoriesTitle = input('
|
|
946
|
+
categoriesTitle = input('Categorías');
|
|
947
|
+
categoriesLayout = input('auto');
|
|
566
948
|
searchPlaceholder = input('Buscar plan');
|
|
567
949
|
searchIconSrc = input('');
|
|
568
950
|
filterTitle = input('Filtrar');
|
|
569
951
|
filterIconSrc = input('');
|
|
570
|
-
ctaLabel = input('Saber más');
|
|
571
|
-
/** Added after the plan name in each image's alt text. */
|
|
572
|
-
imageAltSuffix = input('');
|
|
573
952
|
emptyMessage = input('No encontramos planes con esos criterios.');
|
|
574
|
-
|
|
953
|
+
emptyActionLabel = input('Ver todos los planes');
|
|
954
|
+
/** Optional contact link shown in the empty state, for example WhatsApp. */
|
|
955
|
+
contactHref = input('');
|
|
956
|
+
contactLabel = input('Pregúntanos por WhatsApp');
|
|
575
957
|
cardTemplate = contentChild(PlanCardTemplateDirective, { read: TemplateRef });
|
|
576
|
-
|
|
958
|
+
filterForm = viewChild(PlanFilterFormComponent);
|
|
577
959
|
query = signal('');
|
|
578
960
|
filter = signal(null);
|
|
579
961
|
filterOpen = signal(false);
|
|
580
962
|
/** Set when the user searched or filtered; results then cover every category. */
|
|
581
963
|
searching = signal(false);
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
const initial = this.initialCategory();
|
|
588
|
-
untracked(() => {
|
|
589
|
-
if (!this.searching())
|
|
590
|
-
this.category.set(initial);
|
|
591
|
-
});
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
categoryOptions = computed(() => this.showCounts() ? withCategoryCounts(this.categories(), this.plans()) : this.categories());
|
|
964
|
+
loading = computed(() => this.plans() === null);
|
|
965
|
+
skeletons = computed(() => Array.from({ length: this.skeletonCount() }, (_, i) => i));
|
|
966
|
+
/** Category shown in the menu: none while searching. */
|
|
967
|
+
activeCategory = computed(() => this.searching() ? null : (this.category() ?? this.initialCategory()));
|
|
968
|
+
categoryOptions = computed(() => this.showCounts() ? withCategoryCounts(this.categories(), this.plans() ?? []) : this.categories());
|
|
595
969
|
hasFilter = computed(() => this.services().length > 0 || this.priceRanges().length > 0);
|
|
596
970
|
visiblePlans = computed(() => {
|
|
597
|
-
const plans = this.plans();
|
|
971
|
+
const plans = this.plans() ?? [];
|
|
598
972
|
if (!this.searching()) {
|
|
599
|
-
|
|
600
|
-
return category === null ? plans : filterPlansByCategory(plans, category);
|
|
973
|
+
return filterPlansByCategory(plans, this.category() ?? this.initialCategory());
|
|
601
974
|
}
|
|
602
975
|
const byName = searchPlansByName(plans, this.query());
|
|
603
976
|
const filter = this.filter();
|
|
@@ -606,73 +979,83 @@ class PlanCatalogComponent {
|
|
|
606
979
|
title = computed(() => {
|
|
607
980
|
if (this.searching())
|
|
608
981
|
return `${this.titlePrefix()} - ${this.resultsTitle()}`;
|
|
609
|
-
const option = this.categories().find((c) => c.value === this.
|
|
982
|
+
const option = this.categories().find((c) => c.value === this.activeCategory());
|
|
610
983
|
return option ? `${this.titlePrefix()} - ${option.label}` : this.titlePrefix();
|
|
611
984
|
});
|
|
612
985
|
selectCategory(value) {
|
|
613
986
|
if (value === null)
|
|
614
987
|
return;
|
|
615
|
-
this.
|
|
616
|
-
this.query.set('');
|
|
617
|
-
this.filter.set(null);
|
|
988
|
+
this.clearSearch();
|
|
618
989
|
this.category.set(value);
|
|
619
|
-
this.categoryChange.emit(value);
|
|
620
990
|
}
|
|
621
991
|
onSearch(query) {
|
|
622
992
|
this.query.set(query);
|
|
623
|
-
|
|
624
|
-
this.selectCategory(this.lastCategory ?? this.initialCategory());
|
|
625
|
-
return;
|
|
626
|
-
}
|
|
627
|
-
this.startSearch();
|
|
993
|
+
this.updateSearching();
|
|
628
994
|
}
|
|
629
995
|
onFilter(filter) {
|
|
630
996
|
const empty = !filter.service && !filter.priceRange;
|
|
631
997
|
this.filter.set(empty ? null : filter);
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
this.
|
|
998
|
+
this.updateSearching();
|
|
999
|
+
}
|
|
1000
|
+
/** Clears search and filter and shows the selected category again. */
|
|
1001
|
+
showAll() {
|
|
1002
|
+
this.filterForm()?.reset();
|
|
1003
|
+
this.clearSearch();
|
|
637
1004
|
}
|
|
638
1005
|
linkFor(plan) {
|
|
639
1006
|
return this.detailsLink()(plan);
|
|
640
1007
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
this.
|
|
1008
|
+
metaFor(plan) {
|
|
1009
|
+
return this.planMeta()(plan);
|
|
1010
|
+
}
|
|
1011
|
+
clearSearch() {
|
|
1012
|
+
this.query.set('');
|
|
1013
|
+
this.filter.set(null);
|
|
1014
|
+
this.searching.set(false);
|
|
1015
|
+
}
|
|
1016
|
+
updateSearching() {
|
|
1017
|
+
this.searching.set(!!this.query().trim() || !!this.filter());
|
|
646
1018
|
}
|
|
647
1019
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlanCatalogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
648
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PlanCatalogComponent, isStandalone: true, selector: "cc-plan-catalog", inputs: { plans: { classPropertyName: "plans", publicName: "plans", isSignal: true, isRequired: true, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, initialCategory: { classPropertyName: "initialCategory", publicName: "initialCategory", isSignal: true, isRequired: false, transformFunction: null }, showCounts: { classPropertyName: "showCounts", publicName: "showCounts", isSignal: true, isRequired: false, transformFunction: null }, services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, priceRanges: { classPropertyName: "priceRanges", publicName: "priceRanges", isSignal: true, isRequired: false, transformFunction: null }, detailsLink: { classPropertyName: "detailsLink", publicName: "detailsLink", isSignal: true, isRequired: false, transformFunction: null }, showBanner: { classPropertyName: "showBanner", publicName: "showBanner", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, titlePrefix: { classPropertyName: "titlePrefix", publicName: "titlePrefix", isSignal: true, isRequired: false, transformFunction: null }, resultsTitle: { classPropertyName: "resultsTitle", publicName: "resultsTitle", isSignal: true, isRequired: false, transformFunction: null }, categoriesTitle: { classPropertyName: "categoriesTitle", publicName: "categoriesTitle", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, searchIconSrc: { classPropertyName: "searchIconSrc", publicName: "searchIconSrc", isSignal: true, isRequired: false, transformFunction: null }, filterTitle: { classPropertyName: "filterTitle", publicName: "filterTitle", isSignal: true, isRequired: false, transformFunction: null }, filterIconSrc: { classPropertyName: "filterIconSrc", publicName: "filterIconSrc", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, imageAltSuffix: { classPropertyName: "imageAltSuffix", publicName: "imageAltSuffix", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { categoryChange: "categoryChange" }, queries: [{ propertyName: "cardTemplate", first: true, predicate: PlanCardTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: "@if (showBanner()) {\n <cc-page-banner [title]=\"title()\" />\n}\n\n<div class=\"cc-catalog\">\n <aside class=\"cc-catalog__side\">\n @if (showSearch()) {\n <cc-search-box\n [placeholder]=\"searchPlaceholder()\"\n [iconSrc]=\"searchIconSrc()\"\n [(value)]=\"query\"\n (search)=\"onSearch($event)\"\n />\n }\n\n <div class=\"cc-catalog__panel\">\n <cc-category-menu\n [title]=\"categoriesTitle()\"\n [options]=\"categoryOptions()\"\n [selected]=\"category()\"\n (selectedChange)=\"selectCategory($event)\"\n />\n\n @if (hasFilter()) {\n <hr class=\"cc-catalog__rule\" />\n <button\n type=\"button\"\n class=\"cc-catalog__filter-toggle\"\n [attr.aria-expanded]=\"filterOpen()\"\n (click)=\"filterOpen.set(!filterOpen())\"\n >\n <span>{{ filterTitle() }}</span>\n @if (filterIconSrc()) {\n <img [src]=\"filterIconSrc()\" alt=\"\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <path d=\"M3 5h18l-7 8v6l-4-2v-4L3 5Z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linejoin=\"round\" />\n </svg>\n }\n </button>\n @if (filterOpen()) {\n <cc-plan-filter-form\n [services]=\"services()\"\n [priceRanges]=\"priceRanges()\"\n (filterChange)=\"onFilter($event)\"\n />\n }\n }\n </div>\n </aside>\n\n @if (visiblePlans().length) {\n <div class=\"cc-catalog__grid\">\n @for (plan of visiblePlans(); track plan.id) {\n @if (cardTemplate(); as tpl) {\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: plan, link: linkFor(plan) }\" />\n } @else {\n <cc-plan-card\n [name]=\"plan.name\"\n [imageSrc]=\"plan.imgPath\"\n [imageAlt]=\"plan.name + imageAltSuffix()\"\n [link]=\"linkFor(plan)\"\n [ctaLabel]=\"ctaLabel()\"\n />\n }\n }\n </div>\n } @else {\n <p class=\"cc-catalog__empty\">{{ emptyMessage() }}</p>\n }\n</div>\n", styles: [":host{display:block}.cc-catalog{display:flex;flex-direction:column;gap:4rem}.cc-catalog__side{display:flex;flex-direction:column;width:100%;overflow:hidden}.cc-catalog__panel{width:100%;box-sizing:border-box;padding:1.25rem;background:var(--cc-catalog-panel-bg, var(--cc-surface, var(--cc-secondary-light, #f8f4ee)))}.cc-catalog__rule{height:.1rem;margin:0 0 1.5rem;border:0;background:#d1d5db}.cc-catalog__filter-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;padding:0 1.25rem;border:0;font:inherit;font-weight:700;color:var(--cc-text, var(--cc-primary, #4c6b4a));background:transparent;cursor:pointer}.cc-catalog__filter-toggle img,.cc-catalog__filter-toggle svg{width:1.75rem;height:1.75rem}.cc-catalog__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--cc-catalog-column-min, 15rem)),1fr));gap:2rem 1.5rem;width:100%;height:auto;place-items:center;align-content:start}.cc-catalog__empty{width:100%;margin:0;font-size:1.5rem;text-align:center;color:var(--cc-accent, var(--cc-secondary, #ceab5d))}@media (min-width: 1024px){.cc-catalog{flex-direction:row}.cc-catalog__side{flex:none;width:24rem}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: PageBannerComponent, selector: "cc-page-banner", inputs: ["title", "variant", "iconSrc", "backLink", "backIconSrc", "backLabel"] }, { kind: "component", type: SearchBoxComponent, selector: "cc-search-box", inputs: ["value", "placeholder", "buttonLabel", "iconSrc"], outputs: ["valueChange", "search"] }, { kind: "component", type: CategoryMenuComponent, selector: "cc-category-menu", inputs: ["options", "selected", "title"], outputs: ["selectedChange"] }, { kind: "component", type: PlanFilterFormComponent, selector: "cc-plan-filter-form", inputs: ["services", "priceRanges", "serviceLabel", "priceLabel", "anyLabel", "submitLabel", "resetLabel"], outputs: ["filterChange"] }, { kind: "component", type: PlanCardComponent, selector: "cc-plan-card", inputs: ["name", "imageSrc", "imageAlt", "subtitle", "link", "ctaLabel"], outputs: ["ctaClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1020
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PlanCatalogComponent, isStandalone: true, selector: "cc-plan-catalog", inputs: { plans: { classPropertyName: "plans", publicName: "plans", isSignal: true, isRequired: true, transformFunction: null }, categories: { classPropertyName: "categories", publicName: "categories", isSignal: true, isRequired: false, transformFunction: null }, category: { classPropertyName: "category", publicName: "category", isSignal: true, isRequired: false, transformFunction: null }, initialCategory: { classPropertyName: "initialCategory", publicName: "initialCategory", isSignal: true, isRequired: false, transformFunction: null }, showCounts: { classPropertyName: "showCounts", publicName: "showCounts", isSignal: true, isRequired: false, transformFunction: null }, services: { classPropertyName: "services", publicName: "services", isSignal: true, isRequired: false, transformFunction: null }, priceRanges: { classPropertyName: "priceRanges", publicName: "priceRanges", isSignal: true, isRequired: false, transformFunction: null }, detailsLink: { classPropertyName: "detailsLink", publicName: "detailsLink", isSignal: true, isRequired: false, transformFunction: null }, showPrice: { classPropertyName: "showPrice", publicName: "showPrice", isSignal: true, isRequired: false, transformFunction: null }, priceLabel: { classPropertyName: "priceLabel", publicName: "priceLabel", isSignal: true, isRequired: false, transformFunction: null }, priceFormat: { classPropertyName: "priceFormat", publicName: "priceFormat", isSignal: true, isRequired: false, transformFunction: null }, planMeta: { classPropertyName: "planMeta", publicName: "planMeta", isSignal: true, isRequired: false, transformFunction: null }, cardAppearance: { classPropertyName: "cardAppearance", publicName: "cardAppearance", isSignal: true, isRequired: false, transformFunction: null }, ctaLabel: { classPropertyName: "ctaLabel", publicName: "ctaLabel", isSignal: true, isRequired: false, transformFunction: null }, ctaVariant: { classPropertyName: "ctaVariant", publicName: "ctaVariant", isSignal: true, isRequired: false, transformFunction: null }, imageAltSuffix: { classPropertyName: "imageAltSuffix", publicName: "imageAltSuffix", isSignal: true, isRequired: false, transformFunction: null }, skeletonCount: { classPropertyName: "skeletonCount", publicName: "skeletonCount", isSignal: true, isRequired: false, transformFunction: null }, showBanner: { classPropertyName: "showBanner", publicName: "showBanner", isSignal: true, isRequired: false, transformFunction: null }, showSearch: { classPropertyName: "showSearch", publicName: "showSearch", isSignal: true, isRequired: false, transformFunction: null }, titlePrefix: { classPropertyName: "titlePrefix", publicName: "titlePrefix", isSignal: true, isRequired: false, transformFunction: null }, resultsTitle: { classPropertyName: "resultsTitle", publicName: "resultsTitle", isSignal: true, isRequired: false, transformFunction: null }, categoriesTitle: { classPropertyName: "categoriesTitle", publicName: "categoriesTitle", isSignal: true, isRequired: false, transformFunction: null }, categoriesLayout: { classPropertyName: "categoriesLayout", publicName: "categoriesLayout", isSignal: true, isRequired: false, transformFunction: null }, searchPlaceholder: { classPropertyName: "searchPlaceholder", publicName: "searchPlaceholder", isSignal: true, isRequired: false, transformFunction: null }, searchIconSrc: { classPropertyName: "searchIconSrc", publicName: "searchIconSrc", isSignal: true, isRequired: false, transformFunction: null }, filterTitle: { classPropertyName: "filterTitle", publicName: "filterTitle", isSignal: true, isRequired: false, transformFunction: null }, filterIconSrc: { classPropertyName: "filterIconSrc", publicName: "filterIconSrc", isSignal: true, isRequired: false, transformFunction: null }, emptyMessage: { classPropertyName: "emptyMessage", publicName: "emptyMessage", isSignal: true, isRequired: false, transformFunction: null }, emptyActionLabel: { classPropertyName: "emptyActionLabel", publicName: "emptyActionLabel", isSignal: true, isRequired: false, transformFunction: null }, contactHref: { classPropertyName: "contactHref", publicName: "contactHref", isSignal: true, isRequired: false, transformFunction: null }, contactLabel: { classPropertyName: "contactLabel", publicName: "contactLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { category: "categoryChange" }, queries: [{ propertyName: "cardTemplate", first: true, predicate: PlanCardTemplateDirective, descendants: true, read: TemplateRef, isSignal: true }], viewQueries: [{ propertyName: "filterForm", first: true, predicate: PlanFilterFormComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (showBanner()) {\r\n <cc-page-banner [title]=\"title()\" />\r\n}\r\n\r\n<div class=\"cc-catalog\">\r\n <aside class=\"cc-catalog__side\">\r\n <div class=\"cc-catalog__panel\">\r\n @if (showSearch()) {\r\n <cc-search-box\r\n [placeholder]=\"searchPlaceholder()\"\r\n [iconSrc]=\"searchIconSrc()\"\r\n [(value)]=\"query\"\r\n (search)=\"onSearch($event)\"\r\n />\r\n }\r\n\r\n <cc-category-menu\r\n [title]=\"categoriesTitle()\"\r\n [layout]=\"categoriesLayout()\"\r\n [options]=\"categoryOptions()\"\r\n [selected]=\"activeCategory()\"\r\n (selectedChange)=\"selectCategory($event)\"\r\n />\r\n\r\n @if (hasFilter()) {\r\n <div class=\"cc-catalog__filter\">\r\n <button\r\n type=\"button\"\r\n class=\"cc-catalog__filter-toggle\"\r\n aria-controls=\"cc-catalog-filter\"\r\n [attr.aria-expanded]=\"filterOpen()\"\r\n (click)=\"filterOpen.set(!filterOpen())\"\r\n >\r\n <span>{{ filterTitle() }}</span>\r\n @if (filterIconSrc()) {\r\n <img [src]=\"filterIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path d=\"M3 5h18l-7 8v6l-4-2v-4L3 5Z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linejoin=\"round\" />\r\n </svg>\r\n }\r\n </button>\r\n @if (filterOpen()) {\r\n <cc-plan-filter-form\r\n id=\"cc-catalog-filter\"\r\n [services]=\"services()\"\r\n [priceRanges]=\"priceRanges()\"\r\n (filterChange)=\"onFilter($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n </aside>\r\n\r\n <section class=\"cc-catalog__results\" [attr.aria-busy]=\"loading()\" aria-live=\"polite\">\r\n @if (loading()) {\r\n <div class=\"cc-catalog__grid\">\r\n @for (i of skeletons(); track i) {\r\n <cc-plan-card [skeleton]=\"true\" />\r\n }\r\n </div>\r\n } @else if (visiblePlans().length) {\r\n <div class=\"cc-catalog__grid\">\r\n @for (plan of visiblePlans(); track plan.id) {\r\n @if (cardTemplate(); as tpl) {\r\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: plan, link: linkFor(plan) }\" />\r\n } @else {\r\n <cc-plan-card\r\n [name]=\"plan.name\"\r\n [imageSrc]=\"plan.imgPath\"\r\n [imageAlt]=\"plan.name + imageAltSuffix()\"\r\n [meta]=\"metaFor(plan)\"\r\n [price]=\"showPrice() ? plan.price : null\"\r\n [priceLabel]=\"priceLabel()\"\r\n [priceFormat]=\"priceFormat()\"\r\n [link]=\"linkFor(plan)\"\r\n [ctaLabel]=\"ctaLabel()\"\r\n [ctaVariant]=\"ctaVariant()\"\r\n [appearance]=\"cardAppearance()\"\r\n />\r\n }\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"cc-catalog__empty\">\r\n <p>{{ emptyMessage() }}</p>\r\n <div class=\"cc-catalog__empty-actions\">\r\n <button ccButton type=\"button\" (click)=\"showAll()\">{{ emptyActionLabel() }}</button>\r\n @if (contactHref()) {\r\n <a ccButton variant=\"secondary\" [href]=\"contactHref()\" target=\"_blank\" rel=\"noopener\">{{ contactLabel() }}</a>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </section>\r\n</div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_catalog-gap: var(--cc-catalog-gap, var(--_space-6));display:block;padding-bottom:var(--_space-16)}.cc-catalog{display:flex;flex-direction:column;gap:var(--_space-6)}.cc-catalog__side{width:100%;min-width:0}.cc-catalog__panel{display:flex;flex-direction:column;gap:var(--_space-4);width:100%;padding:var(--_space-4);border-radius:var(--_radius);background:var(--cc-catalog-panel-bg, var(--_surface))}.cc-catalog__filter{display:flex;flex-direction:column;gap:var(--_space-4);padding-top:var(--_space-4);border-top:1px solid var(--_border)}.cc-catalog__filter-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:var(--_control-height);padding:0 var(--_space-4);border:0;border-radius:var(--_radius);font:inherit;font-weight:var(--_weight-bold);color:var(--_text);background:transparent;cursor:pointer}.cc-catalog__filter-toggle:hover{background:color-mix(in srgb,var(--_text) 6%,transparent)}.cc-catalog__filter-toggle img,.cc-catalog__filter-toggle svg{width:1.5rem;height:1.5rem}.cc-catalog__results{flex:1;min-width:0}.cc-catalog__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--cc-catalog-column-min, 14rem)),1fr));gap:var(--_catalog-gap);align-items:stretch}.cc-catalog__empty{display:flex;flex-direction:column;align-items:center;gap:var(--_space-5);padding:var(--_space-12) var(--_space-4);border-radius:var(--_radius);text-align:center;background:var(--_surface)}.cc-catalog__empty p{margin:0;font-size:var(--_text-lg);color:var(--_text)}.cc-catalog__empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--_space-3)}@media (min-width: 1024px){.cc-catalog{flex-direction:row;align-items:flex-start;gap:var(--_space-10)}.cc-catalog__side{position:sticky;top:var(--cc-catalog-sticky-top, var(--_space-6));flex:none;width:var(--cc-catalog-sidebar-width, 18rem)}.cc-catalog__panel{padding:var(--_space-5)}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "a[ccButton], button[ccButton]", inputs: ["variant", "size", "block"] }, { kind: "component", type: PageBannerComponent, selector: "cc-page-banner", inputs: ["title", "subtitle", "variant", "size", "italic", "align", "iconSrc", "backLink", "backIconSrc", "backLabel"] }, { kind: "component", type: SearchBoxComponent, selector: "cc-search-box", inputs: ["value", "placeholder", "label", "buttonLabel", "iconSrc"], outputs: ["valueChange", "search"] }, { kind: "component", type: CategoryMenuComponent, selector: "cc-category-menu", inputs: ["options", "selected", "title", "layout"], outputs: ["selectedChange"] }, { kind: "component", type: PlanFilterFormComponent, selector: "cc-plan-filter-form", inputs: ["services", "priceRanges", "mode", "serviceLabel", "priceLabel", "anyLabel", "submitLabel", "resetLabel"], outputs: ["filterChange"] }, { kind: "component", type: PlanCardComponent, selector: "cc-plan-card", inputs: ["name", "imageSrc", "imageAlt", "meta", "price", "priceLabel", "priceFormat", "link", "queryParams", "ctaLabel", "ctaVariant", "appearance", "headingLevel", "skeleton"], outputs: ["ctaClick"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
649
1021
|
}
|
|
650
1022
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlanCatalogComponent, decorators: [{
|
|
651
1023
|
type: Component,
|
|
652
1024
|
args: [{ selector: 'cc-plan-catalog', imports: [
|
|
653
1025
|
NgTemplateOutlet,
|
|
1026
|
+
ButtonComponent,
|
|
654
1027
|
PageBannerComponent,
|
|
655
1028
|
SearchBoxComponent,
|
|
656
1029
|
CategoryMenuComponent,
|
|
657
1030
|
PlanFilterFormComponent,
|
|
658
1031
|
PlanCardComponent,
|
|
659
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (showBanner()) {\n <cc-page-banner [title]=\"title()\" />\n}\n\n<div class=\"cc-catalog\">\n <aside class=\"cc-catalog__side\">\n @if (showSearch()) {\n
|
|
660
|
-
}]
|
|
1032
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (showBanner()) {\r\n <cc-page-banner [title]=\"title()\" />\r\n}\r\n\r\n<div class=\"cc-catalog\">\r\n <aside class=\"cc-catalog__side\">\r\n <div class=\"cc-catalog__panel\">\r\n @if (showSearch()) {\r\n <cc-search-box\r\n [placeholder]=\"searchPlaceholder()\"\r\n [iconSrc]=\"searchIconSrc()\"\r\n [(value)]=\"query\"\r\n (search)=\"onSearch($event)\"\r\n />\r\n }\r\n\r\n <cc-category-menu\r\n [title]=\"categoriesTitle()\"\r\n [layout]=\"categoriesLayout()\"\r\n [options]=\"categoryOptions()\"\r\n [selected]=\"activeCategory()\"\r\n (selectedChange)=\"selectCategory($event)\"\r\n />\r\n\r\n @if (hasFilter()) {\r\n <div class=\"cc-catalog__filter\">\r\n <button\r\n type=\"button\"\r\n class=\"cc-catalog__filter-toggle\"\r\n aria-controls=\"cc-catalog-filter\"\r\n [attr.aria-expanded]=\"filterOpen()\"\r\n (click)=\"filterOpen.set(!filterOpen())\"\r\n >\r\n <span>{{ filterTitle() }}</span>\r\n @if (filterIconSrc()) {\r\n <img [src]=\"filterIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <path d=\"M3 5h18l-7 8v6l-4-2v-4L3 5Z\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linejoin=\"round\" />\r\n </svg>\r\n }\r\n </button>\r\n @if (filterOpen()) {\r\n <cc-plan-filter-form\r\n id=\"cc-catalog-filter\"\r\n [services]=\"services()\"\r\n [priceRanges]=\"priceRanges()\"\r\n (filterChange)=\"onFilter($event)\"\r\n />\r\n }\r\n </div>\r\n }\r\n </div>\r\n </aside>\r\n\r\n <section class=\"cc-catalog__results\" [attr.aria-busy]=\"loading()\" aria-live=\"polite\">\r\n @if (loading()) {\r\n <div class=\"cc-catalog__grid\">\r\n @for (i of skeletons(); track i) {\r\n <cc-plan-card [skeleton]=\"true\" />\r\n }\r\n </div>\r\n } @else if (visiblePlans().length) {\r\n <div class=\"cc-catalog__grid\">\r\n @for (plan of visiblePlans(); track plan.id) {\r\n @if (cardTemplate(); as tpl) {\r\n <ng-container *ngTemplateOutlet=\"tpl; context: { $implicit: plan, link: linkFor(plan) }\" />\r\n } @else {\r\n <cc-plan-card\r\n [name]=\"plan.name\"\r\n [imageSrc]=\"plan.imgPath\"\r\n [imageAlt]=\"plan.name + imageAltSuffix()\"\r\n [meta]=\"metaFor(plan)\"\r\n [price]=\"showPrice() ? plan.price : null\"\r\n [priceLabel]=\"priceLabel()\"\r\n [priceFormat]=\"priceFormat()\"\r\n [link]=\"linkFor(plan)\"\r\n [ctaLabel]=\"ctaLabel()\"\r\n [ctaVariant]=\"ctaVariant()\"\r\n [appearance]=\"cardAppearance()\"\r\n />\r\n }\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"cc-catalog__empty\">\r\n <p>{{ emptyMessage() }}</p>\r\n <div class=\"cc-catalog__empty-actions\">\r\n <button ccButton type=\"button\" (click)=\"showAll()\">{{ emptyActionLabel() }}</button>\r\n @if (contactHref()) {\r\n <a ccButton variant=\"secondary\" [href]=\"contactHref()\" target=\"_blank\" rel=\"noopener\">{{ contactLabel() }}</a>\r\n }\r\n </div>\r\n </div>\r\n }\r\n </section>\r\n</div>\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_catalog-gap: var(--cc-catalog-gap, var(--_space-6));display:block;padding-bottom:var(--_space-16)}.cc-catalog{display:flex;flex-direction:column;gap:var(--_space-6)}.cc-catalog__side{width:100%;min-width:0}.cc-catalog__panel{display:flex;flex-direction:column;gap:var(--_space-4);width:100%;padding:var(--_space-4);border-radius:var(--_radius);background:var(--cc-catalog-panel-bg, var(--_surface))}.cc-catalog__filter{display:flex;flex-direction:column;gap:var(--_space-4);padding-top:var(--_space-4);border-top:1px solid var(--_border)}.cc-catalog__filter-toggle{display:flex;align-items:center;justify-content:space-between;width:100%;min-height:var(--_control-height);padding:0 var(--_space-4);border:0;border-radius:var(--_radius);font:inherit;font-weight:var(--_weight-bold);color:var(--_text);background:transparent;cursor:pointer}.cc-catalog__filter-toggle:hover{background:color-mix(in srgb,var(--_text) 6%,transparent)}.cc-catalog__filter-toggle img,.cc-catalog__filter-toggle svg{width:1.5rem;height:1.5rem}.cc-catalog__results{flex:1;min-width:0}.cc-catalog__grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,var(--cc-catalog-column-min, 14rem)),1fr));gap:var(--_catalog-gap);align-items:stretch}.cc-catalog__empty{display:flex;flex-direction:column;align-items:center;gap:var(--_space-5);padding:var(--_space-12) var(--_space-4);border-radius:var(--_radius);text-align:center;background:var(--_surface)}.cc-catalog__empty p{margin:0;font-size:var(--_text-lg);color:var(--_text)}.cc-catalog__empty-actions{display:flex;flex-wrap:wrap;justify-content:center;gap:var(--_space-3)}@media (min-width: 1024px){.cc-catalog{flex-direction:row;align-items:flex-start;gap:var(--_space-10)}.cc-catalog__side{position:sticky;top:var(--cc-catalog-sticky-top, var(--_space-6));flex:none;width:var(--cc-catalog-sidebar-width, 18rem)}.cc-catalog__panel{padding:var(--_space-5)}}\n"] }]
|
|
1033
|
+
}] });
|
|
661
1034
|
|
|
662
1035
|
/**
|
|
663
|
-
* Plan detail view: title with a back link, photo, price
|
|
664
|
-
* number of people, included services
|
|
665
|
-
*
|
|
1036
|
+
* Plan detail view: title with a back link, photo, price with an early booking button,
|
|
1037
|
+
* description, duration, number of people, included services and a gift box.
|
|
1038
|
+
* On screens below 1024px a bar with the price and the booking button stays fixed at
|
|
1039
|
+
* the bottom while the plan is on screen. It only renders; the page loads the plan and
|
|
1040
|
+
* handles SEO.
|
|
666
1041
|
*
|
|
667
1042
|
* ```html
|
|
668
|
-
* <cc-plan-details [plan]="plan" [bookingUrl]="
|
|
1043
|
+
* <cc-plan-details [plan]="plan" [bookingUrl]="bookingFor" imageAltSuffix=" en Laurel Spa" />
|
|
669
1044
|
* ```
|
|
1045
|
+
*
|
|
1046
|
+
* Tokens: --cc-details-panel-bg, --cc-details-price-bg, --cc-details-price-color,
|
|
1047
|
+
* --cc-details-gift-border, --cc-details-bar-bg, --cc-details-image-ratio.
|
|
670
1048
|
*/
|
|
671
1049
|
class PlanDetailsComponent {
|
|
672
1050
|
plan = input.required();
|
|
673
|
-
/**
|
|
1051
|
+
/** Booking link, usually WhatsApp. A function receives the plan, to mention it in the message. */
|
|
674
1052
|
bookingUrl = input.required();
|
|
675
|
-
bookingLabel = input('
|
|
1053
|
+
bookingLabel = input('Reservar por WhatsApp');
|
|
1054
|
+
/** Shorter label for the bottom bar on small screens. */
|
|
1055
|
+
barBookingLabel = input('Reservar');
|
|
1056
|
+
bookingVariant = input('primary');
|
|
1057
|
+
/** Keeps a bar with price and booking button at the bottom on small screens. */
|
|
1058
|
+
stickyBar = input(true);
|
|
676
1059
|
showBanner = input(true);
|
|
677
1060
|
backLink = input('/planes');
|
|
678
1061
|
backLabel = input('Volver a los planes');
|
|
@@ -680,41 +1063,51 @@ class PlanDetailsComponent {
|
|
|
680
1063
|
titleIconSrc = input('');
|
|
681
1064
|
/** Added after the plan name in the photo's alt text. */
|
|
682
1065
|
imageAltSuffix = input('');
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
currencyDigits = input('1.0-0');
|
|
1066
|
+
priceFormat = input({});
|
|
1067
|
+
/** Small text under the price. Defaults to "Precio por plan". */
|
|
1068
|
+
priceNote = input('Precio por plan');
|
|
687
1069
|
durationIconSrc = input('');
|
|
688
1070
|
personIconSrc = input('');
|
|
689
1071
|
peopleIconSrc = input('');
|
|
1072
|
+
durationLabel = input('Duración');
|
|
1073
|
+
peopleCaption = input('Personas');
|
|
690
1074
|
personLabel = input('persona');
|
|
691
|
-
peopleLabel = input('
|
|
692
|
-
includesLabel = input('Incluye
|
|
1075
|
+
peopleLabel = input('personas');
|
|
1076
|
+
includesLabel = input('Incluye');
|
|
693
1077
|
/** Gift box. It is hidden when `perks` is empty. */
|
|
694
|
-
perksTitle = input('Recibe con
|
|
1078
|
+
perksTitle = input('Recibe con tu plan');
|
|
695
1079
|
perks = input([
|
|
696
1080
|
'Gift Card de invitación en PDF para regalo.',
|
|
697
1081
|
'Decoración según la ocasión que celebres.',
|
|
698
1082
|
]);
|
|
699
1083
|
perksImageSrc = input('');
|
|
700
|
-
perksImageAlt = input('
|
|
1084
|
+
perksImageAlt = input('');
|
|
701
1085
|
people = computed(() => Math.max(this.plan().cuantity || 1, 1));
|
|
702
1086
|
services = computed(() => this.plan().additionalServices ?? []);
|
|
1087
|
+
price = computed(() => formatPrice(this.plan().price, this.priceFormat()));
|
|
1088
|
+
booking = computed(() => {
|
|
1089
|
+
const url = this.bookingUrl();
|
|
1090
|
+
return typeof url === 'function' ? url(this.plan()) : url;
|
|
1091
|
+
});
|
|
703
1092
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlanDetailsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
704
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PlanDetailsComponent, isStandalone: true, selector: "cc-plan-details", inputs: { plan: { classPropertyName: "plan", publicName: "plan", isSignal: true, isRequired: true, transformFunction: null }, bookingUrl: { classPropertyName: "bookingUrl", publicName: "bookingUrl", isSignal: true, isRequired: true, transformFunction: null }, bookingLabel: { classPropertyName: "bookingLabel", publicName: "bookingLabel", isSignal: true, isRequired: false, transformFunction: null }, showBanner: { classPropertyName: "showBanner", publicName: "showBanner", isSignal: true, isRequired: false, transformFunction: null }, backLink: { classPropertyName: "backLink", publicName: "backLink", isSignal: true, isRequired: false, transformFunction: null }, backLabel: { classPropertyName: "backLabel", publicName: "backLabel", isSignal: true, isRequired: false, transformFunction: null }, backIconSrc: { classPropertyName: "backIconSrc", publicName: "backIconSrc", isSignal: true, isRequired: false, transformFunction: null }, titleIconSrc: { classPropertyName: "titleIconSrc", publicName: "titleIconSrc", isSignal: true, isRequired: false, transformFunction: null }, imageAltSuffix: { classPropertyName: "imageAltSuffix", publicName: "imageAltSuffix", isSignal: true, isRequired: false, transformFunction: null }, currencyCode: { classPropertyName: "currencyCode", publicName: "currencyCode", isSignal: true, isRequired: false, transformFunction: null }, currencyDisplay: { classPropertyName: "currencyDisplay", publicName: "currencyDisplay", isSignal: true, isRequired: false, transformFunction: null }, currencyDigits: { classPropertyName: "currencyDigits", publicName: "currencyDigits", isSignal: true, isRequired: false, transformFunction: null }, durationIconSrc: { classPropertyName: "durationIconSrc", publicName: "durationIconSrc", isSignal: true, isRequired: false, transformFunction: null }, personIconSrc: { classPropertyName: "personIconSrc", publicName: "personIconSrc", isSignal: true, isRequired: false, transformFunction: null }, peopleIconSrc: { classPropertyName: "peopleIconSrc", publicName: "peopleIconSrc", isSignal: true, isRequired: false, transformFunction: null }, personLabel: { classPropertyName: "personLabel", publicName: "personLabel", isSignal: true, isRequired: false, transformFunction: null }, peopleLabel: { classPropertyName: "peopleLabel", publicName: "peopleLabel", isSignal: true, isRequired: false, transformFunction: null }, includesLabel: { classPropertyName: "includesLabel", publicName: "includesLabel", isSignal: true, isRequired: false, transformFunction: null }, perksTitle: { classPropertyName: "perksTitle", publicName: "perksTitle", isSignal: true, isRequired: false, transformFunction: null }, perks: { classPropertyName: "perks", publicName: "perks", isSignal: true, isRequired: false, transformFunction: null }, perksImageSrc: { classPropertyName: "perksImageSrc", publicName: "perksImageSrc", isSignal: true, isRequired: false, transformFunction: null }, perksImageAlt: { classPropertyName: "perksImageAlt", publicName: "perksImageAlt", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (showBanner()) {\n <cc-page-banner\n variant=\"plain\"\n [title]=\"plan().name\"\n [iconSrc]=\"titleIconSrc()\"\n [backLink]=\"backLink()\"\n [backLabel]=\"backLabel()\"\n [backIconSrc]=\"backIconSrc()\"\n />\n}\n\n<div class=\"cc-details\">\n <div class=\"cc-details__media\">\n <img class=\"cc-details__photo\" [src]=\"plan().imgPath\" [alt]=\"plan().name + imageAltSuffix()\" />\n <ng-content select=\"[ccDetailsMedia]\" />\n </div>\n\n <div class=\"cc-details__panel\">\n <div class=\"cc-details__info\">\n <div class=\"cc-details__price\">\n <p>{{ plan().price | currency: currencyCode() : currencyDisplay() : currencyDigits() }}</p>\n </div>\n\n <p class=\"cc-details__description\">{{ plan().description }}</p>\n\n <div class=\"cc-details__facts\">\n <div class=\"cc-details__fact\">\n @if (durationIconSrc()) {\n <img [src]=\"durationIconSrc()\" alt=\"Duraci\u00F3n\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" role=\"img\" aria-label=\"Duraci\u00F3n\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"M12 7v5l3 2\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n <small>{{ plan().duration }}</small>\n </div>\n\n <div class=\"cc-details__fact\">\n @if (people() > 1) {\n @if (peopleIconSrc()) {\n <img [src]=\"peopleIconSrc()\" alt=\"\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"9\" cy=\"8\" r=\"3.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <circle cx=\"17\" cy=\"9\" r=\"2.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"M2.5 20a6.5 6.5 0 0 1 13 0M15 14.5a5 5 0 0 1 6.5 4.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n <small>{{ people() }} {{ peopleLabel() }}</small>\n } @else {\n @if (personIconSrc()) {\n <img [src]=\"personIconSrc()\" alt=\"\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"8\" r=\"4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"M4.5 20a7.5 7.5 0 0 1 15 0\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n <small>1 {{ personLabel() }}</small>\n }\n </div>\n </div>\n\n @if (services().length) {\n <h2 class=\"cc-details__includes\">{{ includesLabel() }}</h2>\n <ul class=\"cc-details__services\">\n @for (service of services(); track $index) {\n <li>\n <img [src]=\"service.iconPath\" alt=\"\" />\n <small>{{ service.name }}</small>\n </li>\n }\n </ul>\n }\n\n <ng-content />\n\n <div class=\"cc-details__gift\" [class.cc-details__gift--solo]=\"!perks().length\">\n @if (perks().length) {\n @if (perksImageSrc()) {\n <img class=\"cc-details__gift-img\" [src]=\"perksImageSrc()\" [alt]=\"perksImageAlt()\" loading=\"lazy\" />\n }\n <div class=\"cc-details__perks\">\n <h2>{{ perksTitle() }}</h2>\n <ul>\n @for (perk of perks(); track $index) {\n <li>{{ perk }}</li>\n }\n </ul>\n </div>\n }\n <div class=\"cc-details__cta-wrap\">\n <a class=\"cc-details__cta\" [href]=\"bookingUrl()\" target=\"_blank\" rel=\"noopener\">{{ bookingLabel() }}</a>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;color:var(--cc-text, var(--cc-primary, #4c6b4a))}.cc-details{display:flex;flex-direction:column;gap:3rem}.cc-details__media{display:flex;flex-direction:column;gap:2.5rem}.cc-details__photo{display:block;width:100%;max-width:60rem;box-shadow:var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1))}.cc-details__panel{background:var(--cc-details-panel-bg, var(--cc-surface, var(--cc-secondary-light, #f8f4ee)))}.cc-details__info{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:2.5rem;width:100%;padding:5rem 2.5rem 1.25rem}.cc-details__price{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;padding:.25rem 1.5rem;white-space:nowrap;text-align:center;background:var(--cc-details-price-bg, var(--cc-heading, var(--cc-primary, #4c6b4a)));box-shadow:0 1px 2px #0000000d}.cc-details__price p{margin:0;font-family:var(--cc-font-heading, inherit);font-size:1.6rem;font-weight:700;color:var(--cc-on-accent, var(--cc-bg, #f0ffef))}.cc-details__description{margin:0}.cc-details__facts{display:flex;gap:2.5rem}.cc-details__fact{display:flex;flex-direction:column;align-items:center;gap:.25rem}.cc-details__fact img,.cc-details__fact svg{width:1.75rem;height:1.75rem}.cc-details__includes{margin:0;font-size:1rem;font-weight:600;color:var(--cc-heading, var(--cc-primary, #4c6b4a))}.cc-details__services{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:0;padding:0;list-style:none}.cc-details__services li{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;text-align:center}.cc-details__services img{width:2rem}.cc-details__gift{box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:1.25rem;width:100%;padding:.5rem;border:2px dashed var(--cc-details-gift-border, var(--cc-secondary-light, #f8f4ee))}.cc-details__gift--solo{border:0;padding:0}.cc-details__gift-img{width:100%}.cc-details__perks{display:flex;flex-direction:column;gap:1.25rem}.cc-details__perks h2{margin:0;font-size:1rem;font-weight:600;color:var(--cc-accent, var(--cc-secondary, #ceab5d))}.cc-details__perks ul{margin:0;padding:0;list-style:none}.cc-details__cta-wrap{display:flex;align-items:flex-end;width:100%;height:100%}.cc-details__cta{padding:.75rem 2.5rem;white-space:nowrap;text-decoration:none;color:var(--cc-on-accent, var(--cc-bg, #f0ffef));background:var(--cc-accent, var(--cc-secondary, #ceab5d));box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;transition:background-color .15s ease-in}.cc-details__cta:hover{background:var(--cc-accent-hover, var(--cc-secondary-dark, #9a7521))}@media (min-width: 1024px){.cc-details{flex-direction:row;gap:7rem}.cc-details__media,.cc-details__panel{flex:1 1 0}.cc-details__info{gap:1.25rem}.cc-details__price{width:auto;min-width:30%}.cc-details__services{grid-template-columns:repeat(6,minmax(0,1fr))}.cc-details__gift{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem 1.5rem;padding:1.25rem}.cc-details__gift--solo{grid-template-columns:1fr;padding:0}.cc-details__gift-img{width:10rem}.cc-details__perks{gap:.5rem}.cc-details__perks ul{padding-left:1.25rem;list-style:disc}.cc-details__cta-wrap{grid-column:1 / -1;justify-content:flex-end;width:100%}}\n"], dependencies: [{ kind: "pipe", type: CurrencyPipe, name: "currency" }, { kind: "component", type: PageBannerComponent, selector: "cc-page-banner", inputs: ["title", "variant", "iconSrc", "backLink", "backIconSrc", "backLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
1093
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: PlanDetailsComponent, isStandalone: true, selector: "cc-plan-details", inputs: { plan: { classPropertyName: "plan", publicName: "plan", isSignal: true, isRequired: true, transformFunction: null }, bookingUrl: { classPropertyName: "bookingUrl", publicName: "bookingUrl", isSignal: true, isRequired: true, transformFunction: null }, bookingLabel: { classPropertyName: "bookingLabel", publicName: "bookingLabel", isSignal: true, isRequired: false, transformFunction: null }, barBookingLabel: { classPropertyName: "barBookingLabel", publicName: "barBookingLabel", isSignal: true, isRequired: false, transformFunction: null }, bookingVariant: { classPropertyName: "bookingVariant", publicName: "bookingVariant", isSignal: true, isRequired: false, transformFunction: null }, stickyBar: { classPropertyName: "stickyBar", publicName: "stickyBar", isSignal: true, isRequired: false, transformFunction: null }, showBanner: { classPropertyName: "showBanner", publicName: "showBanner", isSignal: true, isRequired: false, transformFunction: null }, backLink: { classPropertyName: "backLink", publicName: "backLink", isSignal: true, isRequired: false, transformFunction: null }, backLabel: { classPropertyName: "backLabel", publicName: "backLabel", isSignal: true, isRequired: false, transformFunction: null }, backIconSrc: { classPropertyName: "backIconSrc", publicName: "backIconSrc", isSignal: true, isRequired: false, transformFunction: null }, titleIconSrc: { classPropertyName: "titleIconSrc", publicName: "titleIconSrc", isSignal: true, isRequired: false, transformFunction: null }, imageAltSuffix: { classPropertyName: "imageAltSuffix", publicName: "imageAltSuffix", isSignal: true, isRequired: false, transformFunction: null }, priceFormat: { classPropertyName: "priceFormat", publicName: "priceFormat", isSignal: true, isRequired: false, transformFunction: null }, priceNote: { classPropertyName: "priceNote", publicName: "priceNote", isSignal: true, isRequired: false, transformFunction: null }, durationIconSrc: { classPropertyName: "durationIconSrc", publicName: "durationIconSrc", isSignal: true, isRequired: false, transformFunction: null }, personIconSrc: { classPropertyName: "personIconSrc", publicName: "personIconSrc", isSignal: true, isRequired: false, transformFunction: null }, peopleIconSrc: { classPropertyName: "peopleIconSrc", publicName: "peopleIconSrc", isSignal: true, isRequired: false, transformFunction: null }, durationLabel: { classPropertyName: "durationLabel", publicName: "durationLabel", isSignal: true, isRequired: false, transformFunction: null }, peopleCaption: { classPropertyName: "peopleCaption", publicName: "peopleCaption", isSignal: true, isRequired: false, transformFunction: null }, personLabel: { classPropertyName: "personLabel", publicName: "personLabel", isSignal: true, isRequired: false, transformFunction: null }, peopleLabel: { classPropertyName: "peopleLabel", publicName: "peopleLabel", isSignal: true, isRequired: false, transformFunction: null }, includesLabel: { classPropertyName: "includesLabel", publicName: "includesLabel", isSignal: true, isRequired: false, transformFunction: null }, perksTitle: { classPropertyName: "perksTitle", publicName: "perksTitle", isSignal: true, isRequired: false, transformFunction: null }, perks: { classPropertyName: "perks", publicName: "perks", isSignal: true, isRequired: false, transformFunction: null }, perksImageSrc: { classPropertyName: "perksImageSrc", publicName: "perksImageSrc", isSignal: true, isRequired: false, transformFunction: null }, perksImageAlt: { classPropertyName: "perksImageAlt", publicName: "perksImageAlt", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (showBanner()) {\r\n <cc-page-banner\r\n [title]=\"plan().name\"\r\n [iconSrc]=\"titleIconSrc()\"\r\n [backLink]=\"backLink()\"\r\n [backLabel]=\"backLabel()\"\r\n [backIconSrc]=\"backIconSrc()\"\r\n />\r\n}\r\n\r\n<div class=\"cc-details\">\r\n <div class=\"cc-details__media\">\r\n <img\r\n class=\"cc-details__photo\"\r\n [src]=\"plan().imgPath\"\r\n [alt]=\"plan().name + imageAltSuffix()\"\r\n width=\"800\"\r\n height=\"800\"\r\n />\r\n <ng-content select=\"[ccDetailsMedia]\" />\r\n </div>\r\n\r\n <div class=\"cc-details__panel\">\r\n <div class=\"cc-details__buy\">\r\n <p class=\"cc-details__price\">{{ price() }}</p>\r\n @if (priceNote()) {\r\n <p class=\"cc-details__price-note\">{{ priceNote() }}</p>\r\n }\r\n <a ccButton [variant]=\"bookingVariant()\" size=\"lg\" class=\"cc-details__cta-top\" [href]=\"booking()\" target=\"_blank\" rel=\"noopener\">\r\n {{ bookingLabel() }}\r\n </a>\r\n </div>\r\n\r\n <p class=\"cc-details__description\">{{ plan().description }}</p>\r\n\r\n <dl class=\"cc-details__facts\">\r\n <div class=\"cc-details__fact\">\r\n @if (durationIconSrc()) {\r\n <img [src]=\"durationIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <circle cx=\"12\" cy=\"12\" r=\"9\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M12 7v5l3 2\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n }\r\n <dt class=\"cc-sr-only\">{{ durationLabel() }}</dt>\r\n <dd>{{ plan().duration }}</dd>\r\n </div>\r\n\r\n <div class=\"cc-details__fact\">\r\n @if (people() > 1) {\r\n @if (peopleIconSrc()) {\r\n <img [src]=\"peopleIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <circle cx=\"9\" cy=\"8\" r=\"3.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <circle cx=\"17\" cy=\"9\" r=\"2.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M2.5 20a6.5 6.5 0 0 1 13 0M15 14.5a5 5 0 0 1 6.5 4.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n }\r\n } @else {\r\n @if (personIconSrc()) {\r\n <img [src]=\"personIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <circle cx=\"12\" cy=\"8\" r=\"4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M4.5 20a7.5 7.5 0 0 1 15 0\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n }\r\n }\r\n <dt class=\"cc-sr-only\">{{ peopleCaption() }}</dt>\r\n <dd>{{ people() }} {{ people() > 1 ? peopleLabel() : personLabel() }}</dd>\r\n </div>\r\n </dl>\r\n\r\n @if (services().length) {\r\n <section class=\"cc-details__section\">\r\n <h2 class=\"cc-details__heading\">{{ includesLabel() }}</h2>\r\n <ul class=\"cc-details__services\">\r\n @for (service of services(); track $index) {\r\n <li>\r\n <img [src]=\"service.iconPath\" alt=\"\" width=\"36\" height=\"36\" />\r\n <span>{{ service.name }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </section>\r\n }\r\n\r\n <ng-content />\r\n\r\n @if (perks().length) {\r\n <section class=\"cc-details__gift\">\r\n @if (perksImageSrc()) {\r\n <img class=\"cc-details__gift-img\" [src]=\"perksImageSrc()\" [alt]=\"perksImageAlt()\" loading=\"lazy\" />\r\n }\r\n <div class=\"cc-details__perks\">\r\n <h2 class=\"cc-details__heading cc-details__heading--accent\">{{ perksTitle() }}</h2>\r\n <ul>\r\n @for (perk of perks(); track $index) {\r\n <li>{{ perk }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </section>\r\n }\r\n\r\n <div class=\"cc-details__cta-bottom\">\r\n <a ccButton [variant]=\"bookingVariant()\" size=\"lg\" [href]=\"booking()\" target=\"_blank\" rel=\"noopener\">{{ bookingLabel() }}</a>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if (stickyBar()) {\r\n <div class=\"cc-details__bar\">\r\n <div class=\"cc-details__bar-price\">\r\n <span class=\"cc-details__bar-amount\">{{ price() }}</span>\r\n <span class=\"cc-details__bar-name\">{{ plan().name }}</span>\r\n </div>\r\n <a ccButton [variant]=\"bookingVariant()\" class=\"cc-details__bar-cta\" [href]=\"booking()\" target=\"_blank\" rel=\"noopener\">{{ barBookingLabel() }}</a>\r\n </div>\r\n}\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:block;color:var(--_text)}.cc-details{display:flex;flex-direction:column;gap:var(--_space-8)}.cc-details__media{display:flex;flex-direction:column;gap:var(--_space-6)}.cc-details__photo{display:block;width:100%;height:auto;aspect-ratio:var(--cc-details-image-ratio, 1);object-fit:cover;border-radius:var(--_radius);box-shadow:var(--_shadow-lg)}.cc-details__panel{display:flex;flex-direction:column;gap:var(--_space-6);padding:var(--_space-6);border-radius:var(--_radius);background:var(--cc-details-panel-bg, var(--_surface))}.cc-details__buy{display:flex;flex-direction:column;align-items:flex-start;gap:var(--_space-2)}.cc-details__price{margin:0;padding:var(--_space-1) var(--_space-4);border-radius:var(--_radius);font-family:var(--_font-heading);font-size:var(--_text-3xl);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);color:var(--cc-details-price-color, var(--_on-inverse));background:var(--cc-details-price-bg, var(--_inverse))}.cc-details__price-note{margin:0;font-size:var(--_text-sm);color:var(--_text-muted)}.cc-details__cta-top{margin-top:var(--_space-2)}.cc-details__description{margin:0;font-size:var(--_text-md);line-height:var(--_leading-body)}.cc-details__facts{display:flex;flex-wrap:wrap;gap:var(--_space-8);margin:0}.cc-details__fact{display:flex;align-items:center;gap:var(--_space-2)}.cc-details__fact dd{margin:0;font-size:var(--_text-sm);font-weight:var(--_weight-semibold)}.cc-details__fact img,.cc-details__fact svg{flex:none;width:1.75rem;height:1.75rem}.cc-details__section{display:flex;flex-direction:column;gap:var(--_space-4)}.cc-details__heading{font-style:var(--_heading-style);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);margin:0;font-family:var(--_font-heading);font-size:var(--_text-lg);font-weight:var(--_weight-bold);color:var(--_heading)}.cc-details__heading--accent{color:var(--_accent-text)}.cc-details__services{display:grid;grid-template-columns:repeat(auto-fill,minmax(5.5rem,1fr));gap:var(--_space-4) var(--_space-3);margin:0;padding:0;list-style:none}.cc-details__services li{display:flex;flex-direction:column;align-items:center;gap:var(--_space-2);font-size:var(--_text-sm);line-height:var(--_leading-snug);text-align:center}.cc-details__services img{width:2.25rem;height:2.25rem;object-fit:contain}.cc-details__gift{display:flex;flex-direction:column;gap:var(--_space-4);padding:var(--_space-5);border:2px dashed var(--cc-details-gift-border, var(--_border-strong));border-radius:var(--_radius)}.cc-details__gift-img{width:100%;max-width:12rem;align-self:center}.cc-details__perks{display:flex;flex-direction:column;gap:var(--_space-3)}.cc-details__perks ul{display:flex;flex-direction:column;gap:var(--_space-2);margin:0;padding-left:var(--_space-5);line-height:var(--_leading-snug)}.cc-details__cta-bottom{display:flex;justify-content:flex-end}.cc-details__bar{position:sticky;bottom:0;z-index:var(--_z-sticky);display:flex;align-items:center;justify-content:space-between;gap:var(--_space-3);margin:var(--_space-6) calc(-1 * var(--cc-details-bar-bleed, 0px)) 0;padding:var(--_space-3) var(--_space-4);background:var(--cc-details-bar-bg, var(--_canvas));box-shadow:0 -4px 12px #00000014}.cc-details__bar-cta{flex:none;white-space:nowrap}.cc-details__bar-price{display:flex;flex-direction:column;min-width:0}.cc-details__bar-amount{font-size:var(--_text-lg);font-weight:var(--_weight-bold);color:var(--_heading)}.cc-details__bar-name{overflow:hidden;font-size:var(--_text-xs);white-space:nowrap;text-overflow:ellipsis;color:var(--_text-muted)}@media (min-width: 640px){.cc-details__gift{flex-direction:row;align-items:center}.cc-details__gift-img{width:10rem;align-self:auto}}@media (min-width: 1024px){.cc-details{flex-direction:row;align-items:flex-start;gap:var(--_space-12)}.cc-details__media{position:sticky;top:var(--cc-details-sticky-top, var(--_space-6));flex:1 1 0}.cc-details__panel{flex:1 1 0;padding:var(--_space-8)}.cc-details__bar{display:none}}\n"], dependencies: [{ kind: "component", type: ButtonComponent, selector: "a[ccButton], button[ccButton]", inputs: ["variant", "size", "block"] }, { kind: "component", type: PageBannerComponent, selector: "cc-page-banner", inputs: ["title", "subtitle", "variant", "size", "italic", "align", "iconSrc", "backLink", "backIconSrc", "backLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
705
1094
|
}
|
|
706
1095
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: PlanDetailsComponent, decorators: [{
|
|
707
1096
|
type: Component,
|
|
708
|
-
args: [{ selector: 'cc-plan-details', imports: [CurrencyPipe, PageBannerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (showBanner()) {\n <cc-page-banner\n variant=\"plain\"\n [title]=\"plan().name\"\n [iconSrc]=\"titleIconSrc()\"\n [backLink]=\"backLink()\"\n [backLabel]=\"backLabel()\"\n [backIconSrc]=\"backIconSrc()\"\n />\n}\n\n<div class=\"cc-details\">\n <div class=\"cc-details__media\">\n <img class=\"cc-details__photo\" [src]=\"plan().imgPath\" [alt]=\"plan().name + imageAltSuffix()\" />\n <ng-content select=\"[ccDetailsMedia]\" />\n </div>\n\n <div class=\"cc-details__panel\">\n <div class=\"cc-details__info\">\n <div class=\"cc-details__price\">\n <p>{{ plan().price | currency: currencyCode() : currencyDisplay() : currencyDigits() }}</p>\n </div>\n\n <p class=\"cc-details__description\">{{ plan().description }}</p>\n\n <div class=\"cc-details__facts\">\n <div class=\"cc-details__fact\">\n @if (durationIconSrc()) {\n <img [src]=\"durationIconSrc()\" alt=\"Duraci\u00F3n\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" role=\"img\" aria-label=\"Duraci\u00F3n\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"M12 7v5l3 2\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n <small>{{ plan().duration }}</small>\n </div>\n\n <div class=\"cc-details__fact\">\n @if (people() > 1) {\n @if (peopleIconSrc()) {\n <img [src]=\"peopleIconSrc()\" alt=\"\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"9\" cy=\"8\" r=\"3.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <circle cx=\"17\" cy=\"9\" r=\"2.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"M2.5 20a6.5 6.5 0 0 1 13 0M15 14.5a5 5 0 0 1 6.5 4.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n <small>{{ people() }} {{ peopleLabel() }}</small>\n } @else {\n @if (personIconSrc()) {\n <img [src]=\"personIconSrc()\" alt=\"\" />\n } @else {\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle cx=\"12\" cy=\"8\" r=\"4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\n <path d=\"M4.5 20a7.5 7.5 0 0 1 15 0\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\n </svg>\n }\n <small>1 {{ personLabel() }}</small>\n }\n </div>\n </div>\n\n @if (services().length) {\n <h2 class=\"cc-details__includes\">{{ includesLabel() }}</h2>\n <ul class=\"cc-details__services\">\n @for (service of services(); track $index) {\n <li>\n <img [src]=\"service.iconPath\" alt=\"\" />\n <small>{{ service.name }}</small>\n </li>\n }\n </ul>\n }\n\n <ng-content />\n\n <div class=\"cc-details__gift\" [class.cc-details__gift--solo]=\"!perks().length\">\n @if (perks().length) {\n @if (perksImageSrc()) {\n <img class=\"cc-details__gift-img\" [src]=\"perksImageSrc()\" [alt]=\"perksImageAlt()\" loading=\"lazy\" />\n }\n <div class=\"cc-details__perks\">\n <h2>{{ perksTitle() }}</h2>\n <ul>\n @for (perk of perks(); track $index) {\n <li>{{ perk }}</li>\n }\n </ul>\n </div>\n }\n <div class=\"cc-details__cta-wrap\">\n <a class=\"cc-details__cta\" [href]=\"bookingUrl()\" target=\"_blank\" rel=\"noopener\">{{ bookingLabel() }}</a>\n </div>\n </div>\n </div>\n </div>\n</div>\n", styles: [":host{display:block;color:var(--cc-text, var(--cc-primary, #4c6b4a))}.cc-details{display:flex;flex-direction:column;gap:3rem}.cc-details__media{display:flex;flex-direction:column;gap:2.5rem}.cc-details__photo{display:block;width:100%;max-width:60rem;box-shadow:var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1))}.cc-details__panel{background:var(--cc-details-panel-bg, var(--cc-surface, var(--cc-secondary-light, #f8f4ee)))}.cc-details__info{position:relative;box-sizing:border-box;display:flex;flex-direction:column;gap:2.5rem;width:100%;padding:5rem 2.5rem 1.25rem}.cc-details__price{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;padding:.25rem 1.5rem;white-space:nowrap;text-align:center;background:var(--cc-details-price-bg, var(--cc-heading, var(--cc-primary, #4c6b4a)));box-shadow:0 1px 2px #0000000d}.cc-details__price p{margin:0;font-family:var(--cc-font-heading, inherit);font-size:1.6rem;font-weight:700;color:var(--cc-on-accent, var(--cc-bg, #f0ffef))}.cc-details__description{margin:0}.cc-details__facts{display:flex;gap:2.5rem}.cc-details__fact{display:flex;flex-direction:column;align-items:center;gap:.25rem}.cc-details__fact img,.cc-details__fact svg{width:1.75rem;height:1.75rem}.cc-details__includes{margin:0;font-size:1rem;font-weight:600;color:var(--cc-heading, var(--cc-primary, #4c6b4a))}.cc-details__services{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem;margin:0;padding:0;list-style:none}.cc-details__services li{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.5rem;text-align:center}.cc-details__services img{width:2rem}.cc-details__gift{box-sizing:border-box;display:flex;flex-direction:column;align-items:flex-start;justify-content:space-between;gap:1.25rem;width:100%;padding:.5rem;border:2px dashed var(--cc-details-gift-border, var(--cc-secondary-light, #f8f4ee))}.cc-details__gift--solo{border:0;padding:0}.cc-details__gift-img{width:100%}.cc-details__perks{display:flex;flex-direction:column;gap:1.25rem}.cc-details__perks h2{margin:0;font-size:1rem;font-weight:600;color:var(--cc-accent, var(--cc-secondary, #ceab5d))}.cc-details__perks ul{margin:0;padding:0;list-style:none}.cc-details__cta-wrap{display:flex;align-items:flex-end;width:100%;height:100%}.cc-details__cta{padding:.75rem 2.5rem;white-space:nowrap;text-decoration:none;color:var(--cc-on-accent, var(--cc-bg, #f0ffef));background:var(--cc-accent, var(--cc-secondary, #ceab5d));box-shadow:0 20px 25px -5px #0000001a,0 8px 10px -6px #0000001a;transition:background-color .15s ease-in}.cc-details__cta:hover{background:var(--cc-accent-hover, var(--cc-secondary-dark, #9a7521))}@media (min-width: 1024px){.cc-details{flex-direction:row;gap:7rem}.cc-details__media,.cc-details__panel{flex:1 1 0}.cc-details__info{gap:1.25rem}.cc-details__price{width:auto;min-width:30%}.cc-details__services{grid-template-columns:repeat(6,minmax(0,1fr))}.cc-details__gift{display:grid;grid-template-columns:auto 1fr;align-items:center;gap:1rem 1.5rem;padding:1.25rem}.cc-details__gift--solo{grid-template-columns:1fr;padding:0}.cc-details__gift-img{width:10rem}.cc-details__perks{gap:.5rem}.cc-details__perks ul{padding-left:1.25rem;list-style:disc}.cc-details__cta-wrap{grid-column:1 / -1;justify-content:flex-end;width:100%}}\n"] }]
|
|
1097
|
+
args: [{ selector: 'cc-plan-details', imports: [ButtonComponent, PageBannerComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (showBanner()) {\r\n <cc-page-banner\r\n [title]=\"plan().name\"\r\n [iconSrc]=\"titleIconSrc()\"\r\n [backLink]=\"backLink()\"\r\n [backLabel]=\"backLabel()\"\r\n [backIconSrc]=\"backIconSrc()\"\r\n />\r\n}\r\n\r\n<div class=\"cc-details\">\r\n <div class=\"cc-details__media\">\r\n <img\r\n class=\"cc-details__photo\"\r\n [src]=\"plan().imgPath\"\r\n [alt]=\"plan().name + imageAltSuffix()\"\r\n width=\"800\"\r\n height=\"800\"\r\n />\r\n <ng-content select=\"[ccDetailsMedia]\" />\r\n </div>\r\n\r\n <div class=\"cc-details__panel\">\r\n <div class=\"cc-details__buy\">\r\n <p class=\"cc-details__price\">{{ price() }}</p>\r\n @if (priceNote()) {\r\n <p class=\"cc-details__price-note\">{{ priceNote() }}</p>\r\n }\r\n <a ccButton [variant]=\"bookingVariant()\" size=\"lg\" class=\"cc-details__cta-top\" [href]=\"booking()\" target=\"_blank\" rel=\"noopener\">\r\n {{ bookingLabel() }}\r\n </a>\r\n </div>\r\n\r\n <p class=\"cc-details__description\">{{ plan().description }}</p>\r\n\r\n <dl class=\"cc-details__facts\">\r\n <div class=\"cc-details__fact\">\r\n @if (durationIconSrc()) {\r\n <img [src]=\"durationIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <circle cx=\"12\" cy=\"12\" r=\"9\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M12 7v5l3 2\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n }\r\n <dt class=\"cc-sr-only\">{{ durationLabel() }}</dt>\r\n <dd>{{ plan().duration }}</dd>\r\n </div>\r\n\r\n <div class=\"cc-details__fact\">\r\n @if (people() > 1) {\r\n @if (peopleIconSrc()) {\r\n <img [src]=\"peopleIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <circle cx=\"9\" cy=\"8\" r=\"3.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <circle cx=\"17\" cy=\"9\" r=\"2.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M2.5 20a6.5 6.5 0 0 1 13 0M15 14.5a5 5 0 0 1 6.5 4.5\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n }\r\n } @else {\r\n @if (personIconSrc()) {\r\n <img [src]=\"personIconSrc()\" alt=\"\" />\r\n } @else {\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\">\r\n <circle cx=\"12\" cy=\"8\" r=\"4\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" />\r\n <path d=\"M4.5 20a7.5 7.5 0 0 1 15 0\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" />\r\n </svg>\r\n }\r\n }\r\n <dt class=\"cc-sr-only\">{{ peopleCaption() }}</dt>\r\n <dd>{{ people() }} {{ people() > 1 ? peopleLabel() : personLabel() }}</dd>\r\n </div>\r\n </dl>\r\n\r\n @if (services().length) {\r\n <section class=\"cc-details__section\">\r\n <h2 class=\"cc-details__heading\">{{ includesLabel() }}</h2>\r\n <ul class=\"cc-details__services\">\r\n @for (service of services(); track $index) {\r\n <li>\r\n <img [src]=\"service.iconPath\" alt=\"\" width=\"36\" height=\"36\" />\r\n <span>{{ service.name }}</span>\r\n </li>\r\n }\r\n </ul>\r\n </section>\r\n }\r\n\r\n <ng-content />\r\n\r\n @if (perks().length) {\r\n <section class=\"cc-details__gift\">\r\n @if (perksImageSrc()) {\r\n <img class=\"cc-details__gift-img\" [src]=\"perksImageSrc()\" [alt]=\"perksImageAlt()\" loading=\"lazy\" />\r\n }\r\n <div class=\"cc-details__perks\">\r\n <h2 class=\"cc-details__heading cc-details__heading--accent\">{{ perksTitle() }}</h2>\r\n <ul>\r\n @for (perk of perks(); track $index) {\r\n <li>{{ perk }}</li>\r\n }\r\n </ul>\r\n </div>\r\n </section>\r\n }\r\n\r\n <div class=\"cc-details__cta-bottom\">\r\n <a ccButton [variant]=\"bookingVariant()\" size=\"lg\" [href]=\"booking()\" target=\"_blank\" rel=\"noopener\">{{ bookingLabel() }}</a>\r\n </div>\r\n </div>\r\n</div>\r\n\r\n@if (stickyBar()) {\r\n <div class=\"cc-details__bar\">\r\n <div class=\"cc-details__bar-price\">\r\n <span class=\"cc-details__bar-amount\">{{ price() }}</span>\r\n <span class=\"cc-details__bar-name\">{{ plan().name }}</span>\r\n </div>\r\n <a ccButton [variant]=\"bookingVariant()\" class=\"cc-details__bar-cta\" [href]=\"booking()\" target=\"_blank\" rel=\"noopener\">{{ barBookingLabel() }}</a>\r\n </div>\r\n}\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:block;color:var(--_text)}.cc-details{display:flex;flex-direction:column;gap:var(--_space-8)}.cc-details__media{display:flex;flex-direction:column;gap:var(--_space-6)}.cc-details__photo{display:block;width:100%;height:auto;aspect-ratio:var(--cc-details-image-ratio, 1);object-fit:cover;border-radius:var(--_radius);box-shadow:var(--_shadow-lg)}.cc-details__panel{display:flex;flex-direction:column;gap:var(--_space-6);padding:var(--_space-6);border-radius:var(--_radius);background:var(--cc-details-panel-bg, var(--_surface))}.cc-details__buy{display:flex;flex-direction:column;align-items:flex-start;gap:var(--_space-2)}.cc-details__price{margin:0;padding:var(--_space-1) var(--_space-4);border-radius:var(--_radius);font-family:var(--_font-heading);font-size:var(--_text-3xl);font-weight:var(--_weight-bold);line-height:var(--_leading-tight);color:var(--cc-details-price-color, var(--_on-inverse));background:var(--cc-details-price-bg, var(--_inverse))}.cc-details__price-note{margin:0;font-size:var(--_text-sm);color:var(--_text-muted)}.cc-details__cta-top{margin-top:var(--_space-2)}.cc-details__description{margin:0;font-size:var(--_text-md);line-height:var(--_leading-body)}.cc-details__facts{display:flex;flex-wrap:wrap;gap:var(--_space-8);margin:0}.cc-details__fact{display:flex;align-items:center;gap:var(--_space-2)}.cc-details__fact dd{margin:0;font-size:var(--_text-sm);font-weight:var(--_weight-semibold)}.cc-details__fact img,.cc-details__fact svg{flex:none;width:1.75rem;height:1.75rem}.cc-details__section{display:flex;flex-direction:column;gap:var(--_space-4)}.cc-details__heading{font-style:var(--_heading-style);letter-spacing:var(--_heading-tracking);text-transform:var(--_heading-transform);margin:0;font-family:var(--_font-heading);font-size:var(--_text-lg);font-weight:var(--_weight-bold);color:var(--_heading)}.cc-details__heading--accent{color:var(--_accent-text)}.cc-details__services{display:grid;grid-template-columns:repeat(auto-fill,minmax(5.5rem,1fr));gap:var(--_space-4) var(--_space-3);margin:0;padding:0;list-style:none}.cc-details__services li{display:flex;flex-direction:column;align-items:center;gap:var(--_space-2);font-size:var(--_text-sm);line-height:var(--_leading-snug);text-align:center}.cc-details__services img{width:2.25rem;height:2.25rem;object-fit:contain}.cc-details__gift{display:flex;flex-direction:column;gap:var(--_space-4);padding:var(--_space-5);border:2px dashed var(--cc-details-gift-border, var(--_border-strong));border-radius:var(--_radius)}.cc-details__gift-img{width:100%;max-width:12rem;align-self:center}.cc-details__perks{display:flex;flex-direction:column;gap:var(--_space-3)}.cc-details__perks ul{display:flex;flex-direction:column;gap:var(--_space-2);margin:0;padding-left:var(--_space-5);line-height:var(--_leading-snug)}.cc-details__cta-bottom{display:flex;justify-content:flex-end}.cc-details__bar{position:sticky;bottom:0;z-index:var(--_z-sticky);display:flex;align-items:center;justify-content:space-between;gap:var(--_space-3);margin:var(--_space-6) calc(-1 * var(--cc-details-bar-bleed, 0px)) 0;padding:var(--_space-3) var(--_space-4);background:var(--cc-details-bar-bg, var(--_canvas));box-shadow:0 -4px 12px #00000014}.cc-details__bar-cta{flex:none;white-space:nowrap}.cc-details__bar-price{display:flex;flex-direction:column;min-width:0}.cc-details__bar-amount{font-size:var(--_text-lg);font-weight:var(--_weight-bold);color:var(--_heading)}.cc-details__bar-name{overflow:hidden;font-size:var(--_text-xs);white-space:nowrap;text-overflow:ellipsis;color:var(--_text-muted)}@media (min-width: 640px){.cc-details__gift{flex-direction:row;align-items:center}.cc-details__gift-img{width:10rem;align-self:auto}}@media (min-width: 1024px){.cc-details{flex-direction:row;align-items:flex-start;gap:var(--_space-12)}.cc-details__media{position:sticky;top:var(--cc-details-sticky-top, var(--_space-6));flex:1 1 0}.cc-details__panel{flex:1 1 0;padding:var(--_space-8)}.cc-details__bar{display:none}}\n"] }]
|
|
709
1098
|
}] });
|
|
710
1099
|
|
|
711
1100
|
/**
|
|
712
1101
|
* Full-screen image viewer. It is open while `index` is not null.
|
|
713
|
-
* Arrow keys move between images and
|
|
1102
|
+
* Arrow keys and swipe move between images; Escape and the backdrop close it.
|
|
1103
|
+
* Focus moves into the viewer on open, stays inside while open, and returns to the
|
|
1104
|
+
* element that opened it on close.
|
|
714
1105
|
*
|
|
715
1106
|
* ```html
|
|
716
1107
|
* <cc-lightbox [images]="images" [(index)]="openIndex" />
|
|
717
1108
|
* ```
|
|
1109
|
+
*
|
|
1110
|
+
* Tokens: --cc-lightbox-backdrop, --cc-lightbox-control-bg, --cc-lightbox-color.
|
|
718
1111
|
*/
|
|
719
1112
|
class LightboxComponent {
|
|
720
1113
|
images = input.required();
|
|
@@ -723,20 +1116,34 @@ class LightboxComponent {
|
|
|
723
1116
|
closeLabel = input('Cerrar');
|
|
724
1117
|
prevLabel = input('Imagen anterior');
|
|
725
1118
|
nextLabel = input('Imagen siguiente');
|
|
1119
|
+
/** Text of the position counter, for example "3 de 18". */
|
|
1120
|
+
counterSeparator = input('de');
|
|
726
1121
|
current = computed(() => {
|
|
727
1122
|
const i = this.index();
|
|
728
1123
|
return i === null ? null : (this.images()[i] ?? null);
|
|
729
1124
|
});
|
|
1125
|
+
/** Changes only on open/close, not when moving between images. */
|
|
1126
|
+
isOpen = computed(() => this.current() !== null);
|
|
730
1127
|
document = inject(DOCUMENT);
|
|
1128
|
+
dialog = viewChild('dialog');
|
|
1129
|
+
closeButton = viewChild('closeButton');
|
|
1130
|
+
touchStartX = null;
|
|
731
1131
|
constructor() {
|
|
732
|
-
//
|
|
1132
|
+
// Lock page scroll and manage focus while the viewer is open.
|
|
733
1133
|
effect((onCleanup) => {
|
|
734
|
-
if (this.
|
|
1134
|
+
if (!this.isOpen())
|
|
735
1135
|
return;
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
1136
|
+
untracked(() => {
|
|
1137
|
+
const body = this.document.body;
|
|
1138
|
+
const previousOverflow = body.style.overflow;
|
|
1139
|
+
const opener = this.document.activeElement;
|
|
1140
|
+
body.style.overflow = 'hidden';
|
|
1141
|
+
queueMicrotask(() => this.closeButton()?.nativeElement.focus());
|
|
1142
|
+
onCleanup(() => {
|
|
1143
|
+
body.style.overflow = previousOverflow;
|
|
1144
|
+
opener?.focus?.();
|
|
1145
|
+
});
|
|
1146
|
+
});
|
|
740
1147
|
});
|
|
741
1148
|
}
|
|
742
1149
|
close() {
|
|
@@ -755,8 +1162,42 @@ class LightboxComponent {
|
|
|
755
1162
|
if (i !== null && total)
|
|
756
1163
|
this.index.set((i - 1 + total) % total);
|
|
757
1164
|
}
|
|
1165
|
+
/** Keeps Tab and Shift+Tab inside the viewer. */
|
|
1166
|
+
trapFocus(event) {
|
|
1167
|
+
if (event.key !== 'Tab')
|
|
1168
|
+
return;
|
|
1169
|
+
const focusable = this.dialog()?.nativeElement.querySelectorAll('button');
|
|
1170
|
+
if (!focusable?.length)
|
|
1171
|
+
return;
|
|
1172
|
+
const first = focusable[0];
|
|
1173
|
+
const last = focusable[focusable.length - 1];
|
|
1174
|
+
const active = this.document.activeElement;
|
|
1175
|
+
if (event.shiftKey && active === first) {
|
|
1176
|
+
event.preventDefault();
|
|
1177
|
+
last.focus();
|
|
1178
|
+
}
|
|
1179
|
+
else if (!event.shiftKey && active === last) {
|
|
1180
|
+
event.preventDefault();
|
|
1181
|
+
first.focus();
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
onTouchStart(event) {
|
|
1185
|
+
this.touchStartX = event.touches[0]?.clientX ?? null;
|
|
1186
|
+
}
|
|
1187
|
+
onTouchEnd(event) {
|
|
1188
|
+
if (this.touchStartX === null)
|
|
1189
|
+
return;
|
|
1190
|
+
const delta = (event.changedTouches[0]?.clientX ?? this.touchStartX) - this.touchStartX;
|
|
1191
|
+
this.touchStartX = null;
|
|
1192
|
+
if (Math.abs(delta) < 40)
|
|
1193
|
+
return;
|
|
1194
|
+
if (delta < 0)
|
|
1195
|
+
this.next();
|
|
1196
|
+
else
|
|
1197
|
+
this.prev();
|
|
1198
|
+
}
|
|
758
1199
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LightboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
759
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: LightboxComponent, isStandalone: true, selector: "cc-lightbox", inputs: { images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, prevLabel: { classPropertyName: "prevLabel", publicName: "prevLabel", isSignal: true, isRequired: false, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { index: "indexChange" }, host: { listeners: { "document:keydown.escape": "close()", "document:keydown.arrowright": "next()", "document:keydown.arrowleft": "prev()" } }, ngImport: i0, template: "@if (current(); as image) {\n <div
|
|
1200
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: LightboxComponent, isStandalone: true, selector: "cc-lightbox", inputs: { images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: true, transformFunction: null }, index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: false, transformFunction: null }, closeLabel: { classPropertyName: "closeLabel", publicName: "closeLabel", isSignal: true, isRequired: false, transformFunction: null }, prevLabel: { classPropertyName: "prevLabel", publicName: "prevLabel", isSignal: true, isRequired: false, transformFunction: null }, nextLabel: { classPropertyName: "nextLabel", publicName: "nextLabel", isSignal: true, isRequired: false, transformFunction: null }, counterSeparator: { classPropertyName: "counterSeparator", publicName: "counterSeparator", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { index: "indexChange" }, host: { listeners: { "document:keydown.escape": "close()", "document:keydown.arrowright": "next()", "document:keydown.arrowleft": "prev()" } }, viewQueries: [{ propertyName: "dialog", first: true, predicate: ["dialog"], descendants: true, isSignal: true }, { propertyName: "closeButton", first: true, predicate: ["closeButton"], descendants: true, isSignal: true }], ngImport: i0, template: "@if (current(); as image) {\r\n <div\r\n #dialog\r\n class=\"cc-lb\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"image.caption || image.alt || null\"\r\n (click)=\"close()\"\r\n (keydown)=\"trapFocus($event)\"\r\n (touchstart)=\"onTouchStart($event)\"\r\n (touchend)=\"onTouchEnd($event)\"\r\n >\r\n <div class=\"cc-lb__top\" (click)=\"$event.stopPropagation()\">\r\n <span class=\"cc-lb__counter\">{{ (index() ?? 0) + 1 }} {{ counterSeparator() }} {{ images().length }}</span>\r\n <button #closeButton type=\"button\" class=\"cc-lb__btn\" [attr.aria-label]=\"closeLabel()\" (click)=\"close()\">\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6 6l12 12M18 6 6 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" /></svg>\r\n </button>\r\n </div>\r\n\r\n <figure class=\"cc-lb__figure\" (click)=\"$event.stopPropagation()\">\r\n <img class=\"cc-lb__img\" [src]=\"image.src\" [alt]=\"image.alt ?? image.caption ?? ''\" />\r\n @if (image.caption) {\r\n <figcaption class=\"cc-lb__caption\">{{ image.caption }}</figcaption>\r\n }\r\n </figure>\r\n\r\n @if (images().length > 1) {\r\n <div class=\"cc-lb__nav\" (click)=\"$event.stopPropagation()\">\r\n <button type=\"button\" class=\"cc-lb__btn\" [attr.aria-label]=\"prevLabel()\" (click)=\"prev()\">\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M15 18l-6-6 6-6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" /></svg>\r\n </button>\r\n <button type=\"button\" class=\"cc-lb__btn\" [attr.aria-label]=\"nextLabel()\" (click)=\"next()\">\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"m9 18 6-6-6-6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" /></svg>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_lb-color: var(--cc-lightbox-color, var(--_on-inverse));--_lb-control-bg: var(--cc-lightbox-control-bg, rgb(255 255 255 / .14));--_focus-ring: var(--cc-focus-ring, var(--_lb-color))}.cc-lb{position:fixed;inset:0;z-index:var(--_z-overlay);display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:var(--_space-4);padding:var(--_space-4);color:var(--_lb-color);background:var(--cc-lightbox-backdrop, rgb(0 0 0 / .92))}.cc-lb__top{display:flex;align-items:center;justify-content:space-between;width:100%}.cc-lb__counter{font-size:var(--_text-sm);font-weight:var(--_weight-semibold);opacity:.85}.cc-lb__figure{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:var(--_space-3);min-height:0;margin:0}.cc-lb__img{max-width:100%;max-height:calc(100% - 3rem);object-fit:contain;border-radius:var(--_radius-md);box-shadow:var(--_shadow-lg)}.cc-lb__caption{font-size:var(--_text-md);text-align:center}.cc-lb__nav{display:flex;gap:var(--_space-4)}.cc-lb__btn{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;padding:0;border:0;border-radius:var(--_radius-pill);color:var(--_lb-color);background:var(--_lb-control-bg);cursor:pointer;transition:background-color var(--_duration-fast) var(--_ease)}.cc-lb__btn:hover{background:#ffffff42}.cc-lb__btn svg{width:1.5rem;height:1.5rem}@media (min-width: 1024px){.cc-lb{padding:var(--_space-6) var(--_space-8)}.cc-lb__nav{position:absolute;top:50%;left:var(--_space-6);right:var(--_space-6);justify-content:space-between;transform:translateY(-50%);pointer-events:none}.cc-lb__nav .cc-lb__btn{pointer-events:auto}.cc-lb__figure{padding:0 var(--_space-16)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
760
1201
|
}
|
|
761
1202
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: LightboxComponent, decorators: [{
|
|
762
1203
|
type: Component,
|
|
@@ -764,29 +1205,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
764
1205
|
'(document:keydown.escape)': 'close()',
|
|
765
1206
|
'(document:keydown.arrowright)': 'next()',
|
|
766
1207
|
'(document:keydown.arrowleft)': 'prev()',
|
|
767
|
-
}, template: "@if (current(); as image) {\n <div
|
|
1208
|
+
}, template: "@if (current(); as image) {\r\n <div\r\n #dialog\r\n class=\"cc-lb\"\r\n role=\"dialog\"\r\n aria-modal=\"true\"\r\n [attr.aria-label]=\"image.caption || image.alt || null\"\r\n (click)=\"close()\"\r\n (keydown)=\"trapFocus($event)\"\r\n (touchstart)=\"onTouchStart($event)\"\r\n (touchend)=\"onTouchEnd($event)\"\r\n >\r\n <div class=\"cc-lb__top\" (click)=\"$event.stopPropagation()\">\r\n <span class=\"cc-lb__counter\">{{ (index() ?? 0) + 1 }} {{ counterSeparator() }} {{ images().length }}</span>\r\n <button #closeButton type=\"button\" class=\"cc-lb__btn\" [attr.aria-label]=\"closeLabel()\" (click)=\"close()\">\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M6 6l12 12M18 6 6 18\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" /></svg>\r\n </button>\r\n </div>\r\n\r\n <figure class=\"cc-lb__figure\" (click)=\"$event.stopPropagation()\">\r\n <img class=\"cc-lb__img\" [src]=\"image.src\" [alt]=\"image.alt ?? image.caption ?? ''\" />\r\n @if (image.caption) {\r\n <figcaption class=\"cc-lb__caption\">{{ image.caption }}</figcaption>\r\n }\r\n </figure>\r\n\r\n @if (images().length > 1) {\r\n <div class=\"cc-lb__nav\" (click)=\"$event.stopPropagation()\">\r\n <button type=\"button\" class=\"cc-lb__btn\" [attr.aria-label]=\"prevLabel()\" (click)=\"prev()\">\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"M15 18l-6-6 6-6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" /></svg>\r\n </button>\r\n <button type=\"button\" class=\"cc-lb__btn\" [attr.aria-label]=\"nextLabel()\" (click)=\"next()\">\r\n <svg viewBox=\"0 0 24 24\" aria-hidden=\"true\"><path d=\"m9 18 6-6-6-6\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" /></svg>\r\n </button>\r\n </div>\r\n }\r\n </div>\r\n}\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{--_lb-color: var(--cc-lightbox-color, var(--_on-inverse));--_lb-control-bg: var(--cc-lightbox-control-bg, rgb(255 255 255 / .14));--_focus-ring: var(--cc-focus-ring, var(--_lb-color))}.cc-lb{position:fixed;inset:0;z-index:var(--_z-overlay);display:flex;flex-direction:column;align-items:center;justify-content:space-between;gap:var(--_space-4);padding:var(--_space-4);color:var(--_lb-color);background:var(--cc-lightbox-backdrop, rgb(0 0 0 / .92))}.cc-lb__top{display:flex;align-items:center;justify-content:space-between;width:100%}.cc-lb__counter{font-size:var(--_text-sm);font-weight:var(--_weight-semibold);opacity:.85}.cc-lb__figure{display:flex;flex:1;flex-direction:column;align-items:center;justify-content:center;gap:var(--_space-3);min-height:0;margin:0}.cc-lb__img{max-width:100%;max-height:calc(100% - 3rem);object-fit:contain;border-radius:var(--_radius-md);box-shadow:var(--_shadow-lg)}.cc-lb__caption{font-size:var(--_text-md);text-align:center}.cc-lb__nav{display:flex;gap:var(--_space-4)}.cc-lb__btn{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;padding:0;border:0;border-radius:var(--_radius-pill);color:var(--_lb-color);background:var(--_lb-control-bg);cursor:pointer;transition:background-color var(--_duration-fast) var(--_ease)}.cc-lb__btn:hover{background:#ffffff42}.cc-lb__btn svg{width:1.5rem;height:1.5rem}@media (min-width: 1024px){.cc-lb{padding:var(--_space-6) var(--_space-8)}.cc-lb__nav{position:absolute;top:50%;left:var(--_space-6);right:var(--_space-6);justify-content:space-between;transform:translateY(-50%);pointer-events:none}.cc-lb__nav .cc-lb__btn{pointer-events:auto}.cc-lb__figure{padding:0 var(--_space-16)}}\n"] }]
|
|
768
1209
|
}], ctorParameters: () => [] });
|
|
769
1210
|
|
|
770
1211
|
/**
|
|
771
|
-
*
|
|
1212
|
+
* Grid of square thumbnails that opens a lightbox on click.
|
|
772
1213
|
*
|
|
773
1214
|
* ```html
|
|
774
|
-
* <cc-gallery [images]="images" />
|
|
1215
|
+
* <cc-gallery [images]="images" [columns]="4" />
|
|
775
1216
|
* ```
|
|
776
1217
|
*
|
|
777
1218
|
* `numberedImages()` builds the list for folders named 1.jpeg, 2.jpeg, …
|
|
1219
|
+
*
|
|
1220
|
+
* Tokens: --cc-gallery-gap, --cc-gallery-radius, --cc-gallery-bg.
|
|
778
1221
|
*/
|
|
779
1222
|
class GalleryComponent {
|
|
780
1223
|
images = input.required();
|
|
1224
|
+
/** Columns from 1024px. Small screens use 2, tablets 3. */
|
|
1225
|
+
columns = input(4);
|
|
781
1226
|
backgroundImage = input('');
|
|
782
1227
|
openLabel = input('Ver imagen');
|
|
783
1228
|
open = signal(null);
|
|
784
1229
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GalleryComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
785
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: GalleryComponent, isStandalone: true, selector: "cc-gallery", inputs: { images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: true, transformFunction: null }, backgroundImage: { classPropertyName: "backgroundImage", publicName: "backgroundImage", isSignal: true, isRequired: false, transformFunction: null }, openLabel: { classPropertyName: "openLabel", publicName: "openLabel", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<ul class=\"cc-gallery\" [style.background-image]=\"backgroundImage() ? 'url(' + backgroundImage() + ')' : null\">\n @for (image of images(); track image.src; let i = $index) {\n <li>\n <button
|
|
1230
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: GalleryComponent, isStandalone: true, selector: "cc-gallery", inputs: { images: { classPropertyName: "images", publicName: "images", isSignal: true, isRequired: true, transformFunction: null }, columns: { classPropertyName: "columns", publicName: "columns", isSignal: true, isRequired: false, transformFunction: null }, backgroundImage: { classPropertyName: "backgroundImage", publicName: "backgroundImage", isSignal: true, isRequired: false, transformFunction: null }, openLabel: { classPropertyName: "openLabel", publicName: "openLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--_gallery-columns": "columns()" } }, ngImport: i0, template: "<ul class=\"cc-gallery\" [class.cc-gallery--bg]=\"!!backgroundImage()\" [style.background-image]=\"backgroundImage() ? 'url(' + backgroundImage() + ')' : null\">\r\n @for (image of images(); track image.src; let i = $index) {\r\n <li>\r\n <button\r\n type=\"button\"\r\n class=\"cc-gallery__item\"\r\n [attr.aria-label]=\"openLabel() + ': ' + (image.alt ?? image.caption ?? i + 1)\"\r\n (click)=\"open.set(i)\"\r\n >\r\n <img [src]=\"image.thumb ?? image.src\" [alt]=\"image.alt ?? image.caption ?? ''\" width=\"400\" height=\"400\" loading=\"lazy\" decoding=\"async\" />\r\n </button>\r\n </li>\r\n }\r\n</ul>\r\n<cc-lightbox [images]=\"images()\" [(index)]=\"open\" />\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:block}.cc-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cc-gallery-gap, var(--_space-3));margin:0;padding:0;list-style:none}.cc-gallery--bg{padding:var(--_space-4);border-radius:var(--_radius);background-color:var(--cc-gallery-bg, var(--_surface));background-size:cover;background-position:center;background-repeat:no-repeat}.cc-gallery__item{display:block;width:100%;padding:0;overflow:hidden;border:0;border-radius:var(--cc-gallery-radius, var(--_radius));aspect-ratio:1;background:var(--_surface-alt);cursor:zoom-in}.cc-gallery__item img{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--_duration) var(--_ease),filter var(--_duration) var(--_ease)}.cc-gallery__item:hover img{transform:scale(1.04);filter:brightness(1.05)}@media (min-width: 768px){.cc-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cc-gallery-gap, var(--_space-4))}}@media (min-width: 1024px){.cc-gallery{grid-template-columns:repeat(var(--_gallery-columns, 4),minmax(0,1fr));gap:var(--cc-gallery-gap, var(--_space-5))}.cc-gallery--bg{padding:var(--_space-8)}}\n"], dependencies: [{ kind: "component", type: LightboxComponent, selector: "cc-lightbox", inputs: ["images", "index", "closeLabel", "prevLabel", "nextLabel", "counterSeparator"], outputs: ["indexChange"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
786
1231
|
}
|
|
787
1232
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: GalleryComponent, decorators: [{
|
|
788
1233
|
type: Component,
|
|
789
|
-
args: [{ selector: 'cc-gallery', imports: [LightboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<ul class=\"cc-gallery\" [style.background-image]=\"backgroundImage() ? 'url(' + backgroundImage() + ')' : null\">\n @for (image of images(); track image.src; let i = $index) {\n <li>\n <button
|
|
1234
|
+
args: [{ selector: 'cc-gallery', imports: [LightboxComponent], changeDetection: ChangeDetectionStrategy.OnPush, host: { '[style.--_gallery-columns]': 'columns()' }, template: "<ul class=\"cc-gallery\" [class.cc-gallery--bg]=\"!!backgroundImage()\" [style.background-image]=\"backgroundImage() ? 'url(' + backgroundImage() + ')' : null\">\r\n @for (image of images(); track image.src; let i = $index) {\r\n <li>\r\n <button\r\n type=\"button\"\r\n class=\"cc-gallery__item\"\r\n [attr.aria-label]=\"openLabel() + ': ' + (image.alt ?? image.caption ?? i + 1)\"\r\n (click)=\"open.set(i)\"\r\n >\r\n <img [src]=\"image.thumb ?? image.src\" [alt]=\"image.alt ?? image.caption ?? ''\" width=\"400\" height=\"400\" loading=\"lazy\" decoding=\"async\" />\r\n </button>\r\n </li>\r\n }\r\n</ul>\r\n<cc-lightbox [images]=\"images()\" [(index)]=\"open\" />\r\n", styles: [":host{--_canvas: var(--cc-canvas, #ffffff);--_surface: var(--cc-surface, #f5f5f4);--_surface-alt: var(--cc-surface-alt, #fafaf9);--_text: var(--cc-text, #292524);--_text-muted: var(--cc-text-muted, color-mix(in srgb, var(--_text) 72%, transparent));--_heading: var(--cc-heading, #1c1917);--_accent: var(--cc-accent, #1c1917);--_accent-hover: var(--cc-accent-hover, #44403c);--_accent-text: var(--cc-accent-text, var(--_heading));--_on-accent: var(--cc-on-accent, #ffffff);--_inverse: var(--cc-inverse, #1c1917);--_inverse-hover: var(--cc-inverse-hover, #000000);--_on-inverse: var(--cc-on-inverse, #ffffff);--_border: var(--cc-border, #d6d3d1);--_border-strong: var(--cc-border-strong, #78716c);--_focus-ring: var(--cc-focus-ring, var(--_heading));--_overlay: var(--cc-overlay, rgb(0 0 0 / .7));--_danger: var(--cc-danger, #b91c1c);--_danger-surface: var(--cc-danger-surface, #fef2f2);--_on-danger-surface: var(--cc-on-danger-surface, #7f1d1d);--_whatsapp: var(--cc-whatsapp, #1faf38);--_whatsapp-hover: var(--cc-whatsapp-hover, #17902d);--_on-whatsapp: var(--cc-on-whatsapp, #ffffff);--_font-body: var(--cc-font-body, inherit);--_font-heading: var(--cc-font-heading, inherit);--_heading-style: var(--cc-heading-style, normal);--_heading-transform: var(--cc-heading-transform, none);--_heading-tracking: var(--cc-heading-tracking, normal);--_text-xs: var(--cc-text-xs, .75rem);--_text-sm: var(--cc-text-sm, .875rem);--_text-md: var(--cc-text-md, 1rem);--_text-lg: var(--cc-text-lg, 1.125rem);--_text-xl: var(--cc-text-xl, 1.25rem);--_text-2xl: var(--cc-text-2xl, 1.5rem);--_text-3xl: var(--cc-text-3xl, clamp(1.625rem, 1.2rem + 1.6vw, 2rem));--_text-4xl: var(--cc-text-4xl, clamp(2rem, 1.4rem + 2.4vw, 2.75rem));--_leading-tight: var(--cc-leading-tight, 1.2);--_leading-snug: var(--cc-leading-snug, 1.4);--_leading-body: var(--cc-leading-body, 1.6);--_weight-regular: var(--cc-weight-regular, 400);--_weight-medium: var(--cc-weight-medium, 500);--_weight-semibold: var(--cc-weight-semibold, 600);--_weight-bold: var(--cc-weight-bold, 700);--_tracking-wide: var(--cc-tracking-wide, .04em);--_space-1: var(--cc-space-1, .25rem);--_space-2: var(--cc-space-2, .5rem);--_space-3: var(--cc-space-3, .75rem);--_space-4: var(--cc-space-4, 1rem);--_space-5: var(--cc-space-5, 1.25rem);--_space-6: var(--cc-space-6, 1.5rem);--_space-8: var(--cc-space-8, 2rem);--_space-10: var(--cc-space-10, 2.5rem);--_space-12: var(--cc-space-12, 3rem);--_space-16: var(--cc-space-16, 4rem);--_space-20: var(--cc-space-20, 5rem);--_space-24: var(--cc-space-24, 6rem);--_radius: var(--cc-radius, 0);--_radius-sm: var(--cc-radius-sm, .125rem);--_radius-md: var(--cc-radius-md, .5rem);--_radius-lg: var(--cc-radius-lg, 1rem);--_radius-pill: var(--cc-radius-pill, 9999px);--_shadow-sm: var(--cc-shadow-sm, 0 1px 2px 0 rgb(0 0 0 / .05));--_shadow: var(--cc-shadow, 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1));--_shadow-lg: var(--cc-shadow-lg, 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1));--_shadow-xl: var(--cc-shadow-xl, 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1));--_focus-width: var(--cc-focus-width, 2px);--_focus-offset: var(--cc-focus-offset, 2px);--_control-height: var(--cc-control-height, 2.75rem);--_control-height-sm: var(--cc-control-height-sm, 2.25rem);--_control-height-lg: var(--cc-control-height-lg, 3.25rem);--_duration-fast: var(--cc-duration-fast, .15s);--_duration: var(--cc-duration, .25s);--_ease: var(--cc-ease, cubic-bezier(.2, 0, 0, 1));--_z-float: var(--cc-z-float, 20);--_z-sticky: var(--cc-z-sticky, 30);--_z-overlay: var(--cc-z-overlay, 50);box-sizing:border-box;font-family:var(--_font-body)}*,*:before,*:after{box-sizing:border-box}:focus-visible{outline:var(--_focus-width) solid var(--_focus-ring);outline-offset:var(--_focus-offset)}.cc-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}\n", ":host{display:block}.cc-gallery{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--cc-gallery-gap, var(--_space-3));margin:0;padding:0;list-style:none}.cc-gallery--bg{padding:var(--_space-4);border-radius:var(--_radius);background-color:var(--cc-gallery-bg, var(--_surface));background-size:cover;background-position:center;background-repeat:no-repeat}.cc-gallery__item{display:block;width:100%;padding:0;overflow:hidden;border:0;border-radius:var(--cc-gallery-radius, var(--_radius));aspect-ratio:1;background:var(--_surface-alt);cursor:zoom-in}.cc-gallery__item img{display:block;width:100%;height:100%;object-fit:cover;transition:transform var(--_duration) var(--_ease),filter var(--_duration) var(--_ease)}.cc-gallery__item:hover img{transform:scale(1.04);filter:brightness(1.05)}@media (min-width: 768px){.cc-gallery{grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--cc-gallery-gap, var(--_space-4))}}@media (min-width: 1024px){.cc-gallery{grid-template-columns:repeat(var(--_gallery-columns, 4),minmax(0,1fr));gap:var(--cc-gallery-gap, var(--_space-5))}.cc-gallery--bg{padding:var(--_space-8)}}\n"] }]
|
|
790
1235
|
}] });
|
|
791
1236
|
/**
|
|
792
1237
|
* Builds a gallery list for numbered files.
|
|
@@ -811,5 +1256,5 @@ function numberedImages(count, src, caption) {
|
|
|
811
1256
|
* Generated bundle index. Do not edit.
|
|
812
1257
|
*/
|
|
813
1258
|
|
|
814
|
-
export { CategoryMenuComponent, DEFAULT_PLAN_CATALOG_CONFIG, DEFAULT_PLAN_CATEGORIES, FaqComponent, GalleryComponent, InfoItemComponent, LightboxComponent, PLAN_CATALOG_CONFIG, PageBannerComponent, PlanCardComponent, PlanCardTemplateDirective, PlanCatalogComponent, PlanCatalogService, PlanCategory, PlanDetailsComponent, PlanFilterFormComponent, PromoModalComponent, SEO_CONFIG, SearchBoxComponent, SeoService, SocialLinksComponent, WhatsappButtonComponent, filterPlans, filterPlansByCategory, findPlanBySlug, joinAdditionalServices, numberedImages, planSlug, providePlanCatalog, provideSeo, searchPlansByName, slugify, titleCase, truncateText, whatsappUrl, withCategoryCounts };
|
|
1259
|
+
export { ButtonComponent, CategoryMenuComponent, DEFAULT_PLAN_CATALOG_CONFIG, DEFAULT_PLAN_CATEGORIES, FaqComponent, FaqItemComponent, GalleryComponent, InfoItemComponent, LightboxComponent, NoticeComponent, PLAN_CATALOG_CONFIG, PageBannerComponent, PlanCardComponent, PlanCardTemplateDirective, PlanCatalogComponent, PlanCatalogService, PlanCategory, PlanDetailsComponent, PlanFilterFormComponent, PromoModalComponent, SEO_CONFIG, SearchBoxComponent, SectionHeadingComponent, SeoService, SocialLinksComponent, WhatsappButtonComponent, defaultPlanMeta, filterPlans, filterPlansByCategory, findPlanBySlug, formatPrice, joinAdditionalServices, numberedImages, planSlug, providePlanCatalog, provideSeo, searchPlansByName, slugify, titleCase, truncateText, whatsappUrl, withCategoryCounts };
|
|
815
1260
|
//# sourceMappingURL=c-code-c-code-fw-ui.mjs.map
|