valtech-components 2.0.565 → 2.0.567

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 (68) hide show
  1. package/esm2022/lib/components/atoms/avatar/avatar.component.mjs +51 -14
  2. package/esm2022/lib/components/atoms/fab/fab.component.mjs +63 -25
  3. package/esm2022/lib/components/atoms/progress-bar/progress-bar.component.mjs +64 -19
  4. package/esm2022/lib/components/molecules/accordion/accordion.component.mjs +45 -18
  5. package/esm2022/lib/components/molecules/alert-box/alert-box.component.mjs +55 -13
  6. package/esm2022/lib/components/molecules/breadcrumb/breadcrumb.component.mjs +43 -15
  7. package/esm2022/lib/components/molecules/card/card.component.mjs +126 -83
  8. package/esm2022/lib/components/molecules/check-input/check-input.component.mjs +52 -8
  9. package/esm2022/lib/components/molecules/chip-group/chip-group.component.mjs +54 -37
  10. package/esm2022/lib/components/molecules/comment/comment.component.mjs +1 -1
  11. package/esm2022/lib/components/molecules/date-input/date-input.component.mjs +62 -27
  12. package/esm2022/lib/components/molecules/docs-code-example/docs-code-example.component.mjs +3 -3
  13. package/esm2022/lib/components/molecules/email-input/email-input.component.mjs +48 -18
  14. package/esm2022/lib/components/molecules/glow-card/glow-card.component.mjs +74 -46
  15. package/esm2022/lib/components/molecules/multi-select-search/multi-select-search.component.mjs +2 -2
  16. package/esm2022/lib/components/molecules/participant-card/participant-card.component.mjs +1 -1
  17. package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +49 -21
  18. package/esm2022/lib/components/molecules/phone-input/phone-input.component.mjs +95 -59
  19. package/esm2022/lib/components/molecules/pill/pill.component.mjs +61 -13
  20. package/esm2022/lib/components/molecules/progress-status/progress-status.component.mjs +2 -2
  21. package/esm2022/lib/components/molecules/rating/rating.component.mjs +60 -43
  22. package/esm2022/lib/components/molecules/searchbar/searchbar.component.mjs +56 -26
  23. package/esm2022/lib/components/molecules/searchbar/types.mjs +2 -0
  24. package/esm2022/lib/components/molecules/segment-control/segment-control.component.mjs +52 -29
  25. package/esm2022/lib/components/molecules/select-input/select-input.component.mjs +68 -18
  26. package/esm2022/lib/components/molecules/select-search/select-search.component.mjs +2 -2
  27. package/esm2022/lib/components/molecules/stats-card/stats-card.component.mjs +67 -51
  28. package/esm2022/lib/components/molecules/stepper/stepper.component.mjs +51 -23
  29. package/esm2022/lib/components/molecules/tabs/tabs.component.mjs +59 -21
  30. package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +49 -19
  31. package/esm2022/lib/components/molecules/textarea-input/textarea-input.component.mjs +93 -59
  32. package/esm2022/lib/components/molecules/toggle-input/toggle-input.component.mjs +49 -15
  33. package/esm2022/lib/components/molecules/winner-display/winner-display.component.mjs +1 -1
  34. package/esm2022/lib/components/organisms/comment-section/comment-section.component.mjs +2 -2
  35. package/esm2022/lib/components/organisms/form/form.component.mjs +2 -2
  36. package/esm2022/lib/components/organisms/tabbed-content/tabbed-content.component.mjs +1 -1
  37. package/esm2022/lib/components/organisms/toolbar/toolbar.component.mjs +2 -2
  38. package/esm2022/lib/components/organisms/wizard/wizard-footer/wizard-footer.component.mjs +2 -2
  39. package/fesm2022/valtech-components.mjs +1638 -837
  40. package/fesm2022/valtech-components.mjs.map +1 -1
  41. package/lib/components/atoms/avatar/avatar.component.d.ts +26 -5
  42. package/lib/components/atoms/fab/fab.component.d.ts +24 -5
  43. package/lib/components/atoms/progress-bar/progress-bar.component.d.ts +21 -6
  44. package/lib/components/molecules/accordion/accordion.component.d.ts +10 -4
  45. package/lib/components/molecules/alert-box/alert-box.component.d.ts +24 -5
  46. package/lib/components/molecules/breadcrumb/breadcrumb.component.d.ts +10 -4
  47. package/lib/components/molecules/card/card.component.d.ts +24 -5
  48. package/lib/components/molecules/check-input/check-input.component.d.ts +25 -4
  49. package/lib/components/molecules/chip-group/chip-group.component.d.ts +10 -4
  50. package/lib/components/molecules/date-input/date-input.component.d.ts +25 -7
  51. package/lib/components/molecules/email-input/email-input.component.d.ts +25 -6
  52. package/lib/components/molecules/glow-card/glow-card.component.d.ts +16 -5
  53. package/lib/components/molecules/password-input/password-input.component.d.ts +25 -6
  54. package/lib/components/molecules/phone-input/phone-input.component.d.ts +28 -5
  55. package/lib/components/molecules/pill/pill.component.d.ts +27 -3
  56. package/lib/components/molecules/rating/rating.component.d.ts +10 -4
  57. package/lib/components/molecules/searchbar/searchbar.component.d.ts +15 -11
  58. package/lib/components/molecules/searchbar/types.d.ts +33 -0
  59. package/lib/components/molecules/segment-control/segment-control.component.d.ts +17 -6
  60. package/lib/components/molecules/select-input/select-input.component.d.ts +26 -6
  61. package/lib/components/molecules/stats-card/stats-card.component.d.ts +10 -4
  62. package/lib/components/molecules/stepper/stepper.component.d.ts +20 -4
  63. package/lib/components/molecules/tabs/tabs.component.d.ts +27 -4
  64. package/lib/components/molecules/text-input/text-input.component.d.ts +26 -26
  65. package/lib/components/molecules/textarea-input/textarea-input.component.d.ts +27 -4
  66. package/lib/components/molecules/toggle-input/toggle-input.component.d.ts +25 -4
  67. package/package.json +1 -1
  68. package/src/lib/components/styles/_docs-page.scss +310 -0
@@ -1,10 +1,16 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { OnChanges, OnInit, EventEmitter, SimpleChanges } from '@angular/core';
2
2
  import { RatingMetadata, RatingChangeEvent } from './types';
3
3
  import * as i0 from "@angular/core";
4
- export declare class RatingComponent {
5
- props: RatingMetadata;
4
+ export declare class RatingComponent implements OnInit, OnChanges {
5
+ private presets;
6
+ preset?: string;
7
+ props: Partial<RatingMetadata>;
8
+ resolvedProps: RatingMetadata;
6
9
  ratingChange: EventEmitter<RatingChangeEvent>;
7
10
  hoverValue: number | null;
11
+ ngOnInit(): void;
12
+ ngOnChanges(changes: SimpleChanges): void;
13
+ private resolveProps;
8
14
  get displayValue(): number;
9
15
  getStars(): number[];
10
16
  getStarIcon(position: number): string;
@@ -13,5 +19,5 @@ export declare class RatingComponent {
13
19
  onStarHover(position: number): void;
14
20
  onStarLeave(): void;
15
21
  static ɵfac: i0.ɵɵFactoryDeclaration<RatingComponent, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<RatingComponent, "val-rating", never, { "props": { "alias": "props"; "required": false; }; }, { "ratingChange": "ratingChange"; }, never, never, true, never>;
22
+ static ɵcmp: i0.ɵɵComponentDeclaration<RatingComponent, "val-rating", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "ratingChange": "ratingChange"; }, never, never, true, never>;
17
23
  }
@@ -1,18 +1,21 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { EventEmitter, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
+ import { SearchbarMetadata } from './types';
2
3
  import * as i0 from "@angular/core";
3
- export declare class SearchbarComponent {
4
+ export declare class SearchbarComponent implements OnInit, OnChanges {
5
+ private presets;
6
+ private i18n;
4
7
  /**
5
- * Whether the searchbar is disabled.
8
+ * Preset name to apply.
6
9
  */
7
- disabled: boolean;
10
+ preset?: string;
8
11
  /**
9
- * Custom placeholder text (optional - uses i18n default if not provided)
12
+ * Configuration object. Values here override preset values.
10
13
  */
11
- placeholder?: string;
14
+ props: Partial<SearchbarMetadata>;
12
15
  /**
13
- * Custom cancel button text (optional - uses i18n default if not provided)
16
+ * Resolved props after merging preset + explicit props.
14
17
  */
15
- cancelText?: string;
18
+ resolvedProps: SearchbarMetadata;
16
19
  /**
17
20
  * Emits the search term on input.
18
21
  */
@@ -25,15 +28,16 @@ export declare class SearchbarComponent {
25
28
  * Emits when the searchbar loses focus.
26
29
  */
27
30
  blurEvent: EventEmitter<void>;
28
- private i18n;
31
+ ngOnInit(): void;
32
+ ngOnChanges(changes: SimpleChanges): void;
33
+ private resolveProps;
29
34
  /** Get placeholder text */
30
35
  getPlaceholder(): string;
31
36
  /** Get cancel button text */
32
37
  getCancelText(): string;
33
- constructor();
34
38
  onSearch($event: any): void;
35
39
  onFocus(): void;
36
40
  onBlur(): void;
37
41
  static ɵfac: i0.ɵɵFactoryDeclaration<SearchbarComponent, never>;
38
- static ɵcmp: i0.ɵɵComponentDeclaration<SearchbarComponent, "val-searchbar", never, { "disabled": { "alias": "disabled"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "cancelText": { "alias": "cancelText"; "required": false; }; }, { "filterEvent": "filterEvent"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; }, never, never, true, never>;
42
+ static ɵcmp: i0.ɵɵComponentDeclaration<SearchbarComponent, "val-searchbar", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "filterEvent": "filterEvent"; "focusEvent": "focusEvent"; "blurEvent": "blurEvent"; }, never, never, true, never>;
39
43
  }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Configuration for val-searchbar component.
3
+ */
4
+ export interface SearchbarMetadata {
5
+ /**
6
+ * Whether the searchbar is disabled.
7
+ */
8
+ disabled?: boolean;
9
+ /**
10
+ * Custom placeholder text.
11
+ * If not provided, uses i18n default ('search').
12
+ */
13
+ placeholder?: string;
14
+ /**
15
+ * Custom cancel button text.
16
+ * If not provided, uses i18n default ('cancel').
17
+ */
18
+ cancelText?: string;
19
+ /**
20
+ * Debounce time in milliseconds for search input.
21
+ * Default: 500
22
+ */
23
+ debounce?: number;
24
+ /**
25
+ * When to show the cancel button.
26
+ * Default: 'focus'
27
+ */
28
+ showCancelButton?: 'always' | 'focus' | 'never';
29
+ /**
30
+ * Mode for styling (iOS or MD).
31
+ */
32
+ mode?: 'ios' | 'md';
33
+ }
@@ -1,12 +1,20 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { OnChanges, OnInit, EventEmitter, SimpleChanges } from '@angular/core';
2
2
  import { SegmentControlMetadata, SegmentOption } from './types';
3
3
  import * as i0 from "@angular/core";
4
- export declare class SegmentControlComponent {
4
+ export declare class SegmentControlComponent implements OnInit, OnChanges {
5
+ private presets;
5
6
  /**
6
- * Input configuration object.
7
- * @type {SegmentControlMetadata}
7
+ * Preset name to apply. Presets define reusable segment configurations.
8
8
  */
9
- props: SegmentControlMetadata;
9
+ preset?: string;
10
+ /**
11
+ * Input configuration object. Values here override preset values.
12
+ */
13
+ props: Partial<SegmentControlMetadata>;
14
+ /**
15
+ * Resolved props after merging preset + explicit props.
16
+ */
17
+ resolvedProps: SegmentControlMetadata;
10
18
  /**
11
19
  * Emits the selected value when the segment changes.
12
20
  */
@@ -17,8 +25,11 @@ export declare class SegmentControlComponent {
17
25
  WORKING: "WORKING";
18
26
  ERROR: "ERROR";
19
27
  };
28
+ ngOnInit(): void;
29
+ ngOnChanges(changes: SimpleChanges): void;
30
+ private resolveProps;
20
31
  onSegmentChange(event: CustomEvent): void;
21
32
  getOptionLabel(option: SegmentOption): string;
22
33
  static ɵfac: i0.ɵɵFactoryDeclaration<SegmentControlComponent, never>;
23
- static ɵcmp: i0.ɵɵComponentDeclaration<SegmentControlComponent, "val-segment-control", never, { "props": { "alias": "props"; "required": false; }; }, { "segmentChange": "segmentChange"; }, never, never, true, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<SegmentControlComponent, "val-segment-control", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "segmentChange": "segmentChange"; }, never, never, true, never>;
24
35
  }
@@ -1,9 +1,19 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { InputMetadata } from '../../types';
3
3
  import * as i0 from "@angular/core";
4
- export declare class SearchSelectorComponent implements OnInit {
4
+ export declare class SearchSelectorComponent implements OnInit, OnChanges {
5
+ private i18n;
6
+ private presets;
7
+ /**
8
+ * Preset name to apply. Presets define reusable input configurations
9
+ * that can be registered at app level via provideValtechPresets().
10
+ *
11
+ * @example
12
+ * <val-select-input preset="form-field" [props]="{ control: ctrl, options: opts }"></val-select-input>
13
+ */
14
+ preset?: string;
5
15
  /**
6
- * Input configuration object.
16
+ * Input configuration object. Values here override preset values.
7
17
  * @type {InputMetadata}
8
18
  * @property control - The Angular FormControl for the select input.
9
19
  * @property label - The label for the select.
@@ -13,8 +23,11 @@ export declare class SearchSelectorComponent implements OnInit {
13
23
  * @property cancelText - Custom cancel button text (default: 'Cancelar').
14
24
  * @property okText - Custom OK button text (default: 'Aceptar').
15
25
  */
16
- props: InputMetadata;
17
- private i18n;
26
+ props: Partial<InputMetadata>;
27
+ /**
28
+ * Resolved props after merging preset + explicit props.
29
+ */
30
+ resolvedProps: InputMetadata;
18
31
  customModalOptions: {
19
32
  header: string;
20
33
  breakpoints: number[];
@@ -23,6 +36,13 @@ export declare class SearchSelectorComponent implements OnInit {
23
36
  cancelText: string;
24
37
  okText: string;
25
38
  ngOnInit(): void;
39
+ ngOnChanges(changes: SimpleChanges): void;
40
+ /**
41
+ * Merge preset configuration with explicit props.
42
+ * Explicit props take precedence over preset values.
43
+ */
44
+ private resolveProps;
45
+ private setupComponent;
26
46
  static ɵfac: i0.ɵɵFactoryDeclaration<SearchSelectorComponent, never>;
27
- static ɵcmp: i0.ɵɵComponentDeclaration<SearchSelectorComponent, "val-select-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
47
+ static ɵcmp: i0.ɵɵComponentDeclaration<SearchSelectorComponent, "val-select-input", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
28
48
  }
@@ -1,14 +1,20 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { OnChanges, OnInit, EventEmitter, SimpleChanges } from '@angular/core';
2
2
  import { StatsCardMetadata } from './types';
3
3
  import * as i0 from "@angular/core";
4
- export declare class StatsCardComponent {
5
- props: StatsCardMetadata;
4
+ export declare class StatsCardComponent implements OnInit, OnChanges {
5
+ private presets;
6
+ preset?: string;
7
+ props: Partial<StatsCardMetadata>;
8
+ resolvedProps: StatsCardMetadata;
6
9
  cardClick: EventEmitter<void>;
7
10
  Math: Math;
11
+ ngOnInit(): void;
12
+ ngOnChanges(changes: SimpleChanges): void;
13
+ private resolveProps;
8
14
  getCardColor(): string;
9
15
  getBackgroundClass(): string;
10
16
  getTrendClass(): string;
11
17
  getTrendIcon(): string;
12
18
  static ɵfac: i0.ɵɵFactoryDeclaration<StatsCardComponent, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<StatsCardComponent, "val-stats-card", never, { "props": { "alias": "props"; "required": false; }; }, { "cardClick": "cardClick"; }, never, never, true, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<StatsCardComponent, "val-stats-card", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "cardClick": "cardClick"; }, never, never, true, never>;
14
20
  }
@@ -1,9 +1,25 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { OnChanges, OnInit, EventEmitter, SimpleChanges } from '@angular/core';
2
2
  import { StepperMetadata, StepMetadata, StepChangeEvent, StepStatus } from './types';
3
3
  import * as i0 from "@angular/core";
4
- export declare class StepperComponent {
5
- props: StepperMetadata;
4
+ export declare class StepperComponent implements OnInit, OnChanges {
5
+ private presets;
6
+ /**
7
+ * Preset name to apply. Presets define reusable stepper configurations
8
+ * that can be registered at app level via provideValtechPresets().
9
+ */
10
+ preset?: string;
11
+ /**
12
+ * Stepper configuration object. Values here override preset values.
13
+ */
14
+ props: Partial<StepperMetadata>;
15
+ /**
16
+ * Resolved props after merging preset + explicit props.
17
+ */
18
+ resolvedProps: StepperMetadata;
6
19
  stepChange: EventEmitter<StepChangeEvent>;
20
+ ngOnInit(): void;
21
+ ngOnChanges(changes: SimpleChanges): void;
22
+ private resolveProps;
7
23
  getCurrentIndex(): number;
8
24
  getStepStatus(step: StepMetadata, index: number): StepStatus;
9
25
  getStepColor(step: StepMetadata, index: number): string;
@@ -11,5 +27,5 @@ export declare class StepperComponent {
11
27
  onStepClick(step: StepMetadata, index: number): void;
12
28
  getStepLabel(step: StepMetadata): string;
13
29
  static ɵfac: i0.ɵɵFactoryDeclaration<StepperComponent, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<StepperComponent, "val-stepper", never, { "props": { "alias": "props"; "required": false; }; }, { "stepChange": "stepChange"; }, never, never, true, never>;
30
+ static ɵcmp: i0.ɵɵComponentDeclaration<StepperComponent, "val-stepper", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "stepChange": "stepChange"; }, never, never, true, never>;
15
31
  }
@@ -1,11 +1,34 @@
1
- import { EventEmitter } from '@angular/core';
1
+ import { OnChanges, OnInit, EventEmitter, SimpleChanges } from '@angular/core';
2
2
  import { TabsMetadata, TabMetadata } from './types';
3
3
  import * as i0 from "@angular/core";
4
- export declare class TabsComponent {
5
- props: TabsMetadata;
4
+ export declare class TabsComponent implements OnInit, OnChanges {
5
+ private presets;
6
+ /**
7
+ * Preset name to apply. Presets define reusable tabs configurations
8
+ * that can be registered at app level via provideValtechPresets().
9
+ *
10
+ * @example
11
+ * <val-tabs preset="main-nav" [props]="{ tabs: [...] }"></val-tabs>
12
+ */
13
+ preset?: string;
14
+ /**
15
+ * Tabs configuration object. Values here override preset values.
16
+ */
17
+ props: Partial<TabsMetadata>;
18
+ /**
19
+ * Resolved props after merging preset + explicit props.
20
+ */
21
+ resolvedProps: TabsMetadata;
6
22
  tabChange: EventEmitter<TabMetadata>;
23
+ ngOnInit(): void;
24
+ ngOnChanges(changes: SimpleChanges): void;
25
+ /**
26
+ * Merge preset configuration with explicit props.
27
+ * Explicit props take precedence over preset values.
28
+ */
29
+ private resolveProps;
7
30
  onTabClick(tab: TabMetadata): void;
8
31
  getTabLabel(tab: TabMetadata): string;
9
32
  static ɵfac: i0.ɵɵFactoryDeclaration<TabsComponent, never>;
10
- static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "val-tabs", never, { "props": { "alias": "props"; "required": false; }; }, { "tabChange": "tabChange"; }, never, never, true, never>;
33
+ static ɵcmp: i0.ɵɵComponentDeclaration<TabsComponent, "val-tabs", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "tabChange": "tabChange"; }, never, never, true, never>;
11
34
  }
@@ -1,42 +1,42 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { InputMetadata } from '../../types';
3
3
  import * as i0 from "@angular/core";
4
- export declare class TextInputComponent implements OnInit {
4
+ export declare class TextInputComponent implements OnInit, OnChanges {
5
+ private presets;
5
6
  /**
6
- * Input configuration object.
7
+ * Preset name to apply. Presets define reusable input configurations
8
+ * (size, fill, labelPosition, etc.) that can be registered at app level.
9
+ *
10
+ * @example
11
+ * <val-text-input preset="form-field" [props]="{ control: ctrl }"></val-text-input>
12
+ */
13
+ preset?: string;
14
+ /**
15
+ * Input configuration object. Values here override preset values.
7
16
  * @type {InputMetadata}
8
17
  * @property control - The Angular FormControl for the input.
9
- * @property placeholder - The placeholder text. For i18n, use langService.getText() to get translated value.
18
+ * @property placeholder - The placeholder text.
10
19
  * @property label, name, hint, type, validators, etc. - See InputMetadata for all options.
11
20
  */
12
- props: InputMetadata;
21
+ props: Partial<InputMetadata>;
22
+ /**
23
+ * Resolved props after merging preset + explicit props.
24
+ * Preset values are overridden by explicit props.
25
+ */
26
+ resolvedProps: InputMetadata;
13
27
  states: {
14
28
  ENABLED: "ENABLED";
15
29
  DISABLED: "DISABLED";
16
30
  WORKING: "WORKING";
17
- /**
18
- * val-text-input
19
- *
20
- * A text input field integrated with Angular forms.
21
- * For i18n support, pass the translated placeholder text via props.
22
- *
23
- * @example Static placeholder:
24
- * <val-text-input [props]="{ control: myControl, placeholder: 'Enter text' }"></val-text-input>
25
- *
26
- * @example With i18n:
27
- * ```typescript
28
- * // In component
29
- * textProps = {
30
- * control: this.textControl,
31
- * placeholder: this.langService.getText('MyComponent', 'namePlaceholder')
32
- * };
33
- * ```
34
- *
35
- * @input props: InputMetadata - Configuration for the input (form control, placeholder, label, etc.)
36
- */
37
31
  ERROR: "ERROR";
38
32
  };
39
33
  ngOnInit(): void;
34
+ ngOnChanges(changes: SimpleChanges): void;
35
+ /**
36
+ * Merge preset configuration with explicit props.
37
+ * Explicit props take precedence over preset values.
38
+ */
39
+ private resolveProps;
40
40
  static ɵfac: i0.ɵɵFactoryDeclaration<TextInputComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "val-text-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
41
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextInputComponent, "val-text-input", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
42
42
  }
@@ -1,8 +1,24 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
2
  import { TextareaInputMetadata } from './types';
3
3
  import * as i0 from "@angular/core";
4
- export declare class TextareaInputComponent implements OnInit {
5
- props: TextareaInputMetadata;
4
+ export declare class TextareaInputComponent implements OnInit, OnChanges {
5
+ private presets;
6
+ /**
7
+ * Preset name to apply. Presets define reusable textarea configurations
8
+ * that can be registered at app level via provideValtechPresets().
9
+ *
10
+ * @example
11
+ * <val-textarea-input preset="form-field" [props]="{ control: ctrl }"></val-textarea-input>
12
+ */
13
+ preset?: string;
14
+ /**
15
+ * Textarea configuration object. Values here override preset values.
16
+ */
17
+ props: Partial<TextareaInputMetadata>;
18
+ /**
19
+ * Resolved props after merging preset + explicit props.
20
+ */
21
+ resolvedProps: TextareaInputMetadata;
6
22
  states: {
7
23
  ENABLED: "ENABLED";
8
24
  DISABLED: "DISABLED";
@@ -10,6 +26,13 @@ export declare class TextareaInputComponent implements OnInit {
10
26
  ERROR: "ERROR";
11
27
  };
12
28
  ngOnInit(): void;
29
+ ngOnChanges(changes: SimpleChanges): void;
30
+ /**
31
+ * Merge preset configuration with explicit props.
32
+ * Explicit props take precedence over preset values.
33
+ */
34
+ private resolveProps;
35
+ private applyDefaultValue;
13
36
  getLabel(): string;
14
37
  getPlaceholder(): string;
15
38
  getHint(): string;
@@ -19,5 +42,5 @@ export declare class TextareaInputComponent implements OnInit {
19
42
  getRemainingLabel(): string;
20
43
  counterFormatter: (inputLength: number, maxLength: number) => string;
21
44
  static ɵfac: i0.ɵɵFactoryDeclaration<TextareaInputComponent, never>;
22
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaInputComponent, "val-textarea-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<TextareaInputComponent, "val-textarea-input", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
23
46
  }
@@ -1,18 +1,39 @@
1
+ import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
1
2
  import { ToggleInputMetadata } from './types';
2
3
  import * as i0 from "@angular/core";
3
- export declare class ToggleInputComponent {
4
+ export declare class ToggleInputComponent implements OnInit, OnChanges {
5
+ private presets;
4
6
  /**
5
- * Input configuration object.
7
+ * Preset name to apply. Presets define reusable toggle input configurations
8
+ * that can be registered at app level via provideValtechPresets().
9
+ *
10
+ * @example
11
+ * <val-toggle-input preset="form-field" [props]="{ control: ctrl }"></val-toggle-input>
12
+ */
13
+ preset?: string;
14
+ /**
15
+ * Input configuration object. Values here override preset values.
6
16
  * @type {ToggleInputMetadata}
7
17
  */
8
- props: ToggleInputMetadata;
18
+ props: Partial<ToggleInputMetadata>;
19
+ /**
20
+ * Resolved props after merging preset + explicit props.
21
+ */
22
+ resolvedProps: ToggleInputMetadata;
9
23
  states: {
10
24
  ENABLED: "ENABLED";
11
25
  DISABLED: "DISABLED";
12
26
  WORKING: "WORKING";
13
27
  ERROR: "ERROR";
14
28
  };
29
+ ngOnInit(): void;
30
+ ngOnChanges(changes: SimpleChanges): void;
31
+ /**
32
+ * Merge preset configuration with explicit props.
33
+ * Explicit props take precedence over preset values.
34
+ */
35
+ private resolveProps;
15
36
  getDisplayLabel(): string;
16
37
  static ɵfac: i0.ɵɵFactoryDeclaration<ToggleInputComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<ToggleInputComponent, "val-toggle-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
38
+ static ɵcmp: i0.ɵɵComponentDeclaration<ToggleInputComponent, "val-toggle-input", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
18
39
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.565",
3
+ "version": "2.0.567",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"