@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,238 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, input, 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-tw/form-field';
6
+ import { HlmLabel } from '@egose/shadcn-theme-ng-tw/label';
7
+ import { HlmRadioGroup, HlmRadio, HlmRadioIndicator } from '@egose/shadcn-theme-ng-tw/radio-group';
8
+ import { hlm } from '@egose/shadcn-theme-ng-tw/utils';
9
+
10
+ const EgFormRadioGroupConfigToken = new InjectionToken('EgFormRadioGroupConfig');
11
+ function provideEgFormRadioGroupConfig(config) {
12
+ return { provide: EgFormRadioGroupConfigToken, useValue: { ...config } };
13
+ }
14
+ function injectEgFormRadioGroupConfig() {
15
+ return inject(EgFormRadioGroupConfigToken, { optional: true }) ?? {};
16
+ }
17
+
18
+ class EgFormRadioGroup {
19
+ formGroupDirective = inject(FormGroupDirective);
20
+ _errorMessages = injectEgFormErrorMessages();
21
+ generatedId = inject(HlmFormIdGenerator).generate('eg-form-radio-group');
22
+ _config = injectEgFormRadioGroupConfig();
23
+ label = input(undefined, /* @ts-ignore */
24
+ ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
25
+ controlId = input(undefined, /* @ts-ignore */
26
+ ...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
27
+ controlName = input('', /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "controlName" }] : /* istanbul ignore next */ []));
29
+ error = input(undefined, /* @ts-ignore */
30
+ ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
31
+ /**
32
+ * Auto-resolve the displayed message from the control's `ValidationErrors`
33
+ * when `error()` is unset. Explicit `error()` always wins. Set to `false`
34
+ * for manual-only messages.
35
+ */
36
+ autoError = input(true, /* @ts-ignore */
37
+ ...(ngDevMode ? [{ debugName: "autoError" }] : /* istanbul ignore next */ []));
38
+ hint = input(undefined, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
40
+ id = input(undefined, /* @ts-ignore */
41
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
42
+ name = input(undefined, /* @ts-ignore */
43
+ ...(ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []));
44
+ disabled = input(false, /* @ts-ignore */
45
+ ...(ngDevMode ? [{ debugName: "disabled" }] : /* istanbul ignore next */ []));
46
+ required = input(false, /* @ts-ignore */
47
+ ...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
48
+ options = input([], /* @ts-ignore */
49
+ ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
50
+ effectiveId = computed(() => this.controlId() || this.id() || this.generatedId, /* @ts-ignore */
51
+ ...(ngDevMode ? [{ debugName: "effectiveId" }] : /* istanbul ignore next */ []));
52
+ errorId = computed(() => `${this.effectiveId()}-error`, /* @ts-ignore */
53
+ ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
54
+ hintId = computed(() => `${this.effectiveId()}-hint`, /* @ts-ignore */
55
+ ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
56
+ /**
57
+ * Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
58
+ * auto-resolved from the control's `ValidationErrors`. Plain method (not a
59
+ * computed): `ValidationErrors` is not a signal, so the control must be read
60
+ * fresh on every change-detection pass.
61
+ */
62
+ resolvedError() {
63
+ const explicit = this.error();
64
+ if (explicit)
65
+ return explicit;
66
+ if (!this.autoError())
67
+ return undefined;
68
+ const control = this.formGroupDirective.form.get(this.controlName());
69
+ return resolveEgFormError(control?.errors ?? null, this.label(), this._errorMessages);
70
+ }
71
+ /**
72
+ * Whether the error is surfaced: message present + control invalid +
73
+ * touched/dirty/submitted. Gates the visual `<hlm-error>` (and
74
+ * `describedBy()`, where present) so sighted and screen-reader output agree.
75
+ */
76
+ showError() {
77
+ const control = this.formGroupDirective.form.get(this.controlName());
78
+ return (!!this.resolvedError() &&
79
+ !!control?.invalid &&
80
+ (control.dirty || control.touched || this.formGroupDirective.submitted));
81
+ }
82
+ /**
83
+ * Combined lock for the brain `linkedSignal`-based disabled state: the raw
84
+ * input write always carries the resolved value, so a same-pass
85
+ * wrapper-toggle + `control.disable()` cannot clobber CVA state.
86
+ */
87
+ effectiveDisabled() {
88
+ return this.disabled() || !!this.formGroupDirective.form.get(this.controlName())?.disabled;
89
+ }
90
+ describedBy() {
91
+ return this.showError() ? this.errorId() : this.hint() ? this.hintId() : null;
92
+ }
93
+ // Styling
94
+ userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
95
+ labelClass = input('', /* @ts-ignore */
96
+ ...(ngDevMode ? [{ debugName: "labelClass" }] : /* istanbul ignore next */ []));
97
+ groupClass = input('', /* @ts-ignore */
98
+ ...(ngDevMode ? [{ debugName: "groupClass" }] : /* istanbul ignore next */ []));
99
+ errorClass = input('', /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "errorClass" }] : /* istanbul ignore next */ []));
101
+ hintClass = input('', /* @ts-ignore */
102
+ ...(ngDevMode ? [{ debugName: "hintClass" }] : /* istanbul ignore next */ []));
103
+ // Computed classes (library base < global config < per-instance)
104
+ $userClass = computed(() => hlm('tw:w-full', this.userClass()), /* @ts-ignore */
105
+ ...(ngDevMode ? [{ debugName: "$userClass" }] : /* istanbul ignore next */ []));
106
+ $labelClass = computed(() => hlm('tw:mb-1', this._config.labelClass, this.labelClass()), /* @ts-ignore */
107
+ ...(ngDevMode ? [{ debugName: "$labelClass" }] : /* istanbul ignore next */ []));
108
+ $groupClass = computed(() => hlm('tw:flex tw:flex-col tw:gap-2', this._config.groupClass, this.groupClass()), /* @ts-ignore */
109
+ ...(ngDevMode ? [{ debugName: "$groupClass" }] : /* istanbul ignore next */ []));
110
+ $errorClass = computed(() => hlm('tw:mt-0', this._config.errorClass, this.errorClass()), /* @ts-ignore */
111
+ ...(ngDevMode ? [{ debugName: "$errorClass" }] : /* istanbul ignore next */ []));
112
+ $hintClass = computed(() => hlm('tw:mt-0', this._config.hintClass, this.hintClass()), /* @ts-ignore */
113
+ ...(ngDevMode ? [{ debugName: "$hintClass" }] : /* istanbul ignore next */ []));
114
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
115
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormRadioGroup, isStandalone: true, selector: "eg-form-radio-group", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", 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 }, groupClass: { classPropertyName: "groupClass", publicName: "groupClass", 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: `
116
+ @let lbl = label();
117
+ @let cnm = controlName();
118
+ @let hnt = hint();
119
+ @let rqrd = required();
120
+
121
+ <hlm-form-field>
122
+ @if (lbl) {
123
+ <span hlmLabel [class]="$labelClass()"
124
+ >{{ lbl }}
125
+ @if (rqrd) {
126
+ <span class="tw:text-red-500">*</span>
127
+ }
128
+ </span>
129
+ }
130
+
131
+ <hlm-radio-group
132
+ [formControlName]="cnm"
133
+ [name]="cnm || name() || ''"
134
+ [disabled]="effectiveDisabled()"
135
+ [required]="rqrd"
136
+ [class]="$groupClass()"
137
+ >
138
+ @for (option of options(); track option.value) {
139
+ <label class="tw:flex tw:items-center tw:gap-2">
140
+ <hlm-radio
141
+ [value]="option.value"
142
+ [disabled]="option.disabled ?? false"
143
+ [aria-describedby]="describedBy() ?? undefined"
144
+ >
145
+ <hlm-radio-indicator />
146
+ </hlm-radio>
147
+ <span>{{ option.label }}</span>
148
+ </label>
149
+ }
150
+ </hlm-radio-group>
151
+
152
+ @if (showError()) {
153
+ <hlm-error [id]="errorId()" [class]="$errorClass()">
154
+ {{ resolvedError() }}
155
+ </hlm-error>
156
+ }
157
+
158
+ @if (hnt) {
159
+ <hlm-hint [id]="hintId()" [class]="$hintClass()">
160
+ {{ hnt }}
161
+ </hlm-hint>
162
+ }
163
+ </hlm-form-field>
164
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { 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: "directive", type: HlmRadioGroup, selector: "[hlmRadioGroup],hlm-radio-group", inputs: ["class"] }, { kind: "component", type: HlmRadio, selector: "hlm-radio", inputs: ["class", "inputId", "aria-label", "aria-labelledby", "aria-describedby", "value", "required", "disabled"], outputs: ["change"] }, { kind: "component", type: HlmRadioIndicator, selector: "hlm-radio-indicator" }] });
165
+ }
166
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormRadioGroup, decorators: [{
167
+ type: Component,
168
+ args: [{
169
+ selector: 'eg-form-radio-group',
170
+ standalone: true,
171
+ host: {
172
+ '[class]': '$userClass()',
173
+ },
174
+ imports: [ReactiveFormsModule, HlmFormField, HlmError, HlmHint, HlmLabel, HlmRadioGroup, HlmRadio, HlmRadioIndicator],
175
+ providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
176
+ template: `
177
+ @let lbl = label();
178
+ @let cnm = controlName();
179
+ @let hnt = hint();
180
+ @let rqrd = required();
181
+
182
+ <hlm-form-field>
183
+ @if (lbl) {
184
+ <span hlmLabel [class]="$labelClass()"
185
+ >{{ lbl }}
186
+ @if (rqrd) {
187
+ <span class="tw:text-red-500">*</span>
188
+ }
189
+ </span>
190
+ }
191
+
192
+ <hlm-radio-group
193
+ [formControlName]="cnm"
194
+ [name]="cnm || name() || ''"
195
+ [disabled]="effectiveDisabled()"
196
+ [required]="rqrd"
197
+ [class]="$groupClass()"
198
+ >
199
+ @for (option of options(); track option.value) {
200
+ <label class="tw:flex tw:items-center tw:gap-2">
201
+ <hlm-radio
202
+ [value]="option.value"
203
+ [disabled]="option.disabled ?? false"
204
+ [aria-describedby]="describedBy() ?? undefined"
205
+ >
206
+ <hlm-radio-indicator />
207
+ </hlm-radio>
208
+ <span>{{ option.label }}</span>
209
+ </label>
210
+ }
211
+ </hlm-radio-group>
212
+
213
+ @if (showError()) {
214
+ <hlm-error [id]="errorId()" [class]="$errorClass()">
215
+ {{ resolvedError() }}
216
+ </hlm-error>
217
+ }
218
+
219
+ @if (hnt) {
220
+ <hlm-hint [id]="hintId()" [class]="$hintClass()">
221
+ {{ hnt }}
222
+ </hlm-hint>
223
+ }
224
+ </hlm-form-field>
225
+ `,
226
+ }]
227
+ }], 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], groupClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "groupClass", required: false }] }], errorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorClass", required: false }] }], hintClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintClass", required: false }] }] } });
228
+
229
+ /*
230
+ * Public API Surface of form-radio-group
231
+ */
232
+
233
+ /**
234
+ * Generated bundle index. Do not edit.
235
+ */
236
+
237
+ export { EgFormRadioGroup, injectEgFormRadioGroupConfig, provideEgFormRadioGroupConfig };
238
+
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "form-radio-group",
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-radio-group.mjs",
13
+ "typings": "types/form-radio-group.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./types/form-radio-group.d.ts",
20
+ "default": "./fesm2022/form-radio-group.mjs"
21
+ }
22
+ },
23
+ "type": "module"
24
+ }
@@ -0,0 +1,83 @@
1
+ import * as _angular_core from '@angular/core';
2
+ import { ValueProvider } from '@angular/core';
3
+ import { ClassValue } from 'clsx';
4
+
5
+ interface RadioOption {
6
+ value: string;
7
+ label: string;
8
+ disabled?: boolean;
9
+ }
10
+ declare class EgFormRadioGroup {
11
+ private readonly formGroupDirective;
12
+ private readonly _errorMessages;
13
+ private readonly generatedId;
14
+ private readonly _config;
15
+ label: _angular_core.InputSignal<string | undefined>;
16
+ controlId: _angular_core.InputSignal<string | undefined>;
17
+ controlName: _angular_core.InputSignal<string>;
18
+ error: _angular_core.InputSignal<string | undefined>;
19
+ /**
20
+ * Auto-resolve the displayed message from the control's `ValidationErrors`
21
+ * when `error()` is unset. Explicit `error()` always wins. Set to `false`
22
+ * for manual-only messages.
23
+ */
24
+ autoError: _angular_core.InputSignal<boolean>;
25
+ hint: _angular_core.InputSignal<string | undefined>;
26
+ id: _angular_core.InputSignal<string | undefined>;
27
+ name: _angular_core.InputSignal<string | undefined>;
28
+ disabled: _angular_core.InputSignal<boolean>;
29
+ required: _angular_core.InputSignal<boolean>;
30
+ options: _angular_core.InputSignal<RadioOption[]>;
31
+ readonly effectiveId: _angular_core.Signal<string>;
32
+ readonly errorId: _angular_core.Signal<string>;
33
+ readonly hintId: _angular_core.Signal<string>;
34
+ /**
35
+ * Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
36
+ * auto-resolved from the control's `ValidationErrors`. Plain method (not a
37
+ * computed): `ValidationErrors` is not a signal, so the control must be read
38
+ * fresh on every change-detection pass.
39
+ */
40
+ protected resolvedError(): string | undefined;
41
+ /**
42
+ * Whether the error is surfaced: message present + control invalid +
43
+ * touched/dirty/submitted. Gates the visual `<hlm-error>` (and
44
+ * `describedBy()`, where present) so sighted and screen-reader output agree.
45
+ */
46
+ protected showError(): boolean;
47
+ /**
48
+ * Combined lock for the brain `linkedSignal`-based disabled state: the raw
49
+ * input write always carries the resolved value, so a same-pass
50
+ * wrapper-toggle + `control.disable()` cannot clobber CVA state.
51
+ */
52
+ effectiveDisabled(): boolean;
53
+ describedBy(): string | null;
54
+ userClass: _angular_core.InputSignal<ClassValue>;
55
+ labelClass: _angular_core.InputSignal<string>;
56
+ groupClass: _angular_core.InputSignal<string>;
57
+ errorClass: _angular_core.InputSignal<string>;
58
+ hintClass: _angular_core.InputSignal<string>;
59
+ $userClass: _angular_core.Signal<string>;
60
+ $labelClass: _angular_core.Signal<string>;
61
+ $groupClass: _angular_core.Signal<string>;
62
+ $errorClass: _angular_core.Signal<string>;
63
+ $hintClass: _angular_core.Signal<string>;
64
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgFormRadioGroup, never>;
65
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormRadioGroup, "eg-form-radio-group", 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; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "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; }; "groupClass": { "alias": "groupClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
66
+ }
67
+
68
+ interface EgFormRadioGroupConfig {
69
+ /**
70
+ * Global class defaults for `eg-form-radio-group` styling slots.
71
+ * Each is merged under the matching per-instance `*Class` input
72
+ * (library base < global config < per-instance).
73
+ */
74
+ labelClass?: string;
75
+ groupClass?: string;
76
+ errorClass?: string;
77
+ hintClass?: string;
78
+ }
79
+ declare function provideEgFormRadioGroupConfig(config: Partial<EgFormRadioGroupConfig>): ValueProvider;
80
+ declare function injectEgFormRadioGroupConfig(): EgFormRadioGroupConfig;
81
+
82
+ export { EgFormRadioGroup, injectEgFormRadioGroupConfig, provideEgFormRadioGroupConfig };
83
+ export type { EgFormRadioGroupConfig };
@@ -77,23 +77,24 @@ Real selectors involved: `eg-form-searchable-multiselect` (this wrapper), `eg-fo
77
77
 
78
78
  ### `eg-form-searchable-multiselect` — `EgFormSearchableMultiselect`
79
79
 
80
- | Input | Type | Default | Description |
81
- | --------------------- | --------------------- | ------------------------ | --------------------------------------------------------------------------------------------------- |
82
- | `label` | `string \| undefined` | `undefined` | Field label. When set, a `<label hlmLabel>` bound to the control id is rendered. |
83
- | `controlName` | `string` | `''` | **Required.** Name of the control in the parent `FormGroup`; forwarded as `formControlName`. |
84
- | `controlId` | `string \| undefined` | `undefined` | Explicit control id. Falls back to `id`, then to a generated `eg-form-searchable-multiselect-…` id. |
85
- | `id` | `string \| undefined` | `undefined` | Alias for an explicit control id (same fallback chain as `controlId`). |
86
- | `error` | `string \| undefined` | `undefined` | Error text rendered in `<hlm-error>`. |
87
- | `hint` | `string \| undefined` | `undefined` | Hint text rendered in `<hlm-hint>`. |
88
- | `placeholder` | `string` | `'Start typing to add…'` | Placeholder forwarded to the inner multiselect. |
89
- | `disabled` | `boolean` | `false` | Wrapper-level disable, forwarded as `wrapperDisabled` to the inner multiselect. |
90
- | `required` | `boolean` | `false` | Adds `required` to the inner control and renders a red `*` next to the label. |
91
- | `options` | `SelectOption[]` | `[]` | `{ label: string; value: string }[]` forwarded to the inner multiselect. |
92
- | `class` (`userClass`) | `ClassValue` | `''` | Extra classes for the host (merged over `tw:flex tw:flex-col`). |
93
- | `labelClass` | `string` | `''` | Extra classes for the `<label>` (merged over `tw:mb-1 tw:gap-0`). |
94
- | `controlClass` | `string` | `''` | Extra classes for the inner multiselect (merged over `tw:w-full`). |
95
- | `errorClass` | `string` | `''` | Extra classes for `<hlm-error>` (merged over `tw:mt-0`). |
96
- | `hintClass` | `string` | `''` | Extra classes for `<hlm-hint>` (merged over `tw:mt-0`). |
80
+ | Input | Type | Default | Description |
81
+ | --------------------- | --------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
82
+ | `label` | `string \| undefined` | `undefined` | Field label. When set, a `<label hlmLabel>` bound to the control id is rendered. |
83
+ | `controlName` | `string` | `''` | **Required.** Name of the control in the parent `FormGroup`; forwarded as `formControlName`. |
84
+ | `controlId` | `string \| undefined` | `undefined` | Explicit control id. Falls back to `id`, then to a generated `eg-form-searchable-multiselect-…` id. |
85
+ | `id` | `string \| undefined` | `undefined` | Alias for an explicit control id (same fallback chain as `controlId`). |
86
+ | `error` | `string \| undefined` | `undefined` | Error text rendered in `<hlm-error>`. |
87
+ | `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`. |
88
+ | `hint` | `string \| undefined` | `undefined` | Hint text rendered in `<hlm-hint>`. |
89
+ | `placeholder` | `string` | `'Start typing to add…'` | Placeholder forwarded to the inner multiselect. |
90
+ | `disabled` | `boolean` | `false` | Wrapper-level disable, forwarded as `wrapperDisabled` to the inner multiselect. |
91
+ | `required` | `boolean` | `false` | Adds `required` to the inner control and renders a red `*` next to the label. |
92
+ | `options` | `SelectOption[]` | `[]` | `{ label: string; value: string }[]` forwarded to the inner multiselect. |
93
+ | `class` (`userClass`) | `ClassValue` | `''` | Extra classes for the host (merged over `tw:w-full`). |
94
+ | `labelClass` | `string` | `''` | Extra classes for the `<label>` (merged over `tw:mb-1 tw:gap-0`). |
95
+ | `controlClass` | `string` | `''` | Extra classes for the inner multiselect (merged over `tw:w-full`). |
96
+ | `errorClass` | `string` | `''` | Extra classes for `<hlm-error>` (merged over `tw:mt-0`). |
97
+ | `hintClass` | `string` | `''` | Extra classes for `<hlm-hint>` (merged over `tw:mt-0`). |
97
98
 
98
99
  No outputs. Readonly computeds/methods (usable via template ref): `effectiveId()`, `errorId()` (`<id>-error`), `hintId()` (`<id>-hint`), `describedBy(): string | null` (returns the error id when the control is invalid + dirty/touched, else the hint id, else `null`).
99
100
 
@@ -354,6 +355,16 @@ export class ProgrammaticExample {
354
355
 
355
356
  No component-specific CSS variables; styling flows through the shared theme tokens (`--radius`, `--popover`, `--ring`, …) consumed by the inner popover/checkbox classes. Use `class` / `labelClass` / `controlClass` / `errorClass` / `hintClass` to append utilities.
356
357
 
358
+ Global defaults per styling slot via the wrapper config (precedence: library base < global config < per-instance):
359
+
360
+ ```ts
361
+ import { provideEgFormSearchableMultiselectConfig } from '@egose/shadcn-theme-ng/form-searchable-multiselect';
362
+
363
+ await bootstrapApplication(App, {
364
+ providers: [provideEgFormSearchableMultiselectConfig({ controlClass: 'tw:text-sm', labelClass: 'tw:font-medium' })],
365
+ });
366
+ ```
367
+
357
368
  ## Related subpaths
358
369
 
359
370
  - `@egose/shadcn-theme-ng/searchable-multiselect` — the underlying `EgSearchableMultiselect` + `SelectOption` (use it directly for template-driven or non-form usage).
@@ -1,16 +1,26 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, computed, Component } from '@angular/core';
2
+ import { InjectionToken, 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
5
  import { HlmLabel } from '@egose/shadcn-theme-ng-tw/label';
6
6
  import { EgFormField } from '@egose/shadcn-theme-ng-tw/form-field-simple';
7
- import { HlmFormIdGenerator, HlmError, HlmHint } from '@egose/shadcn-theme-ng-tw/form-field';
7
+ import { injectEgFormErrorMessages, HlmFormIdGenerator, resolveEgFormError, HlmError, HlmHint } from '@egose/shadcn-theme-ng-tw/form-field';
8
8
  import { hlm } from '@egose/shadcn-theme-ng-tw/utils';
9
9
  import { EgSearchableMultiselect } from '@egose/shadcn-theme-ng-tw/searchable-multiselect';
10
10
 
11
+ const EgFormSearchableMultiselectConfigToken = new InjectionToken('EgFormSearchableMultiselectConfig');
12
+ function provideEgFormSearchableMultiselectConfig(config) {
13
+ return { provide: EgFormSearchableMultiselectConfigToken, useValue: { ...config } };
14
+ }
15
+ function injectEgFormSearchableMultiselectConfig() {
16
+ return inject(EgFormSearchableMultiselectConfigToken, { optional: true }) ?? {};
17
+ }
18
+
11
19
  class EgFormSearchableMultiselect {
12
20
  formGroupDirective = inject(FormGroupDirective);
21
+ _errorMessages = injectEgFormErrorMessages();
13
22
  generatedId = inject(HlmFormIdGenerator).generate('eg-form-searchable-multiselect');
23
+ _config = injectEgFormSearchableMultiselectConfig();
14
24
  // Form field inputs
15
25
  label = input(undefined, /* @ts-ignore */
16
26
  ...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
@@ -20,6 +30,13 @@ class EgFormSearchableMultiselect {
20
30
  ...(ngDevMode ? [{ debugName: "controlName" }] : /* istanbul ignore next */ [])); // required for form binding
21
31
  error = input(undefined, /* @ts-ignore */
22
32
  ...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
33
+ /**
34
+ * Auto-resolve the displayed message from the control's `ValidationErrors`
35
+ * when `error()` is unset. Explicit `error()` always wins. Set to `false`
36
+ * for manual-only messages.
37
+ */
38
+ autoError = input(true, /* @ts-ignore */
39
+ ...(ngDevMode ? [{ debugName: "autoError" }] : /* istanbul ignore next */ []));
23
40
  hint = input(undefined, /* @ts-ignore */
24
41
  ...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
25
42
  // HTML/control attributes
@@ -37,13 +54,34 @@ class EgFormSearchableMultiselect {
37
54
  ...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
38
55
  hintId = computed(() => `${this.effectiveId()}-hint`, /* @ts-ignore */
39
56
  ...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
40
- describedBy() {
57
+ /**
58
+ * Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
59
+ * auto-resolved from the control's `ValidationErrors`. Plain method (not a
60
+ * computed): `ValidationErrors` is not a signal, so the control must be read
61
+ * fresh on every change-detection pass.
62
+ */
63
+ resolvedError() {
64
+ const explicit = this.error();
65
+ if (explicit)
66
+ return explicit;
67
+ if (!this.autoError())
68
+ return undefined;
41
69
  const control = this.formGroupDirective.form.get(this.controlName());
42
- return this.error() && control?.invalid && (control.dirty || control.touched)
43
- ? this.errorId()
44
- : this.hint()
45
- ? this.hintId()
46
- : null;
70
+ return resolveEgFormError(control?.errors ?? null, this.label(), this._errorMessages);
71
+ }
72
+ /**
73
+ * Whether the error is surfaced: message present + control invalid +
74
+ * touched/dirty/submitted. Gates the visual `<hlm-error>` (and
75
+ * `describedBy()`, where present) so sighted and screen-reader output agree.
76
+ */
77
+ showError() {
78
+ const control = this.formGroupDirective.form.get(this.controlName());
79
+ return (!!this.resolvedError() &&
80
+ !!control?.invalid &&
81
+ (control.dirty || control.touched || this.formGroupDirective.submitted));
82
+ }
83
+ describedBy() {
84
+ return this.showError() ? this.errorId() : this.hint() ? this.hintId() : null;
47
85
  }
48
86
  // Multiselect-specific
49
87
  options = input([], /* @ts-ignore */
@@ -58,22 +96,21 @@ class EgFormSearchableMultiselect {
58
96
  ...(ngDevMode ? [{ debugName: "errorClass" }] : /* istanbul ignore next */ []));
59
97
  hintClass = input('', /* @ts-ignore */
60
98
  ...(ngDevMode ? [{ debugName: "hintClass" }] : /* istanbul ignore next */ []));
61
- // Computed class names
62
- $userClass = computed(() => hlm('tw:flex tw:flex-col', this.userClass()), /* @ts-ignore */
99
+ // Computed class names (library base < global config < per-instance)
100
+ $userClass = computed(() => hlm('tw:w-full', this.userClass()), /* @ts-ignore */
63
101
  ...(ngDevMode ? [{ debugName: "$userClass" }] : /* istanbul ignore next */ []));
64
- $labelClass = computed(() => hlm('tw:mb-1 tw:gap-0', this.labelClass()), /* @ts-ignore */
102
+ $labelClass = computed(() => hlm('tw:mb-1 tw:gap-0', this._config.labelClass, this.labelClass()), /* @ts-ignore */
65
103
  ...(ngDevMode ? [{ debugName: "$labelClass" }] : /* istanbul ignore next */ []));
66
- $controlClass = computed(() => hlm('tw:w-full', this.controlClass()), /* @ts-ignore */
104
+ $controlClass = computed(() => hlm('tw:w-full', this._config.controlClass, this.controlClass()), /* @ts-ignore */
67
105
  ...(ngDevMode ? [{ debugName: "$controlClass" }] : /* istanbul ignore next */ []));
68
- $errorClass = computed(() => hlm('tw:mt-0', this.errorClass()), /* @ts-ignore */
106
+ $errorClass = computed(() => hlm('tw:mt-0', this._config.errorClass, this.errorClass()), /* @ts-ignore */
69
107
  ...(ngDevMode ? [{ debugName: "$errorClass" }] : /* istanbul ignore next */ []));
70
- $hintClass = computed(() => hlm('tw:mt-0', this.hintClass()), /* @ts-ignore */
108
+ $hintClass = computed(() => hlm('tw:mt-0', this._config.hintClass, this.hintClass()), /* @ts-ignore */
71
109
  ...(ngDevMode ? [{ debugName: "$hintClass" }] : /* istanbul ignore next */ []));
72
110
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormSearchableMultiselect, deps: [], target: i0.ɵɵFactoryTarget.Component });
73
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormSearchableMultiselect, isStandalone: true, selector: "eg-form-searchable-multiselect", 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 }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, options: { classPropertyName: "options", publicName: "options", 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 }, controlClass: { classPropertyName: "controlClass", publicName: "controlClass", 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: `
111
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormSearchableMultiselect, isStandalone: true, selector: "eg-form-searchable-multiselect", 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 }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", 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 }, options: { classPropertyName: "options", publicName: "options", 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 }, controlClass: { classPropertyName: "controlClass", publicName: "controlClass", 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: `
74
112
  @let lbl = label();
75
113
  @let cnm = controlName();
76
- @let err = error();
77
114
  @let hnt = hint();
78
115
  @let rqrd = required();
79
116
 
@@ -99,9 +136,9 @@ class EgFormSearchableMultiselect {
99
136
  [class]="$controlClass()"
100
137
  ></eg-searchable-multiselect>
101
138
 
102
- @if (err) {
139
+ @if (showError()) {
103
140
  <hlm-error [id]="errorId()" [class]="$errorClass()">
104
- {{ err }}
141
+ {{ resolvedError() }}
105
142
  </hlm-error>
106
143
  }
107
144
  @if (hnt) {
@@ -118,14 +155,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
118
155
  selector: 'eg-form-searchable-multiselect',
119
156
  standalone: true,
120
157
  host: {
121
- class: 'tw:w-full',
158
+ '[class]': '$userClass()',
122
159
  },
123
160
  imports: [ReactiveFormsModule, EgFormField, HlmError, HlmHint, HlmLabel, EgSearchableMultiselect],
124
161
  providers: [{ provide: ControlContainer, useExisting: FormGroupDirective }],
125
162
  template: `
126
163
  @let lbl = label();
127
164
  @let cnm = controlName();
128
- @let err = error();
129
165
  @let hnt = hint();
130
166
  @let rqrd = required();
131
167
 
@@ -151,9 +187,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
151
187
  [class]="$controlClass()"
152
188
  ></eg-searchable-multiselect>
153
189
 
154
- @if (err) {
190
+ @if (showError()) {
155
191
  <hlm-error [id]="errorId()" [class]="$errorClass()">
156
- {{ err }}
192
+ {{ resolvedError() }}
157
193
  </hlm-error>
158
194
  }
159
195
  @if (hnt) {
@@ -164,7 +200,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
164
200
  </eg-form-field>
165
201
  `,
166
202
  }]
167
- }], 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 }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], controlClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlClass", required: false }] }], errorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorClass", required: false }] }], hintClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintClass", required: false }] }] } });
203
+ }], 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 }] }], placeholder: [{ type: i0.Input, args: [{ isSignal: true, alias: "placeholder", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], controlClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlClass", required: false }] }], errorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorClass", required: false }] }], hintClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintClass", required: false }] }] } });
168
204
 
169
205
  /*
170
206
  * Public API Surface of form-searchable-multiselect
@@ -174,5 +210,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImpor
174
210
  * Generated bundle index. Do not edit.
175
211
  */
176
212
 
177
- export { EgFormSearchableMultiselect };
213
+ export { EgFormSearchableMultiselect, injectEgFormSearchableMultiselectConfig, provideEgFormSearchableMultiselectConfig };
178
214