@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.
- package/README.md +1 -1
- package/autocomplete/fesm2022/autocomplete.mjs +1 -1
- package/checkbox/fesm2022/checkbox.mjs +6 -7
- package/checkbox/types/checkbox.d.ts +1 -1
- package/combobox/fesm2022/combobox.mjs +1 -1
- package/date-picker/README.md +15 -11
- package/date-picker/fesm2022/date-picker.mjs +148 -30
- package/date-picker/types/date-picker.d.ts +102 -9
- package/form-autocomplete/README.md +178 -0
- package/form-autocomplete/fesm2022/form-autocomplete.mjs +159 -0
- package/form-autocomplete/package.json +24 -0
- package/form-autocomplete/types/form-autocomplete.d.ts +81 -0
- package/form-checkbox/README.md +29 -18
- package/form-checkbox/fesm2022/form-checkbox.mjs +59 -17
- package/form-checkbox/types/form-checkbox.d.ts +43 -4
- package/form-combobox/README.md +203 -0
- package/form-combobox/fesm2022/form-combobox.mjs +181 -0
- package/form-combobox/package.json +24 -0
- package/form-combobox/types/form-combobox.d.ts +93 -0
- package/form-date-picker/README.md +49 -22
- package/form-date-picker/fesm2022/form-date-picker.mjs +74 -19
- package/form-date-picker/types/form-date-picker.d.ts +37 -1
- package/form-date-picker-multi/README.md +192 -0
- package/form-date-picker-multi/fesm2022/form-date-picker-multi.mjs +158 -0
- package/form-date-picker-multi/package.json +24 -0
- package/form-date-picker-multi/types/form-date-picker-multi.d.ts +78 -0
- package/form-date-range-picker/README.md +254 -0
- package/form-date-range-picker/fesm2022/form-date-range-picker.mjs +159 -0
- package/form-date-range-picker/package.json +24 -0
- package/form-date-range-picker/types/form-date-range-picker.d.ts +75 -0
- package/form-field/README.md +9 -0
- package/form-field/fesm2022/form-field.mjs +80 -5
- package/form-field/types/form-field.d.ts +50 -2
- package/form-field-simple/fesm2022/form-field-simple.mjs +15 -1
- package/form-field-simple/types/form-field-simple.d.ts +9 -2
- package/form-input-otp/README.md +195 -0
- package/form-input-otp/fesm2022/form-input-otp.mjs +140 -0
- package/form-input-otp/package.json +24 -0
- package/form-input-otp/types/form-input-otp.d.ts +78 -0
- package/form-month-year-picker/README.md +189 -0
- package/form-month-year-picker/fesm2022/form-month-year-picker.mjs +154 -0
- package/form-month-year-picker/package.json +24 -0
- package/form-month-year-picker/types/form-month-year-picker.d.ts +73 -0
- package/form-native-select/README.md +206 -0
- package/form-native-select/fesm2022/form-native-select.mjs +132 -0
- package/form-native-select/package.json +24 -0
- package/form-native-select/types/form-native-select.d.ts +77 -0
- package/form-phone-input/README.md +189 -0
- package/form-phone-input/fesm2022/form-phone-input.mjs +142 -0
- package/form-phone-input/package.json +24 -0
- package/form-phone-input/types/form-phone-input.d.ts +78 -0
- package/form-radio-group/README.md +199 -0
- package/form-radio-group/fesm2022/form-radio-group.mjs +140 -0
- package/form-radio-group/package.json +24 -0
- package/form-radio-group/types/form-radio-group.d.ts +83 -0
- package/form-searchable-multiselect/README.md +28 -17
- package/form-searchable-multiselect/fesm2022/form-searchable-multiselect.mjs +57 -19
- package/form-searchable-multiselect/types/form-searchable-multiselect.d.ts +39 -2
- package/form-select/README.md +30 -19
- package/form-select/fesm2022/form-select.mjs +57 -19
- package/form-select/types/form-select.d.ts +39 -2
- package/form-slider/README.md +183 -0
- package/form-slider/fesm2022/form-slider.mjs +140 -0
- package/form-slider/package.json +24 -0
- package/form-slider/types/form-slider.d.ts +80 -0
- package/form-switch/README.md +174 -0
- package/form-switch/fesm2022/form-switch.mjs +129 -0
- package/form-switch/package.json +24 -0
- package/form-switch/types/form-switch.d.ts +70 -0
- package/form-text-input/README.md +37 -26
- package/form-text-input/fesm2022/form-text-input.mjs +57 -19
- package/form-text-input/types/form-text-input.d.ts +39 -2
- package/form-textarea/README.md +33 -22
- package/form-textarea/fesm2022/form-textarea.mjs +57 -19
- package/form-textarea/types/form-textarea.d.ts +39 -2
- package/form-toggle/README.md +187 -0
- package/form-toggle/fesm2022/form-toggle.mjs +193 -0
- package/form-toggle/package.json +24 -0
- package/form-toggle/types/form-toggle.d.ts +100 -0
- package/form-toggle-group/README.md +177 -0
- package/form-toggle-group/fesm2022/form-toggle-group.mjs +145 -0
- package/form-toggle-group/package.json +24 -0
- package/form-toggle-group/types/form-toggle-group.d.ts +85 -0
- package/input-group/fesm2022/input-group.mjs +19 -9
- package/input-group/types/input-group.d.ts +4 -1
- package/native-select/fesm2022/native-select.mjs +18 -6
- package/native-select/types/native-select.d.ts +7 -2
- package/package.json +57 -1
- package/phone-input/README.md +114 -0
- package/phone-input/fesm2022/phone-input.mjs +191 -0
- package/phone-input/package.json +24 -0
- package/phone-input/types/phone-input.d.ts +67 -0
- package/radio-group/types/radio-group.d.ts +1 -1
- package/switch/fesm2022/switch.mjs +7 -5
- package/switch/types/switch.d.ts +2 -1
- package/typography/types/typography.d.ts +8 -8
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, forwardRef, Injector, DestroyRef, input, booleanAttribute, computed, signal, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
|
4
|
+
import { NG_VALUE_ACCESSOR, FormGroupDirective, FormControlName } from '@angular/forms';
|
|
5
|
+
import { HlmFormIdGenerator, injectEgFormErrorMessages, resolveEgFormError, HlmError, HlmHint } from '@egose/shadcn-theme-ng/form-field';
|
|
6
|
+
import { HlmLabel } from '@egose/shadcn-theme-ng/label';
|
|
7
|
+
import { HlmToggle } from '@egose/shadcn-theme-ng/toggle';
|
|
8
|
+
import { hlm } from '@egose/shadcn-theme-ng/utils';
|
|
9
|
+
import { NgIcon, provideIcons } from '@ng-icons/core';
|
|
10
|
+
import { lucideCheck } from '@ng-icons/lucide';
|
|
11
|
+
|
|
12
|
+
const EgFormToggleConfigToken = new InjectionToken('EgFormToggleConfig');
|
|
13
|
+
function provideEgFormToggleConfig(config) {
|
|
14
|
+
return { provide: EgFormToggleConfigToken, useValue: { ...config } };
|
|
15
|
+
}
|
|
16
|
+
function injectEgFormToggleConfig() {
|
|
17
|
+
return inject(EgFormToggleConfigToken, { optional: true }) ?? {};
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const EG_FORM_TOGGLE_VALUE_ACCESSOR = {
|
|
21
|
+
provide: NG_VALUE_ACCESSOR,
|
|
22
|
+
useExisting: forwardRef(() => EgFormToggle),
|
|
23
|
+
multi: true,
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* A single boolean toggle bound to ReactiveForms.
|
|
27
|
+
*
|
|
28
|
+
* Unlike the other `eg-form-*` wrappers, the toggle itself is the
|
|
29
|
+
* `ControlValueAccessor` (`BrnToggle` exposes no CVA): bind `formControlName`
|
|
30
|
+
* directly on this element instead of using a `controlName` input.
|
|
31
|
+
*/
|
|
32
|
+
class EgFormToggle {
|
|
33
|
+
generatedId = inject(HlmFormIdGenerator).generate('eg-form-toggle');
|
|
34
|
+
_config = injectEgFormToggleConfig();
|
|
35
|
+
_injector = inject(Injector);
|
|
36
|
+
_destroyRef = inject(DestroyRef);
|
|
37
|
+
_formGroupDirective = inject(FormGroupDirective, { optional: true });
|
|
38
|
+
_errorMessages = injectEgFormErrorMessages();
|
|
39
|
+
_controlDir = null;
|
|
40
|
+
label = input(undefined, /* @ts-ignore */
|
|
41
|
+
...(ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []));
|
|
42
|
+
controlId = input(undefined, /* @ts-ignore */
|
|
43
|
+
...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
|
|
44
|
+
error = input(undefined, /* @ts-ignore */
|
|
45
|
+
...(ngDevMode ? [{ debugName: "error" }] : /* istanbul ignore next */ []));
|
|
46
|
+
/**
|
|
47
|
+
* Auto-resolve the displayed message from the control's `ValidationErrors`
|
|
48
|
+
* when `error()` is unset. Explicit `error()` always wins. Set to `false`
|
|
49
|
+
* for manual-only messages.
|
|
50
|
+
*/
|
|
51
|
+
autoError = input(true, /* @ts-ignore */
|
|
52
|
+
...(ngDevMode ? [{ debugName: "autoError" }] : /* istanbul ignore next */ []));
|
|
53
|
+
hint = input(undefined, /* @ts-ignore */
|
|
54
|
+
...(ngDevMode ? [{ debugName: "hint" }] : /* istanbul ignore next */ []));
|
|
55
|
+
id = input(undefined, /* @ts-ignore */
|
|
56
|
+
...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
|
|
57
|
+
disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
58
|
+
required = input(false, /* @ts-ignore */
|
|
59
|
+
...(ngDevMode ? [{ debugName: "required" }] : /* istanbul ignore next */ []));
|
|
60
|
+
variant = input('default', /* @ts-ignore */
|
|
61
|
+
...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
|
|
62
|
+
size = input('default', /* @ts-ignore */
|
|
63
|
+
...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
|
|
64
|
+
effectiveId = computed(() => this.controlId() || this.id() || this.generatedId, /* @ts-ignore */
|
|
65
|
+
...(ngDevMode ? [{ debugName: "effectiveId" }] : /* istanbul ignore next */ []));
|
|
66
|
+
errorId = computed(() => `${this.effectiveId()}-error`, /* @ts-ignore */
|
|
67
|
+
...(ngDevMode ? [{ debugName: "errorId" }] : /* istanbul ignore next */ []));
|
|
68
|
+
hintId = computed(() => `${this.effectiveId()}-hint`, /* @ts-ignore */
|
|
69
|
+
...(ngDevMode ? [{ debugName: "hintId" }] : /* istanbul ignore next */ []));
|
|
70
|
+
_state = signal(false, /* @ts-ignore */
|
|
71
|
+
...(ngDevMode ? [{ debugName: "_state" }] : /* istanbul ignore next */ []));
|
|
72
|
+
_formDisabled = signal(false, /* @ts-ignore */
|
|
73
|
+
...(ngDevMode ? [{ debugName: "_formDisabled" }] : /* istanbul ignore next */ []));
|
|
74
|
+
_disabled = computed(() => this.disabled() || this._formDisabled(), /* @ts-ignore */
|
|
75
|
+
...(ngDevMode ? [{ debugName: "_disabled" }] : /* istanbul ignore next */ []));
|
|
76
|
+
_status = signal(null, /* @ts-ignore */
|
|
77
|
+
...(ngDevMode ? [{ debugName: "_status" }] : /* istanbul ignore next */ []));
|
|
78
|
+
_submitted = signal(false, /* @ts-ignore */
|
|
79
|
+
...(ngDevMode ? [{ debugName: "_submitted" }] : /* istanbul ignore next */ []));
|
|
80
|
+
/**
|
|
81
|
+
* Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
|
|
82
|
+
* auto-resolved from the control's `ValidationErrors`. Plain method (not a
|
|
83
|
+
* computed): `ValidationErrors` is not a signal, so the control must be read
|
|
84
|
+
* fresh on every change-detection pass (`showError()` re-evaluates with it
|
|
85
|
+
* via the `_status`/`_submitted` signals).
|
|
86
|
+
*/
|
|
87
|
+
resolvedError() {
|
|
88
|
+
const explicit = this.error();
|
|
89
|
+
if (explicit)
|
|
90
|
+
return explicit;
|
|
91
|
+
if (!this.autoError())
|
|
92
|
+
return undefined;
|
|
93
|
+
return resolveEgFormError(this._controlDir?.control?.errors ?? null, this.label(), this._errorMessages);
|
|
94
|
+
}
|
|
95
|
+
showError = computed(() => {
|
|
96
|
+
this._status();
|
|
97
|
+
this._submitted();
|
|
98
|
+
const control = this._controlDir?.control;
|
|
99
|
+
return (!!this.resolvedError() &&
|
|
100
|
+
!!control?.errors &&
|
|
101
|
+
(control.touched || control.dirty || !!this._formGroupDirective?.submitted));
|
|
102
|
+
}, /* @ts-ignore */
|
|
103
|
+
...(ngDevMode ? [{ debugName: "showError" }] : /* istanbul ignore next */ []));
|
|
104
|
+
showHint = computed(() => !this.showError() && !!this.hint(), /* @ts-ignore */
|
|
105
|
+
...(ngDevMode ? [{ debugName: "showHint" }] : /* istanbul ignore next */ []));
|
|
106
|
+
_onChange;
|
|
107
|
+
_onTouched;
|
|
108
|
+
ngDoCheck() {
|
|
109
|
+
const submitted = !!this._formGroupDirective?.submitted;
|
|
110
|
+
if (this._submitted() !== submitted)
|
|
111
|
+
this._submitted.set(submitted);
|
|
112
|
+
}
|
|
113
|
+
ngAfterViewInit() {
|
|
114
|
+
// Resolved here (not earlier): this component IS the value accessor for
|
|
115
|
+
// the host FormControlName, so eager self-injection would close a
|
|
116
|
+
// circular dependency (NG0200) — and the directive's `control` is only
|
|
117
|
+
// assigned once its own setup has run.
|
|
118
|
+
this._controlDir = this._injector.get(FormControlName, null, { self: true, optional: true }) ?? null;
|
|
119
|
+
const control = this._controlDir?.control;
|
|
120
|
+
this._status.set(control?.status ?? null);
|
|
121
|
+
control?.statusChanges.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((status) => {
|
|
122
|
+
this._status.set(status);
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
_handleStateChange(state) {
|
|
126
|
+
// BrnToggle speaks 'on'/'off' strings; the form model stays boolean.
|
|
127
|
+
const on = state === 'on';
|
|
128
|
+
this._state.set(on);
|
|
129
|
+
this._onChange?.(on);
|
|
130
|
+
this._onTouched?.();
|
|
131
|
+
}
|
|
132
|
+
/** CONTROL VALUE ACCESSOR */
|
|
133
|
+
writeValue(value) {
|
|
134
|
+
this._state.set(!!value);
|
|
135
|
+
}
|
|
136
|
+
registerOnChange(fn) {
|
|
137
|
+
this._onChange = fn;
|
|
138
|
+
}
|
|
139
|
+
registerOnTouched(fn) {
|
|
140
|
+
this._onTouched = fn;
|
|
141
|
+
}
|
|
142
|
+
setDisabledState(isDisabled) {
|
|
143
|
+
this._formDisabled.set(isDisabled);
|
|
144
|
+
}
|
|
145
|
+
// Styling
|
|
146
|
+
userClass = input('', { ...(ngDevMode ? { debugName: "userClass" } : /* istanbul ignore next */ {}), alias: 'class' });
|
|
147
|
+
toggleClass = input('', /* @ts-ignore */
|
|
148
|
+
...(ngDevMode ? [{ debugName: "toggleClass" }] : /* istanbul ignore next */ []));
|
|
149
|
+
labelClass = input('', /* @ts-ignore */
|
|
150
|
+
...(ngDevMode ? [{ debugName: "labelClass" }] : /* istanbul ignore next */ []));
|
|
151
|
+
errorClass = input('', /* @ts-ignore */
|
|
152
|
+
...(ngDevMode ? [{ debugName: "errorClass" }] : /* istanbul ignore next */ []));
|
|
153
|
+
hintClass = input('', /* @ts-ignore */
|
|
154
|
+
...(ngDevMode ? [{ debugName: "hintClass" }] : /* istanbul ignore next */ []));
|
|
155
|
+
// Computed classes (library base < global config < per-instance)
|
|
156
|
+
$userClass = computed(() => hlm("w-full", this.userClass()), /* @ts-ignore */
|
|
157
|
+
...(ngDevMode ? [{ debugName: "$userClass" }] : /* istanbul ignore next */ []));
|
|
158
|
+
$toggleClass = computed(() => hlm(this._config.toggleClass, this.toggleClass()), /* @ts-ignore */
|
|
159
|
+
...(ngDevMode ? [{ debugName: "$toggleClass" }] : /* istanbul ignore next */ []));
|
|
160
|
+
$labelClass = computed(() => hlm(this._config.labelClass, this.labelClass()), /* @ts-ignore */
|
|
161
|
+
...(ngDevMode ? [{ debugName: "$labelClass" }] : /* istanbul ignore next */ []));
|
|
162
|
+
$errorClass = computed(() => hlm("mt-0", this._config.errorClass, this.errorClass()), /* @ts-ignore */
|
|
163
|
+
...(ngDevMode ? [{ debugName: "$errorClass" }] : /* istanbul ignore next */ []));
|
|
164
|
+
$hintClass = computed(() => hlm("mt-0", this._config.hintClass, this.hintClass()), /* @ts-ignore */
|
|
165
|
+
...(ngDevMode ? [{ debugName: "$hintClass" }] : /* istanbul ignore next */ []));
|
|
166
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormToggle, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
167
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.1.3", type: EgFormToggle, isStandalone: true, selector: "eg-form-toggle", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, controlId: { classPropertyName: "controlId", publicName: "controlId", 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 }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, userClass: { classPropertyName: "userClass", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, toggleClass: { classPropertyName: "toggleClass", publicName: "toggleClass", isSignal: true, isRequired: false, transformFunction: null }, labelClass: { classPropertyName: "labelClass", publicName: "labelClass", 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: [EG_FORM_TOGGLE_VALUE_ACCESSOR, provideIcons({ lucideCheck })], ngImport: i0, template: "\n @let lbl = label();\n @let rqrd = required();\n\n <div>\n <div class=\"flex items-center gap-1\">\n <button\n hlmToggle\n type=\"button\"\n [id]=\"effectiveId()\"\n [state]=\"_state() ? 'on' : 'off'\"\n (stateChange)=\"_handleStateChange($event)\"\n [disabled]=\"_disabled()\"\n [variant]=\"variant()\"\n [size]=\"size()\"\n [class]=\"$toggleClass()\"\n >\n @if (_state()) {\n <ng-icon name=\"lucideCheck\" />\n }\n </button>\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 </div>\n\n @if (showError()) {\n <hlm-error [id]=\"errorId()\" [class]=\"$errorClass()\">\n {{ resolvedError() }}\n </hlm-error>\n } @else if (showHint()) {\n <hlm-hint [id]=\"hintId()\" [class]=\"$hintClass()\">\n {{ hint() }}\n </hlm-hint>\n }\n </div>\n ", isInline: true, dependencies: [{ kind: "directive", type: HlmToggle, selector: "button[hlmToggle]", inputs: ["variant", "size"] }, { 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: NgIcon, selector: "ng-icon", inputs: ["name", "svg", "size", "strokeWidth", "color"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
168
|
+
}
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: EgFormToggle, decorators: [{
|
|
170
|
+
type: Component,
|
|
171
|
+
args: [{
|
|
172
|
+
selector: 'eg-form-toggle',
|
|
173
|
+
standalone: true,
|
|
174
|
+
host: {
|
|
175
|
+
'[class]': '$userClass()',
|
|
176
|
+
},
|
|
177
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
178
|
+
imports: [HlmToggle, HlmError, HlmHint, HlmLabel, NgIcon],
|
|
179
|
+
providers: [EG_FORM_TOGGLE_VALUE_ACCESSOR, provideIcons({ lucideCheck })],
|
|
180
|
+
template: "\n @let lbl = label();\n @let rqrd = required();\n\n <div>\n <div class=\"flex items-center gap-1\">\n <button\n hlmToggle\n type=\"button\"\n [id]=\"effectiveId()\"\n [state]=\"_state() ? 'on' : 'off'\"\n (stateChange)=\"_handleStateChange($event)\"\n [disabled]=\"_disabled()\"\n [variant]=\"variant()\"\n [size]=\"size()\"\n [class]=\"$toggleClass()\"\n >\n @if (_state()) {\n <ng-icon name=\"lucideCheck\" />\n }\n </button>\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 </div>\n\n @if (showError()) {\n <hlm-error [id]=\"errorId()\" [class]=\"$errorClass()\">\n {{ resolvedError() }}\n </hlm-error>\n } @else if (showHint()) {\n <hlm-hint [id]=\"hintId()\" [class]=\"$hintClass()\">\n {{ hint() }}\n </hlm-hint>\n }\n </div>\n ",
|
|
181
|
+
}]
|
|
182
|
+
}], propDecorators: { label: [{ type: i0.Input, args: [{ isSignal: true, alias: "label", required: false }] }], controlId: [{ type: i0.Input, args: [{ isSignal: true, alias: "controlId", 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 }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], userClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "class", required: false }] }], toggleClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "toggleClass", required: false }] }], labelClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "labelClass", required: false }] }], errorClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorClass", required: false }] }], hintClass: [{ type: i0.Input, args: [{ isSignal: true, alias: "hintClass", required: false }] }] } });
|
|
183
|
+
|
|
184
|
+
/*
|
|
185
|
+
* Public API Surface of form-toggle
|
|
186
|
+
*/
|
|
187
|
+
|
|
188
|
+
/**
|
|
189
|
+
* Generated bundle index. Do not edit.
|
|
190
|
+
*/
|
|
191
|
+
|
|
192
|
+
export { EG_FORM_TOGGLE_VALUE_ACCESSOR, EgFormToggle, injectEgFormToggleConfig, provideEgFormToggleConfig };
|
|
193
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "form-toggle",
|
|
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-toggle.mjs",
|
|
13
|
+
"typings": "types/form-toggle.d.ts",
|
|
14
|
+
"exports": {
|
|
15
|
+
"./package.json": {
|
|
16
|
+
"default": "./package.json"
|
|
17
|
+
},
|
|
18
|
+
".": {
|
|
19
|
+
"types": "./types/form-toggle.d.ts",
|
|
20
|
+
"default": "./fesm2022/form-toggle.mjs"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"type": "module"
|
|
24
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { AfterViewInit, DoCheck, ValueProvider } from '@angular/core';
|
|
3
|
+
import { BooleanInput } from '@angular/cdk/coercion';
|
|
4
|
+
import { ControlValueAccessor } from '@angular/forms';
|
|
5
|
+
import { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
|
|
6
|
+
import { ClassValue } from 'clsx';
|
|
7
|
+
|
|
8
|
+
declare const EG_FORM_TOGGLE_VALUE_ACCESSOR: {
|
|
9
|
+
provide: _angular_core.InjectionToken<readonly ControlValueAccessor[]>;
|
|
10
|
+
useExisting: _angular_core.Type<any>;
|
|
11
|
+
multi: boolean;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* A single boolean toggle bound to ReactiveForms.
|
|
15
|
+
*
|
|
16
|
+
* Unlike the other `eg-form-*` wrappers, the toggle itself is the
|
|
17
|
+
* `ControlValueAccessor` (`BrnToggle` exposes no CVA): bind `formControlName`
|
|
18
|
+
* directly on this element instead of using a `controlName` input.
|
|
19
|
+
*/
|
|
20
|
+
declare class EgFormToggle implements ControlValueAccessor, AfterViewInit, DoCheck {
|
|
21
|
+
private readonly generatedId;
|
|
22
|
+
private readonly _config;
|
|
23
|
+
private readonly _injector;
|
|
24
|
+
private readonly _destroyRef;
|
|
25
|
+
private readonly _formGroupDirective;
|
|
26
|
+
private readonly _errorMessages;
|
|
27
|
+
private _controlDir;
|
|
28
|
+
label: _angular_core.InputSignal<string | undefined>;
|
|
29
|
+
controlId: _angular_core.InputSignal<string | undefined>;
|
|
30
|
+
error: _angular_core.InputSignal<string | undefined>;
|
|
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: _angular_core.InputSignal<boolean>;
|
|
37
|
+
hint: _angular_core.InputSignal<string | undefined>;
|
|
38
|
+
id: _angular_core.InputSignal<string | undefined>;
|
|
39
|
+
disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
|
|
40
|
+
required: _angular_core.InputSignal<boolean>;
|
|
41
|
+
variant: _angular_core.InputSignal<"default" | "outline" | null | undefined>;
|
|
42
|
+
size: _angular_core.InputSignal<"default" | "sm" | "lg" | null | undefined>;
|
|
43
|
+
readonly effectiveId: _angular_core.Signal<string>;
|
|
44
|
+
readonly errorId: _angular_core.Signal<string>;
|
|
45
|
+
readonly hintId: _angular_core.Signal<string>;
|
|
46
|
+
protected readonly _state: _angular_core.WritableSignal<boolean>;
|
|
47
|
+
private readonly _formDisabled;
|
|
48
|
+
protected readonly _disabled: _angular_core.Signal<boolean>;
|
|
49
|
+
private readonly _status;
|
|
50
|
+
private readonly _submitted;
|
|
51
|
+
/**
|
|
52
|
+
* Displayed message: explicit `error()` wins; otherwise (when `autoError()`)
|
|
53
|
+
* auto-resolved from the control's `ValidationErrors`. Plain method (not a
|
|
54
|
+
* computed): `ValidationErrors` is not a signal, so the control must be read
|
|
55
|
+
* fresh on every change-detection pass (`showError()` re-evaluates with it
|
|
56
|
+
* via the `_status`/`_submitted` signals).
|
|
57
|
+
*/
|
|
58
|
+
protected resolvedError(): string | undefined;
|
|
59
|
+
protected readonly showError: _angular_core.Signal<boolean>;
|
|
60
|
+
protected readonly showHint: _angular_core.Signal<boolean>;
|
|
61
|
+
protected _onChange?: ChangeFn<boolean>;
|
|
62
|
+
protected _onTouched?: TouchFn;
|
|
63
|
+
ngDoCheck(): void;
|
|
64
|
+
ngAfterViewInit(): void;
|
|
65
|
+
protected _handleStateChange(state: string): void;
|
|
66
|
+
/** CONTROL VALUE ACCESSOR */
|
|
67
|
+
writeValue(value: boolean | null | undefined): void;
|
|
68
|
+
registerOnChange(fn: ChangeFn<boolean>): void;
|
|
69
|
+
registerOnTouched(fn: TouchFn): void;
|
|
70
|
+
setDisabledState(isDisabled: boolean): void;
|
|
71
|
+
userClass: _angular_core.InputSignal<ClassValue>;
|
|
72
|
+
toggleClass: _angular_core.InputSignal<string>;
|
|
73
|
+
labelClass: _angular_core.InputSignal<string>;
|
|
74
|
+
errorClass: _angular_core.InputSignal<string>;
|
|
75
|
+
hintClass: _angular_core.InputSignal<string>;
|
|
76
|
+
$userClass: _angular_core.Signal<string>;
|
|
77
|
+
$toggleClass: _angular_core.Signal<string>;
|
|
78
|
+
$labelClass: _angular_core.Signal<string>;
|
|
79
|
+
$errorClass: _angular_core.Signal<string>;
|
|
80
|
+
$hintClass: _angular_core.Signal<string>;
|
|
81
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<EgFormToggle, never>;
|
|
82
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<EgFormToggle, "eg-form-toggle", never, { "label": { "alias": "label"; "required": false; "isSignal": true; }; "controlId": { "alias": "controlId"; "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; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "variant": { "alias": "variant"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "userClass": { "alias": "class"; "required": false; "isSignal": true; }; "toggleClass": { "alias": "toggleClass"; "required": false; "isSignal": true; }; "labelClass": { "alias": "labelClass"; "required": false; "isSignal": true; }; "errorClass": { "alias": "errorClass"; "required": false; "isSignal": true; }; "hintClass": { "alias": "hintClass"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface EgFormToggleConfig {
|
|
86
|
+
/**
|
|
87
|
+
* Global class defaults for `eg-form-toggle` styling slots.
|
|
88
|
+
* Each is merged under the matching per-instance `*Class` input
|
|
89
|
+
* (library base < global config < per-instance).
|
|
90
|
+
*/
|
|
91
|
+
toggleClass?: string;
|
|
92
|
+
labelClass?: string;
|
|
93
|
+
errorClass?: string;
|
|
94
|
+
hintClass?: string;
|
|
95
|
+
}
|
|
96
|
+
declare function provideEgFormToggleConfig(config: Partial<EgFormToggleConfig>): ValueProvider;
|
|
97
|
+
declare function injectEgFormToggleConfig(): EgFormToggleConfig;
|
|
98
|
+
|
|
99
|
+
export { EG_FORM_TOGGLE_VALUE_ACCESSOR, EgFormToggle, injectEgFormToggleConfig, provideEgFormToggleConfig };
|
|
100
|
+
export type { EgFormToggleConfig };
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Form Toggle Group (`@egose/shadcn-theme-ng/form-toggle-group`)
|
|
2
|
+
|
|
3
|
+
A ready-made reactive-form option group: label + `hlm-toggle-group` buttons + validation error/hint display in one tag. For single- or multi-select button groups (alignment, view modes, formatting).
|
|
4
|
+
|
|
5
|
+
The Angular implementation is a standalone wrapper: it renders `EgFormField` from `@egose/shadcn-theme-ng/form-field-simple` (like `eg-form-checkbox`, because `hlm-toggle-group` exposes no `BrnFieldControl`), `HlmError` / `HlmHint`, `HlmLabel`, and `HlmToggleGroup` / `HlmToggleGroupItem` from `@egose/shadcn-theme-ng/toggle-group`. The group is bound with `[formControlName]="controlName()"`, so the parent `FormGroup` owns the `string | string[]` value. It must live inside a `FormGroupDirective` (`[formGroup]` parent); ids come from `HlmFormIdGenerator` unless overridden.
|
|
6
|
+
|
|
7
|
+
> **Ships as:** `@egose/shadcn-theme-ng/form-toggle-group` and `@egose/shadcn-theme-ng-tw/form-toggle-group`
|
|
8
|
+
> (the `tw:`-prefixed Tailwind variant). Both expose the identical TypeScript surface; only the
|
|
9
|
+
> emitted Tailwind class strings differ. See the [package README](../../README.md) for install
|
|
10
|
+
> steps, peer dependencies, and Tailwind setup. Do not publish this project directory independently.
|
|
11
|
+
|
|
12
|
+
## Installation
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Plain Tailwind (no prefix)
|
|
16
|
+
npm install @egose/shadcn-theme-ng
|
|
17
|
+
|
|
18
|
+
# tw:-prefixed Tailwind variant
|
|
19
|
+
npm install @egose/shadcn-theme-ng-tw
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Peer dependencies (Angular, `@spartan-ng/brain`, `rxjs`, …) are documented in the
|
|
23
|
+
[package README](../../README.md#peer-dependencies). This subpath additionally relies at runtime on
|
|
24
|
+
`@egose/shadcn-theme-ng/toggle-group`, `@egose/shadcn-theme-ng/toggle`, `@egose/shadcn-theme-ng/form-field`,
|
|
25
|
+
`@egose/shadcn-theme-ng/form-field-simple`, and `@egose/shadcn-theme-ng/label`.
|
|
26
|
+
|
|
27
|
+
## Imports
|
|
28
|
+
|
|
29
|
+
Exported from the subpath root (`projects/form-toggle-group/src/public-api.ts`):
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
import { EgFormToggleGroup, provideEgFormToggleGroupConfig } from '@egose/shadcn-theme-ng/form-toggle-group';
|
|
33
|
+
// tw variant: replace with '@egose/shadcn-theme-ng-tw/form-toggle-group'
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
`ControlValueAccessor` behavior: `eg-form-toggle-group` itself is not a `ControlValueAccessor`; the
|
|
37
|
+
inner `hlm-toggle-group` is (bound via `formControlName`), so `formControlName`/`formGroup` handling,
|
|
38
|
+
`Validators`, and `disabled` state from the control all flow through the parent form.
|
|
39
|
+
|
|
40
|
+
## Anatomy / Structure
|
|
41
|
+
|
|
42
|
+
```html
|
|
43
|
+
<form [formGroup]="form">
|
|
44
|
+
<eg-form-toggle-group controlName="align" label="Align" [options]="options" [required]="true" error="Pick one." />
|
|
45
|
+
</form>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Selector (from source): `eg-form-toggle-group` (standalone component, host `tw:w-full`).
|
|
49
|
+
|
|
50
|
+
## API reference
|
|
51
|
+
|
|
52
|
+
### `EgFormToggleGroup` — `eg-form-toggle-group`
|
|
53
|
+
|
|
54
|
+
| Input | Type | Default | Description |
|
|
55
|
+
| ------------- | ------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
56
|
+
| `controlName` | `string` | `''` | `formControlName` key inside the parent `FormGroup`. **Required.** |
|
|
57
|
+
| `label` | `string \| undefined` | — | Group label text (hidden when omitted). |
|
|
58
|
+
| `error` | `string \| undefined` | — | Error text shown when invalid. |
|
|
59
|
+
| `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`. |
|
|
60
|
+
| `hint` | `string \| undefined` | — | Hint text shown otherwise. |
|
|
61
|
+
| `controlId` | `string \| undefined` | — | Explicit id prefix (first priority for `effectiveId`). |
|
|
62
|
+
| `id` | `string \| undefined` | — | Fallback id prefix (second priority). |
|
|
63
|
+
| `type` | `'single' \| 'multiple'` | `'single'` | Selection mode forwarded to the group. |
|
|
64
|
+
| `disabled` | `boolean` | `false` | Locks interaction (form control stays enabled). |
|
|
65
|
+
| `required` | `boolean` | `false` | Shows a red `*` next to the label. |
|
|
66
|
+
| `variant` | toggle variant | `'default'` | Variant forwarded to the group. |
|
|
67
|
+
| `size` | toggle size | `'default'` | Size forwarded to the group. |
|
|
68
|
+
| `options` | `{ value, label, disabled? }[]` | `[]` | Rendered as `hlmToggleGroupItem` buttons. |
|
|
69
|
+
| `class` | `ClassValue` | `''` | Extra host classes (base `tw:w-full`). |
|
|
70
|
+
| `labelClass` | `string` | `''` | Extra group-label classes (base `tw:mb-1`). |
|
|
71
|
+
| `groupClass` | `string` | `''` | Extra group classes. |
|
|
72
|
+
| `errorClass` | `string` | `''` | Extra error classes (base `tw:mt-0`). |
|
|
73
|
+
| `hintClass` | `string` | `''` | Extra hint classes (base `tw:mt-0`). |
|
|
74
|
+
|
|
75
|
+
| Member | Description |
|
|
76
|
+
| -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
77
|
+
| `effectiveId` | `controlId() \|\| id() \|\| generated` — id prefix for `errorId` / `hintId`. |
|
|
78
|
+
| `errorId` / `hintId` | `effectiveId + '-error' / '-hint'`. |
|
|
79
|
+
| `describedBy()` | `errorId` when `error()` is set and control is invalid + dirty/touched, else `hintId` when `hint()` is set, else `null` — wired to each item's `aria-describedby`. |
|
|
80
|
+
|
|
81
|
+
Requires a `[formGroup]` ancestor (injects `FormGroupDirective`, provides `ControlContainer → FormGroupDirective`).
|
|
82
|
+
|
|
83
|
+
## Examples
|
|
84
|
+
|
|
85
|
+
### 1. Single-select alignment
|
|
86
|
+
|
|
87
|
+
```ts
|
|
88
|
+
import { Component, inject } from '@angular/core';
|
|
89
|
+
import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
|
|
90
|
+
import { EgFormToggleGroup } from '@egose/shadcn-theme-ng/form-toggle-group';
|
|
91
|
+
|
|
92
|
+
@Component({
|
|
93
|
+
selector: 'app-align',
|
|
94
|
+
standalone: true,
|
|
95
|
+
imports: [ReactiveFormsModule, EgFormToggleGroup],
|
|
96
|
+
template: `
|
|
97
|
+
<form [formGroup]="form" (ngSubmit)="submit()">
|
|
98
|
+
<eg-form-toggle-group controlName="align" label="Align" [options]="options" [required]="true" error="Pick one." />
|
|
99
|
+
<button type="submit" [disabled]="form.invalid">Save</button>
|
|
100
|
+
</form>
|
|
101
|
+
`,
|
|
102
|
+
})
|
|
103
|
+
export class AlignComponent {
|
|
104
|
+
private readonly fb = inject(FormBuilder);
|
|
105
|
+
readonly form = this.fb.group({ align: ['', Validators.required] });
|
|
106
|
+
readonly options = [
|
|
107
|
+
{ value: 'left', label: 'Left' },
|
|
108
|
+
{ value: 'center', label: 'Center' },
|
|
109
|
+
{ value: 'right', label: 'Right' },
|
|
110
|
+
];
|
|
111
|
+
submit() {
|
|
112
|
+
console.log(this.form.value.align);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### 2. Multi-select formats
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import { Component, inject } from '@angular/core';
|
|
121
|
+
import { FormBuilder, ReactiveFormsModule } from '@angular/forms';
|
|
122
|
+
import { EgFormToggleGroup } from '@egose/shadcn-theme-ng/form-toggle-group';
|
|
123
|
+
|
|
124
|
+
@Component({
|
|
125
|
+
selector: 'app-format-group',
|
|
126
|
+
standalone: true,
|
|
127
|
+
imports: [ReactiveFormsModule, EgFormToggleGroup],
|
|
128
|
+
template: `
|
|
129
|
+
<form [formGroup]="form">
|
|
130
|
+
<eg-form-toggle-group
|
|
131
|
+
controlName="formats"
|
|
132
|
+
label="Formats"
|
|
133
|
+
type="multiple"
|
|
134
|
+
[options]="options"
|
|
135
|
+
hint="Combine as needed."
|
|
136
|
+
/>
|
|
137
|
+
</form>
|
|
138
|
+
`,
|
|
139
|
+
})
|
|
140
|
+
export class FormatGroupComponent {
|
|
141
|
+
private readonly fb = inject(FormBuilder);
|
|
142
|
+
readonly form = this.fb.group({ formats: [<string[]>[]] });
|
|
143
|
+
readonly options = [
|
|
144
|
+
{ value: 'bold', label: 'Bold' },
|
|
145
|
+
{ value: 'italic', label: 'Italic' },
|
|
146
|
+
{ value: 'underline', label: 'Underline' },
|
|
147
|
+
];
|
|
148
|
+
}
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Accessibility notes
|
|
152
|
+
|
|
153
|
+
- The group label is visual; each item carries its option text and `aria-describedby` (error/hint id).
|
|
154
|
+
- The required `*` is visual; pair with `Validators.required` so assistive tech and validation agree.
|
|
155
|
+
|
|
156
|
+
## Theming / CSS variables
|
|
157
|
+
|
|
158
|
+
No component-specific CSS variables. Style per-instance via `class` / `labelClass` / `groupClass` / `errorClass` / `hintClass` (precedence: library base < global config < per-instance); `variant` / `size` drive the button look.
|
|
159
|
+
|
|
160
|
+
Global defaults per styling slot via the wrapper config:
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
import { provideEgFormToggleGroupConfig } from '@egose/shadcn-theme-ng/form-toggle-group';
|
|
164
|
+
|
|
165
|
+
await bootstrapApplication(App, {
|
|
166
|
+
providers: [provideEgFormToggleGroupConfig({ labelClass: 'tw:font-medium' })],
|
|
167
|
+
});
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Related subpaths
|
|
171
|
+
|
|
172
|
+
- `@egose/shadcn-theme-ng/toggle-group` — raw `hlm-toggle-group` / `hlmToggleGroupItem` for custom layouts.
|
|
173
|
+
- `@egose/shadcn-theme-ng/toggle` — raw `hlmToggle` directive.
|
|
174
|
+
- `@egose/shadcn-theme-ng/form-toggle` — the single boolean toggle (`eg-form-toggle`).
|
|
175
|
+
- `@egose/shadcn-theme-ng/form-radio-group` — single-choice alternative with radios.
|
|
176
|
+
- `@egose/shadcn-theme-ng/form-field` — `hlm-error` / `hlm-hint` used internally.
|
|
177
|
+
- `@egose/shadcn-theme-ng/form-field-simple` — `eg-form-field` used internally.
|