@egose/shadcn-theme-ng-tw 0.2.0 → 0.4.0

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 (97) hide show
  1. package/README.md +1 -1
  2. package/alert/fesm2022/alert.mjs +1 -1
  3. package/autocomplete/fesm2022/autocomplete.mjs +1 -1
  4. package/button/fesm2022/button.mjs +3 -3
  5. package/checkbox/fesm2022/checkbox.mjs +6 -7
  6. package/checkbox/types/checkbox.d.ts +1 -1
  7. package/combobox/fesm2022/combobox.mjs +1 -1
  8. package/date-picker/README.md +15 -11
  9. package/date-picker/fesm2022/date-picker.mjs +148 -30
  10. package/date-picker/types/date-picker.d.ts +102 -9
  11. package/form-autocomplete/README.md +178 -0
  12. package/form-autocomplete/fesm2022/form-autocomplete.mjs +243 -0
  13. package/form-autocomplete/package.json +24 -0
  14. package/form-autocomplete/types/form-autocomplete.d.ts +81 -0
  15. package/form-checkbox/README.md +29 -18
  16. package/form-checkbox/fesm2022/form-checkbox.mjs +62 -22
  17. package/form-checkbox/types/form-checkbox.d.ts +43 -4
  18. package/form-combobox/README.md +203 -0
  19. package/form-combobox/fesm2022/form-combobox.mjs +305 -0
  20. package/form-combobox/package.json +24 -0
  21. package/form-combobox/types/form-combobox.d.ts +93 -0
  22. package/form-date-picker/README.md +49 -22
  23. package/form-date-picker/fesm2022/form-date-picker.mjs +100 -29
  24. package/form-date-picker/types/form-date-picker.d.ts +37 -1
  25. package/form-date-picker-multi/README.md +192 -0
  26. package/form-date-picker-multi/fesm2022/form-date-picker-multi.mjs +266 -0
  27. package/form-date-picker-multi/package.json +24 -0
  28. package/form-date-picker-multi/types/form-date-picker-multi.d.ts +78 -0
  29. package/form-date-range-picker/README.md +254 -0
  30. package/form-date-range-picker/fesm2022/form-date-range-picker.mjs +263 -0
  31. package/form-date-range-picker/package.json +24 -0
  32. package/form-date-range-picker/types/form-date-range-picker.d.ts +75 -0
  33. package/form-field/README.md +9 -0
  34. package/form-field/fesm2022/form-field.mjs +80 -5
  35. package/form-field/types/form-field.d.ts +50 -2
  36. package/form-field-simple/fesm2022/form-field-simple.mjs +15 -1
  37. package/form-field-simple/types/form-field-simple.d.ts +9 -2
  38. package/form-input-otp/README.md +195 -0
  39. package/form-input-otp/fesm2022/form-input-otp.mjs +226 -0
  40. package/form-input-otp/package.json +24 -0
  41. package/form-input-otp/types/form-input-otp.d.ts +78 -0
  42. package/form-month-year-picker/README.md +189 -0
  43. package/form-month-year-picker/fesm2022/form-month-year-picker.mjs +256 -0
  44. package/form-month-year-picker/package.json +24 -0
  45. package/form-month-year-picker/types/form-month-year-picker.d.ts +73 -0
  46. package/form-native-select/README.md +206 -0
  47. package/form-native-select/fesm2022/form-native-select.mjs +226 -0
  48. package/form-native-select/package.json +24 -0
  49. package/form-native-select/types/form-native-select.d.ts +77 -0
  50. package/form-phone-input/README.md +189 -0
  51. package/form-phone-input/fesm2022/form-phone-input.mjs +230 -0
  52. package/form-phone-input/package.json +24 -0
  53. package/form-phone-input/types/form-phone-input.d.ts +78 -0
  54. package/form-radio-group/README.md +199 -0
  55. package/form-radio-group/fesm2022/form-radio-group.mjs +238 -0
  56. package/form-radio-group/package.json +24 -0
  57. package/form-radio-group/types/form-radio-group.d.ts +83 -0
  58. package/form-searchable-multiselect/README.md +28 -17
  59. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +60 -24
  60. package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +39 -2
  61. package/form-select/README.md +30 -19
  62. package/form-select/fesm2022/form-select.mjs +65 -29
  63. package/form-select/types/form-select.d.ts +39 -2
  64. package/form-slider/README.md +183 -0
  65. package/form-slider/fesm2022/form-slider.mjs +218 -0
  66. package/form-slider/package.json +24 -0
  67. package/form-slider/types/form-slider.d.ts +80 -0
  68. package/form-switch/README.md +174 -0
  69. package/form-switch/fesm2022/form-switch.mjs +205 -0
  70. package/form-switch/package.json +24 -0
  71. package/form-switch/types/form-switch.d.ts +70 -0
  72. package/form-text-input/README.md +37 -26
  73. package/form-text-input/fesm2022/form-text-input.mjs +60 -24
  74. package/form-text-input/types/form-text-input.d.ts +39 -2
  75. package/form-textarea/README.md +33 -22
  76. package/form-textarea/fesm2022/form-textarea.mjs +60 -24
  77. package/form-textarea/types/form-textarea.d.ts +39 -2
  78. package/form-toggle/README.md +187 -0
  79. package/form-toggle/fesm2022/form-toggle.mjs +275 -0
  80. package/form-toggle/package.json +24 -0
  81. package/form-toggle/types/form-toggle.d.ts +100 -0
  82. package/form-toggle-group/README.md +177 -0
  83. package/form-toggle-group/fesm2022/form-toggle-group.mjs +243 -0
  84. package/form-toggle-group/package.json +24 -0
  85. package/form-toggle-group/types/form-toggle-group.d.ts +85 -0
  86. package/input-group/fesm2022/input-group.mjs +20 -10
  87. package/input-group/types/input-group.d.ts +4 -1
  88. package/native-select/fesm2022/native-select.mjs +18 -6
  89. package/native-select/types/native-select.d.ts +7 -2
  90. package/package.json +57 -1
  91. package/phone-input/README.md +114 -0
  92. package/phone-input/fesm2022/phone-input.mjs +191 -0
  93. package/phone-input/package.json +24 -0
  94. package/phone-input/types/phone-input.d.ts +67 -0
  95. package/sheet/fesm2022/sheet.mjs +1 -1
  96. package/switch/fesm2022/switch.mjs +7 -5
  97. package/switch/types/switch.d.ts +2 -1
@@ -0,0 +1,93 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ValueProvider } from '@angular/core';
3
+ import { ClassValue } from 'clsx';
4
+
5
+ declare class EgFormCombobox {
6
+ private readonly formGroupDirective;
7
+ private readonly _errorMessages;
8
+ private readonly generatedId;
9
+ private readonly _config;
10
+ private readonly _picker;
11
+ private readonly _single;
12
+ label: _angular_core.InputSignal<string | undefined>;
13
+ controlId: _angular_core.InputSignal<string | undefined>;
14
+ controlName: _angular_core.InputSignal<string>;
15
+ error: _angular_core.InputSignal<string | undefined>;
16
+ /**
17
+ * Auto-resolve the displayed message from the control's `ValidationErrors`
18
+ * when `error()` is unset. Explicit `error()` always wins. Set to `false`
19
+ * for manual-only messages.
20
+ */
21
+ autoError: _angular_core.InputSignal<boolean>;
22
+ hint: _angular_core.InputSignal<string | undefined>;
23
+ id: _angular_core.InputSignal<string | undefined>;
24
+ placeholder: _angular_core.InputSignal<string>;
25
+ emptyText: _angular_core.InputSignal<string>;
26
+ disabled: _angular_core.InputSignal<boolean>;
27
+ required: _angular_core.InputSignal<boolean>;
28
+ /**
29
+ * Selection mode. `multiple` renders chips + checkbox-style multi-select
30
+ * (`string[]` model); `single` renders a trigger button + dropdown
31
+ * (`string | null` model). Defaults to `multiple` (original behavior).
32
+ */
33
+ mode: _angular_core.InputSignal<"single" | "multiple">;
34
+ options: _angular_core.InputSignal<string[]>;
35
+ readonly effectiveId: _angular_core.Signal<string>;
36
+ readonly errorId: _angular_core.Signal<string>;
37
+ readonly hintId: _angular_core.Signal<string>;
38
+ /**
39
+ * Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
40
+ * auto-resolved from the control's `ValidationErrors`. Plain method (not a
41
+ * computed): `ValidationErrors` is not a signal, so the control must be read
42
+ * fresh on every change-detection pass.
43
+ */
44
+ protected resolvedError(): string | undefined;
45
+ /**
46
+ * Whether the error is surfaced: message present + control invalid +
47
+ * touched/dirty/submitted. Gates the visual `<hlm-error>` (and
48
+ * `describedBy()`, where present) so sighted and screen-reader output agree.
49
+ */
50
+ protected showError(): boolean;
51
+ /** Selected values read reactively from the brain model so chips track selection. */
52
+ readonly selectedValues: _angular_core.Signal<string[]>;
53
+ /** Single-mode display value read reactively from the brain model. */
54
+ readonly singleDisplay: _angular_core.Signal<string | null>;
55
+ /**
56
+ * Combined lock for the brain `linkedSignal`-based disabled state: the raw
57
+ * input write always carries the resolved value, so a same-pass
58
+ * wrapper-toggle + `control.disable()` cannot clobber CVA state.
59
+ */
60
+ effectiveDisabled(): boolean;
61
+ userClass: _angular_core.InputSignal<ClassValue>;
62
+ labelClass: _angular_core.InputSignal<string>;
63
+ controlClass: _angular_core.InputSignal<string>;
64
+ chipsClass: _angular_core.InputSignal<string>;
65
+ errorClass: _angular_core.InputSignal<string>;
66
+ hintClass: _angular_core.InputSignal<string>;
67
+ $userClass: _angular_core.Signal<string>;
68
+ $labelClass: _angular_core.Signal<string>;
69
+ $controlClass: _angular_core.Signal<string>;
70
+ $chipsClass: _angular_core.Signal<string>;
71
+ $errorClass: _angular_core.Signal<string>;
72
+ $hintClass: _angular_core.Signal<string>;
73
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgFormCombobox, never>;
74
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormCombobox, "eg-form-combobox", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "controlId": { "alias": "controlId"; "required": false; "isSignal": true; }; "controlName": { "alias": "controlName"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "autoError": { "alias": "autoError"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "emptyText": { "alias": "emptyText"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "labelClass": { "alias": "labelClass"; "required": false; "isSignal": true; }; "controlClass": { "alias": "controlClass"; "required": false; "isSignal": true; }; "chipsClass": { "alias": "chipsClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
75
+ }
76
+
77
+ interface EgFormComboboxConfig {
78
+ /**
79
+ * Global class defaults for `eg-form-combobox` styling slots.
80
+ * Each is merged under the matching per-instance `*Class` input
81
+ * (library base < global config < per-instance).
82
+ */
83
+ labelClass?: string;
84
+ controlClass?: string;
85
+ chipsClass?: string;
86
+ errorClass?: string;
87
+ hintClass?: string;
88
+ }
89
+ declare function provideEgFormComboboxConfig(config: Partial<EgFormComboboxConfig>): ValueProvider;
90
+ declare function injectEgFormComboboxConfig(): EgFormComboboxConfig;
91
+
92
+ export { EgFormCombobox, injectEgFormComboboxConfig, provideEgFormComboboxConfig };
93
+ export type { EgFormComboboxConfig };
@@ -84,27 +84,34 @@ Selector (from source): `eg-form-date-picker` (standalone component, host `tw:w-
84
84
 
85
85
  ### `EgFormDatePicker` — `eg-form-date-picker`
86
86
 
87
- | Input | Type | Default | Description |
88
- | ------------------- | ------------------------ | --------------- | ----------------------------------------------------------------------------------------------------------- |
89
- | `controlName` | `string` | `''` | `formControlName` key inside the parent `FormGroup`. **Required.** |
90
- | `label` | `string \| undefined` | — | Label text (hidden when omitted). |
91
- | `error` | `string \| undefined` | — | Error text shown when invalid. |
92
- | `hint` | `string \| undefined` | — | Hint text shown otherwise. |
93
- | `controlId` | `string \| undefined` | — | Explicit id (first priority for `effectiveId`). |
94
- | `id` | `string \| undefined` | — | Fallback id (second priority). |
95
- | `name` | `string \| undefined` | — | Declared input; **not bound** to the inner picker in the current template (surprise — see below). |
96
- | `placeholder` | `string` | `'Pick a date'` | Input placeholder. |
97
- | `readonly` | `boolean` | `false` | Declared input; **not bound** in the current template. |
98
- | `disabled` | `boolean` | `false` | Locks interaction via picker `wrapperDisabled` (form control stays enabled). |
99
- | `required` | `boolean` | `false` | Shows a red `*` next to the label. |
100
- | `min` | `Date \| string \| null` | `null` | Minimum date forwarded to `hlm-date-picker`. |
101
- | `max` | `Date \| string \| null` | `null` | Maximum date forwarded to `hlm-date-picker`. |
102
- | `autoCloseOnSelect` | `boolean` | `true` | Declared input; **not bound** to the inner picker in the current template (picker default `false` applies). |
103
- | `class` | `ClassValue` | `''` | Declared but **not applied** to the host in the current template (host is fixed `tw:w-full`). |
104
- | `labelClass` | `string` | `''` | Extra label classes (base `tw:mb-1`). |
105
- | `pickerClass` | `string` | `''` | Extra picker classes (base `tw:mb-1`). |
106
- | `errorClass` | `string` | `''` | Extra error classes (base `tw:mt-0`). |
107
- | `hintClass` | `string` | `''` | Extra hint classes (base `tw:mt-0`). |
87
+ | Input | Type | Default | Description |
88
+ | ------------------- | --------------------------------- | --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
89
+ | `controlName` | `string` | `''` | `formControlName` key inside the parent `FormGroup`. **Required.** |
90
+ | `label` | `string \| undefined` | — | Label text (hidden when omitted). |
91
+ | `error` | `string \| undefined` | — | Error text shown when invalid. |
92
+ | `autoError` | `boolean` | `true` | Auto-resolve the message from the control's `ValidationErrors` when `error` is unset. Explicit `error` always wins; `error=""` counts as unset. Global wording via `provideEgFormErrorMessages`. |
93
+ | `hint` | `string \| undefined` | — | Hint text shown otherwise. |
94
+ | `controlId` | `string \| undefined` | — | Explicit id (first priority for `effectiveId`). |
95
+ | `id` | `string \| undefined` | — | Fallback id (second priority). |
96
+ | `name` | `string \| undefined` | — | Native `name` forwarded to the inner input (`controlName` wins when set, like `eg-form-text-input`). |
97
+ | `placeholder` | `string` | `'Pick a date'` | Input placeholder. |
98
+ | `readonly` | `boolean` | `false` | Native `readonly` forwarded to the inner input (locks typed text; use `disabled` to lock the calendar too). |
99
+ | `disabled` | `boolean` | `false` | Locks interaction via picker `wrapperDisabled` (form control stays enabled). |
100
+ | `required` | `boolean` | `false` | Shows a red `*` next to the label. |
101
+ | `min` | `Date \| string \| null` | `null` | Minimum date forwarded to `hlm-date-picker`. |
102
+ | `max` | `Date \| string \| null` | `null` | Maximum date forwarded to `hlm-date-picker`. |
103
+ | `autoCloseOnSelect` | `boolean` | config default | Forwarded to `hlm-date-picker` (falls back to `provideHlmDatePickerConfig`, default `false`). |
104
+ | `captionLayout` | union | `'label'` | Forwarded to `hlm-date-picker` (`'dropdown' \| 'label' \| 'dropdown-months' \| 'dropdown-years'`). |
105
+ | `formatDate` | `(date: Date) => string` | config default | Display format, forwarded to `hlm-date-picker` (falls back to `provideHlmDatePickerConfig`). |
106
+ | `transformDate` | `(date: Date) => Date` | config default | Model transform, forwarded to `hlm-date-picker` (falls back to `provideHlmDatePickerConfig`). |
107
+ | `parseDate` | `(value: string) => Date \| null` | config default | Input parsing, forwarded to `hlm-date-picker-input` (falls back to `provideHlmDatePickerConfig`). |
108
+ | `formatInputDate` | `(date: Date) => string` | config default | Edit format while focused, forwarded to `hlm-date-picker-input` (falls back to `provideHlmDatePickerConfig`). |
109
+ | `class` | `ClassValue` | `''` | Extra host classes (base `tw:w-full`). |
110
+ | `labelClass` | `string` | `''` | Extra label classes (base `tw:mb-1`). |
111
+ | `pickerClass` | `string` | `''` | Extra picker-container classes (base `tw:mb-1`). |
112
+ | `inputClass` | `string` | `''` | Extra inner-input classes (e.g. `tw:text-lg` for text size). |
113
+ | `errorClass` | `string` | `''` | Extra error classes (base `tw:mt-0`). |
114
+ | `hintClass` | `string` | `''` | Extra hint classes (base `tw:mt-0`). |
108
115
 
109
116
  | Member | Description |
110
117
  | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -293,6 +300,7 @@ import { EgFormDatePicker } from '@egose/shadcn-theme-ng/form-date-picker';
293
300
  label="Event date"
294
301
  labelClass="tw:font-semibold"
295
302
  pickerClass="tw:max-w-xs"
303
+ inputClass="tw:text-lg"
296
304
  hint="Doors open one hour earlier."
297
305
  />
298
306
  </form>
@@ -313,7 +321,26 @@ export class StyledDateComponent {
313
321
 
314
322
  ## Theming / CSS variables
315
323
 
316
- No component-specific CSS variables. Style via `labelClass` / `pickerClass` / `errorClass` / `hintClass` and global tokens. The host is fixed `tw:w-full`; constrain width with a wrapping container.
324
+ No component-specific CSS variables. Style per-instance via `class` / `labelClass` / `pickerClass` / `inputClass` / `errorClass` / `hintClass` (precedence: library base < global config < per-instance).
325
+
326
+ Global defaults (styling analogue of `formatDate`) via the picker config:
327
+
328
+ ```ts
329
+ import { provideHlmDatePickerConfig } from '@egose/shadcn-theme-ng/date-picker';
330
+
331
+ await bootstrapApplication(App, {
332
+ providers: [
333
+ provideHlmDatePickerConfig({
334
+ inputClass: 'tw:text-sm', // every date input; per-instance inputClass still wins on conflict
335
+ labelClass: 'tw:font-medium',
336
+ }),
337
+ ],
338
+ });
339
+ ```
340
+
341
+ The same `labelClass` / `pickerClass` / `inputClass` / `errorClass` / `hintClass` keys exist on
342
+ `HlmDateRangePickerConfig`, `HlmDatePickerMultiConfig`, and `HlmMonthYearPickerConfig` for future
343
+ wrappers. The host keeps `tw:w-full`; constrain width with `class` (e.g. `tw:max-w-xs`) or a wrapping container.
317
344
 
318
345
  ## Related subpaths
319
346
 
@@ -2,14 +2,16 @@ import * as i0 from '@angular/core';
2
2
  import { inject, input, computed, Component } from '@angular/core';
3
3
  import * as i1 from '@angular/forms';
4
4
  import { FormGroupDirective, ReactiveFormsModule, ControlContainer } from '@angular/forms';
5
- import { HlmFormIdGenerator, HlmFormField, HlmError, HlmHint } from '@egose/shadcn-theme-ng-tw/form-field';
5
+ import { injectEgFormErrorMessages, HlmFormIdGenerator, resolveEgFormError, HlmFormField, HlmError, HlmHint } from '@egose/shadcn-theme-ng-tw/form-field';
6
6
  import { HlmLabel } from '@egose/shadcn-theme-ng-tw/label';
7
- import { HlmDatePicker, HlmDatePickerInput } from '@egose/shadcn-theme-ng-tw/date-picker';
7
+ import { injectHlmDatePickerConfig, HlmDatePicker, HlmDatePickerInput } from '@egose/shadcn-theme-ng-tw/date-picker';
8
8
  import { hlm } from '@egose/shadcn-theme-ng-tw/utils';
9
9
 
10
10
  class EgFormDatePicker {
11
11
  formGroupDirective = inject(FormGroupDirective);
12
+ _errorMessages = injectEgFormErrorMessages();
12
13
  generatedId = inject(HlmFormIdGenerator).generate('eg-form-date-picker');
14
+ _config = injectHlmDatePickerConfig();
13
15
  // Inputs
14
16
  label = input(undefined, /* @ts-ignore */
15
17
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -19,6 +21,13 @@ class EgFormDatePicker {
19
21
  ...(ngDevMode ? [{ debugName: "controlName" }] : /* istanbul ignore next */ []));
20
22
  error = input(undefined, /* @ts-ignore */
21
23
  ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
24
+ /**
25
+ * Auto-resolve the displayed message from the control's `ValidationErrors`
26
+ * when `error()` is unset. Explicit `error()` always wins. Set to `false`
27
+ * for manual-only messages.
28
+ */
29
+ autoError = input(true, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "autoError" }] : /* istanbul ignore next */ []));
22
31
  hint = input(undefined, /* @ts-ignore */
23
32
  ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
24
33
  // HTML attributes
@@ -38,21 +47,63 @@ class EgFormDatePicker {
38
47
  ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
39
48
  max = input(null, /* @ts-ignore */
40
49
  ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
41
- autoCloseOnSelect = input(true, /* @ts-ignore */
50
+ // Picker behavior (defaults fall back to the injected HlmDatePickerConfig,
51
+ // so global `provideHlmDatePickerConfig` values keep working unless overridden)
52
+ autoCloseOnSelect = input(this._config.autoCloseOnSelect, /* @ts-ignore */
42
53
  ...(ngDevMode ? [{ debugName: "autoCloseOnSelect" }] : /* istanbul ignore next */ []));
54
+ captionLayout = input('label', /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "captionLayout" }] : /* istanbul ignore next */ []));
56
+ formatDate = input(this._config.formatDate, /* @ts-ignore */
57
+ ...(ngDevMode ? [{ debugName: "formatDate" }] : /* istanbul ignore next */ []));
58
+ transformDate = input(this._config.transformDate, /* @ts-ignore */
59
+ ...(ngDevMode ? [{ debugName: "transformDate" }] : /* istanbul ignore next */ []));
60
+ parseDate = input(this._config.parseDate, /* @ts-ignore */
61
+ ...(ngDevMode ? [{ debugName: "parseDate" }] : /* istanbul ignore next */ []));
62
+ formatInputDate = input(this._config.formatInputDate, /* @ts-ignore */
63
+ ...(ngDevMode ? [{ debugName: "formatInputDate" }] : /* istanbul ignore next */ []));
43
64
  effectiveId = computed(() => this.controlId() || this.id() || this.generatedId, /* @ts-ignore */
44
65
  ...(ngDevMode ? [{ debugName: "effectiveId" }] : /* istanbul ignore next */ []));
45
66
  errorId = computed(() => `${this.effectiveId()}-error`, /* @ts-ignore */
46
67
  ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
47
68
  hintId = computed(() => `${this.effectiveId()}-hint`, /* @ts-ignore */
48
69
  ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
49
- describedBy() {
70
+ /**
71
+ * Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
72
+ * auto-resolved from the control's `ValidationErrors`. Plain method (not a
73
+ * computed): `ValidationErrors` is not a signal, so the control must be read
74
+ * fresh on every change-detection pass.
75
+ */
76
+ resolvedError() {
77
+ const explicit = this.error();
78
+ if (explicit)
79
+ return explicit;
80
+ if (!this.autoError())
81
+ return undefined;
82
+ const control = this.formGroupDirective.form.get(this.controlName());
83
+ return resolveEgFormError(control?.errors ?? null, this.label(), this._errorMessages);
84
+ }
85
+ /**
86
+ * Whether the error is surfaced: message present + control invalid +
87
+ * touched/dirty/submitted. Gates the visual `<hlm-error>` (and
88
+ * `describedBy()`, where present) so sighted and screen-reader output agree.
89
+ */
90
+ showError() {
50
91
  const control = this.formGroupDirective.form.get(this.controlName());
51
- return this.error() && control?.invalid && (control.dirty || control.touched)
52
- ? this.errorId()
53
- : this.hint()
54
- ? this.hintId()
55
- : null;
92
+ return (!!this.resolvedError() &&
93
+ !!control?.invalid &&
94
+ (control.dirty || control.touched || this.formGroupDirective.submitted));
95
+ }
96
+ /**
97
+ * Bounds projected onto the picker's `Date` model. The cast keeps the
98
+ * template's generic inference on `Date` while passing runtime values
99
+ * (including `string` bounds, as before) through untouched.
100
+ */
101
+ $min = computed(() => this.min(), /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "$min" }] : /* istanbul ignore next */ []));
103
+ $max = computed(() => this.max(), /* @ts-ignore */
104
+ ...(ngDevMode ? [{ debugName: "$max" }] : /* istanbul ignore next */ []));
105
+ describedBy() {
106
+ return this.showError() ? this.errorId() : this.hint() ? this.hintId() : null;
56
107
  }
57
108
  // Styling
58
109
  userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
@@ -60,26 +111,29 @@ class EgFormDatePicker {
60
111
  ...(ngDevMode ? [{ debugName: "labelClass" }] : /* istanbul ignore next */ []));
61
112
  pickerClass = input('', /* @ts-ignore */
62
113
  ...(ngDevMode ? [{ debugName: "pickerClass" }] : /* istanbul ignore next */ []));
114
+ inputClass = input('', /* @ts-ignore */
115
+ ...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
63
116
  errorClass = input('', /* @ts-ignore */
64
117
  ...(ngDevMode ? [{ debugName: "errorClass" }] : /* istanbul ignore next */ []));
65
118
  hintClass = input('', /* @ts-ignore */
66
119
  ...(ngDevMode ? [{ debugName: "hintClass" }] : /* istanbul ignore next */ []));
67
- // Computed classes
68
- $userClass = computed(() => hlm('tw:flex tw:flex-col', this.userClass()), /* @ts-ignore */
120
+ // Computed classes (library base < global config < per-instance)
121
+ $userClass = computed(() => hlm('tw:w-full', this.userClass()), /* @ts-ignore */
69
122
  ...(ngDevMode ? [{ debugName: "$userClass" }] : /* istanbul ignore next */ []));
70
- $labelClass = computed(() => hlm('tw:mb-1', this.labelClass()), /* @ts-ignore */
123
+ $labelClass = computed(() => hlm('tw:mb-1', this._config.labelClass, this.labelClass()), /* @ts-ignore */
71
124
  ...(ngDevMode ? [{ debugName: "$labelClass" }] : /* istanbul ignore next */ []));
72
- $pickerClass = computed(() => hlm('tw:mb-1', this.pickerClass()), /* @ts-ignore */
125
+ $pickerClass = computed(() => hlm('tw:mb-1', this._config.pickerClass, this.pickerClass()), /* @ts-ignore */
73
126
  ...(ngDevMode ? [{ debugName: "$pickerClass" }] : /* istanbul ignore next */ []));
74
- $errorClass = computed(() => hlm('tw:mt-0', this.errorClass()), /* @ts-ignore */
127
+ $inputClass = computed(() => hlm(this._config.inputClass, this.inputClass()), /* @ts-ignore */
128
+ ...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
129
+ $errorClass = computed(() => hlm('tw:mt-0', this._config.errorClass, this.errorClass()), /* @ts-ignore */
75
130
  ...(ngDevMode ? [{ debugName: "$errorClass" }] : /* istanbul ignore next */ []));
76
- $hintClass = computed(() => hlm('tw:mt-0', this.hintClass()), /* @ts-ignore */
131
+ $hintClass = computed(() => hlm('tw:mt-0', this._config.hintClass, this.hintClass()), /* @ts-ignore */
77
132
  ...(ngDevMode ? [{ debugName: "$hintClass" }] : /* istanbul ignore next */ []));
78
133
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormDatePicker, deps: [], target: i0.ɵɵFactoryTarget.Component });
79
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormDatePicker, isStandalone: true, selector: "eg-form-date-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, controlId: { classPropertyName: "controlId", publicName: "controlId", isSignal: true, isRequired: false, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnSelect: { classPropertyName: "autoCloseOnSelect", publicName: "autoCloseOnSelect", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, labelClass: { classPropertyName: "labelClass", publicName: "labelClass", isSignal: true, isRequired: false, transformFunction: null }, pickerClass: { classPropertyName: "pickerClass", publicName: "pickerClass", isSignal: true, isRequired: false, transformFunction: null }, errorClass: { classPropertyName: "errorClass", publicName: "errorClass", isSignal: true, isRequired: false, transformFunction: null }, hintClass: { classPropertyName: "hintClass", publicName: "hintClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "tw:w-full" }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
134
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormDatePicker, isStandalone: true, selector: "eg-form-date-picker", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, controlId: { classPropertyName: "controlId", publicName: "controlId", isSignal: true, isRequired: false, transformFunction: null }, controlName: { classPropertyName: "controlName", publicName: "controlName", isSignal: true, isRequired: false, transformFunction: null }, error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null }, autoError: { classPropertyName: "autoError", publicName: "autoError", isSignal: true, isRequired: false, transformFunction: null }, hint: { classPropertyName: "hint", publicName: "hint", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnSelect: { classPropertyName: "autoCloseOnSelect", publicName: "autoCloseOnSelect", isSignal: true, isRequired: false, transformFunction: null }, captionLayout: { classPropertyName: "captionLayout", publicName: "captionLayout", isSignal: true, isRequired: false, transformFunction: null }, formatDate: { classPropertyName: "formatDate", publicName: "formatDate", isSignal: true, isRequired: false, transformFunction: null }, transformDate: { classPropertyName: "transformDate", publicName: "transformDate", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDate: { classPropertyName: "formatInputDate", publicName: "formatInputDate", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, labelClass: { classPropertyName: "labelClass", publicName: "labelClass", isSignal: true, isRequired: false, transformFunction: null }, pickerClass: { classPropertyName: "pickerClass", publicName: "pickerClass", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, errorClass: { classPropertyName: "errorClass", publicName: "errorClass", isSignal: true, isRequired: false, transformFunction: null }, hintClass: { classPropertyName: "hintClass", publicName: "hintClass", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class": "$userClass()" } }, providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }], ngImport: i0, template: `
80
135
  @let lbl = label();
81
136
  @let cnm = controlName();
82
- @let err = error();
83
137
  @let hnt = hint();
84
138
  @let rqrd = required();
85
139
 
@@ -94,23 +148,32 @@ class EgFormDatePicker {
94
148
  }
95
149
 
96
150
  <hlm-date-picker
97
- [min]="min()"
98
- [max]="max()"
151
+ [min]="$min()"
152
+ [max]="$max()"
99
153
  [wrapperDisabled]="disabled()"
154
+ [autoCloseOnSelect]="autoCloseOnSelect()"
155
+ [captionLayout]="captionLayout()"
156
+ [formatDate]="formatDate()"
157
+ [transformDate]="transformDate()"
100
158
  [formControlName]="cnm"
101
159
  [class]="$pickerClass()"
102
160
  >
103
161
  <hlm-date-picker-input
104
162
  [inputId]="effectiveId()"
163
+ [name]="cnm || name()"
164
+ [readonly]="readonly()"
105
165
  [ariaLabel]="lbl"
106
166
  [ariaDescribedby]="describedBy()"
107
167
  [placeholder]="placeholder()"
168
+ [parseDate]="parseDate()"
169
+ [formatInputDate]="formatInputDate()"
170
+ [inputClass]="$inputClass()"
108
171
  />
109
172
  </hlm-date-picker>
110
173
 
111
- @if (err) {
174
+ @if (showError()) {
112
175
  <hlm-error [id]="errorId()" [class]="$errorClass()">
113
- {{ err }}
176
+ {{ resolvedError() }}
114
177
  </hlm-error>
115
178
  }
116
179
 
@@ -120,7 +183,7 @@ class EgFormDatePicker {
120
183
  </hlm-hint>
121
184
  }
122
185
  </hlm-form-field>
123
- `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: HlmFormField, selector: "hlm-form-field", inputs: ["class"] }, { kind: "directive", type: HlmError, selector: "hlm-error", inputs: ["class"] }, { kind: "directive", type: HlmHint, selector: "hlm-hint", inputs: ["class"] }, { kind: "directive", type: HlmLabel, selector: "[hlmLabel]", inputs: ["class"] }, { kind: "component", type: HlmDatePicker, selector: "hlm-date-picker", inputs: ["captionLayout", "min", "max", "disabled", "wrapperDisabled", "date", "defaultFocusedDate", "autoCloseOnSelect", "formatDate", "transformDate"], outputs: ["dateChange"] }, { kind: "component", type: HlmDatePickerInput, selector: "hlm-date-picker-input", inputs: ["ariaLabel", "ariaDescribedby", "parseDate", "formatInputDate"] }] });
186
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: HlmFormField, selector: "hlm-form-field", inputs: ["class"] }, { kind: "directive", type: HlmError, selector: "hlm-error", inputs: ["class"] }, { kind: "directive", type: HlmHint, selector: "hlm-hint", inputs: ["class"] }, { kind: "directive", type: HlmLabel, selector: "[hlmLabel]", inputs: ["class"] }, { kind: "component", type: HlmDatePicker, selector: "hlm-date-picker", inputs: ["captionLayout", "min", "max", "disabled", "wrapperDisabled", "date", "defaultFocusedDate", "autoCloseOnSelect", "formatDate", "transformDate"], outputs: ["dateChange"] }, { kind: "component", type: HlmDatePickerInput, selector: "hlm-date-picker-input", inputs: ["ariaLabel", "ariaDescribedby", "name", "readonly", "class", "inputClass", "parseDate", "formatInputDate"] }] });
124
187
  }
125
188
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormDatePicker, decorators: [{
126
189
  type: Component,
@@ -128,14 +191,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
128
191
  selector: 'eg-form-date-picker',
129
192
  standalone: true,
130
193
  host: {
131
- class: 'tw:w-full',
194
+ '[class]': '$userClass()',
132
195
  },
133
196
  imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmDatePicker, HlmDatePickerInput],
134
197
  providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
135
198
  template: `
136
199
  @let lbl = label();
137
200
  @let cnm = controlName();
138
- @let err = error();
139
201
  @let hnt = hint();
140
202
  @let rqrd = required();
141
203
 
@@ -150,23 +212,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
150
212
  }
151
213
 
152
214
  <hlm-date-picker
153
- [min]="min()"
154
- [max]="max()"
215
+ [min]="$min()"
216
+ [max]="$max()"
155
217
  [wrapperDisabled]="disabled()"
218
+ [autoCloseOnSelect]="autoCloseOnSelect()"
219
+ [captionLayout]="captionLayout()"
220
+ [formatDate]="formatDate()"
221
+ [transformDate]="transformDate()"
156
222
  [formControlName]="cnm"
157
223
  [class]="$pickerClass()"
158
224
  >
159
225
  <hlm-date-picker-input
160
226
  [inputId]="effectiveId()"
227
+ [name]="cnm || name()"
228
+ [readonly]="readonly()"
161
229
  [ariaLabel]="lbl"
162
230
  [ariaDescribedby]="describedBy()"
163
231
  [placeholder]="placeholder()"
232
+ [parseDate]="parseDate()"
233
+ [formatInputDate]="formatInputDate()"
234
+ [inputClass]="$inputClass()"
164
235
  />
165
236
  </hlm-date-picker>
166
237
 
167
- @if (err) {
238
+ @if (showError()) {
168
239
  <hlm-error [id]="errorId()" [class]="$errorClass()">
169
- {{ err }}
240
+ {{ resolvedError() }}
170
241
  </hlm-error>
171
242
  }
172
243
 
@@ -178,7 +249,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
178
249
  </hlm-form-field>
179
250
  `,
180
251
  }]
181
- }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", required: false }] }], controlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlName", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], autoCloseOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoCloseOnSelect", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], pickerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "pickerClass", required: false }] }], errorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorClass", required: false }] }], hintClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintClass", required: false }] }] } });
252
+ }], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", required: false }] }], controlName: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlName", required: false }] }], error: [{ type: i0.Input, args: [{ isSignal: true, alias: "error", required: false }] }], autoError: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoError", required: false }] }], hint: [{ type: i0.Input, args: [{ isSignal: true, alias: "hint", required: false }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], min: [{ type: i0.Input, args: [{ isSignal: true, alias: "min", required: false }] }], max: [{ type: i0.Input, args: [{ isSignal: true, alias: "max", required: false }] }], autoCloseOnSelect: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoCloseOnSelect", required: false }] }], captionLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "captionLayout", required: false }] }], formatDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatDate", required: false }] }], transformDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformDate", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDate", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], pickerClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "pickerClass", required: false }] }], inputClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "inputClass", required: false }] }], errorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorClass", required: false }] }], hintClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintClass", required: false }] }] } });
182
253
 
183
254
  /*
184
255
  * Public API Surface of form-date-picker
@@ -1,13 +1,22 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { ClassValue } from 'clsx';
3
3
 
4
+ type DatePickerCaptionLayout = 'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years';
4
5
  declare class EgFormDatePicker {
5
6
  private readonly formGroupDirective;
7
+ private readonly _errorMessages;
6
8
  private readonly generatedId;
9
+ private readonly _config;
7
10
  label: _angular_core.InputSignal<string | undefined>;
8
11
  controlId: _angular_core.InputSignal<string | undefined>;
9
12
  controlName: _angular_core.InputSignal<string>;
10
13
  error: _angular_core.InputSignal<string | undefined>;
14
+ /**
15
+ * Auto-resolve the displayed message from the control's `ValidationErrors`
16
+ * when `error()` is unset. Explicit `error()` always wins. Set to `false`
17
+ * for manual-only messages.
18
+ */
19
+ autoError: _angular_core.InputSignal<boolean>;
11
20
  hint: _angular_core.InputSignal<string | undefined>;
12
21
  id: _angular_core.InputSignal<string | undefined>;
13
22
  name: _angular_core.InputSignal<string | undefined>;
@@ -18,22 +27,49 @@ declare class EgFormDatePicker {
18
27
  min: _angular_core.InputSignal<string | Date | null>;
19
28
  max: _angular_core.InputSignal<string | Date | null>;
20
29
  autoCloseOnSelect: _angular_core.InputSignal<boolean>;
30
+ captionLayout: _angular_core.InputSignal<DatePickerCaptionLayout>;
31
+ formatDate: _angular_core.InputSignal<(date: Date) => string>;
32
+ transformDate: _angular_core.InputSignal<(date: Date) => Date>;
33
+ parseDate: _angular_core.InputSignal<(value: string) => Date | null>;
34
+ formatInputDate: _angular_core.InputSignal<(date: Date) => string>;
21
35
  readonly effectiveId: _angular_core.Signal<string>;
22
36
  readonly errorId: _angular_core.Signal<string>;
23
37
  readonly hintId: _angular_core.Signal<string>;
38
+ /**
39
+ * Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
40
+ * auto-resolved from the control's `ValidationErrors`. Plain method (not a
41
+ * computed): `ValidationErrors` is not a signal, so the control must be read
42
+ * fresh on every change-detection pass.
43
+ */
44
+ protected resolvedError(): string | undefined;
45
+ /**
46
+ * Whether the error is surfaced: message present + control invalid +
47
+ * touched/dirty/submitted. Gates the visual `<hlm-error>` (and
48
+ * `describedBy()`, where present) so sighted and screen-reader output agree.
49
+ */
50
+ protected showError(): boolean;
51
+ /**
52
+ * Bounds projected onto the picker's `Date` model. The cast keeps the
53
+ * template's generic inference on `Date` while passing runtime values
54
+ * (including `string` bounds, as before) through untouched.
55
+ */
56
+ protected readonly $min: _angular_core.Signal<Date | undefined>;
57
+ protected readonly $max: _angular_core.Signal<Date | undefined>;
24
58
  describedBy(): string | null;
25
59
  userClass: _angular_core.InputSignal<ClassValue>;
26
60
  labelClass: _angular_core.InputSignal<string>;
27
61
  pickerClass: _angular_core.InputSignal<string>;
62
+ inputClass: _angular_core.InputSignal<string>;
28
63
  errorClass: _angular_core.InputSignal<string>;
29
64
  hintClass: _angular_core.InputSignal<string>;
30
65
  $userClass: _angular_core.Signal<string>;
31
66
  $labelClass: _angular_core.Signal<string>;
32
67
  $pickerClass: _angular_core.Signal<string>;
68
+ $inputClass: _angular_core.Signal<string>;
33
69
  $errorClass: _angular_core.Signal<string>;
34
70
  $hintClass: _angular_core.Signal<string>;
35
71
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgFormDatePicker, never>;
36
- static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormDatePicker, "eg-form-date-picker", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "controlId": { "alias": "controlId"; "required": false; "isSignal": true; }; "controlName": { "alias": "controlName"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "autoCloseOnSelect": { "alias": "autoCloseOnSelect"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "labelClass": { "alias": "labelClass"; "required": false; "isSignal": true; }; "pickerClass": { "alias": "pickerClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
72
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormDatePicker, "eg-form-date-picker", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "controlId": { "alias": "controlId"; "required": false; "isSignal": true; }; "controlName": { "alias": "controlName"; "required": false; "isSignal": true; }; "error": { "alias": "error"; "required": false; "isSignal": true; }; "autoError": { "alias": "autoError"; "required": false; "isSignal": true; }; "hint": { "alias": "hint"; "required": false; "isSignal": true; }; "id": { "alias": "id"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "min": { "alias": "min"; "required": false; "isSignal": true; }; "max": { "alias": "max"; "required": false; "isSignal": true; }; "autoCloseOnSelect": { "alias": "autoCloseOnSelect"; "required": false; "isSignal": true; }; "captionLayout": { "alias": "captionLayout"; "required": false; "isSignal": true; }; "formatDate": { "alias": "formatDate"; "required": false; "isSignal": true; }; "transformDate": { "alias": "transformDate"; "required": false; "isSignal": true; }; "parseDate": { "alias": "parseDate"; "required": false; "isSignal": true; }; "formatInputDate": { "alias": "formatInputDate"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "labelClass": { "alias": "labelClass"; "required": false; "isSignal": true; }; "pickerClass": { "alias": "pickerClass"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
37
73
  }
38
74
 
39
75
  export { EgFormDatePicker };