ngx-com 0.0.20 → 0.0.21

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.
@@ -23,6 +23,8 @@ import { AutofillMonitor } from '@angular/cdk/text-field';
23
23
  * ```
24
24
  */
25
25
  class FormFieldControl {
26
+ /** Structured validation errors (Signal Forms path). */
27
+ errors;
26
28
  }
27
29
 
28
30
  /** Auto-incrementing ID counter. */
@@ -346,8 +348,10 @@ let nextId$1 = 0;
346
348
  */
347
349
  class ComError {
348
350
  id = `com-error-${nextId$1++}`;
349
- /** Reference to the form control, set by the parent form field. */
351
+ /** Reference to the form control (Reactive Forms path). */
350
352
  _control = signal(null, ...(ngDevMode ? [{ debugName: "_control" }] : []));
353
+ /** Structured errors from Signal Forms. */
354
+ _signalErrors = signal([], ...(ngDevMode ? [{ debugName: "_signalErrors" }] : []));
351
355
  /**
352
356
  * Show this error only when a specific validation error key is present.
353
357
  * If empty, the error is always shown when the control is in error state.
@@ -362,16 +366,29 @@ class ComError {
362
366
  const matchKey = this.match();
363
367
  if (!matchKey)
364
368
  return true;
369
+ // Signal Forms path: match on error.kind
370
+ const signalErrors = this._signalErrors();
371
+ if (signalErrors.length > 0) {
372
+ return signalErrors.some((e) => e?.kind === matchKey);
373
+ }
374
+ // Reactive Forms path: match on AbstractControl.errors keys
365
375
  const errors = this._control()?.errors;
366
376
  return errors ? matchKey in errors : false;
367
377
  }, ...(ngDevMode ? [{ debugName: "shouldShow" }] : []));
368
378
  /**
369
- * Sets the form control reference.
379
+ * Sets the form control reference (Reactive Forms).
370
380
  * Called by the parent form field component.
371
381
  */
372
382
  setControl(control) {
373
383
  this._control.set(control);
374
384
  }
385
+ /**
386
+ * Sets structured validation errors (Signal Forms).
387
+ * Called by the parent form field component.
388
+ */
389
+ setSignalErrors(errors) {
390
+ this._signalErrors.set(errors);
391
+ }
375
392
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComError, deps: [], target: i0.ɵɵFactoryTarget.Directive });
376
393
  static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComError, isStandalone: true, selector: "[comError]", inputs: { match: { classPropertyName: "match", publicName: "match", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "alert", "aria-live": "polite" }, properties: { "id": "id", "class": "errorVariants()", "class.hidden": "!shouldShow()" } }, exportAs: ["comError"], ngImport: i0 });
377
394
  }
@@ -579,6 +596,13 @@ class ComInput {
579
596
  transform: booleanAttribute });
580
597
  userAriaDescribedBy = input('', { ...(ngDevMode ? { debugName: "userAriaDescribedBy" } : {}), alias: 'aria-describedby' });
581
598
  errorStateMatcher = input(...(ngDevMode ? [undefined, { debugName: "errorStateMatcher" }] : []));
599
+ // Signal Forms inputs — set automatically by [formField] via setInputOnDirectives
600
+ sfInvalid = input(false, { ...(ngDevMode ? { debugName: "sfInvalid" } : {}), alias: 'invalid' });
601
+ sfTouched = input(false, { ...(ngDevMode ? { debugName: "sfTouched" } : {}), alias: 'touched',
602
+ transform: booleanAttribute });
603
+ sfErrors = input([], { ...(ngDevMode ? { debugName: "sfErrors" } : {}), alias: 'errors' });
604
+ /** Whether the form system is Signal Forms (no NgControl present). */
605
+ isSignalForms = !this.ngControl;
582
606
  // Internal state
583
607
  _focused = signal(false, ...(ngDevMode ? [{ debugName: "_focused" }] : []));
584
608
  _autofilled = signal(false, ...(ngDevMode ? [{ debugName: "_autofilled" }] : []));
@@ -608,14 +632,20 @@ class ComInput {
608
632
  return false;
609
633
  }, ...(ngDevMode ? [{ debugName: "required" }] : []));
610
634
  errorState = computed(() => {
611
- // Read _focused to trigger re-evaluation on blur (when touched changes)
612
- // Read _empty to trigger re-evaluation on input (when validity changes)
635
+ if (this.isSignalForms) {
636
+ // Signal Forms: gate on both invalid AND touched mirrors ErrorStateMatcher default.
637
+ // Signal Forms' invalid is pure validation state (not gated by touched).
638
+ return this.sfInvalid() && this.sfTouched();
639
+ }
640
+ // Reactive Forms: use ErrorStateMatcher (existing logic)
613
641
  this._focused();
614
642
  this._empty();
615
643
  const matcher = this.errorStateMatcher() ?? this.defaultErrorStateMatcher;
616
644
  const form = this.parentFormGroup ?? this.parentForm;
617
645
  return matcher.isErrorState(this.ngControl?.control ?? null, form);
618
646
  }, ...(ngDevMode ? [{ debugName: "errorState" }] : []));
647
+ /** Structured validation errors from Signal Forms, exposed for the parent form field. */
648
+ errors = computed(() => this.isSignalForms ? this.sfErrors() : null, ...(ngDevMode ? [{ debugName: "errors" }] : []));
619
649
  /** Combined aria-describedby including user-provided and form-field-generated IDs. */
620
650
  _describedByIds = signal('', ...(ngDevMode ? [{ debugName: "_describedByIds" }] : []));
621
651
  ariaDescribedBy = computed(() => {
@@ -687,7 +717,7 @@ class ComInput {
687
717
  this.elementRef.nativeElement.focus();
688
718
  }
689
719
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComInput, deps: [], target: i0.ɵɵFactoryTarget.Directive });
690
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComInput, isStandalone: true, selector: "input[comInput], textarea[comInput]", inputs: { inputId: { classPropertyName: "inputId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, inputDisabled: { classPropertyName: "inputDisabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputRequired: { classPropertyName: "inputRequired", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, userAriaDescribedBy: { classPropertyName: "userAriaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "input": "onInput()" }, properties: { "id": "id()", "disabled": "disabled()", "required": "required()", "attr.aria-invalid": "errorState() || null", "attr.aria-required": "required() || null", "attr.aria-describedby": "ariaDescribedBy() || null", "class": "hostClasses()" } }, providers: [{ provide: FormFieldControl, useExisting: forwardRef(() => ComInput) }], exportAs: ["comInput"], ngImport: i0 });
720
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.0", type: ComInput, isStandalone: true, selector: "input[comInput], textarea[comInput]", inputs: { inputId: { classPropertyName: "inputId", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, inputDisabled: { classPropertyName: "inputDisabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, inputRequired: { classPropertyName: "inputRequired", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, userAriaDescribedBy: { classPropertyName: "userAriaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null }, sfInvalid: { classPropertyName: "sfInvalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, sfTouched: { classPropertyName: "sfTouched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, sfErrors: { classPropertyName: "sfErrors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "input": "onInput()" }, properties: { "id": "id()", "disabled": "disabled()", "required": "required()", "attr.aria-invalid": "errorState() || null", "attr.aria-required": "required() || null", "attr.aria-describedby": "ariaDescribedBy() || null", "class": "hostClasses()" } }, providers: [{ provide: FormFieldControl, useExisting: forwardRef(() => ComInput) }], exportAs: ["comInput"], ngImport: i0 });
691
721
  }
692
722
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComInput, decorators: [{
693
723
  type: Directive,
@@ -708,7 +738,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
708
738
  '(input)': 'onInput()',
709
739
  },
710
740
  }]
711
- }], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], inputDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inputRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], userAriaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }] } });
741
+ }], propDecorators: { inputId: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], inputDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], inputRequired: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], userAriaDescribedBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], sfInvalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], sfTouched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }], sfErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }] } });
712
742
 
713
743
  const FORM_FIELD_DEFAULTS = new InjectionToken('FORM_FIELD_DEFAULTS', {
714
744
  providedIn: 'root',
@@ -840,8 +870,18 @@ class ComFormField {
840
870
  // Read hasError to trigger re-evaluation when validation state changes
841
871
  this.hasError();
842
872
  const ctrl = this.control();
843
- const ngControl = ctrl?.ngControl?.control ?? null;
844
- this.errorChildren().forEach((error) => error.setControl(ngControl));
873
+ if (!ctrl)
874
+ return;
875
+ const errors = ctrl.errors?.() ?? null;
876
+ if (errors !== null) {
877
+ // Signal Forms path: pass structured errors to each comError
878
+ this.errorChildren().forEach((error) => error.setSignalErrors(errors));
879
+ }
880
+ else {
881
+ // Reactive Forms path: pass AbstractControl reference
882
+ const ngControl = ctrl.ngControl?.control ?? null;
883
+ this.errorChildren().forEach((error) => error.setControl(ngControl));
884
+ }
845
885
  });
846
886
  }
847
887
  onContainerClick(event) {
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-com-components-form-field.mjs","sources":["../../../projects/com/components/form-field/form-field-control.ts","../../../projects/com/components/form-field/label.directive.ts","../../../projects/com/components/form-field/form-field.variants.ts","../../../projects/com/components/form-field/hint.directive.ts","../../../projects/com/components/form-field/error.directive.ts","../../../projects/com/components/form-field/prefix.directive.ts","../../../projects/com/components/form-field/suffix.directive.ts","../../../projects/com/components/form-field/error-state-matcher.ts","../../../projects/com/components/form-field/input.directive.ts","../../../projects/com/components/form-field/form-field-defaults.ts","../../../projects/com/components/form-field/form-field.component.ts","../../../projects/com/components/form-field/index.ts","../../../projects/com/components/form-field/ngx-com-components-form-field.ts"],"sourcesContent":["import type { Signal } from '@angular/core';\nimport type { NgControl } from '@angular/forms';\n\n/**\n * Contract that any control inside a form field must implement.\n *\n * This allows the form field to read state from any inner control\n * (input, textarea, custom controls) without knowing implementation details.\n *\n * @example Implementing for a custom phone input\n * ```ts\n * @Directive({\n * selector: 'com-phone-input',\n * providers: [{ provide: FormFieldControl, useExisting: PhoneInputComponent }],\n * })\n * export class PhoneInputComponent extends FormFieldControl<string> {\n * // ... implement all abstract members\n * }\n * ```\n */\nexport abstract class FormFieldControl<T = unknown> {\n /** The NgControl bound to this control (if any). */\n abstract readonly ngControl: NgControl | null;\n\n /** Whether the control is focused. */\n abstract readonly focused: Signal<boolean>;\n\n /** Whether the label should float (focused or non-empty). */\n abstract readonly shouldLabelFloat: Signal<boolean>;\n\n /** Whether the control is required. */\n abstract readonly required: Signal<boolean>;\n\n /** Whether the control is disabled. */\n abstract readonly disabled: Signal<boolean>;\n\n /** Whether the control is in an error state. */\n abstract readonly errorState: Signal<boolean>;\n\n /** Unique ID for the control element. */\n abstract readonly id: Signal<string>;\n\n /** Called when the form field container is clicked. */\n abstract onContainerClick(event: MouseEvent): void;\n}\n","import { Directive, signal } from '@angular/core';\nimport type { Signal } from '@angular/core';\n\n/** Auto-incrementing ID counter. */\nlet nextId = 0;\n\n/**\n * Directive to mark the label element inside a form field.\n *\n * The form field automatically associates this label with the inner control\n * and positions it appropriately based on appearance and float state.\n *\n * @example\n * ```html\n * <com-form-field>\n * <label comLabel>Email address</label>\n * <input comInput formControlName=\"email\" />\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comLabel]',\n exportAs: 'comLabel',\n host: {\n '[attr.for]': 'forId()',\n '[id]': 'labelId',\n },\n})\nexport class ComLabel {\n readonly labelId: string = `com-label-${nextId++}`;\n\n private readonly _forId = signal<string | null>(null);\n readonly forId: Signal<string | null> = this._forId.asReadonly();\n\n /** Sets the `for` attribute to link to the control. Called by form field. */\n setForId(id: string): void {\n this._forId.set(id);\n }\n}\n","import { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\n\nexport type FormFieldAppearance = 'fill' | 'outline';\nexport type FormFieldColor = 'primary' | 'accent' | 'warn';\nexport type FormFieldFloatLabel = 'auto' | 'always';\nexport type FormFieldSubscriptSizing = 'fixed' | 'dynamic';\n\n/**\n * CVA variants for the form field wrapper.\n *\n * @tokens `--color-foreground`\n */\nexport const formFieldVariants: (props?: {\n disabled?: boolean | null | undefined;\n}) => string = cva(\n ['com-form-field', 'relative block w-full', 'text-foreground'],\n {\n variants: {\n disabled: {\n true: 'pointer-events-none',\n false: '',\n },\n },\n defaultVariants: {\n disabled: false,\n },\n }\n);\n\nexport type FormFieldVariants = VariantProps<typeof formFieldVariants>;\n\n/**\n * CVA variants for the input container (the bordered/filled area).\n *\n * @tokens `--color-input-border`, `--color-input-background`, `--color-primary`,\n * `--color-accent`, `--color-warn`, `--color-ring`, `--color-muted`,\n * `--color-disabled`, `--radius-input`\n */\nexport const formFieldContainerVariants: (props?: {\n appearance?: FormFieldAppearance | null | undefined;\n color?: FormFieldColor | null | undefined;\n focused?: boolean | null | undefined;\n error?: boolean | null | undefined;\n disabled?: boolean | null | undefined;\n}) => string = cva(\n [\n 'com-form-field__container',\n 'relative flex items-center',\n 'w-full min-h-11',\n 'transition-all duration-150',\n 'rounded-input',\n ],\n {\n variants: {\n appearance: {\n outline: [\n 'border border-input-border',\n 'bg-transparent',\n 'mt-2.5', // Reserve space for floating label to prevent height jump\n ],\n fill: [\n 'rounded-b-none',\n 'bg-muted',\n 'border-b-2 border-input-border',\n ],\n },\n color: {\n primary: '',\n accent: '',\n warn: '',\n },\n focused: {\n true: '',\n false: '',\n },\n error: {\n true: '',\n false: '',\n },\n disabled: {\n true: 'bg-disabled border-disabled',\n false: '',\n },\n },\n compoundVariants: [\n // Outline + focused (no error)\n { appearance: 'outline', focused: true, error: false, class: 'border-primary ring-1 ring-primary' },\n { appearance: 'outline', focused: true, error: false, color: 'accent', class: 'border-accent ring-accent' },\n { appearance: 'outline', focused: true, error: false, color: 'warn', class: 'border-warn ring-warn' },\n // Outline + error\n { appearance: 'outline', error: true, class: 'border-warn ring-1 ring-warn' },\n // Fill + focused (no error)\n { appearance: 'fill', focused: true, error: false, class: 'border-b-primary' },\n { appearance: 'fill', focused: true, error: false, color: 'accent', class: 'border-b-accent' },\n { appearance: 'fill', focused: true, error: false, color: 'warn', class: 'border-b-warn' },\n // Fill + error\n { appearance: 'fill', error: true, class: 'border-b-warn' },\n ],\n defaultVariants: {\n appearance: 'outline',\n color: 'primary',\n focused: false,\n error: false,\n disabled: false,\n },\n }\n);\n\nexport type FormFieldContainerVariants = VariantProps<typeof formFieldContainerVariants>;\n\n/**\n * CVA variants for the floating label.\n *\n * @tokens `--color-muted-foreground`, `--color-primary`, `--color-accent`,\n * `--color-warn`, `--color-background`\n */\nexport const formFieldLabelVariants: (props?: {\n appearance?: FormFieldAppearance | null | undefined;\n floating?: boolean | null | undefined;\n color?: FormFieldColor | null | undefined;\n error?: boolean | null | undefined;\n focused?: boolean | null | undefined;\n disabled?: boolean | null | undefined;\n}) => string = cva(\n [\n 'com-form-field__label',\n 'pointer-events-none',\n 'text-muted-foreground text-sm',\n 'origin-top-left',\n 'transition-all duration-200 ease-in-out',\n ],\n {\n variants: {\n appearance: {\n outline: '',\n fill: '',\n },\n floating: {\n // Floating: absolute positioning at container border\n true: 'absolute',\n // Not floating: relative positioning in flex flow (after prefix)\n false: 'relative flex-shrink-0 pl-3',\n },\n color: {\n primary: '',\n accent: '',\n warn: '',\n },\n error: {\n true: 'text-warn',\n false: '',\n },\n focused: {\n true: '',\n false: '',\n },\n disabled: {\n true: 'text-disabled-foreground',\n false: '',\n },\n },\n compoundVariants: [\n // Outline floating (label above border with notch effect)\n {\n appearance: 'outline',\n floating: true,\n class: 'left-2 -top-2.5 scale-75 bg-background px-1',\n },\n // Fill floating\n {\n appearance: 'fill',\n floating: true,\n class: 'left-3 top-1 scale-75 text-xs',\n },\n // Focused + floating colors (no error)\n { floating: true, focused: true, error: false, color: 'primary', class: 'text-primary' },\n { floating: true, focused: true, error: false, color: 'accent', class: 'text-accent' },\n { floating: true, focused: true, error: false, color: 'warn', class: 'text-warn' },\n // Error overrides\n { floating: true, error: true, class: 'text-warn' },\n ],\n defaultVariants: {\n appearance: 'outline',\n floating: false,\n color: 'primary',\n error: false,\n focused: false,\n disabled: false,\n },\n }\n);\n\nexport type FormFieldLabelVariants = VariantProps<typeof formFieldLabelVariants>;\n\n/**\n * CVA variants for the subscript area (hints/errors).\n *\n * @tokens (inherits from children)\n */\nexport const formFieldSubscriptVariants: (props?: {\n sizing?: FormFieldSubscriptSizing | null | undefined;\n}) => string = cva(\n ['com-form-field__subscript', 'text-xs mt-1 px-3'],\n {\n variants: {\n sizing: {\n fixed: 'min-h-5',\n dynamic: 'min-h-0',\n },\n },\n defaultVariants: {\n sizing: 'fixed',\n },\n }\n);\n\nexport type FormFieldSubscriptVariants = VariantProps<typeof formFieldSubscriptVariants>;\n\n/**\n * CVA variants for hint text.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const hintVariants: () => string = cva(['com-form-field__hint', 'text-muted-foreground text-xs']);\n\n/**\n * CVA variants for error messages.\n *\n * @tokens `--color-warn`\n */\nexport const errorVariants: () => string = cva(['com-form-field__error', 'text-warn text-xs']);\n\n/**\n * CVA variants for prefix slot.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const prefixVariants: () => string = cva([\n 'com-form-field__prefix',\n 'flex items-center text-muted-foreground pl-3',\n]);\n\n/**\n * CVA variants for suffix slot.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const suffixVariants: () => string = cva([\n 'com-form-field__suffix',\n 'flex items-center text-muted-foreground pr-3',\n]);\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { hintVariants } from './form-field.variants';\nimport { mergeClasses } from 'ngx-com/utils';\n\n/** Alignment of hint text in the subscript area. */\nexport type HintAlign = 'start' | 'end';\n\n/** Auto-incrementing ID counter. */\nlet nextId = 0;\n\n/**\n * Directive for hint text displayed below the form field.\n *\n * The hint provides supplementary information to help users fill out the field.\n * It is automatically added to the control's `aria-describedby`.\n *\n * @tokens `--color-muted-foreground`\n *\n * @example Basic hint\n * ```html\n * <com-form-field>\n * <label comLabel>Password</label>\n * <input comInput formControlName=\"password\" />\n * <span comHint>At least 8 characters</span>\n * </com-form-field>\n * ```\n *\n * @example Right-aligned hint (e.g., character count)\n * ```html\n * <com-form-field>\n * <label comLabel>Bio</label>\n * <textarea comInput formControlName=\"bio\"></textarea>\n * <span comHint>Keep it brief</span>\n * <span comHint align=\"end\">{{ bioLength }}/150</span>\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comHint]',\n exportAs: 'comHint',\n host: {\n '[id]': 'id',\n '[class]': 'hostClasses()',\n },\n})\nexport class ComHint {\n readonly id: string = `com-hint-${nextId++}`;\n readonly align: InputSignal<HintAlign> = input<HintAlign>('start');\n\n protected readonly hostClasses: Signal<string> = computed(() =>\n mergeClasses(hintVariants(), this.align() === 'end' && 'ml-auto')\n );\n}\n","import { computed, Directive, input, signal } from '@angular/core';\nimport type { AbstractControl } from '@angular/forms';\nimport type { InputSignal, Signal, WritableSignal } from '@angular/core';\nimport { errorVariants } from './form-field.variants';\n\n/** Auto-incrementing ID counter. */\nlet nextId = 0;\n\n/**\n * Directive for error messages displayed below the form field.\n *\n * Errors replace hints when the control is in an error state.\n * Uses `role=\"alert\"` and `aria-live=\"polite\"` for screen reader announcement.\n *\n * The optional `match` input allows showing errors only for specific validation errors.\n *\n * @tokens `--color-warn`\n *\n * @example Basic error\n * ```html\n * <com-form-field>\n * <label comLabel>Email</label>\n * <input comInput formControlName=\"email\" />\n * <span comError>Please enter a valid email</span>\n * </com-form-field>\n * ```\n *\n * @example Matching specific errors\n * ```html\n * <com-form-field>\n * <label comLabel>Email</label>\n * <input comInput formControlName=\"email\" />\n * <span comError match=\"required\">Email is required.</span>\n * <span comError match=\"email\">Must be a valid email address.</span>\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comError]',\n exportAs: 'comError',\n host: {\n '[id]': 'id',\n '[class]': 'errorVariants()',\n '[class.hidden]': '!shouldShow()',\n 'role': 'alert',\n 'aria-live': 'polite',\n },\n})\nexport class ComError {\n readonly id: string = `com-error-${nextId++}`;\n\n /** Reference to the form control, set by the parent form field. */\n private readonly _control: WritableSignal<AbstractControl | null> = signal(null);\n\n /**\n * Show this error only when a specific validation error key is present.\n * If empty, the error is always shown when the control is in error state.\n */\n readonly match: InputSignal<string> = input<string>('');\n\n protected readonly errorVariants: () => string = errorVariants;\n\n /**\n * Whether this error should be displayed based on the match condition.\n * Used by the form field to filter which errors to show.\n */\n readonly shouldShow: Signal<boolean> = computed(() => {\n const matchKey = this.match();\n if (!matchKey) return true;\n\n const errors = this._control()?.errors;\n return errors ? matchKey in errors : false;\n });\n\n /**\n * Sets the form control reference.\n * Called by the parent form field component.\n */\n setControl(control: AbstractControl | null): void {\n this._control.set(control);\n }\n}\n","import { Directive } from '@angular/core';\nimport { prefixVariants } from './form-field.variants';\n\n/**\n * Directive to mark content as the prefix slot in a form field.\n *\n * Prefix content appears before the input (e.g., currency symbol, icon).\n *\n * @tokens `--color-muted-foreground`\n *\n * @example Currency prefix\n * ```html\n * <com-form-field>\n * <label comLabel>Amount</label>\n * <span comPrefix>$</span>\n * <input comInput type=\"number\" formControlName=\"amount\" />\n * </com-form-field>\n * ```\n *\n * @example Icon prefix\n * ```html\n * <com-form-field>\n * <label comLabel>Search</label>\n * <svg comPrefix class=\"size-4\">...</svg>\n * <input comInput formControlName=\"query\" />\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comPrefix]',\n exportAs: 'comPrefix',\n host: {\n '[class]': 'prefixVariants()',\n },\n})\nexport class ComPrefix {\n protected readonly prefixVariants: () => string = prefixVariants;\n}\n","import { Directive } from '@angular/core';\nimport { suffixVariants } from './form-field.variants';\n\n/**\n * Directive to mark content as the suffix slot in a form field.\n *\n * Suffix content appears after the input (e.g., unit, clear button, visibility toggle).\n *\n * @tokens `--color-muted-foreground`\n *\n * @example Unit suffix\n * ```html\n * <com-form-field>\n * <label comLabel>Weight</label>\n * <input comInput type=\"number\" formControlName=\"weight\" />\n * <span comSuffix>kg</span>\n * </com-form-field>\n * ```\n *\n * @example Clear button suffix\n * ```html\n * <com-form-field>\n * <label comLabel>Search</label>\n * <input comInput formControlName=\"query\" />\n * <button comSuffix type=\"button\" (click)=\"clearSearch()\">\n * <svg class=\"size-4\">...</svg>\n * </button>\n * </com-form-field>\n * ```\n *\n * @example Password visibility toggle\n * ```html\n * <com-form-field>\n * <label comLabel>Password</label>\n * <input comInput [type]=\"showPassword ? 'text' : 'password'\" formControlName=\"password\" />\n * <button comSuffix type=\"button\" (click)=\"showPassword = !showPassword\">\n * <svg class=\"size-4\">...</svg>\n * </button>\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comSuffix]',\n exportAs: 'comSuffix',\n host: {\n '[class]': 'suffixVariants()',\n },\n})\nexport class ComSuffix {\n protected readonly suffixVariants: () => string = suffixVariants;\n}\n","import { Injectable } from '@angular/core';\nimport type { AbstractControl, FormGroupDirective, NgForm } from '@angular/forms';\n\n/**\n * Strategy for determining when to display errors in a form field.\n *\n * The default behavior shows errors when the control is invalid AND\n * either touched OR the parent form has been submitted.\n *\n * @example Override globally with eager error display\n * ```ts\n * @Injectable()\n * export class EagerErrorStateMatcher extends ErrorStateMatcher {\n * override isErrorState(control: AbstractControl | null): boolean {\n * return !!(control?.invalid && control.dirty);\n * }\n * }\n *\n * // In app config\n * providers: [{ provide: ErrorStateMatcher, useClass: EagerErrorStateMatcher }]\n * ```\n *\n * @example Per-field override\n * ```html\n * <com-form-field>\n * <input comInput [errorStateMatcher]=\"eagerMatcher\" />\n * </com-form-field>\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ErrorStateMatcher {\n isErrorState(\n control: AbstractControl | null,\n form: FormGroupDirective | NgForm | null\n ): boolean {\n return !!(control?.invalid && (control.touched || form?.submitted));\n }\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport type { DoCheck, InputSignal, InputSignalWithTransform, OnInit, Signal, WritableSignal } from '@angular/core';\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { AutofillMonitor } from '@angular/cdk/text-field';\nimport { FormFieldControl } from './form-field-control';\nimport { ErrorStateMatcher } from './error-state-matcher';\nimport type { FormFieldAppearance } from './form-field-defaults';\n\n/** Auto-incrementing ID counter. */\nlet nextId = 0;\n\n/**\n * Directive applied to native `<input>` and `<textarea>` elements to bridge\n * them to the form field wrapper. Implements the `FormFieldControl` contract.\n *\n * This directive does NOT implement `ControlValueAccessor` - it relies on\n * Angular's built-in value accessors (`DefaultValueAccessor`, `NumberValueAccessor`, etc.)\n * that are already applied to native elements with `formControlName` or `ngModel`.\n *\n * Instead, this directive reports state (focused, empty, disabled, error) to the\n * parent form field for proper visual presentation.\n *\n * @tokens (styling is controlled by the parent form field)\n *\n * @example Basic usage\n * ```html\n * <com-form-field>\n * <label comLabel>Email</label>\n * <input comInput formControlName=\"email\" placeholder=\"you@example.com\" />\n * </com-form-field>\n * ```\n *\n * @example Textarea\n * ```html\n * <com-form-field>\n * <label comLabel>Description</label>\n * <textarea comInput formControlName=\"description\"></textarea>\n * </com-form-field>\n * ```\n *\n * @example Custom error state matcher\n * ```html\n * <com-form-field>\n * <label comLabel>Code</label>\n * <input comInput formControlName=\"code\" [errorStateMatcher]=\"eagerMatcher\" />\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: 'input[comInput], textarea[comInput]',\n exportAs: 'comInput',\n providers: [{ provide: FormFieldControl, useExisting: forwardRef(() => ComInput) }],\n host: {\n '[id]': 'id()',\n '[disabled]': 'disabled()',\n '[required]': 'required()',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || null',\n '[attr.aria-describedby]': 'ariaDescribedBy() || null',\n '[class]': 'hostClasses()',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(input)': 'onInput()',\n },\n})\nexport class ComInput implements FormFieldControl<string>, OnInit, DoCheck {\n private readonly elementRef: ElementRef<HTMLInputElement | HTMLTextAreaElement> = inject(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly autofillMonitor = inject(AutofillMonitor);\n private readonly defaultErrorStateMatcher = inject(ErrorStateMatcher);\n private readonly parentForm = inject(NgForm, { optional: true });\n private readonly parentFormGroup = inject(FormGroupDirective, { optional: true });\n\n /** NgControl bound to this input (if using reactive forms). */\n readonly ngControl: NgControl | null = inject(NgControl, { optional: true, self: true });\n\n // Inputs\n readonly inputId: InputSignal<string | undefined> = input<string>(undefined, { alias: 'id' });\n readonly inputDisabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'disabled',\n transform: booleanAttribute,\n });\n readonly inputRequired: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'required',\n transform: booleanAttribute,\n });\n readonly userAriaDescribedBy: InputSignal<string> = input<string>('', { alias: 'aria-describedby' });\n readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined> = input<ErrorStateMatcher>();\n\n // Internal state\n private readonly _focused = signal(false);\n private readonly _autofilled = signal(false);\n private readonly _empty = signal(true);\n private readonly _uniqueId: string = `com-input-${nextId++}`;\n private readonly _appearance: WritableSignal<FormFieldAppearance> = signal<FormFieldAppearance>('outline');\n private _previousNativeValue: string = '';\n\n // Public signals implementing FormFieldControl\n readonly focused: Signal<boolean> = this._focused.asReadonly();\n\n readonly id: Signal<string> = computed(() => this.inputId() ?? this._uniqueId);\n\n readonly shouldLabelFloat: Signal<boolean> = computed(() => {\n return this._focused() || !this._empty() || this._autofilled();\n });\n\n readonly disabled: Signal<boolean> = computed(() => {\n if (this.inputDisabled()) return true;\n return this.ngControl?.control?.disabled ?? false;\n });\n\n readonly required: Signal<boolean> = computed(() => {\n if (this.inputRequired()) return true;\n const control = this.ngControl?.control;\n if (control?.validator) {\n const result = control.validator({ value: '' } as never);\n return result?.['required'] !== undefined;\n }\n return false;\n });\n\n readonly errorState: Signal<boolean> = computed(() => {\n // Read _focused to trigger re-evaluation on blur (when touched changes)\n // Read _empty to trigger re-evaluation on input (when validity changes)\n this._focused();\n this._empty();\n const matcher = this.errorStateMatcher() ?? this.defaultErrorStateMatcher;\n const form = this.parentFormGroup ?? this.parentForm;\n return matcher.isErrorState(this.ngControl?.control ?? null, form);\n });\n\n /** Combined aria-describedby including user-provided and form-field-generated IDs. */\n private readonly _describedByIds = signal('');\n\n readonly ariaDescribedBy: Signal<string> = computed(() => {\n const userIds = this.userAriaDescribedBy();\n const fieldIds = this._describedByIds();\n return [userIds, fieldIds].filter(Boolean).join(' ');\n });\n\n /** Computed host classes including appearance-based padding. */\n protected readonly hostClasses: Signal<string> = computed(() => {\n const base =\n 'peer w-full bg-transparent text-foreground placeholder:text-input-placeholder outline-none border-none disabled:cursor-not-allowed disabled:text-disabled-foreground px-3';\n const padding = this._appearance() === 'fill' ? 'pt-5 pb-1.5' : 'py-2.5';\n return `${base} ${padding}`;\n });\n\n ngOnInit(): void {\n this._previousNativeValue = this.elementRef.nativeElement.value;\n this.updateEmpty();\n\n const autofillSub = this.autofillMonitor.monitor(this.elementRef).subscribe((event) => {\n this._autofilled.set(event.isAutofilled);\n });\n\n this.destroyRef.onDestroy(() => {\n autofillSub.unsubscribe();\n this.autofillMonitor.stopMonitoring(this.elementRef);\n });\n }\n\n ngDoCheck(): void {\n this.dirtyCheckNativeValue();\n }\n\n private dirtyCheckNativeValue(): void {\n const newValue = this.elementRef.nativeElement.value;\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.updateEmpty();\n }\n }\n\n protected onFocus(): void {\n this._focused.set(true);\n }\n\n protected onBlur(): void {\n this._focused.set(false);\n }\n\n protected onInput(): void {\n this.updateEmpty();\n }\n\n private updateEmpty(): void {\n this._empty.set(!this.elementRef.nativeElement.value);\n }\n\n // FormFieldControl methods\n onContainerClick(event: MouseEvent): void {\n if (!this.disabled() && event.target !== this.elementRef.nativeElement) {\n this.elementRef.nativeElement.focus();\n }\n }\n\n /**\n * Sets the describedBy IDs from the form field.\n * Called by the parent form field component.\n */\n setDescribedByIds(ids: string): void {\n this._describedByIds.set(ids);\n }\n\n /**\n * Sets the appearance for styling.\n * Called by the parent form field component.\n */\n setAppearance(appearance: FormFieldAppearance): void {\n this._appearance.set(appearance);\n }\n\n /** Focus the native element. */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport type {\n FormFieldAppearance,\n FormFieldColor,\n FormFieldFloatLabel,\n FormFieldSubscriptSizing,\n} from './form-field.variants';\n\n// Re-export types for convenience\nexport type { FormFieldAppearance, FormFieldColor, FormFieldFloatLabel, FormFieldSubscriptSizing };\n\n/**\n * Global configuration defaults for form fields.\n *\n * @example Set defaults in app config\n * ```ts\n * providers: [\n * {\n * provide: FORM_FIELD_DEFAULTS,\n * useValue: {\n * appearance: 'fill',\n * floatLabel: 'always',\n * color: 'primary',\n * }\n * }\n * ]\n * ```\n */\nexport interface FormFieldDefaults {\n appearance?: FormFieldAppearance;\n color?: FormFieldColor;\n floatLabel?: FormFieldFloatLabel;\n hideRequiredMarker?: boolean;\n subscriptSizing?: FormFieldSubscriptSizing;\n}\n\nexport const FORM_FIELD_DEFAULTS: InjectionToken<FormFieldDefaults> = new InjectionToken<FormFieldDefaults>(\n 'FORM_FIELD_DEFAULTS',\n {\n providedIn: 'root',\n factory: (): FormFieldDefaults => ({}),\n }\n);\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n effect,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';\nimport { FormFieldControl } from './form-field-control';\nimport { ComLabel } from './label.directive';\nimport { ComHint } from './hint.directive';\nimport { ComError } from './error.directive';\nimport { ComPrefix } from './prefix.directive';\nimport { ComSuffix } from './suffix.directive';\nimport { ComInput } from './input.directive';\nimport {\n FORM_FIELD_DEFAULTS,\n type FormFieldAppearance,\n type FormFieldColor,\n type FormFieldFloatLabel,\n type FormFieldSubscriptSizing,\n} from './form-field-defaults';\nimport {\n formFieldVariants,\n formFieldContainerVariants,\n formFieldLabelVariants,\n formFieldSubscriptVariants,\n} from './form-field.variants';\nimport { mergeClasses } from 'ngx-com/utils';\n\n/**\n * Form field wrapper providing visual structure for form inputs.\n *\n * Provides floating labels, borders (outline/fill appearance), hints, errors,\n * and prefix/suffix slots. Automatically wires ARIA attributes for accessibility.\n *\n * The form field reads state from its inner `FormFieldControl` child (typically\n * a `ComInput` directive) and renders UI accordingly.\n *\n * @tokens `--color-foreground`, `--color-input-border`, `--color-input-background`,\n * `--color-primary`, `--color-accent`, `--color-warn`, `--color-ring`,\n * `--color-muted`, `--color-muted-foreground`, `--color-disabled`,\n * `--color-disabled-foreground`, `--color-background`, `--radius-input`\n *\n * @example Basic outline field\n * ```html\n * <com-form-field>\n * <label comLabel>Email</label>\n * <input comInput formControlName=\"email\" />\n * <span comHint>We'll never share your email.</span>\n * <span comError match=\"required\">Email is required.</span>\n * </com-form-field>\n * ```\n *\n * @example Fill appearance\n * ```html\n * <com-form-field appearance=\"fill\">\n * <label comLabel>Username</label>\n * <input comInput formControlName=\"username\" />\n * </com-form-field>\n * ```\n *\n * @example With prefix and suffix\n * ```html\n * <com-form-field>\n * <label comLabel>Amount</label>\n * <span comPrefix>$</span>\n * <input comInput type=\"number\" formControlName=\"amount\" />\n * <span comSuffix>.00</span>\n * </com-form-field>\n * ```\n */\n@Component({\n selector: 'com-form-field',\n exportAs: 'comFormField',\n template: `\n <div [class]=\"containerClasses()\" (click)=\"onContainerClick($event)\">\n <div class=\"flex items-center w-full\">\n @if (hasPrefix()) {\n <ng-content select=\"[comPrefix]\" />\n }\n @if (labelChild()) {\n <span [class]=\"labelClasses()\">\n <ng-content select=\"[comLabel]\" />\n @if (showRequiredMarker()) {\n <span class=\"text-warn\" aria-hidden=\"true\">&thinsp;*</span>\n }\n </span>\n }\n <div class=\"flex-1 min-w-0\">\n <ng-content />\n </div>\n @if (hasSuffix()) {\n <ng-content select=\"[comSuffix]\" />\n }\n </div>\n </div>\n\n <div [class]=\"subscriptClasses()\">\n <div [class.hidden]=\"!showErrors()\">\n <ng-content select=\"[comError]\" />\n </div>\n <div [class.hidden]=\"showErrors()\" class=\"flex justify-between w-full gap-2\">\n <ng-content select=\"[comHint]:not([align='end'])\" />\n <ng-content select=\"[comHint][align='end']\" />\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styles: `\n /* Hide placeholder when label exists and is not floating (label acts as placeholder) */\n com-form-field.com-form-field--has-label:not(.com-form-field--floating) input::placeholder,\n com-form-field.com-form-field--has-label:not(.com-form-field--floating) textarea::placeholder {\n color: transparent;\n }\n\n /* Hide dropdown placeholder when label exists and is not floating */\n com-form-field.com-form-field--has-label:not(.com-form-field--floating) com-dropdown .text-placeholder {\n display: none;\n }\n\n /* Make dropdown fill available space inside form-field */\n com-form-field com-dropdown {\n display: block;\n width: 100%;\n }\n `,\n host: {\n '[class]': 'hostClasses()',\n '[class.com-form-field--focused]': 'isFocused()',\n '[class.com-form-field--disabled]': 'isDisabled()',\n '[class.com-form-field--error]': 'hasError()',\n '[class.com-form-field--floating]': 'shouldLabelFloat()',\n '[class.com-form-field--has-label]': '!!labelChild()',\n },\n})\nexport class ComFormField {\n private readonly defaults = inject(FORM_FIELD_DEFAULTS, { optional: true });\n\n // Content children\n readonly control: Signal<FormFieldControl | undefined> = contentChild<FormFieldControl>(FormFieldControl);\n readonly inputDirective: Signal<ComInput | undefined> = contentChild<ComInput>(ComInput);\n readonly labelChild: Signal<ComLabel | undefined> = contentChild<ComLabel>(ComLabel);\n readonly hintChildren: Signal<readonly ComHint[]> = contentChildren<ComHint>(ComHint);\n readonly errorChildren: Signal<readonly ComError[]> = contentChildren<ComError>(ComError);\n readonly prefixChild: Signal<ComPrefix | undefined> = contentChild<ComPrefix>(ComPrefix);\n readonly suffixChild: Signal<ComSuffix | undefined> = contentChild<ComSuffix>(ComSuffix);\n\n // Inputs with defaults fallback\n readonly appearance: InputSignal<FormFieldAppearance> = input<FormFieldAppearance>(\n this.defaults?.appearance ?? 'outline'\n );\n readonly color: InputSignal<FormFieldColor> = input<FormFieldColor>(this.defaults?.color ?? 'primary');\n readonly floatLabel: InputSignal<FormFieldFloatLabel> = input<FormFieldFloatLabel>(\n this.defaults?.floatLabel ?? 'auto'\n );\n readonly hideRequiredMarker: InputSignalWithTransform<boolean, unknown> = input(\n this.defaults?.hideRequiredMarker ?? false,\n { transform: booleanAttribute }\n );\n readonly subscriptSizing: InputSignal<FormFieldSubscriptSizing> = input<FormFieldSubscriptSizing>(\n this.defaults?.subscriptSizing ?? 'fixed'\n );\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n // Derived state from inner control\n readonly shouldLabelFloat: Signal<boolean> = computed(() => {\n if (this.floatLabel() === 'always') return true;\n return this.control()?.shouldLabelFloat() ?? false;\n });\n\n readonly isFocused: Signal<boolean> = computed(() => this.control()?.focused() ?? false);\n readonly isDisabled: Signal<boolean> = computed(() => this.control()?.disabled() ?? false);\n readonly hasError: Signal<boolean> = computed(() => this.control()?.errorState() ?? false);\n readonly hasPrefix: Signal<boolean> = computed(() => !!this.prefixChild());\n readonly hasSuffix: Signal<boolean> = computed(() => !!this.suffixChild());\n\n readonly showRequiredMarker: Signal<boolean> = computed(() => {\n if (this.hideRequiredMarker()) return false;\n return this.control()?.required() ?? false;\n });\n\n readonly showErrors: Signal<boolean> = computed(() => this.hasError() && this.errorChildren().length > 0);\n\n // Computed classes\n protected readonly hostClasses: Signal<string> = computed(() =>\n mergeClasses(formFieldVariants({ disabled: this.isDisabled() }), this.userClass())\n );\n\n protected readonly containerClasses: Signal<string> = computed(() =>\n formFieldContainerVariants({\n appearance: this.appearance(),\n color: this.color(),\n focused: this.isFocused(),\n error: this.hasError(),\n disabled: this.isDisabled(),\n })\n );\n\n protected readonly labelClasses: Signal<string> = computed(() =>\n formFieldLabelVariants({\n appearance: this.appearance(),\n floating: this.shouldLabelFloat(),\n color: this.color(),\n error: this.hasError(),\n focused: this.isFocused(),\n disabled: this.isDisabled(),\n })\n );\n\n protected readonly subscriptClasses: Signal<string> = computed(() =>\n formFieldSubscriptVariants({ sizing: this.subscriptSizing() })\n );\n\n constructor() {\n // Wire up label to control\n effect(() => {\n const label = this.labelChild();\n const ctrl = this.control();\n if (label && ctrl) {\n label.setForId(ctrl.id());\n }\n });\n\n // Wire up aria-describedby on the control\n effect(() => {\n const ctrl = this.control();\n if (!ctrl || !('setDescribedByIds' in ctrl)) return;\n\n const ids = this.showErrors()\n ? this.errorChildren().filter((e) => e.shouldShow()).map((e) => e.id)\n : this.hintChildren().map((h) => h.id);\n (ctrl as { setDescribedByIds: (ids: string) => void }).setDescribedByIds(ids.join(' '));\n });\n\n // Wire up appearance to control for proper styling\n effect(() => {\n const ctrl = this.control();\n if (ctrl && 'setAppearance' in ctrl) {\n (ctrl as { setAppearance: (appearance: FormFieldAppearance) => void }).setAppearance(this.appearance());\n }\n });\n\n // Wire up control reference to error directives (re-runs on error state change)\n effect(() => {\n // Read hasError to trigger re-evaluation when validation state changes\n this.hasError();\n const ctrl = this.control();\n const ngControl = ctrl?.ngControl?.control ?? null;\n this.errorChildren().forEach((error) => error.setControl(ngControl));\n });\n }\n\n protected onContainerClick(event: MouseEvent): void {\n this.control()?.onContainerClick(event);\n }\n}\n","// Public API for the form-field component\n\n// Main component\nexport { ComFormField } from './form-field.component';\n\n// Directives\nexport { ComInput } from './input.directive';\nexport { ComLabel } from './label.directive';\nexport { ComHint, type HintAlign } from './hint.directive';\nexport { ComError } from './error.directive';\nexport { ComPrefix } from './prefix.directive';\nexport { ComSuffix } from './suffix.directive';\n\n// Abstract class for custom controls\nexport { FormFieldControl } from './form-field-control';\n\n// Error state matching\nexport { ErrorStateMatcher } from './error-state-matcher';\n\n// Configuration\nexport {\n FORM_FIELD_DEFAULTS,\n type FormFieldDefaults,\n type FormFieldAppearance,\n type FormFieldColor,\n type FormFieldFloatLabel,\n type FormFieldSubscriptSizing,\n} from './form-field-defaults';\n\n// Variants (for advanced customization)\nexport {\n formFieldVariants,\n formFieldContainerVariants,\n formFieldLabelVariants,\n formFieldSubscriptVariants,\n hintVariants,\n errorVariants,\n prefixVariants,\n suffixVariants,\n type FormFieldVariants,\n type FormFieldContainerVariants,\n type FormFieldLabelVariants,\n type FormFieldSubscriptVariants,\n} from './form-field.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextId"],"mappings":";;;;;;;AAGA;;;;;;;;;;;;;;;;AAgBG;MACmB,gBAAgB,CAAA;AAwBrC;;ACzCD;AACA,IAAIA,QAAM,GAAG,CAAC;AAEd;;;;;;;;;;;;;AAaG;MASU,QAAQ,CAAA;AACV,IAAA,OAAO,GAAW,CAAA,UAAA,EAAaA,QAAM,EAAE,EAAE;AAEjC,IAAA,MAAM,GAAG,MAAM,CAAgB,IAAI,kDAAC;AAC5C,IAAA,KAAK,GAA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A,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,KAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACxJzF;AAEA;;ACFA;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-com-components-form-field.mjs","sources":["../../../projects/com/components/form-field/form-field-control.ts","../../../projects/com/components/form-field/label.directive.ts","../../../projects/com/components/form-field/form-field.variants.ts","../../../projects/com/components/form-field/hint.directive.ts","../../../projects/com/components/form-field/error.directive.ts","../../../projects/com/components/form-field/prefix.directive.ts","../../../projects/com/components/form-field/suffix.directive.ts","../../../projects/com/components/form-field/error-state-matcher.ts","../../../projects/com/components/form-field/input.directive.ts","../../../projects/com/components/form-field/form-field-defaults.ts","../../../projects/com/components/form-field/form-field.component.ts","../../../projects/com/components/form-field/index.ts","../../../projects/com/components/form-field/ngx-com-components-form-field.ts"],"sourcesContent":["import type { Signal } from '@angular/core';\nimport type { NgControl } from '@angular/forms';\n\n\n/**\n * Contract that any control inside a form field must implement.\n *\n * This allows the form field to read state from any inner control\n * (input, textarea, custom controls) without knowing implementation details.\n *\n * @example Implementing for a custom phone input\n * ```ts\n * @Directive({\n * selector: 'com-phone-input',\n * providers: [{ provide: FormFieldControl, useExisting: PhoneInputComponent }],\n * })\n * export class PhoneInputComponent extends FormFieldControl<string> {\n * // ... implement all abstract members\n * }\n * ```\n */\nexport abstract class FormFieldControl<T = unknown> {\n /** The NgControl bound to this control (if any). */\n abstract readonly ngControl: NgControl | null;\n\n /** Whether the control is focused. */\n abstract readonly focused: Signal<boolean>;\n\n /** Whether the label should float (focused or non-empty). */\n abstract readonly shouldLabelFloat: Signal<boolean>;\n\n /** Whether the control is required. */\n abstract readonly required: Signal<boolean>;\n\n /** Whether the control is disabled. */\n abstract readonly disabled: Signal<boolean>;\n\n /** Whether the control is in an error state. */\n abstract readonly errorState: Signal<boolean>;\n\n /** Unique ID for the control element. */\n abstract readonly id: Signal<string>;\n\n /** Structured validation errors (Signal Forms path). */\n readonly errors?: Signal<readonly unknown[] | null>;\n\n /** Called when the form field container is clicked. */\n abstract onContainerClick(event: MouseEvent): void;\n}\n","import { Directive, signal } from '@angular/core';\nimport type { Signal } from '@angular/core';\n\n/** Auto-incrementing ID counter. */\nlet nextId = 0;\n\n/**\n * Directive to mark the label element inside a form field.\n *\n * The form field automatically associates this label with the inner control\n * and positions it appropriately based on appearance and float state.\n *\n * @example\n * ```html\n * <com-form-field>\n * <label comLabel>Email address</label>\n * <input comInput formControlName=\"email\" />\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comLabel]',\n exportAs: 'comLabel',\n host: {\n '[attr.for]': 'forId()',\n '[id]': 'labelId',\n },\n})\nexport class ComLabel {\n readonly labelId: string = `com-label-${nextId++}`;\n\n private readonly _forId = signal<string | null>(null);\n readonly forId: Signal<string | null> = this._forId.asReadonly();\n\n /** Sets the `for` attribute to link to the control. Called by form field. */\n setForId(id: string): void {\n this._forId.set(id);\n }\n}\n","import { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\n\nexport type FormFieldAppearance = 'fill' | 'outline';\nexport type FormFieldColor = 'primary' | 'accent' | 'warn';\nexport type FormFieldFloatLabel = 'auto' | 'always';\nexport type FormFieldSubscriptSizing = 'fixed' | 'dynamic';\n\n/**\n * CVA variants for the form field wrapper.\n *\n * @tokens `--color-foreground`\n */\nexport const formFieldVariants: (props?: {\n disabled?: boolean | null | undefined;\n}) => string = cva(\n ['com-form-field', 'relative block w-full', 'text-foreground'],\n {\n variants: {\n disabled: {\n true: 'pointer-events-none',\n false: '',\n },\n },\n defaultVariants: {\n disabled: false,\n },\n }\n);\n\nexport type FormFieldVariants = VariantProps<typeof formFieldVariants>;\n\n/**\n * CVA variants for the input container (the bordered/filled area).\n *\n * @tokens `--color-input-border`, `--color-input-background`, `--color-primary`,\n * `--color-accent`, `--color-warn`, `--color-ring`, `--color-muted`,\n * `--color-disabled`, `--radius-input`\n */\nexport const formFieldContainerVariants: (props?: {\n appearance?: FormFieldAppearance | null | undefined;\n color?: FormFieldColor | null | undefined;\n focused?: boolean | null | undefined;\n error?: boolean | null | undefined;\n disabled?: boolean | null | undefined;\n}) => string = cva(\n [\n 'com-form-field__container',\n 'relative flex items-center',\n 'w-full min-h-11',\n 'transition-all duration-150',\n 'rounded-input',\n ],\n {\n variants: {\n appearance: {\n outline: [\n 'border border-input-border',\n 'bg-transparent',\n 'mt-2.5', // Reserve space for floating label to prevent height jump\n ],\n fill: [\n 'rounded-b-none',\n 'bg-muted',\n 'border-b-2 border-input-border',\n ],\n },\n color: {\n primary: '',\n accent: '',\n warn: '',\n },\n focused: {\n true: '',\n false: '',\n },\n error: {\n true: '',\n false: '',\n },\n disabled: {\n true: 'bg-disabled border-disabled',\n false: '',\n },\n },\n compoundVariants: [\n // Outline + focused (no error)\n { appearance: 'outline', focused: true, error: false, class: 'border-primary ring-1 ring-primary' },\n { appearance: 'outline', focused: true, error: false, color: 'accent', class: 'border-accent ring-accent' },\n { appearance: 'outline', focused: true, error: false, color: 'warn', class: 'border-warn ring-warn' },\n // Outline + error\n { appearance: 'outline', error: true, class: 'border-warn ring-1 ring-warn' },\n // Fill + focused (no error)\n { appearance: 'fill', focused: true, error: false, class: 'border-b-primary' },\n { appearance: 'fill', focused: true, error: false, color: 'accent', class: 'border-b-accent' },\n { appearance: 'fill', focused: true, error: false, color: 'warn', class: 'border-b-warn' },\n // Fill + error\n { appearance: 'fill', error: true, class: 'border-b-warn' },\n ],\n defaultVariants: {\n appearance: 'outline',\n color: 'primary',\n focused: false,\n error: false,\n disabled: false,\n },\n }\n);\n\nexport type FormFieldContainerVariants = VariantProps<typeof formFieldContainerVariants>;\n\n/**\n * CVA variants for the floating label.\n *\n * @tokens `--color-muted-foreground`, `--color-primary`, `--color-accent`,\n * `--color-warn`, `--color-background`\n */\nexport const formFieldLabelVariants: (props?: {\n appearance?: FormFieldAppearance | null | undefined;\n floating?: boolean | null | undefined;\n color?: FormFieldColor | null | undefined;\n error?: boolean | null | undefined;\n focused?: boolean | null | undefined;\n disabled?: boolean | null | undefined;\n}) => string = cva(\n [\n 'com-form-field__label',\n 'pointer-events-none',\n 'text-muted-foreground text-sm',\n 'origin-top-left',\n 'transition-all duration-200 ease-in-out',\n ],\n {\n variants: {\n appearance: {\n outline: '',\n fill: '',\n },\n floating: {\n // Floating: absolute positioning at container border\n true: 'absolute',\n // Not floating: relative positioning in flex flow (after prefix)\n false: 'relative flex-shrink-0 pl-3',\n },\n color: {\n primary: '',\n accent: '',\n warn: '',\n },\n error: {\n true: 'text-warn',\n false: '',\n },\n focused: {\n true: '',\n false: '',\n },\n disabled: {\n true: 'text-disabled-foreground',\n false: '',\n },\n },\n compoundVariants: [\n // Outline floating (label above border with notch effect)\n {\n appearance: 'outline',\n floating: true,\n class: 'left-2 -top-2.5 scale-75 bg-background px-1',\n },\n // Fill floating\n {\n appearance: 'fill',\n floating: true,\n class: 'left-3 top-1 scale-75 text-xs',\n },\n // Focused + floating colors (no error)\n { floating: true, focused: true, error: false, color: 'primary', class: 'text-primary' },\n { floating: true, focused: true, error: false, color: 'accent', class: 'text-accent' },\n { floating: true, focused: true, error: false, color: 'warn', class: 'text-warn' },\n // Error overrides\n { floating: true, error: true, class: 'text-warn' },\n ],\n defaultVariants: {\n appearance: 'outline',\n floating: false,\n color: 'primary',\n error: false,\n focused: false,\n disabled: false,\n },\n }\n);\n\nexport type FormFieldLabelVariants = VariantProps<typeof formFieldLabelVariants>;\n\n/**\n * CVA variants for the subscript area (hints/errors).\n *\n * @tokens (inherits from children)\n */\nexport const formFieldSubscriptVariants: (props?: {\n sizing?: FormFieldSubscriptSizing | null | undefined;\n}) => string = cva(\n ['com-form-field__subscript', 'text-xs mt-1 px-3'],\n {\n variants: {\n sizing: {\n fixed: 'min-h-5',\n dynamic: 'min-h-0',\n },\n },\n defaultVariants: {\n sizing: 'fixed',\n },\n }\n);\n\nexport type FormFieldSubscriptVariants = VariantProps<typeof formFieldSubscriptVariants>;\n\n/**\n * CVA variants for hint text.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const hintVariants: () => string = cva(['com-form-field__hint', 'text-muted-foreground text-xs']);\n\n/**\n * CVA variants for error messages.\n *\n * @tokens `--color-warn`\n */\nexport const errorVariants: () => string = cva(['com-form-field__error', 'text-warn text-xs']);\n\n/**\n * CVA variants for prefix slot.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const prefixVariants: () => string = cva([\n 'com-form-field__prefix',\n 'flex items-center text-muted-foreground pl-3',\n]);\n\n/**\n * CVA variants for suffix slot.\n *\n * @tokens `--color-muted-foreground`\n */\nexport const suffixVariants: () => string = cva([\n 'com-form-field__suffix',\n 'flex items-center text-muted-foreground pr-3',\n]);\n","import { computed, Directive, input } from '@angular/core';\nimport type { InputSignal, Signal } from '@angular/core';\nimport { hintVariants } from './form-field.variants';\nimport { mergeClasses } from 'ngx-com/utils';\n\n/** Alignment of hint text in the subscript area. */\nexport type HintAlign = 'start' | 'end';\n\n/** Auto-incrementing ID counter. */\nlet nextId = 0;\n\n/**\n * Directive for hint text displayed below the form field.\n *\n * The hint provides supplementary information to help users fill out the field.\n * It is automatically added to the control's `aria-describedby`.\n *\n * @tokens `--color-muted-foreground`\n *\n * @example Basic hint\n * ```html\n * <com-form-field>\n * <label comLabel>Password</label>\n * <input comInput formControlName=\"password\" />\n * <span comHint>At least 8 characters</span>\n * </com-form-field>\n * ```\n *\n * @example Right-aligned hint (e.g., character count)\n * ```html\n * <com-form-field>\n * <label comLabel>Bio</label>\n * <textarea comInput formControlName=\"bio\"></textarea>\n * <span comHint>Keep it brief</span>\n * <span comHint align=\"end\">{{ bioLength }}/150</span>\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comHint]',\n exportAs: 'comHint',\n host: {\n '[id]': 'id',\n '[class]': 'hostClasses()',\n },\n})\nexport class ComHint {\n readonly id: string = `com-hint-${nextId++}`;\n readonly align: InputSignal<HintAlign> = input<HintAlign>('start');\n\n protected readonly hostClasses: Signal<string> = computed(() =>\n mergeClasses(hintVariants(), this.align() === 'end' && 'ml-auto')\n );\n}\n","import { computed, Directive, input, signal } from '@angular/core';\nimport type { AbstractControl } from '@angular/forms';\nimport type { InputSignal, Signal, WritableSignal } from '@angular/core';\nimport { errorVariants } from './form-field.variants';\n\n/** Auto-incrementing ID counter. */\nlet nextId = 0;\n\n/**\n * Directive for error messages displayed below the form field.\n *\n * Errors replace hints when the control is in an error state.\n * Uses `role=\"alert\"` and `aria-live=\"polite\"` for screen reader announcement.\n *\n * The optional `match` input allows showing errors only for specific validation errors.\n *\n * @tokens `--color-warn`\n *\n * @example Basic error\n * ```html\n * <com-form-field>\n * <label comLabel>Email</label>\n * <input comInput formControlName=\"email\" />\n * <span comError>Please enter a valid email</span>\n * </com-form-field>\n * ```\n *\n * @example Matching specific errors\n * ```html\n * <com-form-field>\n * <label comLabel>Email</label>\n * <input comInput formControlName=\"email\" />\n * <span comError match=\"required\">Email is required.</span>\n * <span comError match=\"email\">Must be a valid email address.</span>\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comError]',\n exportAs: 'comError',\n host: {\n '[id]': 'id',\n '[class]': 'errorVariants()',\n '[class.hidden]': '!shouldShow()',\n 'role': 'alert',\n 'aria-live': 'polite',\n },\n})\nexport class ComError {\n readonly id: string = `com-error-${nextId++}`;\n\n /** Reference to the form control (Reactive Forms path). */\n private readonly _control: WritableSignal<AbstractControl | null> = signal(null);\n\n /** Structured errors from Signal Forms. */\n private readonly _signalErrors: WritableSignal<readonly unknown[]> = signal([]);\n\n /**\n * Show this error only when a specific validation error key is present.\n * If empty, the error is always shown when the control is in error state.\n */\n readonly match: InputSignal<string> = input<string>('');\n\n protected readonly errorVariants: () => string = errorVariants;\n\n /**\n * Whether this error should be displayed based on the match condition.\n * Used by the form field to filter which errors to show.\n */\n readonly shouldShow: Signal<boolean> = computed(() => {\n const matchKey = this.match();\n if (!matchKey) return true;\n\n // Signal Forms path: match on error.kind\n const signalErrors = this._signalErrors();\n if (signalErrors.length > 0) {\n return signalErrors.some((e) => (e as { kind?: string })?.kind === matchKey);\n }\n\n // Reactive Forms path: match on AbstractControl.errors keys\n const errors = this._control()?.errors;\n return errors ? matchKey in errors : false;\n });\n\n /**\n * Sets the form control reference (Reactive Forms).\n * Called by the parent form field component.\n */\n setControl(control: AbstractControl | null): void {\n this._control.set(control);\n }\n\n /**\n * Sets structured validation errors (Signal Forms).\n * Called by the parent form field component.\n */\n setSignalErrors(errors: readonly unknown[]): void {\n this._signalErrors.set(errors);\n }\n}\n","import { Directive } from '@angular/core';\nimport { prefixVariants } from './form-field.variants';\n\n/**\n * Directive to mark content as the prefix slot in a form field.\n *\n * Prefix content appears before the input (e.g., currency symbol, icon).\n *\n * @tokens `--color-muted-foreground`\n *\n * @example Currency prefix\n * ```html\n * <com-form-field>\n * <label comLabel>Amount</label>\n * <span comPrefix>$</span>\n * <input comInput type=\"number\" formControlName=\"amount\" />\n * </com-form-field>\n * ```\n *\n * @example Icon prefix\n * ```html\n * <com-form-field>\n * <label comLabel>Search</label>\n * <svg comPrefix class=\"size-4\">...</svg>\n * <input comInput formControlName=\"query\" />\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comPrefix]',\n exportAs: 'comPrefix',\n host: {\n '[class]': 'prefixVariants()',\n },\n})\nexport class ComPrefix {\n protected readonly prefixVariants: () => string = prefixVariants;\n}\n","import { Directive } from '@angular/core';\nimport { suffixVariants } from './form-field.variants';\n\n/**\n * Directive to mark content as the suffix slot in a form field.\n *\n * Suffix content appears after the input (e.g., unit, clear button, visibility toggle).\n *\n * @tokens `--color-muted-foreground`\n *\n * @example Unit suffix\n * ```html\n * <com-form-field>\n * <label comLabel>Weight</label>\n * <input comInput type=\"number\" formControlName=\"weight\" />\n * <span comSuffix>kg</span>\n * </com-form-field>\n * ```\n *\n * @example Clear button suffix\n * ```html\n * <com-form-field>\n * <label comLabel>Search</label>\n * <input comInput formControlName=\"query\" />\n * <button comSuffix type=\"button\" (click)=\"clearSearch()\">\n * <svg class=\"size-4\">...</svg>\n * </button>\n * </com-form-field>\n * ```\n *\n * @example Password visibility toggle\n * ```html\n * <com-form-field>\n * <label comLabel>Password</label>\n * <input comInput [type]=\"showPassword ? 'text' : 'password'\" formControlName=\"password\" />\n * <button comSuffix type=\"button\" (click)=\"showPassword = !showPassword\">\n * <svg class=\"size-4\">...</svg>\n * </button>\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: '[comSuffix]',\n exportAs: 'comSuffix',\n host: {\n '[class]': 'suffixVariants()',\n },\n})\nexport class ComSuffix {\n protected readonly suffixVariants: () => string = suffixVariants;\n}\n","import { Injectable } from '@angular/core';\nimport type { AbstractControl, FormGroupDirective, NgForm } from '@angular/forms';\n\n/**\n * Strategy for determining when to display errors in a form field.\n *\n * The default behavior shows errors when the control is invalid AND\n * either touched OR the parent form has been submitted.\n *\n * @example Override globally with eager error display\n * ```ts\n * @Injectable()\n * export class EagerErrorStateMatcher extends ErrorStateMatcher {\n * override isErrorState(control: AbstractControl | null): boolean {\n * return !!(control?.invalid && control.dirty);\n * }\n * }\n *\n * // In app config\n * providers: [{ provide: ErrorStateMatcher, useClass: EagerErrorStateMatcher }]\n * ```\n *\n * @example Per-field override\n * ```html\n * <com-form-field>\n * <input comInput [errorStateMatcher]=\"eagerMatcher\" />\n * </com-form-field>\n * ```\n */\n@Injectable({ providedIn: 'root' })\nexport class ErrorStateMatcher {\n isErrorState(\n control: AbstractControl | null,\n form: FormGroupDirective | NgForm | null\n ): boolean {\n return !!(control?.invalid && (control.touched || form?.submitted));\n }\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n forwardRef,\n inject,\n input,\n signal,\n} from '@angular/core';\nimport type { DoCheck, InputSignal, InputSignalWithTransform, OnInit, Signal, WritableSignal } from '@angular/core';\n\nimport { FormGroupDirective, NgControl, NgForm } from '@angular/forms';\nimport { AutofillMonitor } from '@angular/cdk/text-field';\nimport { FormFieldControl } from './form-field-control';\nimport { ErrorStateMatcher } from './error-state-matcher';\nimport type { FormFieldAppearance } from './form-field-defaults';\n\n/** Auto-incrementing ID counter. */\nlet nextId = 0;\n\n/**\n * Directive applied to native `<input>` and `<textarea>` elements to bridge\n * them to the form field wrapper. Implements the `FormFieldControl` contract.\n *\n * This directive does NOT implement `ControlValueAccessor` - it relies on\n * Angular's built-in value accessors (`DefaultValueAccessor`, `NumberValueAccessor`, etc.)\n * that are already applied to native elements with `formControlName` or `ngModel`.\n *\n * Instead, this directive reports state (focused, empty, disabled, error) to the\n * parent form field for proper visual presentation.\n *\n * @tokens (styling is controlled by the parent form field)\n *\n * @example Basic usage\n * ```html\n * <com-form-field>\n * <label comLabel>Email</label>\n * <input comInput formControlName=\"email\" placeholder=\"you@example.com\" />\n * </com-form-field>\n * ```\n *\n * @example Textarea\n * ```html\n * <com-form-field>\n * <label comLabel>Description</label>\n * <textarea comInput formControlName=\"description\"></textarea>\n * </com-form-field>\n * ```\n *\n * @example Custom error state matcher\n * ```html\n * <com-form-field>\n * <label comLabel>Code</label>\n * <input comInput formControlName=\"code\" [errorStateMatcher]=\"eagerMatcher\" />\n * </com-form-field>\n * ```\n */\n@Directive({\n selector: 'input[comInput], textarea[comInput]',\n exportAs: 'comInput',\n providers: [{ provide: FormFieldControl, useExisting: forwardRef(() => ComInput) }],\n host: {\n '[id]': 'id()',\n '[disabled]': 'disabled()',\n '[required]': 'required()',\n '[attr.aria-invalid]': 'errorState() || null',\n '[attr.aria-required]': 'required() || null',\n '[attr.aria-describedby]': 'ariaDescribedBy() || null',\n '[class]': 'hostClasses()',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(input)': 'onInput()',\n },\n})\nexport class ComInput implements FormFieldControl<string>, OnInit, DoCheck {\n private readonly elementRef: ElementRef<HTMLInputElement | HTMLTextAreaElement> = inject(ElementRef);\n private readonly destroyRef = inject(DestroyRef);\n private readonly autofillMonitor = inject(AutofillMonitor);\n private readonly defaultErrorStateMatcher = inject(ErrorStateMatcher);\n private readonly parentForm = inject(NgForm, { optional: true });\n private readonly parentFormGroup = inject(FormGroupDirective, { optional: true });\n\n /** NgControl bound to this input (if using reactive forms). */\n readonly ngControl: NgControl | null = inject(NgControl, { optional: true, self: true });\n\n // Inputs\n readonly inputId: InputSignal<string | undefined> = input<string>(undefined, { alias: 'id' });\n readonly inputDisabled: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'disabled',\n transform: booleanAttribute,\n });\n readonly inputRequired: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'required',\n transform: booleanAttribute,\n });\n readonly userAriaDescribedBy: InputSignal<string> = input<string>('', { alias: 'aria-describedby' });\n readonly errorStateMatcher: InputSignal<ErrorStateMatcher | undefined> = input<ErrorStateMatcher>();\n\n // Signal Forms inputs — set automatically by [formField] via setInputOnDirectives\n readonly sfInvalid: InputSignal<boolean> = input(false, { alias: 'invalid' });\n readonly sfTouched: InputSignalWithTransform<boolean, unknown> = input(false, {\n alias: 'touched',\n transform: booleanAttribute,\n });\n readonly sfErrors: InputSignal<readonly unknown[]> = input<readonly unknown[]>([], {\n alias: 'errors',\n });\n\n /** Whether the form system is Signal Forms (no NgControl present). */\n private readonly isSignalForms: boolean = !this.ngControl;\n\n // Internal state\n private readonly _focused = signal(false);\n private readonly _autofilled = signal(false);\n private readonly _empty = signal(true);\n private readonly _uniqueId: string = `com-input-${nextId++}`;\n private readonly _appearance: WritableSignal<FormFieldAppearance> = signal<FormFieldAppearance>('outline');\n private _previousNativeValue: string = '';\n\n // Public signals implementing FormFieldControl\n readonly focused: Signal<boolean> = this._focused.asReadonly();\n\n readonly id: Signal<string> = computed(() => this.inputId() ?? this._uniqueId);\n\n readonly shouldLabelFloat: Signal<boolean> = computed(() => {\n return this._focused() || !this._empty() || this._autofilled();\n });\n\n readonly disabled: Signal<boolean> = computed(() => {\n if (this.inputDisabled()) return true;\n return this.ngControl?.control?.disabled ?? false;\n });\n\n readonly required: Signal<boolean> = computed(() => {\n if (this.inputRequired()) return true;\n const control = this.ngControl?.control;\n if (control?.validator) {\n const result = control.validator({ value: '' } as never);\n return result?.['required'] !== undefined;\n }\n return false;\n });\n\n readonly errorState: Signal<boolean> = computed(() => {\n if (this.isSignalForms) {\n // Signal Forms: gate on both invalid AND touched — mirrors ErrorStateMatcher default.\n // Signal Forms' invalid is pure validation state (not gated by touched).\n return this.sfInvalid() && this.sfTouched();\n }\n // Reactive Forms: use ErrorStateMatcher (existing logic)\n this._focused();\n this._empty();\n const matcher = this.errorStateMatcher() ?? this.defaultErrorStateMatcher;\n const form = this.parentFormGroup ?? this.parentForm;\n return matcher.isErrorState(this.ngControl?.control ?? null, form);\n });\n\n /** Structured validation errors from Signal Forms, exposed for the parent form field. */\n readonly errors: Signal<readonly unknown[] | null> = computed(() =>\n this.isSignalForms ? this.sfErrors() : null\n );\n\n /** Combined aria-describedby including user-provided and form-field-generated IDs. */\n private readonly _describedByIds = signal('');\n\n readonly ariaDescribedBy: Signal<string> = computed(() => {\n const userIds = this.userAriaDescribedBy();\n const fieldIds = this._describedByIds();\n return [userIds, fieldIds].filter(Boolean).join(' ');\n });\n\n /** Computed host classes including appearance-based padding. */\n protected readonly hostClasses: Signal<string> = computed(() => {\n const base =\n 'peer w-full bg-transparent text-foreground placeholder:text-input-placeholder outline-none border-none disabled:cursor-not-allowed disabled:text-disabled-foreground px-3';\n const padding = this._appearance() === 'fill' ? 'pt-5 pb-1.5' : 'py-2.5';\n return `${base} ${padding}`;\n });\n\n ngOnInit(): void {\n this._previousNativeValue = this.elementRef.nativeElement.value;\n this.updateEmpty();\n\n const autofillSub = this.autofillMonitor.monitor(this.elementRef).subscribe((event) => {\n this._autofilled.set(event.isAutofilled);\n });\n\n this.destroyRef.onDestroy(() => {\n autofillSub.unsubscribe();\n this.autofillMonitor.stopMonitoring(this.elementRef);\n });\n }\n\n ngDoCheck(): void {\n this.dirtyCheckNativeValue();\n }\n\n private dirtyCheckNativeValue(): void {\n const newValue = this.elementRef.nativeElement.value;\n if (this._previousNativeValue !== newValue) {\n this._previousNativeValue = newValue;\n this.updateEmpty();\n }\n }\n\n protected onFocus(): void {\n this._focused.set(true);\n }\n\n protected onBlur(): void {\n this._focused.set(false);\n }\n\n protected onInput(): void {\n this.updateEmpty();\n }\n\n private updateEmpty(): void {\n this._empty.set(!this.elementRef.nativeElement.value);\n }\n\n // FormFieldControl methods\n onContainerClick(event: MouseEvent): void {\n if (!this.disabled() && event.target !== this.elementRef.nativeElement) {\n this.elementRef.nativeElement.focus();\n }\n }\n\n /**\n * Sets the describedBy IDs from the form field.\n * Called by the parent form field component.\n */\n setDescribedByIds(ids: string): void {\n this._describedByIds.set(ids);\n }\n\n /**\n * Sets the appearance for styling.\n * Called by the parent form field component.\n */\n setAppearance(appearance: FormFieldAppearance): void {\n this._appearance.set(appearance);\n }\n\n /** Focus the native element. */\n focus(): void {\n this.elementRef.nativeElement.focus();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport type {\n FormFieldAppearance,\n FormFieldColor,\n FormFieldFloatLabel,\n FormFieldSubscriptSizing,\n} from './form-field.variants';\n\n// Re-export types for convenience\nexport type { FormFieldAppearance, FormFieldColor, FormFieldFloatLabel, FormFieldSubscriptSizing };\n\n/**\n * Global configuration defaults for form fields.\n *\n * @example Set defaults in app config\n * ```ts\n * providers: [\n * {\n * provide: FORM_FIELD_DEFAULTS,\n * useValue: {\n * appearance: 'fill',\n * floatLabel: 'always',\n * color: 'primary',\n * }\n * }\n * ]\n * ```\n */\nexport interface FormFieldDefaults {\n appearance?: FormFieldAppearance;\n color?: FormFieldColor;\n floatLabel?: FormFieldFloatLabel;\n hideRequiredMarker?: boolean;\n subscriptSizing?: FormFieldSubscriptSizing;\n}\n\nexport const FORM_FIELD_DEFAULTS: InjectionToken<FormFieldDefaults> = new InjectionToken<FormFieldDefaults>(\n 'FORM_FIELD_DEFAULTS',\n {\n providedIn: 'root',\n factory: (): FormFieldDefaults => ({}),\n }\n);\n","import {\n booleanAttribute,\n ChangeDetectionStrategy,\n Component,\n computed,\n contentChild,\n contentChildren,\n effect,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport type { InputSignal, InputSignalWithTransform, Signal } from '@angular/core';\nimport { FormFieldControl } from './form-field-control';\nimport { ComLabel } from './label.directive';\nimport { ComHint } from './hint.directive';\nimport { ComError } from './error.directive';\nimport { ComPrefix } from './prefix.directive';\nimport { ComSuffix } from './suffix.directive';\nimport { ComInput } from './input.directive';\nimport {\n FORM_FIELD_DEFAULTS,\n type FormFieldAppearance,\n type FormFieldColor,\n type FormFieldFloatLabel,\n type FormFieldSubscriptSizing,\n} from './form-field-defaults';\nimport {\n formFieldVariants,\n formFieldContainerVariants,\n formFieldLabelVariants,\n formFieldSubscriptVariants,\n} from './form-field.variants';\nimport { mergeClasses } from 'ngx-com/utils';\n\n/**\n * Form field wrapper providing visual structure for form inputs.\n *\n * Provides floating labels, borders (outline/fill appearance), hints, errors,\n * and prefix/suffix slots. Automatically wires ARIA attributes for accessibility.\n *\n * The form field reads state from its inner `FormFieldControl` child (typically\n * a `ComInput` directive) and renders UI accordingly.\n *\n * @tokens `--color-foreground`, `--color-input-border`, `--color-input-background`,\n * `--color-primary`, `--color-accent`, `--color-warn`, `--color-ring`,\n * `--color-muted`, `--color-muted-foreground`, `--color-disabled`,\n * `--color-disabled-foreground`, `--color-background`, `--radius-input`\n *\n * @example Basic outline field\n * ```html\n * <com-form-field>\n * <label comLabel>Email</label>\n * <input comInput formControlName=\"email\" />\n * <span comHint>We'll never share your email.</span>\n * <span comError match=\"required\">Email is required.</span>\n * </com-form-field>\n * ```\n *\n * @example Fill appearance\n * ```html\n * <com-form-field appearance=\"fill\">\n * <label comLabel>Username</label>\n * <input comInput formControlName=\"username\" />\n * </com-form-field>\n * ```\n *\n * @example With prefix and suffix\n * ```html\n * <com-form-field>\n * <label comLabel>Amount</label>\n * <span comPrefix>$</span>\n * <input comInput type=\"number\" formControlName=\"amount\" />\n * <span comSuffix>.00</span>\n * </com-form-field>\n * ```\n */\n@Component({\n selector: 'com-form-field',\n exportAs: 'comFormField',\n template: `\n <div [class]=\"containerClasses()\" (click)=\"onContainerClick($event)\">\n <div class=\"flex items-center w-full\">\n @if (hasPrefix()) {\n <ng-content select=\"[comPrefix]\" />\n }\n @if (labelChild()) {\n <span [class]=\"labelClasses()\">\n <ng-content select=\"[comLabel]\" />\n @if (showRequiredMarker()) {\n <span class=\"text-warn\" aria-hidden=\"true\">&thinsp;*</span>\n }\n </span>\n }\n <div class=\"flex-1 min-w-0\">\n <ng-content />\n </div>\n @if (hasSuffix()) {\n <ng-content select=\"[comSuffix]\" />\n }\n </div>\n </div>\n\n <div [class]=\"subscriptClasses()\">\n <div [class.hidden]=\"!showErrors()\">\n <ng-content select=\"[comError]\" />\n </div>\n <div [class.hidden]=\"showErrors()\" class=\"flex justify-between w-full gap-2\">\n <ng-content select=\"[comHint]:not([align='end'])\" />\n <ng-content select=\"[comHint][align='end']\" />\n </div>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n styles: `\n /* Hide placeholder when label exists and is not floating (label acts as placeholder) */\n com-form-field.com-form-field--has-label:not(.com-form-field--floating) input::placeholder,\n com-form-field.com-form-field--has-label:not(.com-form-field--floating) textarea::placeholder {\n color: transparent;\n }\n\n /* Hide dropdown placeholder when label exists and is not floating */\n com-form-field.com-form-field--has-label:not(.com-form-field--floating) com-dropdown .text-placeholder {\n display: none;\n }\n\n /* Make dropdown fill available space inside form-field */\n com-form-field com-dropdown {\n display: block;\n width: 100%;\n }\n `,\n host: {\n '[class]': 'hostClasses()',\n '[class.com-form-field--focused]': 'isFocused()',\n '[class.com-form-field--disabled]': 'isDisabled()',\n '[class.com-form-field--error]': 'hasError()',\n '[class.com-form-field--floating]': 'shouldLabelFloat()',\n '[class.com-form-field--has-label]': '!!labelChild()',\n },\n})\nexport class ComFormField {\n private readonly defaults = inject(FORM_FIELD_DEFAULTS, { optional: true });\n\n // Content children\n readonly control: Signal<FormFieldControl | undefined> = contentChild<FormFieldControl>(FormFieldControl);\n readonly inputDirective: Signal<ComInput | undefined> = contentChild<ComInput>(ComInput);\n readonly labelChild: Signal<ComLabel | undefined> = contentChild<ComLabel>(ComLabel);\n readonly hintChildren: Signal<readonly ComHint[]> = contentChildren<ComHint>(ComHint);\n readonly errorChildren: Signal<readonly ComError[]> = contentChildren<ComError>(ComError);\n readonly prefixChild: Signal<ComPrefix | undefined> = contentChild<ComPrefix>(ComPrefix);\n readonly suffixChild: Signal<ComSuffix | undefined> = contentChild<ComSuffix>(ComSuffix);\n\n // Inputs with defaults fallback\n readonly appearance: InputSignal<FormFieldAppearance> = input<FormFieldAppearance>(\n this.defaults?.appearance ?? 'outline'\n );\n readonly color: InputSignal<FormFieldColor> = input<FormFieldColor>(this.defaults?.color ?? 'primary');\n readonly floatLabel: InputSignal<FormFieldFloatLabel> = input<FormFieldFloatLabel>(\n this.defaults?.floatLabel ?? 'auto'\n );\n readonly hideRequiredMarker: InputSignalWithTransform<boolean, unknown> = input(\n this.defaults?.hideRequiredMarker ?? false,\n { transform: booleanAttribute }\n );\n readonly subscriptSizing: InputSignal<FormFieldSubscriptSizing> = input<FormFieldSubscriptSizing>(\n this.defaults?.subscriptSizing ?? 'fixed'\n );\n readonly userClass: InputSignal<string> = input<string>('', { alias: 'class' });\n\n // Derived state from inner control\n readonly shouldLabelFloat: Signal<boolean> = computed(() => {\n if (this.floatLabel() === 'always') return true;\n return this.control()?.shouldLabelFloat() ?? false;\n });\n\n readonly isFocused: Signal<boolean> = computed(() => this.control()?.focused() ?? false);\n readonly isDisabled: Signal<boolean> = computed(() => this.control()?.disabled() ?? false);\n readonly hasError: Signal<boolean> = computed(() => this.control()?.errorState() ?? false);\n readonly hasPrefix: Signal<boolean> = computed(() => !!this.prefixChild());\n readonly hasSuffix: Signal<boolean> = computed(() => !!this.suffixChild());\n\n readonly showRequiredMarker: Signal<boolean> = computed(() => {\n if (this.hideRequiredMarker()) return false;\n return this.control()?.required() ?? false;\n });\n\n readonly showErrors: Signal<boolean> = computed(() => this.hasError() && this.errorChildren().length > 0);\n\n // Computed classes\n protected readonly hostClasses: Signal<string> = computed(() =>\n mergeClasses(formFieldVariants({ disabled: this.isDisabled() }), this.userClass())\n );\n\n protected readonly containerClasses: Signal<string> = computed(() =>\n formFieldContainerVariants({\n appearance: this.appearance(),\n color: this.color(),\n focused: this.isFocused(),\n error: this.hasError(),\n disabled: this.isDisabled(),\n })\n );\n\n protected readonly labelClasses: Signal<string> = computed(() =>\n formFieldLabelVariants({\n appearance: this.appearance(),\n floating: this.shouldLabelFloat(),\n color: this.color(),\n error: this.hasError(),\n focused: this.isFocused(),\n disabled: this.isDisabled(),\n })\n );\n\n protected readonly subscriptClasses: Signal<string> = computed(() =>\n formFieldSubscriptVariants({ sizing: this.subscriptSizing() })\n );\n\n constructor() {\n // Wire up label to control\n effect(() => {\n const label = this.labelChild();\n const ctrl = this.control();\n if (label && ctrl) {\n label.setForId(ctrl.id());\n }\n });\n\n // Wire up aria-describedby on the control\n effect(() => {\n const ctrl = this.control();\n if (!ctrl || !('setDescribedByIds' in ctrl)) return;\n\n const ids = this.showErrors()\n ? this.errorChildren().filter((e) => e.shouldShow()).map((e) => e.id)\n : this.hintChildren().map((h) => h.id);\n (ctrl as { setDescribedByIds: (ids: string) => void }).setDescribedByIds(ids.join(' '));\n });\n\n // Wire up appearance to control for proper styling\n effect(() => {\n const ctrl = this.control();\n if (ctrl && 'setAppearance' in ctrl) {\n (ctrl as { setAppearance: (appearance: FormFieldAppearance) => void }).setAppearance(this.appearance());\n }\n });\n\n // Wire up control reference to error directives (re-runs on error state change)\n effect(() => {\n // Read hasError to trigger re-evaluation when validation state changes\n this.hasError();\n const ctrl = this.control();\n if (!ctrl) return;\n\n const errors = ctrl.errors?.() ?? null;\n if (errors !== null) {\n // Signal Forms path: pass structured errors to each comError\n this.errorChildren().forEach((error) => error.setSignalErrors(errors as readonly unknown[]));\n } else {\n // Reactive Forms path: pass AbstractControl reference\n const ngControl = ctrl.ngControl?.control ?? null;\n this.errorChildren().forEach((error) => error.setControl(ngControl));\n }\n });\n }\n\n protected onContainerClick(event: MouseEvent): void {\n this.control()?.onContainerClick(event);\n }\n}\n","// Public API for the form-field component\n\n// Main component\nexport { ComFormField } from './form-field.component';\n\n// Directives\nexport { ComInput } from './input.directive';\nexport { ComLabel } from './label.directive';\nexport { ComHint, type HintAlign } from './hint.directive';\nexport { ComError } from './error.directive';\nexport { ComPrefix } from './prefix.directive';\nexport { ComSuffix } from './suffix.directive';\n\n// Abstract class for custom controls\nexport { FormFieldControl } from './form-field-control';\n\n// Error state matching\nexport { ErrorStateMatcher } from './error-state-matcher';\n\n// Configuration\nexport {\n FORM_FIELD_DEFAULTS,\n type FormFieldDefaults,\n type FormFieldAppearance,\n type FormFieldColor,\n type FormFieldFloatLabel,\n type FormFieldSubscriptSizing,\n} from './form-field-defaults';\n\n// Variants (for advanced customization)\nexport {\n formFieldVariants,\n formFieldContainerVariants,\n formFieldLabelVariants,\n formFieldSubscriptVariants,\n hintVariants,\n errorVariants,\n prefixVariants,\n suffixVariants,\n type FormFieldVariants,\n type FormFieldContainerVariants,\n type FormFieldLabelVariants,\n type FormFieldSubscriptVariants,\n} from './form-field.variants';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["nextId"],"mappings":";;;;;;;AAIA;;;;;;;;;;;;;;;;AAgBG;MACmB,gBAAgB,CAAA;;AAuB3B,IAAA,MAAM;AAIhB;;AC7CD;AACA,IAAIA,QAAM,GAAG,CAAC;AAEd;;;;;;;;;;;;;AAaG;MASU,QAAQ,CAAA;AACV,IAAA,OAAO,GAAW,CAAA,UAAA,EAAaA,QAAM,EAAE,EAAE;AAEjC,IAAA,MAAM,GAAG,MAAM,CAAgB,IAAI,kDAAC;AAC5C,IAAA,KAAK,GAA0B,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE;;AAGhE,IAAA,QAAQ,CAAC,EAAU,EAAA;AACjB,QAAA,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;IACrB;uGATW,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;2FAAR,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,YAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,SAAA,EAA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CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,UAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,YAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,kBAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,oBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,eAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,SAAA,EAAA,CAAA,EAAA,IAAA,EAAA,EAAA,CAAA,KAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,KAAA,EAAA,OAAA,EAAA,QAAA,EAAA,KAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA;;ACxJzF;AAEA;;ACFA;;AAEG;;;;"}
@@ -159,8 +159,11 @@ class ComRadioGroup {
159
159
  variant = input('primary', ...(ngDevMode ? [{ debugName: "variant" }] : []));
160
160
  errorMessage = input('', ...(ngDevMode ? [{ debugName: "errorMessage" }] : []));
161
161
  errorStateMatcher = input(...(ngDevMode ? [undefined, { debugName: "errorStateMatcher" }] : []));
162
- /** Internal signal to track when control is touched, used to trigger error state re-evaluation. */
163
- _touched = signal(false, ...(ngDevMode ? [{ debugName: "_touched" }] : []));
162
+ /** Tracks touched state writable by both CVA callback and Signal Forms [formField]. */
163
+ touched = model(false, ...(ngDevMode ? [{ debugName: "touched" }] : []));
164
+ // Signal Forms inputs — set automatically by [formField] via setInputOnDirectives
165
+ invalid = input(false, ...(ngDevMode ? [{ debugName: "invalid" }] : []));
166
+ sfErrors = input([], { ...(ngDevMode ? { debugName: "sfErrors" } : {}), alias: 'errors' });
164
167
  ariaLabel = input(null, { ...(ngDevMode ? { debugName: "ariaLabel" } : {}), alias: 'aria-label' });
165
168
  ariaLabelledby = input(null, { ...(ngDevMode ? { debugName: "ariaLabelledby" } : {}), alias: 'aria-labelledby' });
166
169
  ariaDescribedby = input(null, { ...(ngDevMode ? { debugName: "ariaDescribedby" } : {}), alias: 'aria-describedby' });
@@ -185,11 +188,15 @@ class ComRadioGroup {
185
188
  * Shows errors when control is invalid and touched/submitted.
186
189
  */
187
190
  errorState = computed(() => {
188
- // Read _touched to trigger re-evaluation when touched changes
189
- this._touched();
191
+ if (!this.ngControl) {
192
+ // Signal Forms: gate on invalid AND touched (mirrors ErrorStateMatcher default)
193
+ return this.invalid() && this.touched();
194
+ }
195
+ // Reactive Forms: use ErrorStateMatcher (existing logic)
196
+ this.touched();
190
197
  const matcher = this.errorStateMatcher() ?? this.defaultErrorStateMatcher;
191
198
  const form = this.parentFormGroup ?? this.parentForm;
192
- return matcher.isErrorState(this.ngControl?.control ?? null, form);
199
+ return matcher.isErrorState(this.ngControl.control ?? null, form);
193
200
  }, ...(ngDevMode ? [{ debugName: "errorState" }] : []));
194
201
  computedAriaDescribedby = computed(() => {
195
202
  const userDescribedby = this.ariaDescribedby();
@@ -242,7 +249,7 @@ class ComRadioGroup {
242
249
  }
243
250
  registerOnTouched(fn) {
244
251
  this.onTouchedCallback = () => {
245
- this._touched.set(true);
252
+ this.touched.set(true);
246
253
  fn();
247
254
  };
248
255
  }
@@ -293,7 +300,7 @@ class ComRadioGroup {
293
300
  }
294
301
  }
295
302
  static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.0", ngImport: i0, type: ComRadioGroup, deps: [], target: i0.ɵɵFactoryTarget.Component });
296
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ComRadioGroup, isStandalone: true, selector: "com-radio-group", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", 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 }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", selectionChange: "selectionChange" }, host: { properties: { "class.com-radio-group--disabled": "disabled()", "class.com-radio-group--error": "errorState()" }, classAttribute: "com-radio-group block" }, providers: [
303
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.0", type: ComRadioGroup, isStandalone: true, selector: "com-radio-group", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", 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 }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, errorMessage: { classPropertyName: "errorMessage", publicName: "errorMessage", isSignal: true, isRequired: false, transformFunction: null }, errorStateMatcher: { classPropertyName: "errorStateMatcher", publicName: "errorStateMatcher", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, sfErrors: { classPropertyName: "sfErrors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledby: { classPropertyName: "ariaLabelledby", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedby: { classPropertyName: "ariaDescribedby", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", disabled: "disabledChange", touched: "touchedChange", selectionChange: "selectionChange" }, host: { properties: { "class.com-radio-group--disabled": "disabled()", "class.com-radio-group--error": "errorState()" }, classAttribute: "com-radio-group block" }, providers: [
297
304
  {
298
305
  provide: COM_RADIO_GROUP,
299
306
  useFactory: () => {
@@ -368,7 +375,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.0", ngImpor
368
375
  '[class.com-radio-group--error]': 'errorState()',
369
376
  },
370
377
  }]
371
- }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }] } });
378
+ }], ctorParameters: () => [], propDecorators: { name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }, { type: i0.Output, args: ["disabledChange"] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], errorMessage: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorMessage", required: false }] }], errorStateMatcher: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorStateMatcher", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], sfErrors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], ariaLabelledby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaDescribedby: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-describedby", required: false }] }], selectionChange: [{ type: i0.Output, args: ["selectionChange"] }] } });
372
379
 
373
380
  /**
374
381
  * Production-grade radio component with full accessibility support.