valtech-components 2.0.784 → 2.0.786

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.
@@ -1,5 +1,25 @@
1
1
  import { ActionHeaderMetadata } from './types';
2
2
  import * as i0 from "@angular/core";
3
+ /**
4
+ * `val-action-header` — heading with a right-aligned action button.
5
+ *
6
+ * By default renders the heading via `val-display` (hero size). Set
7
+ * `headingKind: 'title'` to render via `val-title` (section size) so it
8
+ * matches `val-title` section labels elsewhere on the same screen.
9
+ *
10
+ * @example Section heading (matches `val-title size='medium'` on the page):
11
+ * <val-action-header [props]="{
12
+ * headingKind: 'title',
13
+ * title: { size: 'medium', color: 'dark', bold: true, content: 'Active sessions' },
14
+ * action: { text: 'Sign out all', color: 'dark', fill: 'outline', size: 'small', ... },
15
+ * }"></val-action-header>
16
+ *
17
+ * @example Page hero (default):
18
+ * <val-action-header [props]="{
19
+ * title: { size: 'large', color: 'dark', content: 'Settings' },
20
+ * action: { ... },
21
+ * }"></val-action-header>
22
+ */
3
23
  export declare class ActionHeaderComponent {
4
24
  props: ActionHeaderMetadata;
5
25
  static ɵfac: i0.ɵɵFactoryDeclaration<ActionHeaderComponent, never>;
@@ -1,6 +1,27 @@
1
1
  import { DisplayMetadata } from '../../atoms/display/types';
2
+ import { TitleMetadata } from '../../atoms/title/types';
2
3
  import { ButtonMetadata } from '../../types';
4
+ /**
5
+ * Determines how the heading is rendered.
6
+ *
7
+ * - `'display'` (default) — uses `val-display`. Very large (40px medium, 48px large).
8
+ * Ideal for page-level hero headers.
9
+ * - `'title'` — uses `val-title`. Smaller (18px medium, 24px large). Ideal for
10
+ * section-level headings inside a page, so they match other `val-title`
11
+ * section labels on the same screen.
12
+ */
13
+ export type ActionHeaderHeadingKind = 'display' | 'title';
14
+ /**
15
+ * Configuration for `val-action-header` — a section title with a right-aligned
16
+ * action button. Use `headingKind: 'title'` when this lives inside a page that
17
+ * already has `val-title` section labels (so sizes stay coherent).
18
+ */
3
19
  export type ActionHeaderMetadata = {
4
- title: DisplayMetadata;
20
+ /** Heading props. Use `DisplayMetadata` shape when `headingKind === 'display'`,
21
+ * `TitleMetadata` shape when `headingKind === 'title'`. Both accept
22
+ * `size`, `color`, `content`. */
23
+ title: DisplayMetadata | TitleMetadata;
5
24
  action: ButtonMetadata;
25
+ /** Default `'display'` for back-compat. */
26
+ headingKind?: ActionHeaderHeadingKind;
6
27
  };
@@ -0,0 +1,29 @@
1
+ import { PageLink, PageLinksMetadata } from './types';
2
+ import * as i0 from "@angular/core";
3
+ /**
4
+ * `val-page-links` — stacked list of navigational links with optional dividers.
5
+ * Used for legal/policies, footer link columns, "about" sections, etc.
6
+ *
7
+ * Each item can navigate via Angular `routerLink` (SPA) or external `href`.
8
+ * Detects absolute URLs (`http(s)://`) to apply `target="_blank"` by default.
9
+ *
10
+ * @example
11
+ * <val-page-links [props]="{
12
+ * links: [
13
+ * { label: 'Terms', routerLink: '/legal/terms' },
14
+ * { label: 'Privacy', routerLink: '/legal/privacy' },
15
+ * { label: 'Visit main site', href: 'https://myvaltech.com', icon: 'open-outline' },
16
+ * ],
17
+ * }"></val-page-links>
18
+ */
19
+ export declare class PageLinksComponent {
20
+ /** Page links configuration object. */
21
+ set props(value: PageLinksMetadata);
22
+ get props(): PageLinksMetadata;
23
+ private _props;
24
+ protected links: import("@angular/core").Signal<PageLink[]>;
25
+ constructor();
26
+ protected isExternal(link: PageLink): boolean;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<PageLinksComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<PageLinksComponent, "val-page-links", never, { "props": { "alias": "props"; "required": true; }; }, {}, never, never, true, never>;
29
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Single entry of a `val-page-links` list.
3
+ *
4
+ * Pass EITHER `routerLink` (Angular SPA navigation) OR `href` (external URL).
5
+ * If both are present, `routerLink` wins.
6
+ */
7
+ export interface PageLink {
8
+ /** Visible text. */
9
+ label: string;
10
+ /** Angular router path (e.g. `/legal/terms`). */
11
+ routerLink?: string;
12
+ /** External URL (e.g. `https://myvaltech.com/legal/terms`). */
13
+ href?: string;
14
+ /**
15
+ * Force opens in a new tab. Defaults to `true` when `href` looks absolute
16
+ * (starts with `http://` or `https://`).
17
+ */
18
+ external?: boolean;
19
+ /**
20
+ * Optional Ionic icon name shown after the label (e.g. `arrow-forward-outline`,
21
+ * `open-outline` for external). When omitted, no icon is rendered.
22
+ */
23
+ icon?: string;
24
+ /** Optional tooltip / aria-label override. */
25
+ ariaLabel?: string;
26
+ }
27
+ /**
28
+ * Config for `val-page-links` — stacked list of navigational links.
29
+ * Used for legal/policies, footer link columns, "About" sections, etc.
30
+ */
31
+ export interface PageLinksMetadata {
32
+ /** Items to render in order. */
33
+ links: PageLink[];
34
+ /** Show a divider line between items. Default `true`. */
35
+ showDividers?: boolean;
36
+ /** Visual size preset. Default `'medium'`. */
37
+ size?: 'small' | 'medium' | 'large';
38
+ }
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.784";
5
+ export declare const VERSION = "2.0.786";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.784",
3
+ "version": "2.0.786",
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
@@ -79,6 +79,8 @@ export * from './lib/components/molecules/links-cake/links-cake.component';
79
79
  export * from './lib/components/molecules/links-cake/types';
80
80
  export * from './lib/components/molecules/notes-box/notes-box.component';
81
81
  export * from './lib/components/molecules/notes-box/types';
82
+ export * from './lib/components/molecules/page-links/page-links.component';
83
+ export * from './lib/components/molecules/page-links/types';
82
84
  export * from './lib/components/molecules/number-input/number-input.component';
83
85
  export * from './lib/components/molecules/number-from-to/number-from-to.component';
84
86
  export * from './lib/components/molecules/number-from-to/types';