valtech-components 2.0.1035 → 4.0.1

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 (81) hide show
  1. package/esm2022/lib/components/atoms/box/box.component.mjs +6 -8
  2. package/esm2022/lib/components/atoms/button/factory.mjs +24 -217
  3. package/esm2022/lib/components/atoms/divider/divider.component.mjs +2 -4
  4. package/esm2022/lib/components/atoms/href/href.component.mjs +1 -2
  5. package/esm2022/lib/components/atoms/image/image.component.mjs +36 -3
  6. package/esm2022/lib/components/molecules/action-card/action-card.component.mjs +4 -9
  7. package/esm2022/lib/components/molecules/breadcrumb/breadcrumb.component.mjs +4 -4
  8. package/esm2022/lib/components/molecules/card/card.component.mjs +53 -10
  9. package/esm2022/lib/components/molecules/checkbox-radio-input/checkbox-radio-input.component.mjs +27 -36
  10. package/esm2022/lib/components/molecules/chip-group/chip-group.component.mjs +44 -6
  11. package/esm2022/lib/components/molecules/command-display/command-display.component.mjs +32 -7
  12. package/esm2022/lib/components/molecules/comment/comment.component.mjs +28 -12
  13. package/esm2022/lib/components/molecules/cta-card/cta-card.component.mjs +4 -9
  14. package/esm2022/lib/components/molecules/date-picker/date-picker.component.mjs +3 -3
  15. package/esm2022/lib/components/molecules/expandable-text/expandable-text.component.mjs +7 -7
  16. package/esm2022/lib/components/molecules/features-list/features-list.component.mjs +159 -71
  17. package/esm2022/lib/components/molecules/file-input/file-input.component.mjs +7 -3
  18. package/esm2022/lib/components/molecules/hint/hint.component.mjs +30 -5
  19. package/esm2022/lib/components/molecules/pagination/pagination.component.mjs +75 -19
  20. package/esm2022/lib/components/molecules/password-input/password-input.component.mjs +42 -9
  21. package/esm2022/lib/components/molecules/permission-selector/types.mjs +1 -1
  22. package/esm2022/lib/components/molecules/rating/rating.component.mjs +88 -12
  23. package/esm2022/lib/components/molecules/stepper/stepper.component.mjs +15 -7
  24. package/esm2022/lib/components/molecules/text-input/text-input.component.mjs +93 -7
  25. package/esm2022/lib/components/organisms/change-email-modal/change-email-modal.component.mjs +5 -5
  26. package/esm2022/lib/components/organisms/change-password-modal/change-password-modal.component.mjs +4 -4
  27. package/esm2022/lib/components/organisms/form/form.component.mjs +62 -20
  28. package/esm2022/lib/components/organisms/login/login.component.mjs +8 -8
  29. package/esm2022/lib/components/organisms/mfa-modal/mfa-modal.component.mjs +3 -3
  30. package/esm2022/lib/components/types.mjs +1 -1
  31. package/esm2022/lib/services/presets/default-presets.mjs +45 -0
  32. package/esm2022/lib/services/presets/index.mjs +3 -1
  33. package/esm2022/lib/services/presets/preset.service.mjs +17 -4
  34. package/esm2022/lib/services/requests/request-form-builder.service.mjs +8 -3
  35. package/esm2022/lib/shared/utils/ionic-color.mjs +36 -0
  36. package/esm2022/lib/version.mjs +2 -2
  37. package/esm2022/public-api.mjs +2 -8
  38. package/fesm2022/valtech-components.mjs +1140 -1024
  39. package/fesm2022/valtech-components.mjs.map +1 -1
  40. package/lib/components/atoms/box/box.component.d.ts +2 -5
  41. package/lib/components/atoms/button/factory.d.ts +15 -69
  42. package/lib/components/atoms/divider/divider.component.d.ts +1 -4
  43. package/lib/components/atoms/href/href.component.d.ts +2 -3
  44. package/lib/components/atoms/image/image.component.d.ts +5 -0
  45. package/lib/components/molecules/action-card/action-card.component.d.ts +1 -1
  46. package/lib/components/molecules/card/card.component.d.ts +2 -1
  47. package/lib/components/molecules/checkbox-radio-input/checkbox-radio-input.component.d.ts +2 -3
  48. package/lib/components/molecules/chip-group/chip-group.component.d.ts +5 -0
  49. package/lib/components/molecules/command-display/command-display.component.d.ts +4 -0
  50. package/lib/components/molecules/comment/comment.component.d.ts +3 -0
  51. package/lib/components/molecules/cta-card/cta-card.component.d.ts +0 -1
  52. package/lib/components/molecules/hint/hint.component.d.ts +11 -1
  53. package/lib/components/molecules/pagination/pagination.component.d.ts +5 -0
  54. package/lib/components/molecules/password-input/password-input.component.d.ts +4 -2
  55. package/lib/components/molecules/permission-selector/types.d.ts +1 -0
  56. package/lib/components/molecules/rating/rating.component.d.ts +11 -0
  57. package/lib/components/molecules/text-input/text-input.component.d.ts +21 -0
  58. package/lib/components/organisms/form/form.component.d.ts +19 -0
  59. package/lib/components/types.d.ts +21 -1
  60. package/lib/services/presets/default-presets.d.ts +22 -0
  61. package/lib/services/presets/index.d.ts +1 -0
  62. package/lib/services/presets/preset.service.d.ts +4 -0
  63. package/lib/shared/utils/ionic-color.d.ts +20 -0
  64. package/lib/version.d.ts +1 -1
  65. package/package.json +1 -1
  66. package/public-api.d.ts +1 -7
  67. package/src/lib/components/styles/mixins.scss +16 -0
  68. package/esm2022/lib/components/molecules/content-card/content-card.component.mjs +0 -86
  69. package/esm2022/lib/components/molecules/content-card/types.mjs +0 -11
  70. package/esm2022/lib/components/molecules/email-input/email-input.component.mjs +0 -68
  71. package/esm2022/lib/components/molecules/hour-input/hour-input.component.mjs +0 -28
  72. package/esm2022/lib/components/molecules/info-card/info-card.component.mjs +0 -126
  73. package/esm2022/lib/components/molecules/info-card/types.mjs +0 -11
  74. package/esm2022/lib/components/molecules/number-input/number-input.component.mjs +0 -34
  75. package/lib/components/molecules/content-card/content-card.component.d.ts +0 -26
  76. package/lib/components/molecules/content-card/types.d.ts +0 -30
  77. package/lib/components/molecules/email-input/email-input.component.d.ts +0 -34
  78. package/lib/components/molecules/hour-input/hour-input.component.d.ts +0 -15
  79. package/lib/components/molecules/info-card/info-card.component.d.ts +0 -37
  80. package/lib/components/molecules/info-card/types.d.ts +0 -44
  81. package/lib/components/molecules/number-input/number-input.component.d.ts +0 -16
@@ -1,8 +1,7 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
2
- import { IconService } from '../../../services/icons.service';
1
+ import { EventEmitter } from '@angular/core';
3
2
  import { BoxMetadata } from './types';
4
3
  import * as i0 from "@angular/core";
5
- export declare class BoxComponent implements OnInit {
4
+ export declare class BoxComponent {
6
5
  /**
7
6
  * Box configuration object.
8
7
  * @type {BoxMetadata}
@@ -18,8 +17,6 @@ export declare class BoxComponent implements OnInit {
18
17
  * Event emitted when the box or its icon is clicked.
19
18
  */
20
19
  onClick: EventEmitter<any>;
21
- constructor(icon: IconService);
22
- ngOnInit(): void;
23
20
  clickHandler(): void;
24
21
  static ɵfac: i0.ɵɵFactoryDeclaration<BoxComponent, never>;
25
22
  static ɵcmp: i0.ɵɵComponentDeclaration<BoxComponent, "val-box", never, { "props": { "alias": "props"; "required": false; }; }, { "onClick": "onClick"; }, never, ["[body]"], true, never>;
@@ -1,71 +1,17 @@
1
1
  import { ButtonMetadata, IconMetada } from '../../types';
2
2
  export declare const Icon: (name: string, slot: 'start' | 'end') => IconMetada;
3
- export declare const BaseDefault: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
4
- export declare const ClearDefault: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
5
- export declare const ClearDefaultRound: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
6
- export declare const SolidDefault: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
7
- export declare const SolidDefaultRound: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
8
- export declare const OutlineDefault: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
9
- export declare const OutlineDefaultRound: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
10
- export declare const ClearDefaultFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
11
- export declare const ClearDefaultRoundFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
12
- export declare const ClearDefaultBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
13
- export declare const ClearDefaultRoundBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
14
- export declare const SolidDefaultFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
15
- export declare const SolidDefaultRoundFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
16
- export declare const SolidDefaultBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
17
- export declare const SolidDefaultRoundBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
18
- export declare const OutlineDefaultFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
19
- export declare const OutlineDefaultRoundFull: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
20
- export declare const OutlineDefaultBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
21
- export declare const OutlineDefaultRoundBlock: (text: string, type: 'button' | 'submit' | 'reset') => ButtonMetadata;
22
- export declare const SolidDefaultButton: (text: string) => ButtonMetadata;
23
- export declare const SolidSmallButton: (text: string) => ButtonMetadata;
24
- export declare const SolidLargeButton: (text: string) => ButtonMetadata;
25
- export declare const SolidDefaultRoundButton: (text: string) => ButtonMetadata;
26
- export declare const SolidSmallRoundButton: (text: string) => ButtonMetadata;
27
- export declare const SolidLargeRoundButton: (text: string) => ButtonMetadata;
28
- export declare const SolidFullButton: (text: string) => ButtonMetadata;
29
- export declare const SolidBlockButton: (text: string) => ButtonMetadata;
30
- /** PRIMARY */
31
- export declare const PrimarySolidDefaultRoundButton: (text: string) => ButtonMetadata;
32
- export declare const PrimarySolidDefaultRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
33
- export declare const PrimarySolidDefaultRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
34
- export declare const PrimarySolidDefaultRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
35
- export declare const PrimarySolidSmallRoundButton: (text: string) => ButtonMetadata;
36
- export declare const PrimarySolidSmallRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
37
- export declare const PrimarySolidSmallRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
38
- export declare const PrimarySolidSmallRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
39
- export declare const PrimarySolidLargeRoundButton: (text: string) => ButtonMetadata;
40
- export declare const PrimarySolidLargeRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
41
- export declare const PrimarySolidLargeRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
42
- export declare const PrimarySolidLargeRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
43
- export declare const PrimarySolidBlockButton: (text: string) => ButtonMetadata;
44
- export declare const PrimarySolidBlockIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
45
- export declare const PrimarySolidBlockHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
46
- export declare const PrimarySolidBlockIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
47
- export declare const PrimarySolidFullButton: (text: string) => ButtonMetadata;
48
- export declare const PrimarySolidFullIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
49
- export declare const PrimarySolidFullHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
50
- export declare const PrimarySolidFullIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
51
- /** SECONDARY */
52
- export declare const SecondarySolidDefaultRoundButton: (text: string) => ButtonMetadata;
53
- export declare const SecondarySolidDefaultRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
54
- export declare const SecondarySolidDefaultRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
55
- export declare const SecondarySolidDefaultRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
56
- export declare const SecondarySolidSmallRoundButton: (text: string) => ButtonMetadata;
57
- export declare const SecondarySolidSmallRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
58
- export declare const SecondarySolidSmallRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
59
- export declare const SecondarySolidSmallRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
60
- export declare const SecondarySolidLargeRoundButton: (text: string) => ButtonMetadata;
61
- export declare const SecondarySolidLargeRoundIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
62
- export declare const SecondarySolidLargeRoundHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
63
- export declare const SecondarySolidLargeRoundIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
64
- export declare const SecondarySolidFullButton: (text: string) => ButtonMetadata;
65
- export declare const SecondarySolidFullIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
66
- export declare const SecondarySolidFullHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
67
- export declare const SecondarySolidFullIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
68
- export declare const SecondarySolidBlockButton: (text: string) => ButtonMetadata;
69
- export declare const SecondarySolidBlockIconButton: (text: string, icon: IconMetada) => ButtonMetadata;
70
- export declare const SecondarySolidBlockHrefButton: (text: string, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
71
- export declare const SecondarySolidBlockIconHrefButton: (text: string, icon: IconMetada, href: string, target: '_blank' | '_self' | '_parent' | '_top') => ButtonMetadata;
3
+ /**
4
+ * Single source of truth for building a `ButtonMetadata`.
5
+ *
6
+ * Applies the shared defaults (`primary` color, `ENABLED` state, `default`
7
+ * size, `button` type) and merges any overrides. This builder (and
8
+ * `iconButton`) is the canonical way to construct a button in code; for
9
+ * templates prefer a registered `<val-button preset="...">` (channel `button`
10
+ * of the PresetService).
11
+ *
12
+ * @example
13
+ * button({ text: 'Save', fill: 'solid', shape: 'round', expand: 'full' })
14
+ */
15
+ export declare const button: (overrides?: Partial<ButtonMetadata>) => ButtonMetadata;
16
+ /** Convenience builder for a button with a leading/trailing icon. */
17
+ export declare const iconButton: (text: string, icon: IconMetada, overrides?: Partial<ButtonMetadata>) => ButtonMetadata;
@@ -1,4 +1,3 @@
1
- import { OnInit } from '@angular/core';
2
1
  import { DividerMetadata } from './types';
3
2
  import * as i0 from "@angular/core";
4
3
  /**
@@ -11,7 +10,7 @@ import * as i0 from "@angular/core";
11
10
  *
12
11
  * @input props: DividerMetadata - Configuration for the divider (size, color, fill)
13
12
  */
14
- export declare class DividerComponent implements OnInit {
13
+ export declare class DividerComponent {
15
14
  /**
16
15
  * Divider configuration object.
17
16
  * @type {DividerMetadata}
@@ -20,8 +19,6 @@ export declare class DividerComponent implements OnInit {
20
19
  * @property fill - The divider fill style ('solid' | 'gradient').
21
20
  */
22
21
  props: DividerMetadata;
23
- constructor();
24
- ngOnInit(): void;
25
22
  static ɵfac: i0.ɵɵFactoryDeclaration<DividerComponent, never>;
26
23
  static ɵcmp: i0.ɵɵComponentDeclaration<DividerComponent, "val-divider", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
27
24
  }
@@ -1,8 +1,8 @@
1
- import { EventEmitter, OnInit } from '@angular/core';
1
+ import { EventEmitter } from '@angular/core';
2
2
  import { DownloadService } from '../../../services/download.service';
3
3
  import { HrefMetadata } from './types';
4
4
  import * as i0 from "@angular/core";
5
- export declare class HrefComponent implements OnInit {
5
+ export declare class HrefComponent {
6
6
  private downloadService;
7
7
  /**
8
8
  * Link configuration object.
@@ -17,7 +17,6 @@ export declare class HrefComponent implements OnInit {
17
17
  props: HrefMetadata;
18
18
  onClick: EventEmitter<string>;
19
19
  constructor(downloadService: DownloadService);
20
- ngOnInit(): void;
21
20
  getFileName(): string;
22
21
  onClickHandler(event: MouseEvent): void;
23
22
  static ɵfac: i0.ɵɵFactoryDeclaration<HrefComponent, never>;
@@ -23,6 +23,11 @@ export declare class ImageComponent implements OnInit {
23
23
  ngOnInit(): void;
24
24
  changeToVisible(): void;
25
25
  openPreview(): void;
26
+ /**
27
+ * Keyboard activation of the preview trigger. Space must preventDefault to
28
+ * avoid scrolling the page when the focused image is activated.
29
+ */
30
+ onPreviewKeydown(event: Event): void;
26
31
  closePreview(): void;
27
32
  zoomIn(): void;
28
33
  zoomOut(): void;
@@ -75,7 +75,7 @@ export declare class ActionCardComponent {
75
75
  getTitle(): string;
76
76
  /** Get description with i18n support */
77
77
  getDescription(): string;
78
- /** Resolve color to CSS value */
78
+ /** Resolve color to CSS value (named Ionic token → CSS var, else passthrough) */
79
79
  private resolveColor;
80
80
  getBackgroundColor(): string | null;
81
81
  getBorderColor(): string | null;
@@ -35,7 +35,6 @@ export declare class CardComponent implements OnInit, OnChanges {
35
35
  types: typeof CardType;
36
36
  actionTypes: typeof ToolbarActionType;
37
37
  sections: typeof CardSection;
38
- constructor();
39
38
  ngOnInit(): void;
40
39
  ngOnChanges(changes: SimpleChanges): void;
41
40
  /**
@@ -44,6 +43,8 @@ export declare class CardComponent implements OnInit, OnChanges {
44
43
  */
45
44
  private resolveProps;
46
45
  clickHandler(section: CardSection, token?: string): void;
46
+ /** Activación por teclado con Space — previene el scroll de la página. */
47
+ onKeyActivate(event: Event, section: CardSection, token?: string): void;
47
48
  static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
48
49
  static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "val-card", never, { "preset": { "alias": "preset"; "required": false; }; "props": { "alias": "props"; "required": false; }; }, { "onClick": "onClick"; }, never, never, true, never>;
49
50
  }
@@ -1,5 +1,5 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { InputMetadata, InputOption } from '../../types';
2
+ import { InputMetadata } from '../../types';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class CheckboxRadioInputComponent implements OnInit {
5
5
  props: InputMetadata;
@@ -10,8 +10,7 @@ export declare class CheckboxRadioInputComponent implements OnInit {
10
10
  ERROR: "ERROR";
11
11
  };
12
12
  ngOnInit(): void;
13
- isSelected(option: InputOption): boolean;
14
- onOptionSelect(option: InputOption, event: any): void;
13
+ onSelectionChange(event: any): void;
15
14
  static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxRadioInputComponent, never>;
16
15
  static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxRadioInputComponent, "val-checkbox-radio-input", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
17
16
  }
@@ -3,13 +3,18 @@ import { ChipGroupMetadata, ChipMetadata, ChipSelectionEvent, ChipRemoveEvent }
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class ChipGroupComponent implements OnInit, OnChanges {
5
5
  private presets;
6
+ private i18n;
6
7
  preset?: string;
7
8
  props: Partial<ChipGroupMetadata>;
8
9
  resolvedProps: ChipGroupMetadata;
9
10
  selectionChange: EventEmitter<ChipSelectionEvent>;
10
11
  chipRemove: EventEmitter<ChipRemoveEvent>;
11
12
  chipClick: EventEmitter<ChipMetadata>;
13
+ constructor();
12
14
  ngOnInit(): void;
15
+ removeLabel(chip: ChipMetadata): string;
16
+ /** Activación de chip selectable por teclado (Enter/Space). */
17
+ onChipKey(event: Event, chip: ChipMetadata): void;
13
18
  ngOnChanges(changes: SimpleChanges): void;
14
19
  private resolveProps;
15
20
  getChipColor(chip: ChipMetadata): string;
@@ -4,6 +4,10 @@ export declare class CommandDisplayComponent {
4
4
  private toast;
5
5
  private i18n;
6
6
  props: CommandDisplayMetadata;
7
+ /** Mensaje anunciado por el lector de pantalla al copiar. */
8
+ copiedMessage: string;
9
+ constructor();
10
+ copyLabel(): string;
7
11
  copyCommand(): Promise<void>;
8
12
  presentToast(message: string): Promise<void>;
9
13
  static ɵfac: i0.ɵɵFactoryDeclaration<CommandDisplayComponent, never>;
@@ -15,7 +15,10 @@ export declare class CommentComponent implements OnInit {
15
15
  collapsed: boolean;
16
16
  }>;
17
17
  displayContent: string;
18
+ constructor();
18
19
  ngOnInit(): void;
20
+ /** Aria-label accesible del autor (avatar + nombre clicables). */
21
+ authorLabel(): string;
19
22
  getInitials(name: string): string;
20
23
  formatTimestamp(timestamp: string | Date): string;
21
24
  getLoadMoreRepliesText(): string;
@@ -36,7 +36,6 @@ export declare class CtaCardComponent {
36
36
  onAction: EventEmitter<string>;
37
37
  /** Merged configuration with defaults */
38
38
  config: import("@angular/core").Signal<CtaCardMetadata & Required<Pick<CtaCardMetadata, "borderRadius" | "bordered" | "shadowed" | "align" | "padding">>>;
39
- private resolveColor;
40
39
  getBackground(): string;
41
40
  getColor(): string | null;
42
41
  static ɵfac: i0.ɵɵFactoryDeclaration<CtaCardComponent, never>;
@@ -9,11 +9,21 @@ export declare class HintComponent implements OnInit {
9
9
  * @property errors - The error messages mapping.
10
10
  */
11
11
  props: InputMetadata;
12
+ /**
13
+ * Id del contenedor del hint. Lo pasa `val-form` para enlazar el input con el
14
+ * mensaje de error vía `aria-describedby`.
15
+ */
16
+ id?: string;
17
+ /**
18
+ * Si el hint representa un error (vs un hint informativo). Hoy `val-hint`
19
+ * siempre muestra errores de validación, así que por defecto es `true`.
20
+ */
21
+ isError: boolean;
12
22
  private i18n;
13
23
  constructor();
14
24
  ngOnInit(): void;
15
25
  get shouldShowErrors(): boolean;
16
26
  get Errors(): string[];
17
27
  static ɵfac: i0.ɵɵFactoryDeclaration<HintComponent, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<HintComponent, "val-hint", never, { "props": { "alias": "props"; "required": false; }; }, {}, never, never, true, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<HintComponent, "val-hint", never, { "props": { "alias": "props"; "required": false; }; "id": { "alias": "id"; "required": false; }; "isError": { "alias": "isError"; "required": false; }; }, {}, never, never, true, never>;
19
29
  }
@@ -2,10 +2,15 @@ import { OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
2
2
  import { PaginationMetadata, PageChangeEvent } from './types';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class PaginationComponent implements OnChanges {
5
+ private i18n;
5
6
  props: PaginationMetadata;
6
7
  pageChange: EventEmitter<PageChangeEvent>;
7
8
  visiblePages: number[];
8
9
  totalPages: number;
10
+ constructor();
11
+ t(key: string): string;
12
+ pageLabel(page: number): string;
13
+ pageInfo(): string;
9
14
  ngOnChanges(changes: SimpleChanges): void;
10
15
  goToPage(page: number): void;
11
16
  private calculateTotalPages;
@@ -1,9 +1,10 @@
1
1
  import { OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import { IconService } from '../../../services/icons.service';
3
2
  import { InputMetadata } from '../../types';
4
3
  import * as i0 from "@angular/core";
5
4
  export declare class PasswordInputComponent implements OnInit, OnChanges {
6
5
  private presets;
6
+ private i18n;
7
+ constructor();
7
8
  /**
8
9
  * Preset name to apply. Presets define reusable input configurations
9
10
  * that can be registered at app level via provideValtechPresets().
@@ -24,7 +25,8 @@ export declare class PasswordInputComponent implements OnInit, OnChanges {
24
25
  */
25
26
  resolvedProps: InputMetadata;
26
27
  hidePassword: boolean;
27
- constructor(icon: IconService);
28
+ /** Aria-label del botón mostrar/ocultar según el estado de visibilidad. */
29
+ toggleLabel(): string;
28
30
  ngOnInit(): void;
29
31
  ngOnChanges(changes: SimpleChanges): void;
30
32
  /**
@@ -1,4 +1,5 @@
1
1
  import { LocalizedLabel } from '../../../services/org/permission-catalog.service';
2
+ export type { LocalizedLabel };
2
3
  /**
3
4
  * Un recurso del catálogo de permisos tal como lo consume `val-permission-selector`.
4
5
  * Mismo shape que `PermissionResource` del catálogo del backend (resource + actions
@@ -3,16 +3,27 @@ import { RatingMetadata, RatingChangeEvent } from './types';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class RatingComponent implements OnInit, OnChanges {
5
5
  private presets;
6
+ private i18n;
6
7
  preset?: string;
7
8
  props: Partial<RatingMetadata>;
8
9
  resolvedProps: RatingMetadata;
9
10
  ratingChange: EventEmitter<RatingChangeEvent>;
10
11
  hoverValue: number | null;
12
+ constructor();
11
13
  ngOnInit(): void;
12
14
  ngOnChanges(changes: SimpleChanges): void;
13
15
  private resolveProps;
14
16
  get displayValue(): number;
15
17
  getStars(): number[];
18
+ groupLabel(): string;
19
+ starLabel(position: number): string;
20
+ /**
21
+ * Roving tabindex: solo una estrella es tabbable. La estrella del valor
22
+ * actual (o la primera si no hay valor) recibe `0`, el resto `-1`.
23
+ */
24
+ getStarTabindex(position: number): number;
25
+ /** Navegación con flechas: mueve el foco y selecciona la estrella vecina. */
26
+ onArrow(event: Event, delta: number): void;
16
27
  getStarIcon(position: number): string;
17
28
  getStarColor(position: number): string;
18
29
  onStarClick(position: number): void;
@@ -16,6 +16,7 @@ export declare class TextInputComponent implements OnInit, OnChanges {
16
16
  * @type {InputMetadata}
17
17
  * @property control - The Angular FormControl for the input.
18
18
  * @property placeholder - The placeholder text.
19
+ * @property inputType - Native HTML input type ('text' | 'email' | 'number' | 'tel' | 'password' | 'time' | ...).
19
20
  * @property label, name, hint, type, validators, etc. - See InputMetadata for all options.
20
21
  */
21
22
  props: Partial<InputMetadata>;
@@ -30,8 +31,28 @@ export declare class TextInputComponent implements OnInit, OnChanges {
30
31
  WORKING: "WORKING";
31
32
  ERROR: "ERROR";
32
33
  };
34
+ /** Ids únicos por instancia para el wiring de accesibilidad label↔input↔error. */
35
+ private readonly uid;
36
+ readonly inputId: string;
37
+ /**
38
+ * Id del label visible. Si `val-form` orquesta el campo, pasa el id del
39
+ * `<val-title>` externo vía `props.labelId`; si no, se usa el id interno.
40
+ */
41
+ get labelId(): string;
42
+ /**
43
+ * Id del contenedor de error. Si `val-form` orquesta el campo, pasa el id del
44
+ * `<val-hint>` externo vía `props.errorId`; si no, se usa el id interno.
45
+ */
46
+ get errorId(): string;
33
47
  ngOnInit(): void;
34
48
  ngOnChanges(changes: SimpleChanges): void;
49
+ /**
50
+ * Native HTML input type, defaulting to 'text'. Drives both the `[type]` of the
51
+ * `<ion-input>` and the branch between `<ion-input>` and `<ion-datetime>`.
52
+ */
53
+ get resolvedType(): NonNullable<InputMetadata['inputType']>;
54
+ /** Para `aria-invalid` / `aria-describedby`: error visible solo si tocado. */
55
+ get isInvalid(): boolean;
35
56
  /**
36
57
  * Merge preset configuration with explicit props.
37
58
  * Explicit props take precedence over preset values.
@@ -41,6 +41,9 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
41
41
  private usernamePropMemo;
42
42
  private textareaPropMemo;
43
43
  private selectPropMemo;
44
+ private textInputPropMemo;
45
+ private fieldIdMemo;
46
+ private fieldUid;
44
47
  private previousState;
45
48
  private previousUploadingCount;
46
49
  private uploadingFields;
@@ -61,7 +64,23 @@ export declare class FormComponent implements OnInit, OnChanges, DoCheck {
61
64
  submitHandler(token?: string): Promise<void>;
62
65
  onAttachmentChange(fieldName: string, items: AttachmentItem[]): void;
63
66
  getControl(field: string): FormControl;
67
+ /**
68
+ * Ids estables (label + error) para un field. Memoizados por referencia para
69
+ * que el wiring `aria-labelledby` / `aria-describedby` no cambie entre ciclos
70
+ * de change detection.
71
+ */
72
+ private fieldIds;
73
+ /** Id del label visible del campo (consumido por el template + el input). */
74
+ labelId(field: InputMetadata): string;
75
+ /** Id del contenedor de error (`val-hint`) del campo. */
76
+ errorId(field: InputMetadata): string;
64
77
  getFieldProp(field: InputMetadata): InputMetadata;
78
+ /**
79
+ * Adapter para los tipos colapsados en `val-text-input` (EMAIL/NUMBER/HOUR).
80
+ * Reusa `getFieldProp` (con su control + wiring de ids) e inyecta el `inputType`
81
+ * HTML nativo. Memoizado por referencia de field para no romper la identidad.
82
+ */
83
+ getTextInputProp(field: InputMetadata, inputType: NonNullable<InputMetadata['inputType']>): InputMetadata;
65
84
  /**
66
85
  * Adapter para SELECT — igual que `getFieldProp` pero limpia `label`.
67
86
  * val-form ya renderiza el título del campo con `<val-title>` arriba del input;
@@ -100,8 +100,17 @@ export type InputMetadata = {
100
100
  description?: string;
101
101
  /** Input placeholder */
102
102
  placeholder: string;
103
- /** Input type */
103
+ /** Input type (drives val-form routing — which input component renders) */
104
104
  type: InputType;
105
+ /**
106
+ * Native HTML input type for `val-text-input` (the `[type]` attribute of the
107
+ * underlying `<ion-input>` / control). Decoupled from `InputType` (which is the
108
+ * form-routing enum). When `type === InputType.TEXT`, `val-form` forwards a
109
+ * sensible `inputType` ('text' by default, 'email'/'number'/'time'/... for the
110
+ * collapsed email/number/hour cases). `'time'` makes `val-text-input` render an
111
+ * `<ion-datetime presentation="time">` instead of an `<ion-input>`.
112
+ */
113
+ inputType?: 'text' | 'email' | 'number' | 'tel' | 'password' | 'time' | 'url' | 'search' | 'date';
105
114
  /** Display order */
106
115
  order: number;
107
116
  /** Associated validators */
@@ -161,6 +170,17 @@ export type InputMetadata = {
161
170
  inputStyles?: Record<string, string>;
162
171
  /** Upload function (only for ATTACHMENT type). Receives a File, must resolve to the uploaded URL. */
163
172
  uploadFn?: (file: File) => Promise<string>;
173
+ /**
174
+ * Id del elemento que actúa como label visible del campo. `val-form` lo asigna
175
+ * al `<val-title>` que renderiza sobre el input y lo pasa al input para enlazar
176
+ * vía `aria-labelledby`. Si se omite, el input genera su propio id interno.
177
+ */
178
+ labelId?: string;
179
+ /**
180
+ * Id del contenedor de error (`val-hint`). `val-form` lo asigna al `<val-hint>`
181
+ * y lo pasa al input para enlazar vía `aria-describedby` cuando hay error.
182
+ */
183
+ errorId?: string;
164
184
  };
165
185
  /**
166
186
  * A section in a form, grouping multiple fields.
@@ -0,0 +1,22 @@
1
+ import { PresetConfig, ComponentPresets } from './types';
2
+ /**
3
+ * Presets de botón por defecto provistos por la librería.
4
+ *
5
+ * Son el reemplazo recomendado de las factories deprecadas de
6
+ * `atoms/button/factory.ts`: en vez de construir el `ButtonMetadata` a mano,
7
+ * el consumer usa `<val-button preset="primary-round" [props]="{ text }">`.
8
+ *
9
+ * Cada preset define solo el ESTILO reutilizable (color/fill/shape/expand/size).
10
+ * El `text`, `type`, `state`, `icon` y `href` se pasan por `[props]` en cada uso.
11
+ *
12
+ * Disponibles sin configuración: `PresetService` los siembra de fábrica y
13
+ * `provideValtechPresets` los preserva (las apps EXTIENDEN estos defaults en
14
+ * vez de pisarlos). Una app puede sobrescribir un preset declarando la misma
15
+ * clave bajo `button` en su `APP_PRESETS`.
16
+ */
17
+ export declare const DEFAULT_BUTTON_PRESETS: ComponentPresets;
18
+ /**
19
+ * Presets que la librería siembra de fábrica en `PresetService`.
20
+ * Hoy solo botón; agregar otros componentes acá a medida que se definan.
21
+ */
22
+ export declare const DEFAULT_PRESETS: PresetConfig;
@@ -1,3 +1,4 @@
1
1
  export { PresetConfig, ComponentPresets, PresetsOptions } from './types';
2
2
  export { PresetService } from './preset.service';
3
3
  export { provideValtechPresets } from './config';
4
+ export { DEFAULT_BUTTON_PRESETS, DEFAULT_PRESETS } from './default-presets';
@@ -41,6 +41,10 @@ export declare class PresetService {
41
41
  *
42
42
  * @param presets Configuración de presets
43
43
  *
44
+ * Hace MERGE por componente sobre lo ya registrado (incluidos los defaults
45
+ * de la librería), así que las apps EXTIENDEN los presets existentes en vez
46
+ * de reemplazarlos. Para sobrescribir un preset, declarar la misma clave.
47
+ *
44
48
  * @example
45
49
  * presets.registerPresets({
46
50
  * button: {
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Ionic color helpers — single source of truth.
3
+ *
4
+ * Several presentational cards used to inline a literal `IONIC_COLORS` array
5
+ * plus a `resolveColor()` copy. This util consolidates that logic so the named
6
+ * Ionic palette and the CSS-var resolution live in one place.
7
+ */
8
+ /** The named Ionic color palette tokens. */
9
+ export declare const IONIC_COLORS: readonly ["primary", "secondary", "tertiary", "success", "warning", "danger", "light", "medium", "dark"];
10
+ export type IonicColor = (typeof IONIC_COLORS)[number];
11
+ /** True when `value` is one of the named Ionic palette tokens. */
12
+ export declare function isIonicColor(value: string | undefined): value is IonicColor;
13
+ /**
14
+ * Resolve a color value to a usable CSS color.
15
+ *
16
+ * - A named Ionic token (e.g. `primary`) becomes `var(--ion-color-primary)`.
17
+ * - Any other value (hex, rgb, CSS var, etc.) is returned unchanged.
18
+ * - `undefined`/empty returns `undefined`.
19
+ */
20
+ export declare function resolveIonicColor(value: string | undefined): string | undefined;
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.1035";
5
+ export declare const VERSION = "4.0.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.1035",
3
+ "version": "4.0.1",
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
@@ -65,13 +65,11 @@ export * from './lib/components/molecules/content-loader/content-loader.componen
65
65
  export * from './lib/components/molecules/content-loader/types';
66
66
  export * from './lib/components/molecules/date-input/date-input.component';
67
67
  export * from './lib/components/molecules/date-input/types';
68
- export * from './lib/components/molecules/email-input/email-input.component';
69
68
  export * from './lib/components/molecules/expandable-text/expandable-text.component';
70
69
  export * from './lib/components/molecules/expandable-text/types';
71
70
  export * from './lib/components/molecules/file-input/file-input.component';
72
71
  export * from './lib/components/molecules/file-input/types';
73
72
  export * from './lib/components/molecules/hint/hint.component';
74
- export * from './lib/components/molecules/hour-input/hour-input.component';
75
73
  export * from './lib/components/molecules/language-selector/language-selector.component';
76
74
  export * from './lib/components/molecules/language-selector/types';
77
75
  export * from './lib/components/molecules/layered-card/layered-card.component';
@@ -84,7 +82,6 @@ export * from './lib/components/molecules/notes-box/notes-box.component';
84
82
  export * from './lib/components/molecules/notes-box/types';
85
83
  export * from './lib/components/molecules/page-links/page-links.component';
86
84
  export * from './lib/components/molecules/page-links/types';
87
- export * from './lib/components/molecules/number-input/number-input.component';
88
85
  export * from './lib/components/molecules/number-from-to/number-from-to.component';
89
86
  export * from './lib/components/molecules/number-from-to/types';
90
87
  export * from './lib/components/molecules/password-input/password-input.component';
@@ -418,6 +415,7 @@ export * from './lib/shared/pipes/process-links.pipe';
418
415
  export * from './lib/shared/utils/datetime';
419
416
  export * from './lib/shared/utils/dom';
420
417
  export * from './lib/shared/utils/form-defaults';
418
+ export * from './lib/shared/utils/ionic-color';
421
419
  export * from './lib/shared/utils/validators';
422
420
  export * from './lib/shared/utils/styles';
423
421
  export * from './lib/shared/utils/text';
@@ -429,12 +427,8 @@ export * from './lib/services/requests/request-form-builder.service';
429
427
  export * from './lib/services/requests/request-firestore.service';
430
428
  export * from './lib/components/organisms/article-strip/article-strip.component';
431
429
  export * from './lib/components/organisms/article-strip/types';
432
- export * from './lib/components/molecules/info-card/info-card.component';
433
- export * from './lib/components/molecules/info-card/types';
434
430
  export * from './lib/components/molecules/metric-card/metric-card.component';
435
431
  export * from './lib/components/molecules/metric-card/types';
436
- export * from './lib/components/molecules/content-card/content-card.component';
437
- export * from './lib/components/molecules/content-card/types';
438
432
  export * from './lib/components/organisms/auth-cta/auth-cta.component';
439
433
  export * from './lib/components/organisms/auth-cta/types';
440
434
  export * from './lib/components/molecules/ticket-card/ticket-card.component';
@@ -27,6 +27,22 @@
27
27
  box-shadow: 0 pxToRem(-10) pxToRem(16) addColorOpacity($color-default-shadow, 0.07);
28
28
  }
29
29
 
30
+ // Accessible focus indicator. Use on any custom-built interactive element
31
+ // (elements with role="button"/tabindex, native button/a that need a consistent
32
+ // ring) so keyboard users get a visible focus state. Only shows for keyboard
33
+ // focus (:focus-visible), never on mouse/touch.
34
+ @mixin focus-ring($offset: 2px, $color: var(--ion-color-primary, #7026df)) {
35
+ &:focus {
36
+ outline: none;
37
+ }
38
+
39
+ &:focus-visible {
40
+ outline: pxToRem(2) solid $color;
41
+ outline-offset: $offset;
42
+ border-radius: inherit;
43
+ }
44
+ }
45
+
30
46
  @mixin transform-translateY($value) {
31
47
  transform: translateY($value);
32
48
  -webkit-transform: translateY($value);