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.
- package/esm2022/lib/components/molecules/section-header/section-header.component.mjs +39 -23
- package/esm2022/lib/components/molecules/section-header/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +38 -23
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/section-header/section-header.component.d.ts +21 -10
- package/lib/components/molecules/section-header/types.d.ts +21 -14
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
9
|
-
* subtitle below.
|
|
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
|
-
*
|
|
13
|
-
*
|
|
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]="{
|
|
19
|
-
*
|
|
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
|
|
25
|
-
|
|
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; }; }, { "
|
|
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
|
|
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
|
-
*
|
|
19
|
+
* actions: [{ text: '¿Qué son?', fill: 'clear', size: 'small', color: 'primary', type: 'button', state: 'ENABLED', token: 'info' }]
|
|
19
20
|
* }"
|
|
20
|
-
* (
|
|
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
|
-
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
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