valtech-components 4.0.106 → 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 +80 -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 +79 -2
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/section-header/section-header.component.d.ts +40 -0
- package/lib/components/molecules/section-header/types.d.ts +45 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -0,0 +1,40 @@
|
|
|
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
|
+
* bold title + optional right-aligned action button(s) on one row, with an
|
|
9
|
+
* optional muted subtitle below.
|
|
10
|
+
*
|
|
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.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```html
|
|
24
|
+
* <val-section-header
|
|
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()" />
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
export declare class SectionHeaderComponent {
|
|
34
|
+
readonly props: import("@angular/core").InputSignal<Partial<SectionHeaderMetadata>>;
|
|
35
|
+
/** Emits the clicked button's `token` (from `actions`). */
|
|
36
|
+
actionClick: EventEmitter<string>;
|
|
37
|
+
readonly config: import("@angular/core").Signal<SectionHeaderMetadata>;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SectionHeaderComponent, never>;
|
|
39
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionHeaderComponent, "val-section-header", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "actionClick": "actionClick"; }, never, never, true, never>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ButtonMetadata } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration for `val-section-header`.
|
|
4
|
+
*
|
|
5
|
+
* Presentational molecule — all strings are already-resolved (consumer
|
|
6
|
+
* translates via I18nService). No i18n of its own.
|
|
7
|
+
*
|
|
8
|
+
* @example Title-only
|
|
9
|
+
* ```html
|
|
10
|
+
* <val-section-header [props]="{ title: 'Talonarios' }" />
|
|
11
|
+
* ```
|
|
12
|
+
*
|
|
13
|
+
* @example Title + text CTA + subtitle
|
|
14
|
+
* ```html
|
|
15
|
+
* <val-section-header
|
|
16
|
+
* [props]="{
|
|
17
|
+
* title: 'Premios',
|
|
18
|
+
* subtitle: 'Los regalos sorteados durante el evento.',
|
|
19
|
+
* actions: [{ text: '¿Qué son?', fill: 'clear', size: 'small', color: 'primary', type: 'button', state: 'ENABLED', token: 'info' }]
|
|
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)" />
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
export interface SectionHeaderMetadata {
|
|
35
|
+
/** Main section title. Bold, ~18px. */
|
|
36
|
+
title: string;
|
|
37
|
+
/** Muted helper line below the title row. */
|
|
38
|
+
subtitle?: string;
|
|
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[];
|
|
45
|
+
}
|
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';
|