valtech-components 4.0.105 → 4.0.107
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/form-field/form-field.component.mjs +17 -8
- package/esm2022/lib/components/molecules/section-header/section-header.component.mjs +64 -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 +80 -9
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/form-field/form-field.component.d.ts +14 -5
- package/lib/components/molecules/section-header/section-header.component.d.ts +29 -0
- package/lib/components/molecules/section-header/types.d.ts +38 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +2 -0
|
@@ -3,20 +3,29 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
* Primitivo de campo de formulario: label (estilo val-form) + contenido proyectado.
|
|
4
4
|
*
|
|
5
5
|
* Usar cuando necesitás un campo fuera de val-form pero con el mismo estilo:
|
|
6
|
-
*
|
|
6
|
+
* image-picker, date-picker, selectores custom, chips, etc.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* </val-form-field>
|
|
8
|
+
* NOTA: para ion-input / ion-textarea NO usar ng-content projection — el Shadow DOM
|
|
9
|
+
* de Ionic no responde al grid del host. Usá en cambio un `<div class="pf-field">`
|
|
10
|
+
* plano en el template con `<p class="pf-label">` + ion-input directo.
|
|
12
11
|
*
|
|
12
|
+
* ```html
|
|
13
13
|
* <val-form-field label="Imagen">
|
|
14
14
|
* <app-image-picker ... />
|
|
15
15
|
* </val-form-field>
|
|
16
|
+
*
|
|
17
|
+
* <!-- Para ion-input: NO val-form-field, usar div plano -->
|
|
18
|
+
* <div class="pf-field">
|
|
19
|
+
* <p class="pf-label">Nombre</p>
|
|
20
|
+
* <ion-input fill="outline" ... />
|
|
21
|
+
* </div>
|
|
16
22
|
* ```
|
|
17
23
|
*
|
|
18
24
|
* El label usa el mismo val-title que val-form (size=small, color=dark, bold=false).
|
|
19
25
|
* El spacing entre campos se controla con --val-form-field-gap (default 0.5rem).
|
|
26
|
+
* El padding horizontal se hereda vía --val-form-field-padding (default 0).
|
|
27
|
+
* Setearlo en el contenedor padre para consistencia sin override en cada campo:
|
|
28
|
+
* `.my-card { --val-form-field-padding: 0 16px; }`
|
|
20
29
|
*/
|
|
21
30
|
export declare class FormFieldComponent {
|
|
22
31
|
label: import("@angular/core").InputSignal<string>;
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
* 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.
|
|
11
|
+
*
|
|
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).
|
|
14
|
+
*
|
|
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
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
export declare class SectionHeaderComponent {
|
|
23
|
+
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>;
|
|
26
|
+
readonly config: import("@angular/core").Signal<SectionHeaderMetadata>;
|
|
27
|
+
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>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration for `val-section-header`.
|
|
3
|
+
*
|
|
4
|
+
* Presentational molecule — all strings are already-resolved (consumer
|
|
5
|
+
* translates via I18nService). No i18n of its own.
|
|
6
|
+
*
|
|
7
|
+
* @example Title-only (replaces plain eyebrow text)
|
|
8
|
+
* ```html
|
|
9
|
+
* <val-section-header [props]="{ title: 'Talonarios' }" />
|
|
10
|
+
* ```
|
|
11
|
+
*
|
|
12
|
+
* @example Title + CTA + subtitle
|
|
13
|
+
* ```html
|
|
14
|
+
* <val-section-header
|
|
15
|
+
* [props]="{
|
|
16
|
+
* title: 'Premios',
|
|
17
|
+
* subtitle: 'Los regalos sorteados durante el evento.',
|
|
18
|
+
* cta: { label: '¿Qué son?' }
|
|
19
|
+
* }"
|
|
20
|
+
* (ctaClick)="openInfoModal()" />
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export interface SectionHeaderMetadata {
|
|
24
|
+
/** Main section title. Bold, ~18px. */
|
|
25
|
+
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. */
|
|
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
|
+
};
|
|
38
|
+
}
|
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';
|