@egose/shadcn-theme-ng 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 (96) hide show
  1. package/README.md +1 -1
  2. package/autocomplete/fesm2022/autocomplete.mjs +1 -1
  3. package/checkbox/fesm2022/checkbox.mjs +6 -7
  4. package/checkbox/types/checkbox.d.ts +1 -1
  5. package/combobox/fesm2022/combobox.mjs +1 -1
  6. package/date-picker/README.md +15 -11
  7. package/date-picker/fesm2022/date-picker.mjs +148 -30
  8. package/date-picker/types/date-picker.d.ts +102 -9
  9. package/form-autocomplete/README.md +178 -0
  10. package/form-autocomplete/fesm2022/form-autocomplete.mjs +159 -0
  11. package/form-autocomplete/package.json +24 -0
  12. package/form-autocomplete/types/form-autocomplete.d.ts +81 -0
  13. package/form-checkbox/README.md +29 -18
  14. package/form-checkbox/fesm2022/form-checkbox.mjs +59 -17
  15. package/form-checkbox/types/form-checkbox.d.ts +43 -4
  16. package/form-combobox/README.md +203 -0
  17. package/form-combobox/fesm2022/form-combobox.mjs +181 -0
  18. package/form-combobox/package.json +24 -0
  19. package/form-combobox/types/form-combobox.d.ts +93 -0
  20. package/form-date-picker/README.md +49 -22
  21. package/form-date-picker/fesm2022/form-date-picker.mjs +74 -19
  22. package/form-date-picker/types/form-date-picker.d.ts +37 -1
  23. package/form-date-picker-multi/README.md +192 -0
  24. package/form-date-picker-multi/fesm2022/form-date-picker-multi.mjs +158 -0
  25. package/form-date-picker-multi/package.json +24 -0
  26. package/form-date-picker-multi/types/form-date-picker-multi.d.ts +78 -0
  27. package/form-date-range-picker/README.md +254 -0
  28. package/form-date-range-picker/fesm2022/form-date-range-picker.mjs +159 -0
  29. package/form-date-range-picker/package.json +24 -0
  30. package/form-date-range-picker/types/form-date-range-picker.d.ts +75 -0
  31. package/form-field/README.md +9 -0
  32. package/form-field/fesm2022/form-field.mjs +80 -5
  33. package/form-field/types/form-field.d.ts +50 -2
  34. package/form-field-simple/fesm2022/form-field-simple.mjs +15 -1
  35. package/form-field-simple/types/form-field-simple.d.ts +9 -2
  36. package/form-input-otp/README.md +195 -0
  37. package/form-input-otp/fesm2022/form-input-otp.mjs +140 -0
  38. package/form-input-otp/package.json +24 -0
  39. package/form-input-otp/types/form-input-otp.d.ts +78 -0
  40. package/form-month-year-picker/README.md +189 -0
  41. package/form-month-year-picker/fesm2022/form-month-year-picker.mjs +154 -0
  42. package/form-month-year-picker/package.json +24 -0
  43. package/form-month-year-picker/types/form-month-year-picker.d.ts +73 -0
  44. package/form-native-select/README.md +206 -0
  45. package/form-native-select/fesm2022/form-native-select.mjs +132 -0
  46. package/form-native-select/package.json +24 -0
  47. package/form-native-select/types/form-native-select.d.ts +77 -0
  48. package/form-phone-input/README.md +189 -0
  49. package/form-phone-input/fesm2022/form-phone-input.mjs +142 -0
  50. package/form-phone-input/package.json +24 -0
  51. package/form-phone-input/types/form-phone-input.d.ts +78 -0
  52. package/form-radio-group/README.md +199 -0
  53. package/form-radio-group/fesm2022/form-radio-group.mjs +140 -0
  54. package/form-radio-group/package.json +24 -0
  55. package/form-radio-group/types/form-radio-group.d.ts +83 -0
  56. package/form-searchable-multiselect/README.md +28 -17
  57. package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +57 -19
  58. package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +39 -2
  59. package/form-select/README.md +30 -19
  60. package/form-select/fesm2022/form-select.mjs +57 -19
  61. package/form-select/types/form-select.d.ts +39 -2
  62. package/form-slider/README.md +183 -0
  63. package/form-slider/fesm2022/form-slider.mjs +140 -0
  64. package/form-slider/package.json +24 -0
  65. package/form-slider/types/form-slider.d.ts +80 -0
  66. package/form-switch/README.md +174 -0
  67. package/form-switch/fesm2022/form-switch.mjs +129 -0
  68. package/form-switch/package.json +24 -0
  69. package/form-switch/types/form-switch.d.ts +70 -0
  70. package/form-text-input/README.md +37 -26
  71. package/form-text-input/fesm2022/form-text-input.mjs +57 -19
  72. package/form-text-input/types/form-text-input.d.ts +39 -2
  73. package/form-textarea/README.md +33 -22
  74. package/form-textarea/fesm2022/form-textarea.mjs +57 -19
  75. package/form-textarea/types/form-textarea.d.ts +39 -2
  76. package/form-toggle/README.md +187 -0
  77. package/form-toggle/fesm2022/form-toggle.mjs +193 -0
  78. package/form-toggle/package.json +24 -0
  79. package/form-toggle/types/form-toggle.d.ts +100 -0
  80. package/form-toggle-group/README.md +177 -0
  81. package/form-toggle-group/fesm2022/form-toggle-group.mjs +145 -0
  82. package/form-toggle-group/package.json +24 -0
  83. package/form-toggle-group/types/form-toggle-group.d.ts +85 -0
  84. package/input-group/fesm2022/input-group.mjs +19 -9
  85. package/input-group/types/input-group.d.ts +4 -1
  86. package/native-select/fesm2022/native-select.mjs +18 -6
  87. package/native-select/types/native-select.d.ts +7 -2
  88. package/package.json +57 -1
  89. package/phone-input/README.md +114 -0
  90. package/phone-input/fesm2022/phone-input.mjs +191 -0
  91. package/phone-input/package.json +24 -0
  92. package/phone-input/types/phone-input.d.ts +67 -0
  93. package/radio-group/types/radio-group.d.ts +1 -1
  94. package/switch/fesm2022/switch.mjs +7 -5
  95. package/switch/types/switch.d.ts +2 -1
  96. package/typography/types/typography.d.ts +8 -8
@@ -0,0 +1,158 @@
1
+ import * as i0 from '@angular/core';
2
+ import { inject, input, numberAttribute, computed, Component } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { FormGroupDirective, ReactiveFormsModule, ControlContainer } from '@angular/forms';
5
+ import { injectEgFormErrorMessages, HlmFormIdGenerator, resolveEgFormError, HlmFormField, HlmError, HlmHint } from '@egose/shadcn-theme-ng/form-field';
6
+ import { HlmLabel } from '@egose/shadcn-theme-ng/label';
7
+ import { injectHlmDatePickerMultiConfig, HlmDatePickerMulti, HlmDateMultiInput } from '@egose/shadcn-theme-ng/date-picker';
8
+ import { hlm } from '@egose/shadcn-theme-ng/utils';
9
+
10
+ class EgFormDatePickerMulti {
11
+ formGroupDirective = inject(FormGroupDirective);
12
+ _errorMessages = injectEgFormErrorMessages();
13
+ generatedId = inject(HlmFormIdGenerator).generate('eg-form-date-picker-multi');
14
+ _config = injectHlmDatePickerMultiConfig();
15
+ label = input(undefined, /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
17
+ controlId = input(undefined, /* @ts-ignore */
18
+ ...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
19
+ controlName = input('', /* @ts-ignore */
20
+ ...(ngDevMode ? [{ debugName: "controlName" }] : /* istanbul ignore next */ []));
21
+ error = input(undefined, /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
23
+ /**
24
+ * Auto-resolve the displayed message from the control's `ValidationErrors`
25
+ * when `error()` is unset. Explicit `error()` always wins. Set to `false`
26
+ * for manual-only messages.
27
+ */
28
+ autoError = input(true, /* @ts-ignore */
29
+ ...(ngDevMode ? [{ debugName: "autoError" }] : /* istanbul ignore next */ []));
30
+ hint = input(undefined, /* @ts-ignore */
31
+ ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
32
+ id = input(undefined, /* @ts-ignore */
33
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
34
+ name = input(undefined, /* @ts-ignore */
35
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
36
+ placeholder = input('Pick dates', /* @ts-ignore */
37
+ ...(ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []));
38
+ readonly = input(false, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "readonly" }] : /* istanbul ignore next */ []));
40
+ disabled = input(false, /* @ts-ignore */
41
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
42
+ required = input(false, /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
44
+ min = input(null, /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "min" }] : /* istanbul ignore next */ []));
46
+ max = input(null, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "max" }] : /* istanbul ignore next */ []));
48
+ minSelection = input(undefined, { ...(ngDevMode ? { debugName: "minSelection" } : /* istanbul ignore next */ {}), transform: numberAttribute });
49
+ maxSelection = input(undefined, { ...(ngDevMode ? { debugName: "maxSelection" } : /* istanbul ignore next */ {}), transform: numberAttribute });
50
+ // Picker behavior (defaults fall back to the injected HlmDatePickerMultiConfig)
51
+ autoCloseOnMaxSelection = input(this._config.autoCloseOnMaxSelection, /* @ts-ignore */
52
+ ...(ngDevMode ? [{ debugName: "autoCloseOnMaxSelection" }] : /* istanbul ignore next */ []));
53
+ captionLayout = input('label', /* @ts-ignore */
54
+ ...(ngDevMode ? [{ debugName: "captionLayout" }] : /* istanbul ignore next */ []));
55
+ formatDates = input(this._config.formatDates, /* @ts-ignore */
56
+ ...(ngDevMode ? [{ debugName: "formatDates" }] : /* istanbul ignore next */ []));
57
+ transformDates = input(this._config.transformDates, /* @ts-ignore */
58
+ ...(ngDevMode ? [{ debugName: "transformDates" }] : /* istanbul ignore next */ []));
59
+ parseDate = input(this._config.parseDate, /* @ts-ignore */
60
+ ...(ngDevMode ? [{ debugName: "parseDate" }] : /* istanbul ignore next */ []));
61
+ formatInputDates = input(this._config.formatInputDates, /* @ts-ignore */
62
+ ...(ngDevMode ? [{ debugName: "formatInputDates" }] : /* istanbul ignore next */ []));
63
+ effectiveId = computed(() => this.controlId() || this.id() || this.generatedId, /* @ts-ignore */
64
+ ...(ngDevMode ? [{ debugName: "effectiveId" }] : /* istanbul ignore next */ []));
65
+ errorId = computed(() => `${this.effectiveId()}-error`, /* @ts-ignore */
66
+ ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
67
+ hintId = computed(() => `${this.effectiveId()}-hint`, /* @ts-ignore */
68
+ ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
69
+ /**
70
+ * Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
71
+ * auto-resolved from the control's `ValidationErrors`. Plain method (not a
72
+ * computed): `ValidationErrors` is not a signal, so the control must be read
73
+ * fresh on every change-detection pass.
74
+ */
75
+ resolvedError() {
76
+ const explicit = this.error();
77
+ if (explicit)
78
+ return explicit;
79
+ if (!this.autoError())
80
+ return undefined;
81
+ const control = this.formGroupDirective.form.get(this.controlName());
82
+ return resolveEgFormError(control?.errors ?? null, this.label(), this._errorMessages);
83
+ }
84
+ /**
85
+ * Whether the error is surfaced: message present + control invalid +
86
+ * touched/dirty/submitted. Gates the visual `<hlm-error>` (and
87
+ * `describedBy()`, where present) so sighted and screen-reader output agree.
88
+ */
89
+ showError() {
90
+ const control = this.formGroupDirective.form.get(this.controlName());
91
+ return (!!this.resolvedError() &&
92
+ !!control?.invalid &&
93
+ (control.dirty || control.touched || this.formGroupDirective.submitted));
94
+ }
95
+ /**
96
+ * Bounds projected onto the picker's `Date` model. The cast keeps the
97
+ * template's generic inference on `Date` while passing runtime values
98
+ * through untouched.
99
+ */
100
+ $min = computed(() => this.min(), /* @ts-ignore */
101
+ ...(ngDevMode ? [{ debugName: "$min" }] : /* istanbul ignore next */ []));
102
+ $max = computed(() => this.max(), /* @ts-ignore */
103
+ ...(ngDevMode ? [{ debugName: "$max" }] : /* istanbul ignore next */ []));
104
+ describedBy() {
105
+ return this.showError() ? this.errorId() : this.hint() ? this.hintId() : null;
106
+ }
107
+ // Styling
108
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
109
+ labelClass = input('', /* @ts-ignore */
110
+ ...(ngDevMode ? [{ debugName: "labelClass" }] : /* istanbul ignore next */ []));
111
+ pickerClass = input('', /* @ts-ignore */
112
+ ...(ngDevMode ? [{ debugName: "pickerClass" }] : /* istanbul ignore next */ []));
113
+ inputClass = input('', /* @ts-ignore */
114
+ ...(ngDevMode ? [{ debugName: "inputClass" }] : /* istanbul ignore next */ []));
115
+ errorClass = input('', /* @ts-ignore */
116
+ ...(ngDevMode ? [{ debugName: "errorClass" }] : /* istanbul ignore next */ []));
117
+ hintClass = input('', /* @ts-ignore */
118
+ ...(ngDevMode ? [{ debugName: "hintClass" }] : /* istanbul ignore next */ []));
119
+ // Computed classes (library base < global config < per-instance)
120
+ $userClass = computed(() => hlm("w-full", this.userClass()), /* @ts-ignore */
121
+ ...(ngDevMode ? [{ debugName: "$userClass" }] : /* istanbul ignore next */ []));
122
+ $labelClass = computed(() => hlm("mb-1", this._config.labelClass, this.labelClass()), /* @ts-ignore */
123
+ ...(ngDevMode ? [{ debugName: "$labelClass" }] : /* istanbul ignore next */ []));
124
+ $pickerClass = computed(() => hlm("mb-1", this._config.pickerClass, this.pickerClass()), /* @ts-ignore */
125
+ ...(ngDevMode ? [{ debugName: "$pickerClass" }] : /* istanbul ignore next */ []));
126
+ $inputClass = computed(() => hlm(this._config.inputClass, this.inputClass()), /* @ts-ignore */
127
+ ...(ngDevMode ? [{ debugName: "$inputClass" }] : /* istanbul ignore next */ []));
128
+ $errorClass = computed(() => hlm("mt-0", this._config.errorClass, this.errorClass()), /* @ts-ignore */
129
+ ...(ngDevMode ? [{ debugName: "$errorClass" }] : /* istanbul ignore next */ []));
130
+ $hintClass = computed(() => hlm("mt-0", this._config.hintClass, this.hintClass()), /* @ts-ignore */
131
+ ...(ngDevMode ? [{ debugName: "$hintClass" }] : /* istanbul ignore next */ []));
132
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormDatePickerMulti, deps: [], target: i0.ɵɵFactoryTarget.Component });
133
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormDatePickerMulti, isStandalone: true, selector: "eg-form-date-picker-multi", 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 }, minSelection: { classPropertyName: "minSelection", publicName: "minSelection", isSignal: true, isRequired: false, transformFunction: null }, maxSelection: { classPropertyName: "maxSelection", publicName: "maxSelection", isSignal: true, isRequired: false, transformFunction: null }, autoCloseOnMaxSelection: { classPropertyName: "autoCloseOnMaxSelection", publicName: "autoCloseOnMaxSelection", isSignal: true, isRequired: false, transformFunction: null }, captionLayout: { classPropertyName: "captionLayout", publicName: "captionLayout", isSignal: true, isRequired: false, transformFunction: null }, formatDates: { classPropertyName: "formatDates", publicName: "formatDates", isSignal: true, isRequired: false, transformFunction: null }, transformDates: { classPropertyName: "transformDates", publicName: "transformDates", isSignal: true, isRequired: false, transformFunction: null }, parseDate: { classPropertyName: "parseDate", publicName: "parseDate", isSignal: true, isRequired: false, transformFunction: null }, formatInputDates: { classPropertyName: "formatInputDates", publicName: "formatInputDates", 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: "\n @let lbl = label();\n @let cnm = controlName();\n @let hnt = hint();\n @let rqrd = required();\n\n <hlm-form-field>\n @if (lbl) {\n <label hlmLabel [for]=\"effectiveId()\" [class]=\"$labelClass()\"\n >{{ lbl }}\n @if (rqrd) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <hlm-date-picker-multi\n [min]=\"$min()\"\n [max]=\"$max()\"\n [minSelection]=\"minSelection()\"\n [maxSelection]=\"maxSelection()\"\n [disabled]=\"disabled()\"\n [autoCloseOnMaxSelection]=\"autoCloseOnMaxSelection()\"\n [captionLayout]=\"captionLayout()\"\n [formatDates]=\"formatDates()\"\n [transformDates]=\"transformDates()\"\n [formControlName]=\"cnm\"\n [class]=\"$pickerClass()\"\n >\n <hlm-date-multi-input\n [inputId]=\"effectiveId()\"\n [name]=\"cnm || name()\"\n [readonly]=\"readonly()\"\n [ariaLabel]=\"lbl\"\n [ariaDescribedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [parseDate]=\"parseDate()\"\n [formatInputDates]=\"formatInputDates()\"\n [inputClass]=\"$inputClass()\"\n />\n </hlm-date-picker-multi>\n\n @if (showError()) {\n <hlm-error [id]=\"errorId()\" [class]=\"$errorClass()\">\n {{ resolvedError() }}\n </hlm-error>\n }\n\n @if (hnt) {\n <hlm-hint [id]=\"hintId()\" [class]=\"$hintClass()\">\n {{ hnt }}\n </hlm-hint>\n }\n </hlm-form-field>\n ", 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: HlmDatePickerMulti, selector: "hlm-date-picker-multi", inputs: ["captionLayout", "min", "max", "minSelection", "maxSelection", "disabled", "date", "autoCloseOnMaxSelection", "formatDates", "transformDates"], outputs: ["dateChange"] }, { kind: "component", type: HlmDateMultiInput, selector: "hlm-date-multi-input", inputs: ["name", "readonly", "ariaLabel", "ariaDescribedby", "class", "inputClass", "parseDate", "formatInputDates"] }] });
134
+ }
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormDatePickerMulti, decorators: [{
136
+ type: Component,
137
+ args: [{
138
+ selector: 'eg-form-date-picker-multi',
139
+ standalone: true,
140
+ host: {
141
+ '[class]': '$userClass()',
142
+ },
143
+ imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmDatePickerMulti, HlmDateMultiInput],
144
+ providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
145
+ template: "\n @let lbl = label();\n @let cnm = controlName();\n @let hnt = hint();\n @let rqrd = required();\n\n <hlm-form-field>\n @if (lbl) {\n <label hlmLabel [for]=\"effectiveId()\" [class]=\"$labelClass()\"\n >{{ lbl }}\n @if (rqrd) {\n <span class=\"text-red-500\">*</span>\n }\n </label>\n }\n\n <hlm-date-picker-multi\n [min]=\"$min()\"\n [max]=\"$max()\"\n [minSelection]=\"minSelection()\"\n [maxSelection]=\"maxSelection()\"\n [disabled]=\"disabled()\"\n [autoCloseOnMaxSelection]=\"autoCloseOnMaxSelection()\"\n [captionLayout]=\"captionLayout()\"\n [formatDates]=\"formatDates()\"\n [transformDates]=\"transformDates()\"\n [formControlName]=\"cnm\"\n [class]=\"$pickerClass()\"\n >\n <hlm-date-multi-input\n [inputId]=\"effectiveId()\"\n [name]=\"cnm || name()\"\n [readonly]=\"readonly()\"\n [ariaLabel]=\"lbl\"\n [ariaDescribedby]=\"describedBy()\"\n [placeholder]=\"placeholder()\"\n [parseDate]=\"parseDate()\"\n [formatInputDates]=\"formatInputDates()\"\n [inputClass]=\"$inputClass()\"\n />\n </hlm-date-picker-multi>\n\n @if (showError()) {\n <hlm-error [id]=\"errorId()\" [class]=\"$errorClass()\">\n {{ resolvedError() }}\n </hlm-error>\n }\n\n @if (hnt) {\n <hlm-hint [id]=\"hintId()\" [class]=\"$hintClass()\">\n {{ hnt }}\n </hlm-hint>\n }\n </hlm-form-field>\n ",
146
+ }]
147
+ }], 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 }] }], minSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "minSelection", required: false }] }], maxSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "maxSelection", required: false }] }], autoCloseOnMaxSelection: [{ type: i0.Input, args: [{ isSignal: true, alias: "autoCloseOnMaxSelection", required: false }] }], captionLayout: [{ type: i0.Input, args: [{ isSignal: true, alias: "captionLayout", required: false }] }], formatDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatDates", required: false }] }], transformDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "transformDates", required: false }] }], parseDate: [{ type: i0.Input, args: [{ isSignal: true, alias: "parseDate", required: false }] }], formatInputDates: [{ type: i0.Input, args: [{ isSignal: true, alias: "formatInputDates", 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 }] }] } });
148
+
149
+ /*
150
+ * Public API Surface of form-date-picker-multi
151
+ */
152
+
153
+ /**
154
+ * Generated bundle index. Do not edit.
155
+ */
156
+
157
+ export { EgFormDatePickerMulti };
158
+
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "form-date-picker-multi",
3
+ "version": "0.0.1",
4
+ "peerDependencies": {
5
+ "@angular/common": "^20.3.0 || ^22.0.0",
6
+ "@angular/core": "^20.3.0 || ^22.0.0"
7
+ },
8
+ "dependencies": {
9
+ "tslib": "^2.3.0"
10
+ },
11
+ "sideEffects": false,
12
+ "module": "fesm2022/form-date-picker-multi.mjs",
13
+ "typings": "types/form-date-picker-multi.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/form-date-picker-multi.d.ts",
20
+ "default": "./fesm2022/form-date-picker-multi.mjs"
21
+ }
22
+ },
23
+ "type": "module"
24
+ }
@@ -0,0 +1,78 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ClassValue } from 'clsx';
3
+ import { NumberInput } from '@angular/cdk/coercion';
4
+
5
+ type DatePickerCaptionLayout = 'dropdown' | 'label' | 'dropdown-months' | 'dropdown-years';
6
+ declare class EgFormDatePickerMulti {
7
+ private readonly formGroupDirective;
8
+ private readonly _errorMessages;
9
+ private readonly generatedId;
10
+ private readonly _config;
11
+ label: _angular_core.InputSignal<string | undefined>;
12
+ controlId: _angular_core.InputSignal<string | undefined>;
13
+ controlName: _angular_core.InputSignal<string>;
14
+ error: _angular_core.InputSignal<string | undefined>;
15
+ /**
16
+ * Auto-resolve the displayed message from the control's `ValidationErrors`
17
+ * when `error()` is unset. Explicit `error()` always wins. Set to `false`
18
+ * for manual-only messages.
19
+ */
20
+ autoError: _angular_core.InputSignal<boolean>;
21
+ hint: _angular_core.InputSignal<string | undefined>;
22
+ id: _angular_core.InputSignal<string | undefined>;
23
+ name: _angular_core.InputSignal<string | undefined>;
24
+ placeholder: _angular_core.InputSignal<string>;
25
+ readonly: _angular_core.InputSignal<boolean>;
26
+ disabled: _angular_core.InputSignal<boolean>;
27
+ required: _angular_core.InputSignal<boolean>;
28
+ min: _angular_core.InputSignal<string | Date | null>;
29
+ max: _angular_core.InputSignal<string | Date | null>;
30
+ minSelection: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
31
+ maxSelection: _angular_core.InputSignalWithTransform<number | undefined, NumberInput>;
32
+ autoCloseOnMaxSelection: _angular_core.InputSignal<boolean>;
33
+ captionLayout: _angular_core.InputSignal<DatePickerCaptionLayout>;
34
+ formatDates: _angular_core.InputSignal<(dates: Date[]) => string>;
35
+ transformDates: _angular_core.InputSignal<(dates: Date[]) => Date[]>;
36
+ parseDate: _angular_core.InputSignal<(value: string) => Date[] | null>;
37
+ formatInputDates: _angular_core.InputSignal<(dates: Date[]) => string>;
38
+ readonly effectiveId: _angular_core.Signal<string>;
39
+ readonly errorId: _angular_core.Signal<string>;
40
+ readonly hintId: _angular_core.Signal<string>;
41
+ /**
42
+ * Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
43
+ * auto-resolved from the control's `ValidationErrors`. Plain method (not a
44
+ * computed): `ValidationErrors` is not a signal, so the control must be read
45
+ * fresh on every change-detection pass.
46
+ */
47
+ protected resolvedError(): string | undefined;
48
+ /**
49
+ * Whether the error is surfaced: message present + control invalid +
50
+ * touched/dirty/submitted. Gates the visual `<hlm-error>` (and
51
+ * `describedBy()`, where present) so sighted and screen-reader output agree.
52
+ */
53
+ protected showError(): boolean;
54
+ /**
55
+ * Bounds projected onto the picker's `Date` model. The cast keeps the
56
+ * template's generic inference on `Date` while passing runtime values
57
+ * through untouched.
58
+ */
59
+ protected readonly $min: _angular_core.Signal<Date | undefined>;
60
+ protected readonly $max: _angular_core.Signal<Date | undefined>;
61
+ describedBy(): string | null;
62
+ userClass: _angular_core.InputSignal<ClassValue>;
63
+ labelClass: _angular_core.InputSignal<string>;
64
+ pickerClass: _angular_core.InputSignal<string>;
65
+ inputClass: _angular_core.InputSignal<string>;
66
+ errorClass: _angular_core.InputSignal<string>;
67
+ hintClass: _angular_core.InputSignal<string>;
68
+ $userClass: _angular_core.Signal<string>;
69
+ $labelClass: _angular_core.Signal<string>;
70
+ $pickerClass: _angular_core.Signal<string>;
71
+ $inputClass: _angular_core.Signal<string>;
72
+ $errorClass: _angular_core.Signal<string>;
73
+ $hintClass: _angular_core.Signal<string>;
74
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgFormDatePickerMulti, never>;
75
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormDatePickerMulti, "eg-form-date-picker-multi", 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; }; "minSelection": { "alias": "minSelection"; "required": false; "isSignal": true; }; "maxSelection": { "alias": "maxSelection"; "required": false; "isSignal": true; }; "autoCloseOnMaxSelection": { "alias": "autoCloseOnMaxSelection"; "required": false; "isSignal": true; }; "captionLayout": { "alias": "captionLayout"; "required": false; "isSignal": true; }; "formatDates": { "alias": "formatDates"; "required": false; "isSignal": true; }; "transformDates": { "alias": "transformDates"; "required": false; "isSignal": true; }; "parseDate": { "alias": "parseDate"; "required": false; "isSignal": true; }; "formatInputDates": { "alias": "formatInputDates"; "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>;
76
+ }
77
+
78
+ export { EgFormDatePickerMulti };
@@ -0,0 +1,254 @@
1
+ # Form Date Range Picker (`@egose/shadcn-theme-ng/form-date-range-picker`)
2
+
3
+ A ready-made reactive-form date-range field: label + `hlm-date-range-picker` + validation error/hint display in one tag. Equivalent to shadcn/ui `Form` + date-range-picker composition.
4
+
5
+ The Angular implementation is a standalone wrapper (not a brain primitive): it renders
6
+ `HlmFormField` / `HlmError` / `HlmHint` from `@egose/shadcn-theme-ng/form-field`, `HlmLabel`, and
7
+ `HlmDateRangePicker` + `HlmDateRangeInput` from `@egose/shadcn-theme-ng/date-picker`. The inner
8
+ `hlm-date-range-picker` is bound with `[formControlName]="controlName()"`, so the parent `FormGroup`
9
+ owns the `[Date, Date] | null` value. It must live inside a `FormGroupDirective` (`[formGroup]` parent);
10
+ ids come from `HlmFormIdGenerator` unless overridden.
11
+
12
+ > **Ships as:** `@egose/shadcn-theme-ng/form-date-range-picker` and `@egose/shadcn-theme-ng-tw/form-date-range-picker`
13
+ > (the `tw:`-prefixed Tailwind variant). Both expose the identical TypeScript surface; only the
14
+ > emitted Tailwind class strings differ. See the [package README](../../README.md) for install
15
+ > steps, peer dependencies, and Tailwind setup. Do not publish this project directory independently.
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ # Plain Tailwind (no prefix)
21
+ npm install @egose/shadcn-theme-ng
22
+
23
+ # tw:-prefixed Tailwind variant
24
+ npm install @egose/shadcn-theme-ng-tw
25
+ ```
26
+
27
+ Peer dependencies (Angular, `@spartan-ng/brain`, `@ng-icons/*`, `rxjs`, …) are documented in the
28
+ [package README](../../README.md#peer-dependencies). This subpath additionally relies at runtime on
29
+ `@egose/shadcn-theme-ng/date-picker`, `@egose/shadcn-theme-ng/form-field`, and
30
+ `@egose/shadcn-theme-ng/label`.
31
+
32
+ ## Imports
33
+
34
+ Exported from the subpath root (`projects/form-date-range-picker/src/public-api.ts`). Note: this subpath
35
+ exports a single standalone component — there is no `*Imports` array or `*Module`:
36
+
37
+ ```ts
38
+ import { EgFormDateRangePicker } from '@egose/shadcn-theme-ng/form-date-range-picker';
39
+ // tw variant: replace with '@egose/shadcn-theme-ng-tw/form-date-range-picker'
40
+ ```
41
+
42
+ Standalone usage:
43
+
44
+ ```ts
45
+ import { Component } from '@angular/core';
46
+ import { ReactiveFormsModule } from '@angular/forms';
47
+ import { EgFormDateRangePicker } from '@egose/shadcn-theme-ng/form-date-range-picker';
48
+
49
+ @Component({
50
+ selector: 'app-demo',
51
+ standalone: true,
52
+ imports: [ReactiveFormsModule, EgFormDateRangePicker],
53
+ template: `...`,
54
+ })
55
+ export class DemoComponent {}
56
+ ```
57
+
58
+ NgModule-based consumer: add `EgFormDateRangePicker` (and `ReactiveFormsModule`) to the module's
59
+ `imports` — it is a standalone component, not a module.
60
+
61
+ `ControlValueAccessor` behavior: `eg-form-date-range-picker` itself is not a `ControlValueAccessor`; the
62
+ inner `hlm-date-range-picker` is (bound via `formControlName`), so `formControlName`/`formGroup` handling,
63
+ `Validators`, `disabled` state from the control, and `dateChange` values (`[Date, Date] | null`) all flow
64
+ through the parent form.
65
+
66
+ ## Anatomy / Structure
67
+
68
+ ```html
69
+ <form [formGroup]="form">
70
+ <eg-form-date-range-picker
71
+ controlName="stay"
72
+ label="Stay dates"
73
+ placeholder="Pick a date range"
74
+ [required]="true"
75
+ hint="Pick check-in and check-out."
76
+ error="Stay dates are required."
77
+ />
78
+ </form>
79
+ ```
80
+
81
+ Selector (from source): `eg-form-date-range-picker` (standalone component, host `tw:w-full`).
82
+
83
+ ## API reference
84
+
85
+ ### `EgFormDateRangePicker` — `eg-form-date-range-picker`
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
+ | `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 range'` | 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 `disabled` (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-range-picker`. |
102
+ | `max` | `Date \| string \| null` | `null` | Maximum date forwarded to `hlm-date-range-picker`. |
103
+ | `autoCloseOnEndSelection` | `boolean` | config default | Forwarded to `hlm-date-range-picker` (falls back to `provideHlmDateRangePickerConfig`, default `false`). |
104
+ | `captionLayout` | union | `'label'` | Forwarded to `hlm-date-range-picker` (`'dropdown' \| 'label' \| 'dropdown-months' \| 'dropdown-years'`). |
105
+ | `formatDates` | `(dates: [Date \| null, Date \| null]) => string` | config default | Display format, forwarded to `hlm-date-range-picker` (falls back to `provideHlmDateRangePickerConfig`). |
106
+ | `transformDates` | `(dates: [Date, Date]) => [Date, Date]` | config default | Model transform, forwarded to `hlm-date-range-picker` (falls back to `provideHlmDateRangePickerConfig`). |
107
+ | `parseDate` | `(value: string) => [Date, Date] \| null` | config default | Input parsing, forwarded to `hlm-date-range-input` (falls back to `provideHlmDateRangePickerConfig`). |
108
+ | `formatInputDates` | `(dates: [Date \| null, Date \| null]) => string` | config default | Edit format while focused, forwarded to `hlm-date-range-input` (falls back to `provideHlmDateRangePickerConfig`). |
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`). |
115
+
116
+ | Member | Description |
117
+ | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
118
+ | `effectiveId` | `controlId() \|\| id() \|\| generated` — wired to input `inputId` and label `for`. |
119
+ | `errorId` / `hintId` | `effectiveId + '-error' / '-hint'`. |
120
+ | `describedBy()` | `errorId` when `error()` is set and control is invalid + dirty/touched, else `hintId` when `hint()` is set, else `null` — wired to input `ariaDescribedby`. |
121
+
122
+ Requires a `[formGroup]` ancestor (injects `FormGroupDirective`, provides `ControlContainer → FormGroupDirective`).
123
+
124
+ ## Examples
125
+
126
+ ### 1. Basic required range field
127
+
128
+ ```ts
129
+ import { Component, inject } from '@angular/core';
130
+ import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
131
+ import { EgFormDateRangePicker } from '@egose/shadcn-theme-ng/form-date-range-picker';
132
+
133
+ @Component({
134
+ selector: 'app-stay',
135
+ standalone: true,
136
+ imports: [ReactiveFormsModule, EgFormDateRangePicker],
137
+ template: `
138
+ <form [formGroup]="form" (ngSubmit)="submit()">
139
+ <eg-form-date-range-picker
140
+ controlName="stay"
141
+ label="Stay dates"
142
+ [required]="true"
143
+ error="Stay dates are required."
144
+ />
145
+ <button type="submit" [disabled]="form.invalid">Continue</button>
146
+ </form>
147
+ `,
148
+ })
149
+ export class StayComponent {
150
+ private readonly fb = inject(FormBuilder);
151
+ readonly form = this.fb.group({ stay: [null as [Date, Date] | null, Validators.required] });
152
+ submit() {
153
+ console.log(this.form.value.stay);
154
+ }
155
+ }
156
+ ```
157
+
158
+ ### 2. Hint + min bound
159
+
160
+ ```ts
161
+ import { Component, inject } from '@angular/core';
162
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
163
+ import { EgFormDateRangePicker } from '@egose/shadcn-theme-ng/form-date-range-picker';
164
+
165
+ @Component({
166
+ selector: 'app-bounds',
167
+ standalone: true,
168
+ imports: [ReactiveFormsModule, EgFormDateRangePicker],
169
+ template: `
170
+ <form [formGroup]="form">
171
+ <eg-form-date-range-picker
172
+ controlName="booking"
173
+ label="Booking"
174
+ placeholder="Select your stay"
175
+ [min]="today"
176
+ hint="Stays start today or later."
177
+ error="Pick a valid stay."
178
+ />
179
+ </form>
180
+ `,
181
+ })
182
+ export class BoundsComponent {
183
+ private readonly fb = inject(FormBuilder);
184
+ readonly form = this.fb.group({ booking: [null as [Date, Date] | null] });
185
+ readonly today = new Date();
186
+ }
187
+ ```
188
+
189
+ ### 3. Custom label/input styling
190
+
191
+ ```ts
192
+ import { Component, inject } from '@angular/core';
193
+ import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
194
+ import { EgFormDateRangePicker } from '@egose/shadcn-theme-ng/form-date-range-picker';
195
+
196
+ @Component({
197
+ selector: 'app-styled-range',
198
+ standalone: true,
199
+ imports: [ReactiveFormsModule, EgFormDateRangePicker],
200
+ template: `
201
+ <form [formGroup]="form">
202
+ <eg-form-date-range-picker
203
+ controlName="event"
204
+ controlId="event-range"
205
+ label="Event range"
206
+ labelClass="tw:font-semibold"
207
+ pickerClass="tw:max-w-md"
208
+ inputClass="tw:text-lg"
209
+ hint="Doors open one hour earlier on day one."
210
+ />
211
+ </form>
212
+ `,
213
+ })
214
+ export class StyledRangeComponent {
215
+ private readonly fb = inject(FormBuilder);
216
+ readonly form = this.fb.group({ event: [null as [Date, Date] | null] });
217
+ }
218
+ ```
219
+
220
+ ## Accessibility notes
221
+
222
+ - Label `for` ↔ input `inputId` wiring is automatic via `effectiveId`; the input also receives `ariaLabel` (the label text) and `ariaDescribedby` (error/hint id) — always pass a `label`.
223
+ - Closing the picker popover marks the control touched, so errors appear after interaction even without typing.
224
+ - The required `*` is visual; pair with `Validators.required` so assistive tech and validation agree.
225
+ - Arrow-down opens the calendar from the input; the calendar/popup primitives handle focus trap, escape, and outside-click dismissal.
226
+
227
+ ## Theming / CSS variables
228
+
229
+ No component-specific CSS variables. Style per-instance via `class` / `labelClass` / `pickerClass` / `inputClass` / `errorClass` / `hintClass` (precedence: library base < global config < per-instance).
230
+
231
+ Global defaults (styling analogue of `formatDates`) via the range picker config:
232
+
233
+ ```ts
234
+ import { provideHlmDateRangePickerConfig } from '@egose/shadcn-theme-ng/date-picker';
235
+
236
+ await bootstrapApplication(App, {
237
+ providers: [
238
+ provideHlmDateRangePickerConfig({
239
+ inputClass: 'tw:text-sm', // every range input; per-instance inputClass still wins on conflict
240
+ labelClass: 'tw:font-medium',
241
+ }),
242
+ ],
243
+ });
244
+ ```
245
+
246
+ The host keeps `tw:w-full`; constrain width with `class` (e.g. `tw:max-w-md`) or a wrapping container.
247
+
248
+ ## Related subpaths
249
+
250
+ - `@egose/shadcn-theme-ng/date-picker` — raw `hlm-date-range-picker` + input/trigger/config tokens for custom layouts.
251
+ - `@egose/shadcn-theme-ng/form-date-picker` — the single-date counterpart (`eg-form-date-picker`).
252
+ - `@egose/shadcn-theme-ng/form-field` — `hlm-form-field` / `hlm-error` / `hlm-hint` used internally.
253
+ - `@egose/shadcn-theme-ng/calendar` — calendars rendered inside the picker popover.
254
+ - `@egose/shadcn-theme-ng/form-field-simple` — alternative minimal wrapper when you compose pickers by hand.