valtech-components 4.0.106 → 4.0.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/components/molecules/section-header/section-header.component.mjs +64 -0
- package/esm2022/lib/components/molecules/section-header/types.mjs +2 -0
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +3 -1
- package/fesm2022/valtech-components.mjs +64 -2
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/section-header/section-header.component.d.ts +29 -0
- package/lib/components/molecules/section-header/types.d.ts +38 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { SectionHeaderMetadata } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* val-section-header
|
|
6
|
+
*
|
|
7
|
+
* Standard molecule for section titles across all factory apps. Renders a
|
|
8
|
+
* title + optional right-aligned CTA on one row, with an optional muted
|
|
9
|
+
* subtitle below. Replaces ad-hoc `eyebrow`, `val-title`, and custom header
|
|
10
|
+
* divs that accumulate per-page padding inconsistencies.
|
|
11
|
+
*
|
|
12
|
+
* Theming: set `--val-section-header-cta-color` on the host or parent to
|
|
13
|
+
* override the CTA color (e.g. `--bingo-magenta` in bingo).
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```html
|
|
17
|
+
* <val-section-header
|
|
18
|
+
* [props]="{ title: 'Premios', subtitle: 'Regalos sorteados por ronda.', cta: { label: '¿Qué son?' } }"
|
|
19
|
+
* (ctaClick)="openInfoModal()" />
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class SectionHeaderComponent {
|
|
23
|
+
readonly props: import("@angular/core").InputSignal<Partial<SectionHeaderMetadata>>;
|
|
24
|
+
/** Emits the CTA token (defaults to `'cta'`) when the CTA is clicked. */
|
|
25
|
+
ctaClick: EventEmitter<string>;
|
|
26
|
+
readonly config: import("@angular/core").Signal<SectionHeaderMetadata>;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SectionHeaderComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionHeaderComponent, "val-section-header", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "ctaClick": "ctaClick"; }, never, never, true, never>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for `val-section-header`.
|
|
3
|
+
*
|
|
4
|
+
* Presentational molecule — all strings are already-resolved (consumer
|
|
5
|
+
* translates via I18nService). No i18n of its own.
|
|
6
|
+
*
|
|
7
|
+
* @example Title-only (replaces plain eyebrow text)
|
|
8
|
+
* ```html
|
|
9
|
+
* <val-section-header [props]="{ title: 'Talonarios' }" />
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @example Title + CTA + subtitle
|
|
13
|
+
* ```html
|
|
14
|
+
* <val-section-header
|
|
15
|
+
* [props]="{
|
|
16
|
+
* title: 'Premios',
|
|
17
|
+
* subtitle: 'Los regalos sorteados durante el evento.',
|
|
18
|
+
* cta: { label: '¿Qué son?' }
|
|
19
|
+
* }"
|
|
20
|
+
* (ctaClick)="openInfoModal()" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface SectionHeaderMetadata {
|
|
24
|
+
/** Main section title. Bold, ~18px. */
|
|
25
|
+
title: string;
|
|
26
|
+
/** Muted helper line below the title row. */
|
|
27
|
+
subtitle?: string;
|
|
28
|
+
/** Right-aligned call-to-action. Emits `(ctaClick)` with its `token`. */
|
|
29
|
+
cta?: {
|
|
30
|
+
/** Visible label. */
|
|
31
|
+
label: string;
|
|
32
|
+
/**
|
|
33
|
+
* Value emitted by `(ctaClick)`. Useful when one handler manages several
|
|
34
|
+
* section headers. Defaults to `'cta'` when omitted.
|
|
35
|
+
*/
|
|
36
|
+
token?: string;
|
|
37
|
+
};
|
|
38
|
+
}
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -183,6 +183,8 @@ export * from './lib/components/molecules/cta-card/cta-card.component';
|
|
|
183
183
|
export * from './lib/components/molecules/cta-card/types';
|
|
184
184
|
export * from './lib/components/molecules/entity-card/entity-card.component';
|
|
185
185
|
export * from './lib/components/molecules/entity-card/types';
|
|
186
|
+
export * from './lib/components/molecules/section-header/section-header.component';
|
|
187
|
+
export * from './lib/components/molecules/section-header/types';
|
|
186
188
|
export * from './lib/components/molecules/invitation-card/invitation-card.component';
|
|
187
189
|
export * from './lib/components/molecules/invitation-card/types';
|
|
188
190
|
export * from './lib/components/molecules/member-card/member-card.component';
|