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.
- package/esm2022/lib/components/molecules/section-header/section-header.component.mjs +33 -29
- package/esm2022/lib/components/molecules/section-header/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +32 -29
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/section-header/section-header.component.d.ts +13 -16
- package/lib/components/molecules/section-header/types.d.ts +43 -19
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
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
|
-
*
|
|
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
|
-
*
|
|
16
|
-
*
|
|
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
|
-
|
|
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; }; }, { "
|
|
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
|
-
*
|
|
5
|
-
*
|
|
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-
|
|
22
|
+
* @example Title + row-1 info link (no primary action)
|
|
8
23
|
* ```html
|
|
9
|
-
* <val-section-header
|
|
24
|
+
* <val-section-header
|
|
25
|
+
* [props]="{ title: 'Premios', infoLink: { label: '¿Qué son?', token: 'info' } }"
|
|
26
|
+
* (actionClick)="openInfo()" />
|
|
10
27
|
* ```
|
|
11
28
|
*
|
|
12
|
-
* @example
|
|
29
|
+
* @example Full — title + action + row-2 info link
|
|
13
30
|
* ```html
|
|
14
31
|
* <val-section-header
|
|
15
32
|
* [props]="{
|
|
16
|
-
* title: '
|
|
17
|
-
*
|
|
18
|
-
*
|
|
33
|
+
* title: 'Vendedores y talonarios',
|
|
34
|
+
* action: createButtonProps(),
|
|
35
|
+
* infoLink: { label: '¿Qué son los talonarios?', token: 'info' }
|
|
19
36
|
* }"
|
|
20
|
-
* (
|
|
37
|
+
* (actionClick)="onAction($event)" />
|
|
21
38
|
* ```
|
|
22
39
|
*/
|
|
23
40
|
export interface SectionHeaderMetadata {
|
|
24
|
-
/** Main section title
|
|
41
|
+
/** Main section title — bold, ~18px. */
|
|
25
42
|
title: string;
|
|
26
|
-
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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