valtech-components 2.0.963 → 2.0.964
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/content-card/content-card.component.mjs +86 -0
- package/esm2022/lib/components/molecules/content-card/types.mjs +11 -0
- package/esm2022/lib/components/molecules/info-card/info-card.component.mjs +126 -0
- package/esm2022/lib/components/molecules/info-card/types.mjs +11 -0
- package/esm2022/lib/components/molecules/metric-card/metric-card.component.mjs +146 -0
- package/esm2022/lib/components/molecules/metric-card/types.mjs +10 -0
- package/esm2022/lib/components/molecules/pill/pill.component.mjs +100 -105
- package/esm2022/lib/components/molecules/pill/types.mjs +1 -1
- package/esm2022/lib/components/organisms/article-strip/article-strip.component.mjs +127 -0
- package/esm2022/lib/components/organisms/article-strip/types.mjs +8 -0
- package/esm2022/lib/components/organisms/auth-cta/auth-cta.component.mjs +180 -0
- package/esm2022/lib/components/organisms/auth-cta/types.mjs +9 -0
- package/esm2022/lib/services/requests/request.service.mjs +11 -4
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/public-api.mjs +12 -1
- package/fesm2022/valtech-components.mjs +811 -124
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/molecules/article-card/article-card.component.d.ts +1 -1
- package/lib/components/molecules/content-card/content-card.component.d.ts +26 -0
- package/lib/components/molecules/content-card/types.d.ts +30 -0
- package/lib/components/molecules/info-card/info-card.component.d.ts +37 -0
- package/lib/components/molecules/info-card/types.d.ts +44 -0
- package/lib/components/molecules/metric-card/metric-card.component.d.ts +34 -0
- package/lib/components/molecules/metric-card/types.d.ts +46 -0
- package/lib/components/molecules/pill/pill.component.d.ts +10 -26
- package/lib/components/molecules/pill/types.d.ts +76 -35
- package/lib/components/organisms/article-strip/article-strip.component.d.ts +38 -0
- package/lib/components/organisms/article-strip/types.d.ts +29 -0
- package/lib/components/organisms/auth-cta/auth-cta.component.d.ts +44 -0
- package/lib/components/organisms/auth-cta/types.d.ts +42 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +10 -0
|
@@ -32,7 +32,7 @@ export declare class ArticleCardComponent {
|
|
|
32
32
|
/** Emitted when the card is clicked */
|
|
33
33
|
onClick: EventEmitter<ArticleCardClickEvent>;
|
|
34
34
|
/** Merged configuration with defaults */
|
|
35
|
-
config: import("@angular/core").Signal<ArticleCardMetadata & Required<Pick<ArticleCardMetadata, "
|
|
35
|
+
config: import("@angular/core").Signal<ArticleCardMetadata & Required<Pick<ArticleCardMetadata, "aspectRatio" | "bordered" | "shadowed" | "excerptLines">>>;
|
|
36
36
|
isClickable: import("@angular/core").Signal<boolean>;
|
|
37
37
|
getTopicColor(): string | null;
|
|
38
38
|
handleClick(event: MouseEvent): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ContentCardMetadata } from './types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* val-content-card
|
|
5
|
+
*
|
|
6
|
+
* Generic container card with configurable padding, border radius, background
|
|
7
|
+
* color and shadow. Accepts arbitrary content via ng-content. Use it to wrap
|
|
8
|
+
* val-article, stats, or any other content that needs a card shell.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```html
|
|
12
|
+
* <val-content-card [props]="{ title: 'Summary', shadowed: true }">
|
|
13
|
+
* <p>Any inner content here.</p>
|
|
14
|
+
* </val-content-card>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare class ContentCardComponent {
|
|
18
|
+
/** Component configuration */
|
|
19
|
+
readonly props: import("@angular/core").InputSignal<Partial<ContentCardMetadata>>;
|
|
20
|
+
/** Merged configuration with defaults */
|
|
21
|
+
config: import("@angular/core").Signal<ContentCardMetadata & Required<Pick<ContentCardMetadata, "borderRadius" | "bordered" | "shadowed" | "align" | "padding">>>;
|
|
22
|
+
resolvedBg: import("@angular/core").Signal<string>;
|
|
23
|
+
resolvedColor: import("@angular/core").Signal<string>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ContentCardComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ContentCardComponent, "val-content-card", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metadata for val-content-card.
|
|
3
|
+
*
|
|
4
|
+
* Generic container card with configurable padding, border radius, background
|
|
5
|
+
* color and shadow. Supports ng-content for arbitrary inner content.
|
|
6
|
+
*/
|
|
7
|
+
export interface ContentCardMetadata {
|
|
8
|
+
/** Optional card title rendered above the content */
|
|
9
|
+
title?: string;
|
|
10
|
+
/** Optional description rendered below the title */
|
|
11
|
+
description?: string;
|
|
12
|
+
/** Background color — Ionic color name (primary…dark) or any CSS color */
|
|
13
|
+
backgroundColor?: string;
|
|
14
|
+
/** Text color — Ionic color name or any CSS color */
|
|
15
|
+
color?: string;
|
|
16
|
+
/** Card inner padding. Default: '1.5rem' */
|
|
17
|
+
padding?: string;
|
|
18
|
+
/** Card border radius. Default: '20px' */
|
|
19
|
+
borderRadius?: string;
|
|
20
|
+
/** Show border. Default: false */
|
|
21
|
+
bordered?: boolean;
|
|
22
|
+
/** Show box shadow. Default: true */
|
|
23
|
+
shadowed?: boolean;
|
|
24
|
+
/** Text alignment. Default: 'start' */
|
|
25
|
+
align?: 'start' | 'center';
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Default values for ContentCardMetadata.
|
|
29
|
+
*/
|
|
30
|
+
export declare const CONTENT_CARD_DEFAULTS: Required<Pick<ContentCardMetadata, 'padding' | 'borderRadius' | 'bordered' | 'shadowed' | 'align'>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { InfoCardMetadata } from './types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
/**
|
|
4
|
+
* val-info-card
|
|
5
|
+
*
|
|
6
|
+
* Card with icon + overtitle + title + subtitle on the left side, and a list
|
|
7
|
+
* of key-value pairs (label: value) on the right side. Inspired by npm's
|
|
8
|
+
* "Provenance" / metadata panel style.
|
|
9
|
+
*
|
|
10
|
+
* Two-column layout on desktop, stacked single-column on mobile.
|
|
11
|
+
*
|
|
12
|
+
* Presentational — pass already-resolved strings.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <val-info-card
|
|
17
|
+
* [props]="{
|
|
18
|
+
* icon: 'cube-outline',
|
|
19
|
+
* title: 'valtech-components',
|
|
20
|
+
* subtitle: 'v2.0.962',
|
|
21
|
+
* keyValues: [
|
|
22
|
+
* { label: 'License', value: 'MIT' },
|
|
23
|
+
* { label: 'Downloads', value: '1.2M' }
|
|
24
|
+
* ]
|
|
25
|
+
* }"
|
|
26
|
+
* />
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
export declare class InfoCardComponent {
|
|
30
|
+
/** Component configuration */
|
|
31
|
+
readonly props: import("@angular/core").InputSignal<Partial<InfoCardMetadata>>;
|
|
32
|
+
/** Merged configuration with defaults */
|
|
33
|
+
config: import("@angular/core").Signal<InfoCardMetadata & Required<Pick<InfoCardMetadata, "borderRadius" | "bordered" | "iconColor" | "shadowed" | "padding">>>;
|
|
34
|
+
getIconColor(): string;
|
|
35
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InfoCardComponent, never>;
|
|
36
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<InfoCardComponent, "val-info-card", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
37
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A single key-value pair shown in the right column of val-info-card.
|
|
3
|
+
*/
|
|
4
|
+
export interface InfoCardKeyValue {
|
|
5
|
+
/** Label (shown in muted color) */
|
|
6
|
+
label: string;
|
|
7
|
+
/** Value (shown in bold) */
|
|
8
|
+
value: string;
|
|
9
|
+
/** Optional token for click identification */
|
|
10
|
+
token?: string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Metadata for val-info-card.
|
|
14
|
+
*
|
|
15
|
+
* Card with icon + overtitle + title + subtitle on the left side, and a list
|
|
16
|
+
* of key-value pairs on the right side. Inspired by npm "Provenance" / metadata
|
|
17
|
+
* panels. Two-column layout on desktop, stacked on mobile.
|
|
18
|
+
*/
|
|
19
|
+
export interface InfoCardMetadata {
|
|
20
|
+
/** ion-icon name */
|
|
21
|
+
icon?: string;
|
|
22
|
+
/** Icon color (Ionic color name or CSS color). Default: 'primary' */
|
|
23
|
+
iconColor?: string;
|
|
24
|
+
/** Small label above the title */
|
|
25
|
+
overtitle?: string;
|
|
26
|
+
/** Main title */
|
|
27
|
+
title: string;
|
|
28
|
+
/** Subtitle below the title */
|
|
29
|
+
subtitle?: string;
|
|
30
|
+
/** Key-value pairs shown in the right column */
|
|
31
|
+
keyValues?: InfoCardKeyValue[];
|
|
32
|
+
/** Show border. Default: true */
|
|
33
|
+
bordered?: boolean;
|
|
34
|
+
/** Show shadow. Default: false */
|
|
35
|
+
shadowed?: boolean;
|
|
36
|
+
/** Card padding. Default: '1.5rem' */
|
|
37
|
+
padding?: string;
|
|
38
|
+
/** Card border radius. Default: '16px' */
|
|
39
|
+
borderRadius?: string;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Default values for InfoCardMetadata.
|
|
43
|
+
*/
|
|
44
|
+
export declare const INFO_CARD_DEFAULTS: Required<Pick<InfoCardMetadata, 'iconColor' | 'bordered' | 'shadowed' | 'padding' | 'borderRadius'>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { MetricCardMetadata } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* val-metric-card
|
|
6
|
+
*
|
|
7
|
+
* Card with title + optional info link + description + horizontal stats row
|
|
8
|
+
* (val-stats-bar) + a discrete icon action button in the top-right corner.
|
|
9
|
+
*
|
|
10
|
+
* Presentational — pass already-resolved strings.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```html
|
|
14
|
+
* <val-metric-card
|
|
15
|
+
* [props]="{
|
|
16
|
+
* title: 'Email Activity',
|
|
17
|
+
* description: 'Last 30 days',
|
|
18
|
+
* stats: { stats: [{ label: 'Sent', value: 1240 }, { label: 'Opens', value: 680 }] },
|
|
19
|
+
* action: { icon: 'refresh-outline', token: 'refresh' }
|
|
20
|
+
* }"
|
|
21
|
+
* (onAction)="handleAction($event)"
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export declare class MetricCardComponent {
|
|
26
|
+
/** Component configuration */
|
|
27
|
+
readonly props: import("@angular/core").InputSignal<Partial<MetricCardMetadata>>;
|
|
28
|
+
/** Emitted with the token of the clicked action */
|
|
29
|
+
onAction: EventEmitter<string>;
|
|
30
|
+
/** Merged configuration with defaults */
|
|
31
|
+
config: import("@angular/core").Signal<MetricCardMetadata & Required<Pick<MetricCardMetadata, "borderRadius" | "bordered" | "shadowed" | "padding">>>;
|
|
32
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MetricCardComponent, never>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MetricCardComponent, "val-metric-card", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { StatsBarMetadata } from '../stats-bar/types';
|
|
2
|
+
/**
|
|
3
|
+
* A discrete action button shown in the top-right corner of val-metric-card.
|
|
4
|
+
*/
|
|
5
|
+
export interface MetricCardAction {
|
|
6
|
+
/** ion-icon name */
|
|
7
|
+
icon: string;
|
|
8
|
+
/** Token identifier emitted by (onAction) */
|
|
9
|
+
token: string;
|
|
10
|
+
/** Whether the action button is disabled */
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Metadata for val-metric-card.
|
|
15
|
+
*
|
|
16
|
+
* Card with title + optional info link + description + horizontal stats row
|
|
17
|
+
* (val-stats-bar) + a discrete action button in the top-right corner.
|
|
18
|
+
*/
|
|
19
|
+
export interface MetricCardMetadata {
|
|
20
|
+
/** Card title */
|
|
21
|
+
title: string;
|
|
22
|
+
/** Text for the info link next to the title */
|
|
23
|
+
infoLabel?: string;
|
|
24
|
+
/** External href for the info link */
|
|
25
|
+
infoHref?: string;
|
|
26
|
+
/** Internal route for the info link */
|
|
27
|
+
infoRoute?: string | any[];
|
|
28
|
+
/** Description / subtitle below the title */
|
|
29
|
+
description?: string;
|
|
30
|
+
/** Stats to display using val-stats-bar */
|
|
31
|
+
stats?: StatsBarMetadata;
|
|
32
|
+
/** Discrete action button in top-right corner */
|
|
33
|
+
action?: MetricCardAction;
|
|
34
|
+
/** Show border. Default: true */
|
|
35
|
+
bordered?: boolean;
|
|
36
|
+
/** Show shadow. Default: false */
|
|
37
|
+
shadowed?: boolean;
|
|
38
|
+
/** Card padding. Default: '1.25rem 1.5rem' */
|
|
39
|
+
padding?: string;
|
|
40
|
+
/** Card border radius. Default: '16px' */
|
|
41
|
+
borderRadius?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Default values for MetricCardMetadata.
|
|
45
|
+
*/
|
|
46
|
+
export declare const METRIC_CARD_DEFAULTS: Required<Pick<MetricCardMetadata, 'bordered' | 'shadowed' | 'padding' | 'borderRadius'>>;
|
|
@@ -1,44 +1,28 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
import { PillClickEvent, PillMetadata } from './types';
|
|
2
|
+
import { PillActionEvent, PillClickEvent, PillMetadata } from './types';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export declare class PillComponent implements OnInit, OnChanges {
|
|
6
|
-
theme: ThemeService;
|
|
7
5
|
private presets;
|
|
8
|
-
/**
|
|
9
|
-
* Preset name to apply. Presets define reusable pill configurations
|
|
10
|
-
* that can be registered at app level via provideValtechPresets().
|
|
11
|
-
*/
|
|
6
|
+
/** Optional preset name registered via provideValtechPresets(). */
|
|
12
7
|
preset?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Pill configuration object. Values here override preset values.
|
|
15
|
-
*/
|
|
8
|
+
/** Pill configuration. Overrides preset values when both are set. */
|
|
16
9
|
props: Partial<PillMetadata>;
|
|
17
|
-
/**
|
|
18
|
-
* Emits when a clickable text-pill is activated (click / Enter / Space).
|
|
19
|
-
*/
|
|
10
|
+
/** Emits when a clickable badge pill is activated. */
|
|
20
11
|
pillClick: EventEmitter<PillClickEvent>;
|
|
21
|
-
/**
|
|
22
|
-
|
|
23
|
-
*/
|
|
12
|
+
/** Emits when a notification-pill action button is pressed. */
|
|
13
|
+
pillAction: EventEmitter<PillActionEvent>;
|
|
24
14
|
resolvedProps: PillMetadata;
|
|
25
15
|
ngOnInit(): void;
|
|
26
16
|
ngOnChanges(changes: SimpleChanges): void;
|
|
27
|
-
/**
|
|
28
|
-
* Merge preset configuration with explicit props.
|
|
29
|
-
* Explicit props take precedence over preset values.
|
|
30
|
-
*/
|
|
31
17
|
private resolveProps;
|
|
32
|
-
|
|
18
|
+
get isNotificationPill(): boolean;
|
|
33
19
|
get isTextPill(): boolean;
|
|
34
|
-
/** Color variant for the text-pill, with a sensible default. */
|
|
35
20
|
get pillColor(): string;
|
|
36
|
-
/** Font weight for the text-pill, with a sensible default. */
|
|
37
21
|
get pillWeight(): string;
|
|
38
|
-
/** Size for the text-pill, with a sensible default. */
|
|
39
22
|
get pillSize(): string;
|
|
40
|
-
|
|
23
|
+
getIconColor(): string;
|
|
41
24
|
onPillClick(event?: Event): void;
|
|
25
|
+
onActionClick(actionToken: string, event: MouseEvent): void;
|
|
42
26
|
static ɵfac: i0.ɵɵFactoryDeclaration<PillComponent, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<PillComponent, "val-pill", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "pillClick": "pillClick"; }, never, never, true, never>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<PillComponent, "val-pill", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "pillClick": "pillClick"; "pillAction": "pillAction"; }, never, never, true, never>;
|
|
44
28
|
}
|
|
@@ -1,63 +1,104 @@
|
|
|
1
1
|
import { Color } from '@ionic/core';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Visual color variant for the text-pill (badge) mode of `val-pill`.
|
|
5
|
-
* Maps to Ionic theme colors so it stays coherent with the rest of the lib.
|
|
6
|
-
*/
|
|
2
|
+
/** Color variant for the badge/text pill. */
|
|
7
3
|
export type PillColor = Color;
|
|
4
|
+
/** Font weight for the badge label. */
|
|
5
|
+
export type PillWeight = 'normal' | 'medium' | 'bold';
|
|
6
|
+
/** Size of the badge pill. */
|
|
7
|
+
export type PillSize = 'small' | 'medium' | 'large';
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* A single action button rendered as a small circle icon inside a notification pill.
|
|
10
10
|
*/
|
|
11
|
-
export
|
|
11
|
+
export interface PillAction {
|
|
12
|
+
/** ionicons icon name */
|
|
13
|
+
icon: string;
|
|
14
|
+
/** Identifier emitted on click */
|
|
15
|
+
token: string;
|
|
16
|
+
/** Accessible label (falls back to token) */
|
|
17
|
+
ariaLabel?: string;
|
|
18
|
+
}
|
|
12
19
|
/**
|
|
13
|
-
*
|
|
20
|
+
* Notification-pill content. Activates notification mode when provided.
|
|
21
|
+
*
|
|
22
|
+
* Renders as a wide dark pill: icon ﹒ time · title ﹒ [action buttons].
|
|
14
23
|
*/
|
|
15
|
-
export
|
|
24
|
+
export interface PillNotification {
|
|
25
|
+
/** ionicons icon name shown on the left */
|
|
26
|
+
icon?: string;
|
|
27
|
+
/** Icon color (Ionic color name or CSS). Default: 'warning' */
|
|
28
|
+
iconColor?: string;
|
|
29
|
+
/** Short time/age label (e.g. '2h', 'now', '3min ago') */
|
|
30
|
+
time?: string;
|
|
31
|
+
/** Notification title */
|
|
32
|
+
title: string;
|
|
33
|
+
/** Optional secondary body text */
|
|
34
|
+
body?: string;
|
|
35
|
+
/** Circle icon buttons on the right (dismiss, snooze, etc.) */
|
|
36
|
+
actions?: PillAction[];
|
|
37
|
+
}
|
|
16
38
|
/**
|
|
17
39
|
* Configuration for `val-pill`.
|
|
18
40
|
*
|
|
19
|
-
*
|
|
41
|
+
* Two modes — whichever field is present takes precedence:
|
|
42
|
+
*
|
|
43
|
+
* 1. **Notification mode** — provide `notification`. Renders a wide dark pill
|
|
44
|
+
* with icon + time + title + circle action buttons.
|
|
20
45
|
*
|
|
21
|
-
*
|
|
22
|
-
* Renders a large fun-card with a title + action button.
|
|
46
|
+
* 2. **Badge mode** — provide `label`. Renders a compact coloured badge.
|
|
23
47
|
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
48
|
+
* @example Badge
|
|
49
|
+
* ```html
|
|
50
|
+
* <val-pill [props]="{ label: 'v1.2.0', color: 'dark', weight: 'bold' }" />
|
|
51
|
+
* ```
|
|
27
52
|
*
|
|
28
|
-
*
|
|
53
|
+
* @example Notification
|
|
54
|
+
* ```html
|
|
55
|
+
* <val-pill
|
|
56
|
+
* [props]="{
|
|
57
|
+
* notification: {
|
|
58
|
+
* icon: 'alarm-outline',
|
|
59
|
+
* iconColor: 'warning',
|
|
60
|
+
* time: '2h',
|
|
61
|
+
* title: 'Reunión en 15 min',
|
|
62
|
+
* actions: [
|
|
63
|
+
* { icon: 'moon-outline', token: 'snooze' },
|
|
64
|
+
* { icon: 'close-outline', token: 'dismiss' }
|
|
65
|
+
* ]
|
|
66
|
+
* }
|
|
67
|
+
* }"
|
|
68
|
+
* (pillAction)="onAction($event)"
|
|
69
|
+
* />
|
|
70
|
+
* ```
|
|
29
71
|
*/
|
|
30
72
|
export type PillMetadata = {
|
|
31
73
|
token?: string;
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
hoverable?: boolean;
|
|
36
|
-
/** Card-mode content. Optional — omit when using text-pill mode. */
|
|
37
|
-
content?: ActionHeaderMetadata;
|
|
38
|
-
/** Text-pill label. Presence of this switches the component to badge mode. */
|
|
74
|
+
/** Presence activates notification mode */
|
|
75
|
+
notification?: PillNotification;
|
|
76
|
+
/** Presence activates badge mode (overrides notification mode) */
|
|
39
77
|
label?: string;
|
|
40
|
-
/**
|
|
78
|
+
/** Badge color variant. Default: 'medium' */
|
|
41
79
|
color?: PillColor;
|
|
42
|
-
/** Font weight
|
|
80
|
+
/** Font weight. Default: 'medium' */
|
|
43
81
|
weight?: PillWeight;
|
|
44
|
-
/**
|
|
82
|
+
/** Badge size. Default: 'small' */
|
|
45
83
|
size?: PillSize;
|
|
46
|
-
/** Optional
|
|
84
|
+
/** Optional leading ionicons icon */
|
|
47
85
|
icon?: string;
|
|
48
|
-
/**
|
|
86
|
+
/** Makes the badge interactive: pointer cursor + emits pillClick */
|
|
49
87
|
clickable?: boolean;
|
|
50
|
-
/** Solid fill instead of the default soft/tinted fill
|
|
88
|
+
/** Solid fill instead of the default soft/tinted fill */
|
|
51
89
|
solid?: boolean;
|
|
52
|
-
/** Accessible label override
|
|
90
|
+
/** Accessible label override. Falls back to `label` */
|
|
53
91
|
ariaLabel?: string;
|
|
54
92
|
};
|
|
55
|
-
/**
|
|
56
|
-
* Event emitted when a clickable text-pill is activated.
|
|
57
|
-
*/
|
|
93
|
+
/** Emitted by a clickable badge pill. */
|
|
58
94
|
export interface PillClickEvent {
|
|
59
|
-
/** The pill token, if one was set. */
|
|
60
95
|
token?: string;
|
|
61
|
-
/** The pill label at click time. */
|
|
62
96
|
label?: string;
|
|
63
97
|
}
|
|
98
|
+
/** Emitted when a notification-pill action button is pressed. */
|
|
99
|
+
export interface PillActionEvent {
|
|
100
|
+
/** Token of the action button pressed */
|
|
101
|
+
actionToken: string;
|
|
102
|
+
/** Pill token if set */
|
|
103
|
+
pillToken?: string;
|
|
104
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { ArticleCardClickEvent } from '../../molecules/article-card/types';
|
|
3
|
+
import { ArticleStripMetadata } from './types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* val-article-strip
|
|
7
|
+
*
|
|
8
|
+
* Horizontal scroll row of article cards with a section header and an optional
|
|
9
|
+
* "see all" link/action. Reuses val-horizontal-scroll + val-article-card.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```html
|
|
13
|
+
* <val-article-strip
|
|
14
|
+
* [props]="{
|
|
15
|
+
* title: 'Latest Articles',
|
|
16
|
+
* seeAllLabel: 'View all',
|
|
17
|
+
* seeAllRoute: '/blog',
|
|
18
|
+
* articles: [...]
|
|
19
|
+
* }"
|
|
20
|
+
* (onArticleClick)="openArticle($event)"
|
|
21
|
+
* />
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare class ArticleStripComponent {
|
|
25
|
+
private navigation;
|
|
26
|
+
/** Component configuration */
|
|
27
|
+
readonly props: import("@angular/core").InputSignal<Partial<ArticleStripMetadata>>;
|
|
28
|
+
/** Emitted when the "see all" link/button is clicked */
|
|
29
|
+
onSeeAll: EventEmitter<string>;
|
|
30
|
+
/** Re-emits the onClick event from each article card */
|
|
31
|
+
onArticleClick: EventEmitter<ArticleCardClickEvent>;
|
|
32
|
+
/** Merged configuration with defaults */
|
|
33
|
+
config: import("@angular/core").Signal<ArticleStripMetadata & Required<Pick<ArticleStripMetadata, "gap" | "cardWidth">>>;
|
|
34
|
+
hasSeeAll: import("@angular/core").Signal<boolean>;
|
|
35
|
+
handleSeeAll(event: MouseEvent): void;
|
|
36
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArticleStripComponent, never>;
|
|
37
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ArticleStripComponent, "val-article-strip", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onSeeAll": "onSeeAll"; "onArticleClick": "onArticleClick"; }, never, never, true, never>;
|
|
38
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { ArticleCardMetadata } from '../../molecules/article-card/types';
|
|
2
|
+
/**
|
|
3
|
+
* Metadata for val-article-strip.
|
|
4
|
+
*
|
|
5
|
+
* Horizontal scroll row of article cards with an optional section header
|
|
6
|
+
* and a "see all" link/action on the right side.
|
|
7
|
+
*/
|
|
8
|
+
export interface ArticleStripMetadata {
|
|
9
|
+
/** Section title shown on the left of the header */
|
|
10
|
+
title?: string;
|
|
11
|
+
/** Label for the "see all" link/button */
|
|
12
|
+
seeAllLabel?: string;
|
|
13
|
+
/** Internal Angular route for the "see all" action */
|
|
14
|
+
seeAllRoute?: string | any[];
|
|
15
|
+
/** External href for the "see all" action */
|
|
16
|
+
seeAllHref?: string;
|
|
17
|
+
/** Token emitted by (onSeeAll) when neither route nor href is set */
|
|
18
|
+
seeAllToken?: string;
|
|
19
|
+
/** Articles to display */
|
|
20
|
+
articles: ArticleCardMetadata[];
|
|
21
|
+
/** Fixed width of each article card. Default: '280px' */
|
|
22
|
+
cardWidth?: string;
|
|
23
|
+
/** Gap between cards. Default: '16px' */
|
|
24
|
+
gap?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Default values for ArticleStripMetadata.
|
|
28
|
+
*/
|
|
29
|
+
export declare const ARTICLE_STRIP_DEFAULTS: Required<Pick<ArticleStripMetadata, 'cardWidth' | 'gap'>>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { AuthCtaMetadata } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
/**
|
|
5
|
+
* val-auth-cta
|
|
6
|
+
*
|
|
7
|
+
* Full-width CTA section inviting unauthenticated users to sign up or log in.
|
|
8
|
+
* Desktop: text on the left, optional image on the right.
|
|
9
|
+
* Mobile: stacked, image below text.
|
|
10
|
+
*
|
|
11
|
+
* Auto-registers its own i18n defaults (AuthCta namespace) so there are never
|
|
12
|
+
* missing keys, even if the consumer does not register them.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```html
|
|
16
|
+
* <val-auth-cta
|
|
17
|
+
* [props]="{
|
|
18
|
+
* title: 'Join Valtech today',
|
|
19
|
+
* subtitle: 'The platform built for teams that ship.',
|
|
20
|
+
* loginRoute: '/login',
|
|
21
|
+
* registerRoute: '/register'
|
|
22
|
+
* }"
|
|
23
|
+
* (onLogin)="openLogin()"
|
|
24
|
+
* (onRegister)="openRegister()"
|
|
25
|
+
* />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare class AuthCtaComponent {
|
|
29
|
+
private i18n;
|
|
30
|
+
/** Component configuration */
|
|
31
|
+
readonly props: import("@angular/core").InputSignal<Partial<AuthCtaMetadata>>;
|
|
32
|
+
/** Emitted when the login button is clicked */
|
|
33
|
+
onLogin: EventEmitter<void>;
|
|
34
|
+
/** Emitted when the register button is clicked */
|
|
35
|
+
onRegister: EventEmitter<void>;
|
|
36
|
+
constructor();
|
|
37
|
+
/** Merged configuration with defaults */
|
|
38
|
+
config: import("@angular/core").Signal<AuthCtaMetadata & Required<Pick<AuthCtaMetadata, "borderRadius" | "align" | "padding">>>;
|
|
39
|
+
loginLabel: import("@angular/core").Signal<string>;
|
|
40
|
+
registerLabel: import("@angular/core").Signal<string>;
|
|
41
|
+
resolvedBg: import("@angular/core").Signal<string>;
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuthCtaComponent, never>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuthCtaComponent, "val-auth-cta", never, { "props": { "alias": "props"; "required": false; "isSignal": true; }; }, { "onLogin": "onLogin"; "onRegister": "onRegister"; }, never, never, true, never>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Metadata for val-auth-cta.
|
|
3
|
+
*
|
|
4
|
+
* Full-width CTA section that invites unauthenticated users to sign up or log in.
|
|
5
|
+
* Supports an optional side image for desktop layouts.
|
|
6
|
+
*/
|
|
7
|
+
export interface AuthCtaMetadata {
|
|
8
|
+
/** Small label above the title (e.g. "¡Únete gratis!") */
|
|
9
|
+
eyebrow?: string;
|
|
10
|
+
/** Main heading */
|
|
11
|
+
title: string;
|
|
12
|
+
/** Supporting paragraph below the title */
|
|
13
|
+
subtitle?: string;
|
|
14
|
+
/** Label for the login button. Falls back to i18n key AuthCta.login */
|
|
15
|
+
loginLabel?: string;
|
|
16
|
+
/** Label for the register button. Falls back to i18n key AuthCta.register */
|
|
17
|
+
registerLabel?: string;
|
|
18
|
+
/** Internal route for the login button */
|
|
19
|
+
loginRoute?: string | any[];
|
|
20
|
+
/** External href for the login button */
|
|
21
|
+
loginHref?: string;
|
|
22
|
+
/** Internal route for the register button */
|
|
23
|
+
registerRoute?: string | any[];
|
|
24
|
+
/** External href for the register button */
|
|
25
|
+
registerHref?: string;
|
|
26
|
+
/** Decorative image shown to the right (desktop) */
|
|
27
|
+
image?: string;
|
|
28
|
+
/** Alt text for the image */
|
|
29
|
+
imageAlt?: string;
|
|
30
|
+
/** Background color — Ionic color name or any CSS color */
|
|
31
|
+
backgroundColor?: string;
|
|
32
|
+
/** Content alignment. Default: 'center' */
|
|
33
|
+
align?: 'start' | 'center';
|
|
34
|
+
/** Border radius of the wrapper. Default: '0' */
|
|
35
|
+
borderRadius?: string;
|
|
36
|
+
/** Inner padding. Default: '3rem 1.5rem' */
|
|
37
|
+
padding?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Default values for AuthCtaMetadata.
|
|
41
|
+
*/
|
|
42
|
+
export declare const AUTH_CTA_DEFAULTS: Required<Pick<AuthCtaMetadata, 'align' | 'borderRadius' | 'padding'>>;
|
package/lib/version.d.ts
CHANGED
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -366,3 +366,13 @@ export * from './lib/services/requests/types';
|
|
|
366
366
|
export * from './lib/services/requests/request.service';
|
|
367
367
|
export * from './lib/services/requests/request-form-builder.service';
|
|
368
368
|
export * from './lib/services/requests/request-firestore.service';
|
|
369
|
+
export * from './lib/components/organisms/article-strip/article-strip.component';
|
|
370
|
+
export * from './lib/components/organisms/article-strip/types';
|
|
371
|
+
export * from './lib/components/molecules/info-card/info-card.component';
|
|
372
|
+
export * from './lib/components/molecules/info-card/types';
|
|
373
|
+
export * from './lib/components/molecules/metric-card/metric-card.component';
|
|
374
|
+
export * from './lib/components/molecules/metric-card/types';
|
|
375
|
+
export * from './lib/components/molecules/content-card/content-card.component';
|
|
376
|
+
export * from './lib/components/molecules/content-card/types';
|
|
377
|
+
export * from './lib/components/organisms/auth-cta/auth-cta.component';
|
|
378
|
+
export * from './lib/components/organisms/auth-cta/types';
|