valtech-components 4.0.107 → 4.0.108

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.
@@ -5,25 +5,36 @@ import * as i0 from "@angular/core";
5
5
  * val-section-header
6
6
  *
7
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.
8
+ * bold title + optional right-aligned action button(s) on one row, with an
9
+ * optional muted subtitle below.
11
10
  *
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).
11
+ * Replaces ad-hoc eyebrow spans, custom `.section-header` divs, and
12
+ * paired val-title + val-button combinations that accumulate per-page
13
+ * padding inconsistencies.
14
+ *
15
+ * **Actions:** pass `actions: ButtonMetadata[]` for right-side buttons.
16
+ * Use `fill: 'clear'` + `size: 'small'` for a text-link style CTA, or
17
+ * `fill: 'outline'` + `size: 'small'` for a contained button (e.g. "New").
18
+ *
19
+ * **Theming:** set `--val-section-header-cta-color` on the host or parent
20
+ * to tint plain-text CTAs without affecting full buttons.
14
21
  *
15
22
  * @example
16
23
  * ```html
17
24
  * <val-section-header
18
- * [props]="{ title: 'Premios', subtitle: 'Regalos sorteados por ronda.', cta: { label: '¿Qué son?' } }"
19
- * (ctaClick)="openInfoModal()" />
25
+ * [props]="{
26
+ * title: 'Premios',
27
+ * subtitle: 'Regalos sorteados por ronda.',
28
+ * actions: [{ text: '¿Qué son?', fill: 'clear', size: 'small', color: 'primary', type: 'button', state: 'ENABLED', token: 'info' }]
29
+ * }"
30
+ * (actionClick)="openInfoModal()" />
20
31
  * ```
21
32
  */
22
33
  export declare class SectionHeaderComponent {
23
34
  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>;
35
+ /** Emits the clicked button's `token` (from `actions`). */
36
+ actionClick: EventEmitter<string>;
26
37
  readonly config: import("@angular/core").Signal<SectionHeaderMetadata>;
27
38
  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>;
39
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionHeaderComponent, "val-section-header", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; }, never, never, true, never>;
29
40
  }
@@ -1,23 +1,34 @@
1
+ import { ButtonMetadata } from '../../types';
1
2
  /**
2
3
  * Configuration for `val-section-header`.
3
4
  *
4
5
  * Presentational molecule — all strings are already-resolved (consumer
5
6
  * translates via I18nService). No i18n of its own.
6
7
  *
7
- * @example Title-only (replaces plain eyebrow text)
8
+ * @example Title-only
8
9
  * ```html
9
10
  * <val-section-header [props]="{ title: 'Talonarios' }" />
10
11
  * ```
11
12
  *
12
- * @example Title + CTA + subtitle
13
+ * @example Title + text CTA + subtitle
13
14
  * ```html
14
15
  * <val-section-header
15
16
  * [props]="{
16
17
  * title: 'Premios',
17
18
  * subtitle: 'Los regalos sorteados durante el evento.',
18
- * cta: { label: '¿Qué son?' }
19
+ * actions: [{ text: '¿Qué son?', fill: 'clear', size: 'small', color: 'primary', type: 'button', state: 'ENABLED', token: 'info' }]
19
20
  * }"
20
- * (ctaClick)="openInfoModal()" />
21
+ * (actionClick)="openInfoModal()" />
22
+ * ```
23
+ *
24
+ * @example Title + create button
25
+ * ```html
26
+ * <val-section-header
27
+ * [props]="{
28
+ * title: 'Talonarios',
29
+ * actions: [{ text: 'Nueva tanda', fill: 'outline', size: 'small', color: 'primary', type: 'button', state: 'ENABLED', token: 'create' }]
30
+ * }"
31
+ * (actionClick)="onAction($event)" />
21
32
  * ```
22
33
  */
23
34
  export interface SectionHeaderMetadata {
@@ -25,14 +36,10 @@ export interface SectionHeaderMetadata {
25
36
  title: string;
26
37
  /** Muted helper line below the title row. */
27
38
  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
- };
39
+ /**
40
+ * Right-aligned action buttons. Rendered as `val-button` components.
41
+ * Each emits `(actionClick)` with its own `token`.
42
+ * Use `fill: 'clear'` + `size: 'small'` for a text-link style CTA.
43
+ */
44
+ actions?: ButtonMetadata[];
38
45
  }
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "4.0.107";
5
+ export declare const VERSION = "4.0.108";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.107",
3
+ "version": "4.0.108",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"