valtech-components 4.0.107 → 4.0.109

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.
@@ -2,28 +2,25 @@ import { EventEmitter } from '@angular/core';
2
2
  import { SectionHeaderMetadata } from './types';
3
3
  import * as i0 from "@angular/core";
4
4
  /**
5
- * val-section-header
5
+ * val-section-header — standard section eyebrow for all factory apps.
6
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.
7
+ * Two-row layout:
8
+ * ```
9
+ * ┌────────────────────────────────────────────────┐
10
+ * │ TITLE (bold 18px) [action btn] │ ← row 1, space-between
11
+ * │ info link / subtitle (muted 13px) │ ← row 2, optional
12
+ * └────────────────────────────────────────────────┘
13
+ * ```
11
14
  *
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).
15
+ * CSS var `--val-section-header-cta-color` tints the `infoLink` text color.
14
16
  *
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
- * ```
17
+ * Both `action` (button) and `infoLink` (text link) emit `(actionClick)` with
18
+ * their respective `token`.
21
19
  */
22
20
  export declare class SectionHeaderComponent {
23
21
  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>;
22
+ actionClick: EventEmitter<string>;
26
23
  readonly config: import("@angular/core").Signal<SectionHeaderMetadata>;
27
24
  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>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<SectionHeaderComponent, "val-section-header", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; }, never, never, true, never>;
29
26
  }
@@ -1,38 +1,62 @@
1
+ import { ButtonMetadata } from '../../types';
1
2
  /**
2
3
  * Configuration for `val-section-header`.
3
4
  *
4
- * Presentational molecule — all strings are already-resolved (consumer
5
- * translates via I18nService). No i18n of its own.
5
+ * Layout (two rows):
6
+ * ```
7
+ * ┌─────────────────────────────────────────────┐
8
+ * │ title (bold, 18px) [action button] │ ← row 1, space-between
9
+ * │ info link / subtitle (muted) │ ← row 2, optional
10
+ * └─────────────────────────────────────────────┘
11
+ * ```
12
+ *
13
+ * Both `action` and `infoLink` emit `(actionClick)` with their `token`.
14
+ *
15
+ * @example Title + primary action button
16
+ * ```html
17
+ * <val-section-header
18
+ * [props]="{ title: 'Talonarios', action: createButtonProps() }"
19
+ * (actionClick)="openCreate()" />
20
+ * ```
6
21
  *
7
- * @example Title-only (replaces plain eyebrow text)
22
+ * @example Title + row-1 info link (no primary action)
8
23
  * ```html
9
- * <val-section-header [props]="{ title: 'Talonarios' }" />
24
+ * <val-section-header
25
+ * [props]="{ title: 'Premios', infoLink: { label: '¿Qué son?', token: 'info' } }"
26
+ * (actionClick)="openInfo()" />
10
27
  * ```
11
28
  *
12
- * @example Title + CTA + subtitle
29
+ * @example Full — title + action + row-2 info link
13
30
  * ```html
14
31
  * <val-section-header
15
32
  * [props]="{
16
- * title: 'Premios',
17
- * subtitle: 'Los regalos sorteados durante el evento.',
18
- * cta: { label: '¿Qué son?' }
33
+ * title: 'Vendedores y talonarios',
34
+ * action: createButtonProps(),
35
+ * infoLink: { label: '¿Qué son los talonarios?', token: 'info' }
19
36
  * }"
20
- * (ctaClick)="openInfoModal()" />
37
+ * (actionClick)="onAction($event)" />
21
38
  * ```
22
39
  */
23
40
  export interface SectionHeaderMetadata {
24
- /** Main section title. Bold, ~18px. */
41
+ /** Main section title — bold, ~18px. */
25
42
  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. */
43
+ /**
44
+ * Primary action button rendered on the RIGHT of row 1 (space-between).
45
+ * Emits `(actionClick)` with the button's `token`.
46
+ */
47
+ action?: ButtonMetadata;
48
+ /**
49
+ * Clickable info / help link rendered at the START of row 2 (below title).
50
+ * Emits `(actionClick)` with its `token` (defaults to `'info'`).
51
+ * Use for "¿Qué es esto?"-style links.
52
+ */
53
+ infoLink?: {
31
54
  label: string;
32
- /**
33
- * Value emitted by `(ctaClick)`. Useful when one handler manages several
34
- * section headers. Defaults to `'cta'` when omitted.
35
- */
36
55
  token?: string;
37
56
  };
57
+ /**
58
+ * Static muted text in row 2 (shown below `infoLink` if both are set).
59
+ * Use for brief descriptive copy that does not need to be clickable.
60
+ */
61
+ subtitle?: string;
38
62
  }
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.109";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "4.0.107",
3
+ "version": "4.0.109",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"