valtech-components 2.0.944 → 2.0.946

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.
Files changed (34) hide show
  1. package/esm2022/lib/components/atoms/button/button.component.mjs +3 -3
  2. package/esm2022/lib/components/molecules/article-card/article-card.component.mjs +154 -0
  3. package/esm2022/lib/components/molecules/article-card/types.mjs +10 -0
  4. package/esm2022/lib/components/molecules/cta-card/cta-card.component.mjs +121 -0
  5. package/esm2022/lib/components/molecules/cta-card/types.mjs +11 -0
  6. package/esm2022/lib/components/molecules/date-input/date-input.component.mjs +3 -3
  7. package/esm2022/lib/components/molecules/file-input/file-input.component.mjs +3 -3
  8. package/esm2022/lib/components/molecules/hint/hint.component.mjs +3 -3
  9. package/esm2022/lib/components/molecules/media-object/media-object.component.mjs +141 -0
  10. package/esm2022/lib/components/molecules/media-object/types.mjs +11 -0
  11. package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +3 -3
  12. package/esm2022/lib/components/molecules/pin-input/pin-input.component.mjs +3 -3
  13. package/esm2022/lib/components/molecules/select-input/select-input.component.mjs +5 -5
  14. package/esm2022/lib/components/molecules/stats-bar/stats-bar.component.mjs +99 -0
  15. package/esm2022/lib/components/molecules/stats-bar/types.mjs +10 -0
  16. package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +3 -3
  17. package/esm2022/lib/components/organisms/form/form.component.mjs +5 -5
  18. package/esm2022/lib/components/types.mjs +1 -1
  19. package/esm2022/lib/version.mjs +2 -2
  20. package/esm2022/public-api.mjs +9 -1
  21. package/fesm2022/valtech-components.mjs +560 -26
  22. package/fesm2022/valtech-components.mjs.map +1 -1
  23. package/lib/components/molecules/article-card/article-card.component.d.ts +41 -0
  24. package/lib/components/molecules/article-card/types.d.ts +51 -0
  25. package/lib/components/molecules/cta-card/cta-card.component.d.ts +44 -0
  26. package/lib/components/molecules/cta-card/types.d.ts +42 -0
  27. package/lib/components/molecules/media-object/media-object.component.d.ts +38 -0
  28. package/lib/components/molecules/media-object/types.d.ts +53 -0
  29. package/lib/components/molecules/stats-bar/stats-bar.component.d.ts +32 -0
  30. package/lib/components/molecules/stats-bar/types.d.ts +40 -0
  31. package/lib/components/types.d.ts +6 -0
  32. package/lib/version.d.ts +1 -1
  33. package/package.json +1 -1
  34. package/public-api.d.ts +8 -0
@@ -0,0 +1,41 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { ArticleCardMetadata, ArticleCardClickEvent } from './types';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * val-article-card
6
+ *
7
+ * Article / blog teaser card: cover image, topic chip, title, excerpt and date.
8
+ * Clickable (routerLink or external href).
9
+ *
10
+ * Presentational — pass already-resolved/formatted strings (pre-format the date
11
+ * in the consumer with a locale-aware pipe).
12
+ *
13
+ * @example
14
+ * ```html
15
+ * <val-article-card
16
+ * [props]="{
17
+ * image: '/assets/post.jpg',
18
+ * topic: 'Holidays',
19
+ * title: 'New Holiday Shopping Features',
20
+ * excerpt: 'A short summary of the article that gets clamped after a few lines.',
21
+ * date: 'Oct 31, 2025',
22
+ * routerLink: '/blog/holiday-shopping'
23
+ * }"
24
+ * (onClick)="open($event)"
25
+ * />
26
+ * ```
27
+ */
28
+ export declare class ArticleCardComponent {
29
+ private navigation;
30
+ /** Component configuration */
31
+ readonly props: import("@angular/core").InputSignal<Partial<ArticleCardMetadata>>;
32
+ /** Emitted when the card is clicked */
33
+ onClick: EventEmitter<ArticleCardClickEvent>;
34
+ /** Merged configuration with defaults */
35
+ config: import("@angular/core").Signal<ArticleCardMetadata & Required<Pick<ArticleCardMetadata, "bordered" | "aspectRatio" | "shadowed" | "excerptLines">>>;
36
+ isClickable: import("@angular/core").Signal<boolean>;
37
+ getTopicColor(): string | null;
38
+ handleClick(event: MouseEvent): void;
39
+ static ɵfac: i0.ɵɵFactoryDeclaration<ArticleCardComponent, never>;
40
+ static ɵcmp: i0.ɵɵComponentDeclaration<ArticleCardComponent, "val-article-card", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onClick": "onClick"; }, never, never, true, never>;
41
+ }
@@ -0,0 +1,51 @@
1
+ import { Color } from '@ionic/core';
2
+ /**
3
+ * Click event emitted by val-article-card.
4
+ */
5
+ export interface ArticleCardClickEvent {
6
+ /** Token identifier for the card */
7
+ token?: string;
8
+ /** Whether navigation was triggered (routerLink / href set) */
9
+ navigated?: boolean;
10
+ }
11
+ /**
12
+ * Metadata for val-article-card.
13
+ *
14
+ * Article / blog teaser card: cover image, topic chip, title, excerpt and date.
15
+ * Presentational — pass already-resolved/formatted strings (the date should be
16
+ * pre-formatted by the consumer, e.g. with a locale-aware pipe).
17
+ */
18
+ export interface ArticleCardMetadata {
19
+ /** Unique token identifier */
20
+ token?: string;
21
+ /** Cover image URL */
22
+ image?: string;
23
+ /** Alt text for the cover image */
24
+ imageAlt?: string;
25
+ /** Image aspect ratio (CSS). Default: '16 / 9' */
26
+ aspectRatio?: string;
27
+ /** Topic / category label (rendered as a chip) */
28
+ topic?: string;
29
+ /** Topic chip color (Ionic color name or CSS color) */
30
+ topicColor?: Color | string;
31
+ /** Article title */
32
+ title: string;
33
+ /** Short excerpt / summary */
34
+ excerpt?: string;
35
+ /** Pre-formatted publication date string */
36
+ date?: string;
37
+ /** Internal Angular route */
38
+ routerLink?: string | any[];
39
+ /** External URL (opens in a new tab) */
40
+ href?: string;
41
+ /** Show border. Default: true */
42
+ bordered?: boolean;
43
+ /** Show shadow. Default: false */
44
+ shadowed?: boolean;
45
+ /** Number of lines before the excerpt is clamped. Default: 3 */
46
+ excerptLines?: number;
47
+ }
48
+ /**
49
+ * Default values for ArticleCardMetadata.
50
+ */
51
+ export declare const ARTICLE_CARD_DEFAULTS: Required<Pick<ArticleCardMetadata, 'aspectRatio' | 'bordered' | 'shadowed' | 'excerptLines'>>;
@@ -0,0 +1,44 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { CtaCardMetadata } from './types';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * val-cta-card
6
+ *
7
+ * Card with a title, optional description and a group of action buttons, with
8
+ * customisable padding, corner rounding and background (Ionic colors
9
+ * supported). Buttons reuse `val-button-group`.
10
+ *
11
+ * Presentational — pass already-resolved strings.
12
+ *
13
+ * @example
14
+ * ```html
15
+ * <val-cta-card
16
+ * [props]="{
17
+ * title: 'Read the Bible Online',
18
+ * description: 'Trusted translations, in your language.',
19
+ * actions: {
20
+ * position: 'left',
21
+ * columned: false,
22
+ * buttons: [
23
+ * { text: 'Continue Reading', color: 'dark', type: 'button', shape: 'round', state: 'ENABLED', token: 'read' },
24
+ * { text: 'Listen', color: 'dark', fill: 'outline', type: 'button', shape: 'round', state: 'ENABLED', token: 'listen' }
25
+ * ]
26
+ * }
27
+ * }"
28
+ * (onAction)="onAction($event)"
29
+ * />
30
+ * ```
31
+ */
32
+ export declare class CtaCardComponent {
33
+ /** Component configuration */
34
+ readonly props: import("@angular/core").InputSignal<Partial<CtaCardMetadata>>;
35
+ /** Emitted with the token of the clicked action button */
36
+ onAction: EventEmitter<string>;
37
+ /** Merged configuration with defaults */
38
+ config: import("@angular/core").Signal<CtaCardMetadata & Required<Pick<CtaCardMetadata, "borderRadius" | "bordered" | "shadowed" | "align" | "padding">>>;
39
+ private resolveColor;
40
+ getBackground(): string;
41
+ getColor(): string | null;
42
+ static ɵfac: i0.ɵɵFactoryDeclaration<CtaCardComponent, never>;
43
+ static ɵcmp: i0.ɵɵComponentDeclaration<CtaCardComponent, "val-cta-card", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
44
+ }
@@ -0,0 +1,42 @@
1
+ import { Color } from '@ionic/core';
2
+ import { ButtonGroupMetadata } from '../button-group/types';
3
+ /**
4
+ * Metadata for val-cta-card.
5
+ *
6
+ * Card with a title, optional description and a group of action buttons, with
7
+ * customisable padding, corner rounding and background (Ionic colors
8
+ * supported). The "Read the Bible Online / Continue Reading + Listen" pattern.
9
+ *
10
+ * Presentational — pass already-resolved strings. Buttons reuse
11
+ * `ButtonGroupMetadata` (same as banner / layered-card).
12
+ */
13
+ export interface CtaCardMetadata {
14
+ /** Unique token identifier */
15
+ token?: string;
16
+ /** Small label above the title */
17
+ overtitle?: string;
18
+ /** Main title */
19
+ title: string;
20
+ /** Description / supporting text */
21
+ description?: string;
22
+ /** Action buttons configuration (reuses val-button-group) */
23
+ actions?: ButtonGroupMetadata;
24
+ /** Background color (Ionic color name or CSS color). Default: light surface */
25
+ backgroundColor?: Color | string;
26
+ /** Text color (Ionic color name or CSS color) */
27
+ color?: Color | string;
28
+ /** Custom padding (CSS value). Default: '2rem' */
29
+ padding?: string;
30
+ /** Custom corner rounding (CSS value). Default: '20px' */
31
+ borderRadius?: string;
32
+ /** Content alignment. Default: 'start' */
33
+ align?: 'start' | 'center';
34
+ /** Show border. Default: false */
35
+ bordered?: boolean;
36
+ /** Show shadow. Default: false */
37
+ shadowed?: boolean;
38
+ }
39
+ /**
40
+ * Default values for CtaCardMetadata.
41
+ */
42
+ export declare const CTA_CARD_DEFAULTS: Required<Pick<CtaCardMetadata, 'padding' | 'borderRadius' | 'align' | 'bordered' | 'shadowed'>>;
@@ -0,0 +1,38 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { MediaObjectMetadata } from './types';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * val-media-object
6
+ *
7
+ * Image (or icon) on one side, title + long body text on the other. Useful for
8
+ * feature rows, informational blocks, "what is X" sections, etc.
9
+ *
10
+ * Presentational: pass already-resolved strings (build them with
11
+ * `I18nService.t()` in the consumer page).
12
+ *
13
+ * @example
14
+ * ```html
15
+ * <val-media-object
16
+ * [props]="{
17
+ * image: '/assets/feature.png',
18
+ * overtitle: 'Privacy',
19
+ * title: 'Your data stays yours',
20
+ * body: 'A long explanation that can span several lines without truncation.',
21
+ * link: { label: 'Learn more', routerLink: '/privacy' }
22
+ * }"
23
+ * />
24
+ * ```
25
+ */
26
+ export declare class MediaObjectComponent {
27
+ private navigation;
28
+ /** Component configuration */
29
+ readonly props: import("@angular/core").InputSignal<Partial<MediaObjectMetadata>>;
30
+ /** Emitted when the inline link is clicked */
31
+ onLinkClick: EventEmitter<string>;
32
+ /** Merged configuration with defaults */
33
+ config: import("@angular/core").Signal<MediaObjectMetadata & Required<Pick<MediaObjectMetadata, "rounded" | "circle" | "mediaWidth" | "reversed" | "align">>>;
34
+ getColor(): string;
35
+ handleLinkClick(event: MouseEvent): void;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<MediaObjectComponent, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<MediaObjectComponent, "val-media-object", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onLinkClick": "onLinkClick"; }, never, never, true, never>;
38
+ }
@@ -0,0 +1,53 @@
1
+ import { Color } from '@ionic/core';
2
+ /**
3
+ * Optional inline link / CTA shown under the body of a media object.
4
+ */
5
+ export interface MediaObjectLink {
6
+ /** Link text (already resolved by the consumer, e.g. via I18nService.t()) */
7
+ label: string;
8
+ /** Internal Angular route */
9
+ routerLink?: string | any[];
10
+ /** External URL (opens in a new tab) */
11
+ href?: string;
12
+ }
13
+ /**
14
+ * Metadata for val-media-object.
15
+ *
16
+ * Media object = image (or icon) on one side, title + long body text on the
17
+ * other. Presentational: all visible strings are passed already resolved by
18
+ * the consumer (build them with I18nService.t() in the page).
19
+ */
20
+ export interface MediaObjectMetadata {
21
+ /** Unique token identifier */
22
+ token?: string;
23
+ /** Image URL displayed on the side (takes precedence over icon) */
24
+ image?: string;
25
+ /** Alt text for the image */
26
+ imageAlt?: string;
27
+ /** Ionicon name shown when no image is provided */
28
+ icon?: string;
29
+ /** Icon / image accent color */
30
+ color?: Color | string;
31
+ /** Small label above the title */
32
+ overtitle?: string;
33
+ /** Main title */
34
+ title: string;
35
+ /** Body text (supports long, multi-line content) */
36
+ body?: string;
37
+ /** Optional link / CTA under the body */
38
+ link?: MediaObjectLink;
39
+ /** Media width (CSS value). Default: '96px' */
40
+ mediaWidth?: string;
41
+ /** Place the media on the right instead of the left */
42
+ reversed?: boolean;
43
+ /** Vertical alignment of the media against the content */
44
+ align?: 'start' | 'center';
45
+ /** Round the image / icon container corners. Default: true */
46
+ rounded?: boolean;
47
+ /** Render image as a circle (avatar style) */
48
+ circle?: boolean;
49
+ }
50
+ /**
51
+ * Default values for MediaObjectMetadata.
52
+ */
53
+ export declare const MEDIA_OBJECT_DEFAULTS: Required<Pick<MediaObjectMetadata, 'mediaWidth' | 'reversed' | 'align' | 'rounded' | 'circle'>>;
@@ -0,0 +1,32 @@
1
+ import { StatsBarMetadata, StatItem } from './types';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * val-stats-bar
5
+ *
6
+ * Horizontal row of headline stats separated by dividers (AWS / SES "Daily
7
+ * email usage" style). Stacks vertically on mobile.
8
+ *
9
+ * Presentational: values + labels are passed already resolved/formatted.
10
+ *
11
+ * @example
12
+ * ```html
13
+ * <val-stats-bar
14
+ * [props]="{
15
+ * stats: [
16
+ * { label: 'Emails sent', value: 0 },
17
+ * { label: 'Remaining sends', value: 200 },
18
+ * { label: 'Sending quota used', value: '0.00', suffix: '%' }
19
+ * ]
20
+ * }"
21
+ * />
22
+ * ```
23
+ */
24
+ export declare class StatsBarComponent {
25
+ /** Component configuration */
26
+ readonly props: import("@angular/core").InputSignal<Partial<StatsBarMetadata>>;
27
+ /** Merged configuration with defaults */
28
+ config: import("@angular/core").Signal<StatsBarMetadata & Required<Omit<StatsBarMetadata, "stats">>>;
29
+ getColor(stat: StatItem): string | null;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatsBarComponent, never>;
31
+ static ɵcmp: i0.ɵɵComponentDeclaration<StatsBarComponent, "val-stats-bar", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
32
+ }
@@ -0,0 +1,40 @@
1
+ import { Color } from '@ionic/core';
2
+ /**
3
+ * A single stat shown inside a stats bar.
4
+ */
5
+ export interface StatItem {
6
+ /** Label / caption above the value (already resolved by the consumer) */
7
+ label: string;
8
+ /** Main value (number or pre-formatted string) */
9
+ value: string | number;
10
+ /** Value prefix (e.g. "$") */
11
+ prefix?: string;
12
+ /** Value suffix (e.g. "%", "users") */
13
+ suffix?: string;
14
+ /** Value color (Ionic color name or CSS color) */
15
+ color?: Color | string;
16
+ /** Optional token identifier */
17
+ token?: string;
18
+ }
19
+ /**
20
+ * Metadata for val-stats-bar.
21
+ *
22
+ * Horizontal row of headline stats separated by dividers (AWS / SES "Daily
23
+ * email usage" style). Stacks vertically on mobile.
24
+ */
25
+ export interface StatsBarMetadata {
26
+ /** Stats to display */
27
+ stats: StatItem[];
28
+ /** Show vertical dividers between stats. Default: true */
29
+ dividers?: boolean;
30
+ /** Horizontal alignment of the group. Default: 'start' */
31
+ align?: 'start' | 'center' | 'spaced';
32
+ /** Value size. Default: 'large' */
33
+ size?: 'medium' | 'large';
34
+ /** Stack stats vertically on small screens. Default: true */
35
+ stackOnMobile?: boolean;
36
+ }
37
+ /**
38
+ * Default values for StatsBarMetadata.
39
+ */
40
+ export declare const STATS_BAR_DEFAULTS: Required<Omit<StatsBarMetadata, 'stats'>>;
@@ -194,6 +194,12 @@ export type FormMetadata = {
194
194
  actions: ButtonMetadata;
195
195
  /** Global form state */
196
196
  state: ComponentState;
197
+ /**
198
+ * Espacio vertical entre campos, en px. Si se omite, usa el default
199
+ * responsivo de la lib (8px mobile / 12px desktop). Útil para formularios
200
+ * densos o más aireados sin tocar CSS del consumer.
201
+ */
202
+ fieldSpacing?: number;
197
203
  };
198
204
  /**
199
205
  * Possible action types for a toolbar.
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 = "2.0.944";
5
+ export declare const VERSION = "2.0.946";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.944",
3
+ "version": "2.0.946",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"
package/public-api.d.ts CHANGED
@@ -173,6 +173,14 @@ export * from './lib/components/molecules/update-banner/update-banner.component'
173
173
  export * from './lib/components/molecules/update-banner/types';
174
174
  export * from './lib/components/molecules/action-card/action-card.component';
175
175
  export * from './lib/components/molecules/action-card/types';
176
+ export * from './lib/components/molecules/media-object/media-object.component';
177
+ export * from './lib/components/molecules/media-object/types';
178
+ export * from './lib/components/molecules/stats-bar/stats-bar.component';
179
+ export * from './lib/components/molecules/stats-bar/types';
180
+ export * from './lib/components/molecules/article-card/article-card.component';
181
+ export * from './lib/components/molecules/article-card/types';
182
+ export * from './lib/components/molecules/cta-card/cta-card.component';
183
+ export * from './lib/components/molecules/cta-card/types';
176
184
  export * from './lib/components/molecules/invitation-card/invitation-card.component';
177
185
  export * from './lib/components/molecules/invitation-card/types';
178
186
  export * from './lib/components/molecules/member-card/member-card.component';