@radix-ng/primitives 1.0.9 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +26 -5
  2. package/fesm2022/radix-ng-primitives-autocomplete.mjs +35 -19
  3. package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
  4. package/fesm2022/radix-ng-primitives-checkbox.mjs +55 -7
  5. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  6. package/fesm2022/radix-ng-primitives-combobox.mjs +46 -21
  7. package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-composite.mjs +221 -36
  9. package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-core.mjs +189 -26
  11. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  12. package/fesm2022/radix-ng-primitives-date-field.mjs +29 -13
  13. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-field.mjs +127 -23
  15. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +9 -0
  17. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-focus-scope.mjs +241 -95
  19. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-form.mjs +35 -4
  21. package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-input.mjs +87 -15
  23. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
  24. package/fesm2022/radix-ng-primitives-menu.mjs +131 -16
  25. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +17 -3
  27. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-popper.mjs +223 -29
  29. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-portal.mjs +16 -5
  31. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-scroll-area.mjs +6 -3
  33. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  34. package/fesm2022/radix-ng-primitives-select.mjs +49 -17
  35. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  36. package/fesm2022/radix-ng-primitives-signal-forms.mjs +27 -11
  37. package/fesm2022/radix-ng-primitives-signal-forms.mjs.map +1 -1
  38. package/fesm2022/radix-ng-primitives-time-field.mjs +24 -10
  39. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  40. package/package.json +8 -7
  41. package/types/radix-ng-primitives-autocomplete.d.ts +7 -2
  42. package/types/radix-ng-primitives-checkbox.d.ts +10 -1
  43. package/types/radix-ng-primitives-combobox.d.ts +29 -2
  44. package/types/radix-ng-primitives-composite.d.ts +48 -2
  45. package/types/radix-ng-primitives-core.d.ts +165 -104
  46. package/types/radix-ng-primitives-date-field.d.ts +21 -8
  47. package/types/radix-ng-primitives-field.d.ts +55 -8
  48. package/types/radix-ng-primitives-floating-focus-manager.d.ts +7 -0
  49. package/types/radix-ng-primitives-focus-scope.d.ts +61 -44
  50. package/types/radix-ng-primitives-form.d.ts +9 -0
  51. package/types/radix-ng-primitives-input.d.ts +10 -2
  52. package/types/radix-ng-primitives-menu.d.ts +59 -7
  53. package/types/radix-ng-primitives-navigation-menu.d.ts +2 -2
  54. package/types/radix-ng-primitives-popover.d.ts +2 -2
  55. package/types/radix-ng-primitives-popper.d.ts +186 -48
  56. package/types/radix-ng-primitives-portal.d.ts +18 -8
  57. package/types/radix-ng-primitives-preview-card.d.ts +2 -2
  58. package/types/radix-ng-primitives-select.d.ts +17 -3
  59. package/types/radix-ng-primitives-signal-forms.d.ts +22 -8
  60. package/types/radix-ng-primitives-time-field.d.ts +21 -10
  61. package/types/radix-ng-primitives-tooltip.d.ts +2 -2
  62. package/fesm2022/radix-ng-primitives-focus-guards.mjs +0 -53
  63. package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +0 -1
  64. package/focus-guards/README.md +0 -1
  65. package/types/radix-ng-primitives-focus-guards.d.ts +0 -15
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-field.mjs","sources":["../../../packages/primitives/field/src/field-root.ts","../../../packages/primitives/field/src/field-control.ts","../../../packages/primitives/field/src/field-description.ts","../../../packages/primitives/field/src/field-error.ts","../../../packages/primitives/field/src/field-item.ts","../../../packages/primitives/field/src/field-label.ts","../../../packages/primitives/field/radix-ng-primitives-field.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n signal,\n Signal\n} from '@angular/core';\nimport {\n BooleanInput,\n createContext,\n injectId,\n isValidationRevealed,\n RDX_DEFAULT_VALIDATION_MODE,\n RDX_FIELD_VALIDITY,\n RdxValidationError,\n RdxValidationMode\n} from '@radix-ng/primitives/core';\nimport { injectFormRootContext, RdxFormFieldRegistration } from '@radix-ng/primitives/form';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * External owner of field state. An adapter (e.g. a future Signal Forms\n * `[rdxSignalField]` directive, or a Reactive Forms bridge) registers one via\n * `setStateProvider` so Field reads authoritative form state instead of\n * self-computing it from the DOM. Each member is an optional signal-like\n * accessor; only the states the adapter owns need to be provided — the rest\n * fall back to the root's inputs / DOM heuristic. Keeping these as plain\n * `() => boolean` accessors keeps Field framework-agnostic (no dependency on\n * `@angular/forms/signals`).\n *\n * See ADR 0004 and `signal-forms-readiness.md` (prep #4).\n */\nexport interface RdxFieldState {\n /**\n * The control's **actual** invalidity (ungated). The Field decides *when* to display it from its\n * `validationMode` (e.g. only after blur) — the adapter just reports the real state. A non-empty\n * `errors()` also counts as invalid.\n */\n invalid?: () => boolean;\n disabled?: () => boolean;\n required?: () => boolean;\n dirty?: () => boolean;\n touched?: () => boolean;\n filled?: () => boolean;\n focused?: () => boolean;\n /**\n * Optional source of error *content* (not just the invalid boolean). A non-empty list marks the field\n * **actually** invalid (client validation) and its messages (`message ?? kind` per error) surface\n * through `RdxFieldError.messages()` once the field's `validationMode` reveals client validity, ahead of\n * any enclosing Form's server messages. Uses `core`'s framework-free shim type so the seam stays free of\n * `@angular/forms/signals` (ADR 0004 amendment).\n */\n errors?: () => RdxValidationError[];\n}\n\nconst addId = (ids: string[], id: string) => (ids.includes(id) ? ids : [...ids, id]);\nconst removeId = (ids: string[], id: string) => ids.filter((item) => item !== id);\n\nexport interface RdxFieldRootContext {\n controlId: Signal<string>;\n name: Signal<string | undefined>;\n descriptionIds: Signal<string[]>;\n errorIds: Signal<string[]>;\n messages: Signal<string[]>;\n notifyEdited: () => void;\n /** Tri-state *displayed* validity (`true` valid / `false` invalid / `null` neutral), gated by the\n * field's `validationMode`. The source for `data-valid` / `data-invalid` on the field and its controls. */\n validState: Signal<boolean | null>;\n /** Whether the enclosing Form has had a submit attempted (always `false` with no Form). */\n formSubmitAttempted: Signal<boolean>;\n invalidState: Signal<boolean>;\n disabledState: Signal<boolean>;\n requiredState: Signal<boolean>;\n dirtyState: Signal<boolean>;\n touchedState: Signal<boolean>;\n filledState: Signal<boolean>;\n focusedState: Signal<boolean>;\n setControlId: (id: string) => void;\n addDescriptionId: (id: string) => void;\n removeDescriptionId: (id: string) => void;\n addErrorId: (id: string) => void;\n removeErrorId: (id: string) => void;\n setFocused: (value: boolean) => void;\n setFilled: (value: boolean) => void;\n setDirty: (value: boolean) => void;\n setTouched: (value: boolean) => void;\n setStateProvider: (provider: RdxFieldState | null) => RdxFieldState | null;\n /**\n * Identity-checked teardown: roll the slot back to `previous` only if `provider` is still the\n * active one. A newer adapter that registered after `provider` (create-before-destroy during a\n * view swap) owns the slot and must not be clobbered by the old adapter's destroy.\n */\n clearStateProvider: (provider: RdxFieldState | null, previous: RdxFieldState | null) => void;\n hasStateProvider: Signal<boolean>;\n}\n\nconst fieldRootContext = (): RdxFieldRootContext => {\n const root = injectFieldRoot();\n\n return {\n controlId: root.controlId,\n name: root.name,\n descriptionIds: root.descriptionIds,\n errorIds: root.errorIds,\n /** Combined messages for `RdxFieldError`: client (provider + form name-routing, when revealed) then\n * server (`errors` input, always). */\n messages: root.messages,\n /** Notify an enclosing Form that this field's control was edited (composite-control opt-in). */\n notifyEdited: () => root.notifyEdited(),\n validState: root.validState,\n formSubmitAttempted: root.formSubmitAttempted,\n invalidState: root.invalidState,\n disabledState: root.disabledState,\n requiredState: root.requiredState,\n dirtyState: root.dirtyState,\n touchedState: root.touchedState,\n filledState: root.filledState,\n focusedState: root.focusedState,\n setControlId: (id: string) => root.controlId.set(id),\n addDescriptionId: (id: string) => root.descriptionIds.update((ids) => addId(ids, id)),\n removeDescriptionId: (id: string) => root.descriptionIds.update((ids) => removeId(ids, id)),\n addErrorId: (id: string) => root.errorIds.update((ids) => addId(ids, id)),\n removeErrorId: (id: string) => root.errorIds.update((ids) => removeId(ids, id)),\n setFocused: (value: boolean) => root.focusedValue.set(value),\n setFilled: (value: boolean) => root.filledValue.set(value),\n setDirty: (value: boolean) => root.dirtyValue.set(value),\n setTouched: (value: boolean) => root.touchedValue.set(value),\n /**\n * Register (or clear with `null`) an external owner of field state.\n * While a provider is registered, any state it exposes takes precedence\n * over the root inputs and the DOM-derived values. Returns the previous\n * provider so adapters can restore it on teardown.\n */\n setStateProvider: (provider: RdxFieldState | null) => root.setStateProvider(provider),\n clearStateProvider: (provider: RdxFieldState | null, previous: RdxFieldState | null) =>\n root.clearStateProvider(provider, previous),\n hasStateProvider: root.hasStateProvider\n };\n};\n\nexport const [injectFieldRootContext, provideFieldRootContext] = createContext<RdxFieldRootContext>(\n 'RdxFieldRoot',\n 'components/field'\n);\n\n/**\n * Groups a form control with its label, description, error message, and field state.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldRoot]',\n exportAs: 'rdxFieldRoot',\n providers: [\n provideFieldRootContext(fieldRootContext),\n // Expose the tri-state display validity so controls inside the field reflect it (single source).\n { provide: RDX_FIELD_VALIDITY, useFactory: () => inject(RdxFieldRoot).validState }\n ],\n host: {\n // Tri-state: `data-invalid` when displayed-invalid, `data-valid` only when displayed-valid,\n // and **neither** when neutral (`validState()` is `null`).\n '[attr.data-invalid]': 'dataAttr(validState() === false)',\n '[attr.data-valid]': 'dataAttr(validState() === true)',\n '[attr.data-disabled]': 'dataAttr(disabledState())',\n '[attr.data-required]': 'dataAttr(requiredState())',\n '[attr.data-dirty]': 'dataAttr(dirtyState())',\n '[attr.data-touched]': 'dataAttr(touchedState())',\n '[attr.data-filled]': 'dataAttr(filledState())',\n '[attr.data-focused]': 'dataAttr(focusedState())',\n '(input)': 'notifyEdited()',\n '(change)': 'notifyEdited()'\n }\n})\nexport class RdxFieldRoot {\n /**\n * Whether the field is invalid.\n *\n * @group Props\n * @defaultValue false\n */\n readonly invalid = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the field is disabled.\n *\n * @group Props\n * @defaultValue false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the field is required.\n *\n * @group Props\n * @defaultValue false\n */\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the field value has changed from its initial value.\n *\n * @group Props\n * @defaultValue false\n */\n readonly dirty = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the field has been blurred after receiving focus.\n *\n * @group Props\n * @defaultValue false\n */\n readonly touched = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Overrides whether the control has a non-empty value.\n *\n * @group Props\n */\n readonly filled = input<boolean>();\n\n /**\n * Overrides whether the control is focused.\n *\n * @group Props\n */\n readonly focused = input<boolean>();\n\n /**\n * Identifies the field to an enclosing Form for external (server) error matching. Fields without a\n * `name` never match external errors.\n *\n * @group Props\n */\n readonly name = input<string>();\n\n /**\n * Overrides when this field reveals its validity (error styling + message). Falls back to the\n * enclosing `rdxFormRoot`'s `validationMode`, then `'onBlur'`. Server errors always show regardless.\n *\n * @group Props\n */\n readonly validationMode = input<RdxValidationMode>();\n\n /** The enclosing Form, if any. All Form-related behavior is a no-op when this is `null`. */\n private readonly formContext = injectFormRootContext(true);\n\n readonly controlId = signal(injectId('rdx-field-control-'));\n readonly descriptionIds = signal<string[]>([]);\n readonly errorIds = signal<string[]>([]);\n\n readonly focusedValue = signal(false);\n readonly filledValue = signal(false);\n readonly dirtyValue = signal(false);\n readonly touchedValue = signal(false);\n\n /** External state owner registered through the context; `null` when Field self-computes. */\n private readonly stateProvider = signal<RdxFieldState | null>(null);\n\n /** Whether an external adapter currently owns field state. */\n readonly hasStateProvider = computed(() => this.stateProvider() !== null);\n\n /** Error content from a registered state provider (e.g. a Signal Forms adapter). */\n private readonly providerErrors = computed(() => this.stateProvider()?.errors?.() ?? []);\n\n /** **Client** validation errors routed by a form-level provider (`rdxSignalForm`) — gated by `validationMode`. */\n private readonly clientErrors = computed(() => this.formContext?.clientErrorsFor(this.name()) ?? []);\n\n /** **Server/external** errors from the Form's `errors` input — shown eagerly (never gated). */\n private readonly serverErrors = computed(() => this.formContext?.externalErrorsFor(this.name()) ?? []);\n\n /** Whether the enclosing Form has had a submit attempted; `false` when standalone. A presentation\n * seam an adapter can read to reveal errors after a submit attempt (Base UI's submit-attempt state). */\n readonly formSubmitAttempted = computed(() => this.formContext?.submitAttempted() ?? false);\n\n /**\n * Client messages first (per-field `rdxSignalField` provider, then form-level `rdxSignalForm`\n * name-routing) — only once `validationMode` reveals client validity — then the Form's **server**\n * messages (the `errors` input), which always show. **Deduped by text**: a field can receive the same\n * Signal Forms error from both a per-field provider and the form-level routing (they read the same\n * field state), so deduping renders it once while still surfacing distinct messages from each source.\n */\n readonly messages = computed(() => {\n // **Client** messages (per-field `rdxSignalField` provider + form-level `rdxSignalForm` routing)\n // surface only once the field's `validationMode` reveals them; **server** messages (the `errors`\n // input) always show. So a neutral field stays empty and the polite live region announces on reveal.\n const client = this.validationRevealed()\n ? [...this.providerErrors().map((error) => error.message ?? error.kind), ...this.clientErrors()]\n : [];\n const seen = new Set<string>();\n const result: string[] = [];\n for (const message of [...client, ...this.serverErrors()]) {\n if (message && !seen.has(message)) {\n seen.add(message);\n result.push(message);\n }\n }\n return result;\n });\n\n /** Effective validation-display mode: this field's override → the enclosing Form's → the default. */\n readonly effectiveValidationMode = computed<RdxValidationMode>(\n () => this.validationMode() ?? this.formContext?.validationMode() ?? RDX_DEFAULT_VALIDATION_MODE\n );\n\n /** Whether client-side validity is revealed yet, per {@link effectiveValidationMode} + interaction. */\n private readonly validationRevealed = computed(() =>\n isValidationRevealed(this.effectiveValidationMode(), {\n touched: this.touchedState(),\n dirty: this.dirtyState(),\n submitAttempted: this.formSubmitAttempted()\n })\n );\n\n /**\n * Client-side invalidity (gated by `validationMode`): the per-field provider's error content / `invalid`\n * (`rdxSignalField`), a form-level provider's name-routed errors (`rdxSignalForm`), or the `[invalid]`\n * input. Excludes server errors (which are eager).\n */\n private readonly clientInvalidState = computed(\n () =>\n this.providerErrors().length > 0 ||\n this.clientErrors().length > 0 ||\n this.resolve('invalid', () => this.invalid())\n );\n\n /**\n * Tri-state *displayed* validity (`boolean | null`) — the source for `data-valid` / `data-invalid`.\n * Server errors show immediately; client-side validity (including `rdxSignalForm` name-routing) stays\n * **neutral** (`null`) until the field's {@link effectiveValidationMode} reveals it, then `false`/`true`.\n */\n readonly validState = computed<boolean | null>(() => {\n if (this.serverErrors().length > 0) {\n return false;\n }\n if (!this.validationRevealed()) {\n return null;\n }\n return this.clientInvalidState() ? false : true;\n });\n\n /**\n * Boolean **displayed** invalidity (= `validState() === false`), used by `rdxFieldError` (hidden) and\n * `rdxFieldControl`'s `aria-describedby` error linking. A neutral (`null`) `validState` reads as not\n * invalid here, so the error region stays hidden until the field's mode reveals it.\n */\n readonly invalidState = computed(() => this.validState() === false);\n\n /**\n * Boolean **actual** invalidity — ungated by the display mode. The enclosing Form aggregates this into\n * `anyInvalid` (→ submit-block / focus-first-invalid), so a field that is really invalid but displayed\n * neutral still blocks submit. The form's presentation `data-invalid` comes from the *displayed*\n * aggregate (`anyDisplayedInvalid`) instead — not from this. Server errors + provider error content +\n * the provider/input `invalid`.\n */\n readonly actualInvalidState = computed(() => this.serverErrors().length > 0 || this.clientInvalidState());\n readonly disabledState = computed(() => this.resolve('disabled', () => this.disabled()));\n readonly requiredState = computed(() => this.resolve('required', () => this.required()));\n // `touched`/`dirty` also OR in the enclosing Form's per-name state (`rdxSignalForm` name-routing), so a\n // field with only a bare `[formField]` (no `rdxSignalField`/`rdxFieldControl`) still reveals on blur.\n readonly dirtyState = computed(\n () =>\n this.resolve('dirty', () => this.dirty() || this.dirtyValue()) ||\n (this.formContext?.dirtyFor(this.name()) ?? false)\n );\n readonly touchedState = computed(\n () =>\n this.resolve('touched', () => this.touched() || this.touchedValue()) ||\n (this.formContext?.touchedFor(this.name()) ?? false)\n );\n readonly filledState = computed(() => this.resolve('filled', () => this.filled() ?? this.filledValue()));\n readonly focusedState = computed(() => this.resolve('focused', () => this.focused() ?? this.focusedValue()));\n\n protected readonly dataAttr = attr;\n\n constructor() {\n // Register with an enclosing Form (if any) for aggregate state, submit guard, and reset; a\n // standalone field never enters this branch and behaves exactly as before.\n const formContext = this.formContext;\n if (formContext) {\n const registration: RdxFormFieldRegistration = {\n name: () => this.name(),\n // `invalid` reports *actual* validity (ungated) — `form.anyInvalid` + the submit guard must\n // reflect real state even before a field reveals it. `displayValid` reports the *gated*\n // tri-state so the form's presentation `data-invalid` stays neutral on load.\n invalid: () => this.actualInvalidState(),\n displayValid: () => this.validState(),\n dirty: () => this.dirtyState(),\n touched: () => this.touchedState(),\n focus: () => this.focusControl(),\n resetState: () => this.resetState()\n };\n const unregister = formContext.register(registration);\n inject(DestroyRef).onDestroy(unregister);\n }\n }\n\n /** Notify the enclosing Form (if any) that this field's control was edited (clear-on-edit). */\n notifyEdited(): void {\n this.formContext?.notifyEdited(this.name());\n }\n\n /** Reset interaction state on native form reset: touched/dirty/focused → false, filled re-synced. */\n resetState(): void {\n this.touchedValue.set(false);\n this.dirtyValue.set(false);\n this.focusedValue.set(false);\n const control = this.controlElement();\n const value = control?.value ?? '';\n this.filledValue.set(value != null && value !== '');\n }\n\n /** Focus the field's control (used by the Form's first-invalid-focus on blocked submit). */\n private focusControl(): void {\n this.controlElement()?.focus();\n }\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /**\n * The field's control element, found by `controlId` but scoped to this field's own subtree — a\n * duplicate or consumer-reused id elsewhere on the page can't steal focus/reset. The control\n * registers its id through `setControlId`, so this matches the same element the labels point at.\n */\n private controlElement(): HTMLInputElement | null {\n return this.host.querySelector<HTMLInputElement>(`[id=\"${this.controlId()}\"]`);\n }\n\n /**\n * Register an external owner of field state, returning the previous one.\n * @ignore\n */\n setStateProvider(provider: RdxFieldState | null): RdxFieldState | null {\n const previous = this.stateProvider();\n this.stateProvider.set(provider);\n return previous;\n }\n\n /**\n * Identity-checked teardown — roll back to `previous` only if `provider` is still active. Prevents\n * an old adapter's destroy from clobbering a newer adapter that registered after it (create-before-\n * destroy during a structural view swap).\n */\n clearStateProvider(provider: RdxFieldState | null, previous: RdxFieldState | null): void {\n if (this.stateProvider() === provider) {\n this.stateProvider.set(previous);\n }\n }\n\n /**\n * Prefer the registered provider's value for `key` when it exposes one,\n * otherwise fall back to the root inputs / DOM-derived signals. `errors` (content) and `valid`\n * (tri-state `boolean | null`) are resolved separately, so they're excluded from this boolean key.\n */\n private resolve(key: Exclude<keyof RdxFieldState, 'errors' | 'valid'>, fallback: () => boolean): boolean {\n const accessor = this.stateProvider()?.[key];\n return accessor ? accessor() : fallback();\n }\n}\n\nfunction injectFieldRoot(): RdxFieldRoot {\n return inject(RdxFieldRoot);\n}\n","import { afterNextRender, computed, Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { injectId } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Connects a form control to the field label, description, error, and state.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldControl]',\n exportAs: 'rdxFieldControl',\n host: {\n '[attr.id]': 'id()',\n '[attr.aria-describedby]': 'describedBy()',\n // `aria-invalid`/`data-*` follow the field's tri-state `validState`: while it is neutral (`null`,\n // e.g. a field whose `validationMode` defers display (e.g. `onBlur`) before interaction) the control emits no `aria-invalid`\n // and neither `data-valid` nor `data-invalid`, matching the field root.\n '[attr.aria-invalid]': 'rootContext.validState() === false ? \"true\" : undefined',\n // On a native control the native `required`/`disabled` attributes already convey the state, so\n // `aria-required`/`aria-disabled` are only emitted on non-native (custom) controls.\n '[attr.aria-required]': '!isNativeFormControl() && rootContext.requiredState() ? \"true\" : undefined',\n '[attr.aria-disabled]': '!isNativeFormControl() && rootContext.disabledState() ? \"true\" : undefined',\n '[attr.disabled]': 'isNativeFormControl() && rootContext.disabledState() ? \"\" : undefined',\n '[attr.required]': 'isNativeFormControl() && rootContext.requiredState() ? \"\" : undefined',\n '[attr.data-invalid]': 'dataAttr(rootContext.validState() === false)',\n '[attr.data-valid]': 'dataAttr(rootContext.validState() === true)',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())',\n '[attr.data-required]': 'dataAttr(rootContext.requiredState())',\n '[attr.data-dirty]': 'dataAttr(rootContext.dirtyState())',\n '[attr.data-touched]': 'dataAttr(rootContext.touchedState())',\n '[attr.data-filled]': 'dataAttr(rootContext.filledState())',\n '[attr.data-focused]': 'dataAttr(rootContext.focusedState())',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(input)': 'syncFilled()',\n '(change)': 'syncFilled()'\n }\n})\nexport class RdxFieldControl {\n protected readonly rootContext = injectFieldRootContext();\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private initialValue = '';\n\n /**\n * Control id. Labels and descriptions use this value for accessible relationships.\n *\n * @group Props\n */\n readonly id = input(injectId('rdx-field-control-'));\n\n protected readonly describedBy = computed(() => {\n const ids = [\n ...this.rootContext.descriptionIds(),\n ...(this.rootContext.invalidState() ? this.rootContext.errorIds() : [])\n ];\n\n return ids.length ? ids.join(' ') : undefined;\n });\n\n constructor() {\n effect(() => {\n this.rootContext.setControlId(this.id());\n });\n\n afterNextRender(() => {\n this.initialValue = this.currentValue();\n this.syncFilled();\n });\n }\n\n onFocus(): void {\n this.rootContext.setFocused(true);\n }\n\n onBlur(): void {\n this.rootContext.setFocused(false);\n this.rootContext.setTouched(true);\n }\n\n syncFilled(): void {\n const value = this.currentValue();\n\n this.rootContext.setFilled(Array.isArray(value) ? value.length > 0 : value != null && value !== '');\n this.rootContext.setDirty(value !== this.initialValue);\n }\n\n protected isNativeFormControl(): boolean {\n return ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(this.elementRef.nativeElement.tagName);\n }\n\n protected readonly dataAttr = attr;\n\n private currentValue(): string {\n const element = this.elementRef.nativeElement as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;\n return element.value ?? '';\n }\n}\n","import { Directive, effect, input } from '@angular/core';\nimport { injectId } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Describes the field control.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldDescription]',\n exportAs: 'rdxFieldDescription',\n host: {\n '[attr.id]': 'id()',\n '[attr.data-invalid]': 'dataAttr(rootContext.invalidState())',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())'\n }\n})\nexport class RdxFieldDescription {\n protected readonly rootContext = injectFieldRootContext();\n\n /**\n * Description id.\n *\n * @group Props\n */\n readonly id = input(injectId('rdx-field-description-'));\n\n constructor() {\n effect((onCleanup) => {\n const id = this.id();\n this.rootContext.addDescriptionId(id);\n onCleanup(() => this.rootContext.removeDescriptionId(id));\n });\n }\n\n protected readonly dataAttr = attr;\n}\n","import { Directive, effect, input } from '@angular/core';\nimport { injectId } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Describes an invalid field control.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldError]',\n exportAs: 'rdxFieldError',\n host: {\n '[attr.id]': 'id()',\n '[attr.hidden]': 'rootContext.invalidState() ? undefined : \"\"',\n '[attr.aria-live]': '\"polite\"',\n '[attr.data-invalid]': 'dataAttr(rootContext.invalidState())',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())'\n }\n})\nexport class RdxFieldError {\n protected readonly rootContext = injectFieldRootContext();\n\n /**\n * Error message id.\n *\n * @group Props\n */\n readonly id = input(injectId('rdx-field-error-'));\n\n /**\n * The field's validation messages — client (provider / form name-routing, once `validationMode`\n * reveals them) then server (the Form's `errors` input, always); `[]` when none. Render them\n * explicitly via the `exportAs` reference — the directive never injects text content itself:\n * `<p rdxFieldError #err=\"rdxFieldError\">{{ err.messages().join(' ') }}</p>`.\n */\n readonly messages = this.rootContext.messages;\n\n constructor() {\n effect((onCleanup) => {\n const id = this.id();\n this.rootContext.addErrorId(id);\n onCleanup(() => this.rootContext.removeErrorId(id));\n });\n }\n\n protected readonly dataAttr = attr;\n}\n","import { booleanAttribute, computed, Directive, inject, input, signal } from '@angular/core';\nimport { BooleanInput, injectId, RDX_FIELD_VALIDITY } from '@radix-ng/primitives/core';\nimport { provideFieldRootContext, RdxFieldRoot, RdxFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\nconst addId = (ids: string[], id: string) => (ids.includes(id) ? ids : [...ids, id]);\nconst removeId = (ids: string[], id: string) => ids.filter((item) => item !== id);\n\n/**\n * The field item context **re-provides** {@link RdxFieldRootContext} so a label, description, and control\n * placed inside the item associate with the **item's** control (own `controlId` / `descriptionIds`),\n * while all validation state (`invalidState` / `dirtyState` / `touchedState` / `filledState` /\n * `focusedState` / `requiredState`, errors and messages) is **delegated to the enclosing `rdxFieldRoot`**.\n * `disabledState` is the item's `disabled` OR'd with the root's. The enclosing root is reached with\n * `skipSelf` (the item provides the same token), so there is no circular injection.\n */\nconst fieldItemContext = (): RdxFieldRootContext => {\n const item = inject(RdxFieldItem);\n const root = item.root;\n\n return {\n controlId: item.controlId,\n name: root.name,\n descriptionIds: item.descriptionIds,\n errorIds: root.errorIds,\n messages: root.messages,\n notifyEdited: () => root.notifyEdited(),\n validState: root.validState,\n formSubmitAttempted: root.formSubmitAttempted,\n invalidState: root.invalidState,\n disabledState: item.disabledState,\n requiredState: root.requiredState,\n dirtyState: root.dirtyState,\n touchedState: root.touchedState,\n filledState: root.filledState,\n focusedState: root.focusedState,\n setControlId: (id: string) => item.controlId.set(id),\n addDescriptionId: (id: string) => item.descriptionIds.update((ids) => addId(ids, id)),\n removeDescriptionId: (id: string) => item.descriptionIds.update((ids) => removeId(ids, id)),\n addErrorId: (id: string) => root.errorIds.update((ids) => addId(ids, id)),\n removeErrorId: (id: string) => root.errorIds.update((ids) => removeId(ids, id)),\n setFocused: (value: boolean) => root.focusedValue.set(value),\n setFilled: (value: boolean) => root.filledValue.set(value),\n setDirty: (value: boolean) => root.dirtyValue.set(value),\n setTouched: (value: boolean) => root.touchedValue.set(value),\n setStateProvider: (provider) => root.setStateProvider(provider),\n clearStateProvider: (provider, previous) => root.clearStateProvider(provider, previous),\n hasStateProvider: root.hasStateProvider\n };\n};\n\n/**\n * Groups an individual item in a checkbox group or radio group with its own label and description.\n *\n * Use inside a `rdxFieldRoot` (typically wrapping a group) when each control needs its own label /\n * description: the item scopes those associations to its control while reflecting the field's validation\n * state. Mirrors Base UI's `Field.Item`.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldItem]',\n exportAs: 'rdxFieldItem',\n providers: [\n provideFieldRootContext(fieldItemContext),\n // Items delegate validity to the root; expose the root's tri-state to controls inside the item.\n { provide: RDX_FIELD_VALIDITY, useFactory: () => inject(RdxFieldItem).root.validState }\n ],\n host: {\n // Tri-state, mirroring the root: neither attribute while the root's `validState` is neutral.\n '[attr.data-invalid]': 'dataAttr(root.validState() === false)',\n '[attr.data-valid]': 'dataAttr(root.validState() === true)',\n '[attr.data-disabled]': 'dataAttr(disabledState())',\n '[attr.data-required]': 'dataAttr(root.requiredState())',\n '[attr.data-dirty]': 'dataAttr(root.dirtyState())',\n '[attr.data-touched]': 'dataAttr(root.touchedState())',\n '[attr.data-filled]': 'dataAttr(root.filledState())',\n '[attr.data-focused]': 'dataAttr(root.focusedState())'\n }\n})\nexport class RdxFieldItem {\n /** The enclosing field root (items are leaves under the root, so `skipSelf` reaches it). */\n readonly root = inject(RdxFieldRoot, { skipSelf: true });\n\n /**\n * Whether the wrapped control should ignore user interaction. The `disabled` on `rdxFieldRoot` takes\n * precedence (it is OR'd in).\n *\n * @group Props\n * @defaultValue false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** This item's control id — label / description / control inside the item associate with it. */\n readonly controlId = signal(injectId('rdx-field-item-control-'));\n /** Description ids for this item's control `aria-describedby`. */\n readonly descriptionIds = signal<string[]>([]);\n\n /** The item's effective disabled state: the root's disabled OR the item's. */\n readonly disabledState = computed(() => this.root.disabledState() || this.disabled());\n\n protected readonly dataAttr = attr;\n}\n","import { Directive, input } from '@angular/core';\nimport { injectId, rdxCheckLabelElement } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Labels the field control.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldLabel]',\n exportAs: 'rdxFieldLabel',\n host: {\n '[attr.id]': 'id()',\n '[attr.for]': 'htmlFor()',\n '[attr.data-invalid]': 'dataAttr(rootContext.invalidState())',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())',\n '[attr.data-required]': 'dataAttr(rootContext.requiredState())'\n }\n})\nexport class RdxFieldLabel {\n protected readonly rootContext = injectFieldRootContext();\n\n /**\n * Label id.\n *\n * @group Props\n */\n readonly id = input(injectId('rdx-field-label-'));\n\n readonly htmlFor = () => this.rootContext.controlId();\n\n constructor() {\n rdxCheckLabelElement('rdxFieldLabel', 'field/unassociated-label', 'components/field');\n }\n\n protected readonly dataAttr = attr;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["attr","addId","removeId"],"mappings":";;;;;AAuBA,MAAMA,MAAI,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AAqCzD,MAAMC,OAAK,GAAG,CAAC,GAAa,EAAE,EAAU,MAAM,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,CAAC;AACpF,MAAMC,UAAQ,GAAG,CAAC,GAAa,EAAE,EAAU,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;AAwCjF,MAAM,gBAAgB,GAAG,MAA0B;AAC/C,IAAA,MAAM,IAAI,GAAG,eAAe,EAAE;IAE9B,OAAO;QACH,SAAS,EAAE,IAAI,CAAC,SAAS;QACzB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,cAAc,EAAE,IAAI,CAAC,cAAc;QACnC,QAAQ,EAAE,IAAI,CAAC,QAAQ;AACvB;AACsC;QACtC,QAAQ,EAAE,IAAI,CAAC,QAAQ;;AAEvB,QAAA,YAAY,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE;QACvC,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,mBAAmB,EAAE,IAAI,CAAC,mBAAmB;QAC7C,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,UAAU,EAAE,IAAI,CAAC,UAAU;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"file":"radix-ng-primitives-field.mjs","sources":["../../../packages/primitives/field/src/field-root.ts","../../../packages/primitives/field/src/field-control.ts","../../../packages/primitives/field/src/field-description.ts","../../../packages/primitives/field/src/field-error.ts","../../../packages/primitives/field/src/field-item.ts","../../../packages/primitives/field/src/field-label.ts","../../../packages/primitives/field/src/ng-control-field.ts","../../../packages/primitives/field/radix-ng-primitives-field.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n ElementRef,\n inject,\n input,\n signal,\n Signal\n} from '@angular/core';\nimport {\n BooleanInput,\n createContext,\n injectId,\n isValidationRevealed,\n RDX_DEFAULT_VALIDATION_MODE,\n RDX_FIELD_VALIDITY,\n RdxValidationError,\n RdxValidationMode\n} from '@radix-ng/primitives/core';\nimport { injectFormRootContext, RdxFormFieldRegistration } from '@radix-ng/primitives/form';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * External owner of field state. An adapter (`rdxSignalField` or `rdxNgControlField`) registers one via\n * `setStateProvider` so Field reads authoritative form state instead of\n * self-computing it from the DOM. Each member is an optional signal-like\n * accessor; only the states the adapter owns need to be provided — the rest\n * fall back to the root's inputs / DOM heuristic. Keeping these as plain\n * `() => boolean` accessors keeps Field framework-agnostic (no dependency on\n * `@angular/forms/signals`).\n *\n * See ADR 0004, ADR 0021, and `signal-forms-readiness.md` (prep #4).\n */\nexport interface RdxFieldState {\n /** Field name inferred by an adapter. An explicit `rdxFieldRoot[name]` always wins. */\n name?: () => string | undefined;\n /**\n * The control's **actual** invalidity (ungated). The Field decides *when* to display it from its\n * `validationMode` (e.g. only after blur) — the adapter just reports the real state. A non-empty\n * `errors()` also counts as invalid.\n */\n invalid?: () => boolean;\n /** Whether async validation is pending. Pending validity remains neutral, never falsely valid. */\n pending?: () => boolean;\n disabled?: () => boolean;\n required?: () => boolean;\n dirty?: () => boolean;\n touched?: () => boolean;\n filled?: () => boolean;\n focused?: () => boolean;\n /**\n * Optional source of error *content* (not just the invalid boolean). A non-empty list marks the field\n * **actually** invalid (client validation) and its messages (`message ?? kind` per error) surface\n * through `RdxFieldError.messages()` once the field's `validationMode` reveals client validity, ahead of\n * any enclosing Form's server messages. Uses `core`'s framework-free shim type so the seam stays free of\n * `@angular/forms/signals` (ADR 0004 amendment).\n */\n errors?: () => readonly RdxValidationError[];\n}\n\nconst addId = (ids: string[], id: string) => (ids.includes(id) ? ids : [...ids, id]);\nconst removeId = (ids: string[], id: string) => ids.filter((item) => item !== id);\n\nexport interface RdxFieldRootContext {\n controlId: Signal<string>;\n name: Signal<string | undefined>;\n descriptionIds: Signal<string[]>;\n errorIds: Signal<string[]>;\n messages: Signal<string[]>;\n /** Whether the currently displayed client errors contain this validation kind. */\n matchesError: (kind: string) => boolean;\n notifyEdited: () => void;\n /** Tri-state *displayed* validity (`true` valid / `false` invalid / `null` neutral), gated by the\n * field's `validationMode`. The source for `data-valid` / `data-invalid` on the field and its controls. */\n validState: Signal<boolean | null>;\n /** Whether the enclosing Form has had a submit attempted (always `false` with no Form). */\n formSubmitAttempted: Signal<boolean>;\n invalidState: Signal<boolean>;\n disabledState: Signal<boolean>;\n requiredState: Signal<boolean>;\n dirtyState: Signal<boolean>;\n touchedState: Signal<boolean>;\n filledState: Signal<boolean>;\n focusedState: Signal<boolean>;\n setControlId: (id: string) => void;\n addDescriptionId: (id: string) => void;\n removeDescriptionId: (id: string) => void;\n addErrorId: (id: string) => void;\n removeErrorId: (id: string) => void;\n setFocused: (value: boolean) => void;\n setFilled: (value: boolean) => void;\n setDirty: (value: boolean) => void;\n setTouched: (value: boolean) => void;\n setStateProvider: (provider: RdxFieldState | null) => RdxFieldState | null;\n /**\n * Identity-checked teardown: roll the slot back to `previous` only if `provider` is still the\n * active one. A newer adapter that registered after `provider` (create-before-destroy during a\n * view swap) owns the slot and must not be clobbered by the old adapter's destroy.\n */\n clearStateProvider: (provider: RdxFieldState | null, previous: RdxFieldState | null) => void;\n hasStateProvider: Signal<boolean>;\n}\n\nconst fieldRootContext = (): RdxFieldRootContext => {\n const root = injectFieldRoot();\n\n return {\n controlId: root.controlId,\n name: root.effectiveName,\n descriptionIds: root.descriptionIds,\n errorIds: root.errorIds,\n /** Combined messages for `RdxFieldError`: client (provider + form name-routing, when revealed) then\n * server (`errors` input, always). */\n messages: root.messages,\n matchesError: (kind: string) => root.matchesError(kind),\n /** Notify an enclosing Form that this field's control was edited (composite-control opt-in). */\n notifyEdited: () => root.notifyEdited(),\n validState: root.validState,\n formSubmitAttempted: root.formSubmitAttempted,\n invalidState: root.invalidState,\n disabledState: root.disabledState,\n requiredState: root.requiredState,\n dirtyState: root.dirtyState,\n touchedState: root.touchedState,\n filledState: root.filledState,\n focusedState: root.focusedState,\n setControlId: (id: string) => root.controlId.set(id),\n addDescriptionId: (id: string) => root.descriptionIds.update((ids) => addId(ids, id)),\n removeDescriptionId: (id: string) => root.descriptionIds.update((ids) => removeId(ids, id)),\n addErrorId: (id: string) => root.errorIds.update((ids) => addId(ids, id)),\n removeErrorId: (id: string) => root.errorIds.update((ids) => removeId(ids, id)),\n setFocused: (value: boolean) => root.focusedValue.set(value),\n setFilled: (value: boolean) => root.filledValue.set(value),\n setDirty: (value: boolean) => root.dirtyValue.set(value),\n setTouched: (value: boolean) => root.touchedValue.set(value),\n /**\n * Register (or clear with `null`) an external owner of field state.\n * While a provider is registered, any state it exposes takes precedence\n * over the root inputs and the DOM-derived values. Returns the previous\n * provider so adapters can restore it on teardown.\n */\n setStateProvider: (provider: RdxFieldState | null) => root.setStateProvider(provider),\n clearStateProvider: (provider: RdxFieldState | null, previous: RdxFieldState | null) =>\n root.clearStateProvider(provider, previous),\n hasStateProvider: root.hasStateProvider\n };\n};\n\nexport const [injectFieldRootContext, provideFieldRootContext] = createContext<RdxFieldRootContext>(\n 'RdxFieldRoot',\n 'components/field'\n);\n\n/**\n * Groups a form control with its label, description, error message, and field state.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldRoot]',\n exportAs: 'rdxFieldRoot',\n providers: [\n provideFieldRootContext(fieldRootContext),\n // Expose the tri-state display validity so controls inside the field reflect it (single source).\n { provide: RDX_FIELD_VALIDITY, useFactory: () => inject(RdxFieldRoot).validState }\n ],\n host: {\n // Tri-state: `data-invalid` when displayed-invalid, `data-valid` only when displayed-valid,\n // and **neither** when neutral (`validState()` is `null`).\n '[attr.data-invalid]': 'dataAttr(validState() === false)',\n '[attr.data-valid]': 'dataAttr(validState() === true)',\n '[attr.data-disabled]': 'dataAttr(disabledState())',\n '[attr.data-required]': 'dataAttr(requiredState())',\n '[attr.data-dirty]': 'dataAttr(dirtyState())',\n '[attr.data-touched]': 'dataAttr(touchedState())',\n '[attr.data-filled]': 'dataAttr(filledState())',\n '[attr.data-focused]': 'dataAttr(focusedState())',\n '(input)': 'notifyEdited()',\n '(change)': 'notifyEdited()'\n }\n})\nexport class RdxFieldRoot {\n /**\n * Whether the field is invalid.\n *\n * @group Props\n * @defaultValue false\n */\n readonly invalid = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the field is disabled.\n *\n * @group Props\n * @defaultValue false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the field is required.\n *\n * @group Props\n * @defaultValue false\n */\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the field value has changed from its initial value.\n *\n * @group Props\n * @defaultValue false\n */\n readonly dirty = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the field has been blurred after receiving focus.\n *\n * @group Props\n * @defaultValue false\n */\n readonly touched = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Overrides whether the control has a non-empty value.\n *\n * @group Props\n */\n readonly filled = input<boolean>();\n\n /**\n * Overrides whether the control is focused.\n *\n * @group Props\n */\n readonly focused = input<boolean>();\n\n /**\n * Identifies the field to an enclosing Form for external (server) error matching. Fields without a\n * `name` never match external errors.\n *\n * @group Props\n */\n readonly name = input<string>();\n\n /**\n * Overrides when this field reveals its validity (error styling + message). Falls back to the\n * enclosing `rdxFormRoot`'s `validationMode`, then `'onBlur'`. Server errors always show regardless.\n *\n * @group Props\n */\n readonly validationMode = input<RdxValidationMode>();\n\n /** The enclosing Form, if any. All Form-related behavior is a no-op when this is `null`. */\n private readonly formContext = injectFormRootContext(true);\n\n readonly controlId = signal(injectId('rdx-field-control-'));\n readonly descriptionIds = signal<string[]>([]);\n readonly errorIds = signal<string[]>([]);\n\n readonly focusedValue = signal(false);\n readonly filledValue = signal(false);\n readonly dirtyValue = signal(false);\n readonly touchedValue = signal(false);\n\n /** External state owner registered through the context; `null` when Field self-computes. */\n private readonly stateProvider = signal<RdxFieldState | null>(null);\n\n /** Whether an external adapter currently owns field state. */\n readonly hasStateProvider = computed(() => this.stateProvider() !== null);\n\n /** Explicit field name wins; an adapter may infer one from its form-control binding. */\n readonly effectiveName = computed(() => this.name() ?? this.stateProvider()?.name?.());\n\n /** Error content from a registered state provider (e.g. a Signal Forms adapter). */\n private readonly providerErrors = computed(() => this.stateProvider()?.errors?.() ?? []);\n\n /** **Client** validation errors routed by a form-level provider (`rdxSignalForm`) — gated by `validationMode`. */\n private readonly clientErrors = computed(() => this.formContext?.clientErrorsFor(this.effectiveName()) ?? []);\n\n /** **Server/external** errors from the Form's `errors` input — shown eagerly (never gated). */\n private readonly serverErrors = computed(() => this.formContext?.externalErrorsFor(this.effectiveName()) ?? []);\n\n /** Whether the enclosing Form has had a submit attempted; `false` when standalone. A presentation\n * seam an adapter can read to reveal errors after a submit attempt (Base UI's submit-attempt state). */\n readonly formSubmitAttempted = computed(() => this.formContext?.submitAttempted() ?? false);\n\n /**\n * Client messages first (per-field `rdxSignalField` provider, then form-level `rdxSignalForm`\n * name-routing) — only once `validationMode` reveals client validity — then the Form's **server**\n * messages (the `errors` input), which always show. **Deduped by text**: a field can receive the same\n * Signal Forms error from both a per-field provider and the form-level routing (they read the same\n * field state), so deduping renders it once while still surfacing distinct messages from each source.\n */\n readonly messages = computed(() => {\n // **Client** messages (per-field `rdxSignalField` provider + form-level `rdxSignalForm` routing)\n // surface only once the field's `validationMode` reveals them; **server** messages (the `errors`\n // input) always show. So a neutral field stays empty and the polite live region announces on reveal.\n const client = this.validationRevealed()\n ? [...this.providerErrors().map((error) => error.message ?? error.kind), ...this.clientErrors()]\n : [];\n const seen = new Set<string>();\n const result: string[] = [];\n for (const message of [...client, ...this.serverErrors()]) {\n if (message && !seen.has(message)) {\n seen.add(message);\n result.push(message);\n }\n }\n return result;\n });\n\n /** Whether a client validation error of `kind` is currently revealed by the field. */\n matchesError(kind: string): boolean {\n return this.validationRevealed() && this.providerErrors().some((error) => error.kind === kind);\n }\n\n /** Effective validation-display mode: this field's override → the enclosing Form's → the default. */\n readonly effectiveValidationMode = computed<RdxValidationMode>(\n () => this.validationMode() ?? this.formContext?.validationMode() ?? RDX_DEFAULT_VALIDATION_MODE\n );\n\n /** Whether client-side validity is revealed yet, per {@link effectiveValidationMode} + interaction. */\n private readonly validationRevealed = computed(() =>\n isValidationRevealed(this.effectiveValidationMode(), {\n touched: this.touchedState(),\n dirty: this.dirtyState(),\n submitAttempted: this.formSubmitAttempted()\n })\n );\n\n /**\n * Client-side invalidity (gated by `validationMode`): the per-field provider's error content / `invalid`\n * (`rdxSignalField`), a form-level provider's name-routed errors (`rdxSignalForm`), or the `[invalid]`\n * input. Excludes server errors (which are eager).\n */\n private readonly clientInvalidState = computed(\n () =>\n this.providerErrors().length > 0 ||\n this.clientErrors().length > 0 ||\n this.resolve('invalid', () => this.invalid())\n );\n\n /**\n * Tri-state *displayed* validity (`boolean | null`) — the source for `data-valid` / `data-invalid`.\n * Server errors show immediately; client-side validity (including `rdxSignalForm` name-routing) stays\n * **neutral** (`null`) until the field's {@link effectiveValidationMode} reveals it, then `false`/`true`.\n */\n readonly validState = computed<boolean | null>(() => {\n if (this.serverErrors().length > 0) {\n return false;\n }\n // Angular Forms distinguishes pending from both valid and invalid. Preserve Base UI's\n // tri-state presentation by publishing neither validity attribute while validation settles.\n if (this.pendingState()) {\n return null;\n }\n // A disabled Angular control does not participate in validation. Keep it neutral unless an\n // explicit invalid/error source still marks it invalid (matching Base UI's controlled-invalid\n // precedence over computed disabled validity).\n if (this.disabledState() && !this.clientInvalidState()) {\n return null;\n }\n if (!this.validationRevealed()) {\n return null;\n }\n return this.clientInvalidState() ? false : true;\n });\n\n /**\n * Boolean **displayed** invalidity (= `validState() === false`), used by `rdxFieldError` (hidden) and\n * `rdxFieldControl`'s `aria-describedby` error linking. A neutral (`null`) `validState` reads as not\n * invalid here, so the error region stays hidden until the field's mode reveals it.\n */\n readonly invalidState = computed(() => this.validState() === false);\n\n /**\n * Boolean **actual** invalidity — ungated by the display mode. The enclosing Form aggregates this into\n * `anyInvalid` (→ submit-block / focus-first-invalid), so a field that is really invalid but displayed\n * neutral still blocks submit. The form's presentation `data-invalid` comes from the *displayed*\n * aggregate (`anyDisplayedInvalid`) instead — not from this. Server errors + provider error content +\n * the provider/input `invalid`.\n */\n readonly actualInvalidState = computed(() => this.serverErrors().length > 0 || this.clientInvalidState());\n readonly pendingState = computed(() => this.resolve('pending', () => false));\n readonly disabledState = computed(() => this.resolve('disabled', () => this.disabled()));\n readonly requiredState = computed(() => this.resolve('required', () => this.required()));\n // `touched`/`dirty` also OR in the enclosing Form's per-name state (`rdxSignalForm` name-routing), so a\n // field with only a bare `[formField]` (no `rdxSignalField`/`rdxFieldControl`) still reveals on blur.\n readonly dirtyState = computed(\n () =>\n this.resolve('dirty', () => this.dirty() || this.dirtyValue()) ||\n (this.formContext?.dirtyFor(this.effectiveName()) ?? false)\n );\n readonly touchedState = computed(\n () =>\n this.resolve('touched', () => this.touched() || this.touchedValue()) ||\n (this.formContext?.touchedFor(this.effectiveName()) ?? false)\n );\n readonly filledState = computed(() => this.resolve('filled', () => this.filled() ?? this.filledValue()));\n readonly focusedState = computed(() => this.resolve('focused', () => this.focused() ?? this.focusedValue()));\n\n protected readonly dataAttr = attr;\n\n constructor() {\n // Register with an enclosing Form (if any) for aggregate state, submit guard, and reset; a\n // standalone field never enters this branch and behaves exactly as before.\n const formContext = this.formContext;\n if (formContext) {\n const registration: RdxFormFieldRegistration = {\n name: () => this.effectiveName(),\n // `invalid` reports *actual* validity (ungated) — `form.anyInvalid` + the submit guard must\n // reflect real state even before a field reveals it. `displayValid` reports the *gated*\n // tri-state so the form's presentation `data-invalid` stays neutral on load.\n invalid: () => this.actualInvalidState(),\n displayValid: () => this.validState(),\n dirty: () => this.dirtyState(),\n touched: () => this.touchedState(),\n focus: () => this.focusControl(),\n resetState: () => this.resetState()\n };\n const unregister = formContext.register(registration);\n inject(DestroyRef).onDestroy(unregister);\n }\n }\n\n /** Notify the enclosing Form (if any) that this field's control was edited (clear-on-edit). */\n notifyEdited(): void {\n this.formContext?.notifyEdited(this.effectiveName());\n }\n\n /** Reset interaction state on native form reset: touched/dirty/focused → false, filled re-synced. */\n resetState(): void {\n this.touchedValue.set(false);\n this.dirtyValue.set(false);\n this.focusedValue.set(false);\n const control = this.controlElement();\n const value = control && 'value' in control ? (control as HTMLInputElement).value : '';\n this.filledValue.set(value != null && value !== '');\n }\n\n /** Focus the field's control (used by the Form's first-invalid-focus on blocked submit). */\n private focusControl(): void {\n const control = this.controlElement();\n if (!control) {\n return;\n }\n control.focus();\n // Base UI selects text after focusing an invalid input so the user can replace it immediately.\n if (control.tagName === 'INPUT') {\n (control as HTMLInputElement).select();\n }\n }\n\n private readonly host = inject<ElementRef<HTMLElement>>(ElementRef).nativeElement;\n\n /**\n * The field's control element, found by `controlId` but scoped to this field's own subtree — a\n * duplicate or consumer-reused id elsewhere on the page can't steal focus/reset. The control\n * registers its id through `setControlId`, so this matches the same element the labels point at.\n */\n private controlElement(): HTMLElement | null {\n return this.host.querySelector<HTMLElement>(`[id=\"${this.controlId()}\"]`);\n }\n\n /**\n * Register an external owner of field state, returning the previous one.\n * @ignore\n */\n setStateProvider(provider: RdxFieldState | null): RdxFieldState | null {\n const previous = this.stateProvider();\n this.stateProvider.set(provider);\n return previous;\n }\n\n /**\n * Identity-checked teardown — roll back to `previous` only if `provider` is still active. Prevents\n * an old adapter's destroy from clobbering a newer adapter that registered after it (create-before-\n * destroy during a structural view swap).\n */\n clearStateProvider(provider: RdxFieldState | null, previous: RdxFieldState | null): void {\n if (this.stateProvider() === provider) {\n this.stateProvider.set(previous);\n }\n }\n\n /**\n * Prefer the registered provider's value for `key` when it exposes one,\n * otherwise fall back to the root inputs / DOM-derived signals. `name` and `errors` are resolved\n * separately, so they're excluded from this boolean key.\n */\n private resolve(key: Exclude<keyof RdxFieldState, 'name' | 'errors'>, fallback: () => boolean): boolean {\n const accessor = this.stateProvider()?.[key];\n return accessor ? accessor() : fallback();\n }\n}\n\nfunction injectFieldRoot(): RdxFieldRoot {\n return inject(RdxFieldRoot);\n}\n","import { afterNextRender, computed, Directive, effect, ElementRef, inject, input } from '@angular/core';\nimport { injectId } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Connects a form control to the field label, description, error, and state.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldControl]',\n exportAs: 'rdxFieldControl',\n host: {\n '[attr.id]': 'id()',\n '[attr.aria-describedby]': 'describedBy()',\n // `aria-invalid`/`data-*` follow the field's tri-state `validState`: while it is neutral (`null`,\n // e.g. a field whose `validationMode` defers display (e.g. `onBlur`) before interaction) the control emits no `aria-invalid`\n // and neither `data-valid` nor `data-invalid`, matching the field root.\n '[attr.aria-invalid]': 'rootContext.validState() === false ? \"true\" : undefined',\n // On a native control the native `required`/`disabled` attributes already convey the state, so\n // `aria-required`/`aria-disabled` are only emitted on non-native (custom) controls.\n '[attr.aria-required]': '!isNativeFormControl() && rootContext.requiredState() ? \"true\" : undefined',\n '[attr.aria-disabled]': '!isNativeFormControl() && rootContext.disabledState() ? \"true\" : undefined',\n '[attr.disabled]': 'isNativeFormControl() && rootContext.disabledState() ? \"\" : undefined',\n '[attr.required]': 'isNativeFormControl() && rootContext.requiredState() ? \"\" : undefined',\n '[attr.data-invalid]': 'dataAttr(rootContext.validState() === false)',\n '[attr.data-valid]': 'dataAttr(rootContext.validState() === true)',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())',\n '[attr.data-required]': 'dataAttr(rootContext.requiredState())',\n '[attr.data-dirty]': 'dataAttr(rootContext.dirtyState())',\n '[attr.data-touched]': 'dataAttr(rootContext.touchedState())',\n '[attr.data-filled]': 'dataAttr(rootContext.filledState())',\n '[attr.data-focused]': 'dataAttr(rootContext.focusedState())',\n '(focus)': 'onFocus()',\n '(blur)': 'onBlur()',\n '(input)': 'syncFilled()',\n '(change)': 'syncFilled()'\n }\n})\nexport class RdxFieldControl {\n protected readonly rootContext = injectFieldRootContext();\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private initialValue = '';\n\n /**\n * Control id. Labels and descriptions use this value for accessible relationships.\n *\n * @group Props\n */\n readonly id = input(injectId('rdx-field-control-'));\n\n protected readonly describedBy = computed(() => {\n const ids = [...this.rootContext.descriptionIds(), ...this.rootContext.errorIds()];\n\n return ids.length ? ids.join(' ') : undefined;\n });\n\n constructor() {\n effect(() => {\n this.rootContext.setControlId(this.id());\n });\n\n afterNextRender(() => {\n this.initialValue = this.currentValue();\n this.syncFilled();\n });\n }\n\n onFocus(): void {\n this.rootContext.setFocused(true);\n }\n\n onBlur(): void {\n this.rootContext.setFocused(false);\n this.rootContext.setTouched(true);\n }\n\n syncFilled(): void {\n const value = this.currentValue();\n\n this.rootContext.setFilled(Array.isArray(value) ? value.length > 0 : value != null && value !== '');\n this.rootContext.setDirty(value !== this.initialValue);\n }\n\n protected isNativeFormControl(): boolean {\n return ['INPUT', 'SELECT', 'TEXTAREA', 'BUTTON'].includes(this.elementRef.nativeElement.tagName);\n }\n\n protected readonly dataAttr = attr;\n\n private currentValue(): string {\n const element = this.elementRef.nativeElement as HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;\n return element.value ?? '';\n }\n}\n","import { Directive, effect, input } from '@angular/core';\nimport { injectId } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Describes the field control.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldDescription]',\n exportAs: 'rdxFieldDescription',\n host: {\n '[attr.id]': 'id()',\n '[attr.data-invalid]': 'dataAttr(rootContext.invalidState())',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())'\n }\n})\nexport class RdxFieldDescription {\n protected readonly rootContext = injectFieldRootContext();\n\n /**\n * Description id.\n *\n * @group Props\n */\n readonly id = input(injectId('rdx-field-description-'));\n\n constructor() {\n effect((onCleanup) => {\n const id = this.id();\n this.rootContext.addDescriptionId(id);\n onCleanup(() => this.rootContext.removeDescriptionId(id));\n });\n }\n\n protected readonly dataAttr = attr;\n}\n","import { computed, Directive, effect, input } from '@angular/core';\nimport { injectId } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Describes an invalid field control.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldError]',\n exportAs: 'rdxFieldError',\n host: {\n '[attr.id]': 'id()',\n '[attr.hidden]': 'visible() ? undefined : \"\"',\n '[attr.aria-live]': '\"polite\"',\n '[attr.data-invalid]': 'dataAttr(visible() && rootContext.invalidState())',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())'\n }\n})\nexport class RdxFieldError {\n protected readonly rootContext = injectFieldRootContext();\n\n /**\n * Error message id.\n *\n * @group Props\n */\n readonly id = input(injectId('rdx-field-error-'));\n\n /**\n * Shows this error only for a matching validation-error key. Bind `true` to keep it visible under\n * external control; omit it for the field's default error behavior.\n *\n * @group Props\n */\n readonly match = input<boolean | string>();\n\n /** Whether this error part is currently presented. */\n readonly visible = computed(() => {\n const match = this.match();\n if (match === true) {\n return true;\n }\n if (typeof match === 'string') {\n return this.rootContext.matchesError(match);\n }\n return this.rootContext.invalidState();\n });\n\n /**\n * The field's validation messages — client (provider / form name-routing, once `validationMode`\n * reveals them) then server (the Form's `errors` input, always); `[]` when none. Render them\n * explicitly via the `exportAs` reference — the directive never injects text content itself:\n * `<p rdxFieldError #err=\"rdxFieldError\">{{ err.messages().join(' ') }}</p>`.\n */\n readonly messages = this.rootContext.messages;\n\n constructor() {\n effect((onCleanup) => {\n const id = this.id();\n if (!this.visible()) {\n return;\n }\n this.rootContext.addErrorId(id);\n onCleanup(() => this.rootContext.removeErrorId(id));\n });\n }\n\n protected readonly dataAttr = attr;\n}\n","import { booleanAttribute, computed, Directive, inject, input, signal } from '@angular/core';\nimport { BooleanInput, injectId, RDX_FIELD_VALIDITY } from '@radix-ng/primitives/core';\nimport { provideFieldRootContext, RdxFieldRoot, RdxFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\nconst addId = (ids: string[], id: string) => (ids.includes(id) ? ids : [...ids, id]);\nconst removeId = (ids: string[], id: string) => ids.filter((item) => item !== id);\n\n/**\n * The field item context **re-provides** {@link RdxFieldRootContext} so a label, description, and control\n * placed inside the item associate with the **item's** control (own `controlId` / `descriptionIds`),\n * while all validation state (`invalidState` / `dirtyState` / `touchedState` / `filledState` /\n * `focusedState` / `requiredState`, errors and messages) is **delegated to the enclosing `rdxFieldRoot`**.\n * `disabledState` is the item's `disabled` OR'd with the root's. The enclosing root is reached with\n * `skipSelf` (the item provides the same token), so there is no circular injection.\n */\nconst fieldItemContext = (): RdxFieldRootContext => {\n const item = inject(RdxFieldItem);\n const root = item.root;\n\n return {\n controlId: item.controlId,\n name: root.effectiveName,\n descriptionIds: item.descriptionIds,\n errorIds: root.errorIds,\n messages: root.messages,\n matchesError: (kind: string) => root.matchesError(kind),\n notifyEdited: () => root.notifyEdited(),\n validState: root.validState,\n formSubmitAttempted: root.formSubmitAttempted,\n invalidState: root.invalidState,\n disabledState: item.disabledState,\n requiredState: root.requiredState,\n dirtyState: root.dirtyState,\n touchedState: root.touchedState,\n filledState: root.filledState,\n focusedState: root.focusedState,\n setControlId: (id: string) => item.controlId.set(id),\n addDescriptionId: (id: string) => item.descriptionIds.update((ids) => addId(ids, id)),\n removeDescriptionId: (id: string) => item.descriptionIds.update((ids) => removeId(ids, id)),\n addErrorId: (id: string) => root.errorIds.update((ids) => addId(ids, id)),\n removeErrorId: (id: string) => root.errorIds.update((ids) => removeId(ids, id)),\n setFocused: (value: boolean) => root.focusedValue.set(value),\n setFilled: (value: boolean) => root.filledValue.set(value),\n setDirty: (value: boolean) => root.dirtyValue.set(value),\n setTouched: (value: boolean) => root.touchedValue.set(value),\n setStateProvider: (provider) => root.setStateProvider(provider),\n clearStateProvider: (provider, previous) => root.clearStateProvider(provider, previous),\n hasStateProvider: root.hasStateProvider\n };\n};\n\n/**\n * Groups an individual item in a checkbox group or radio group with its own label and description.\n *\n * Use inside a `rdxFieldRoot` (typically wrapping a group) when each control needs its own label /\n * description: the item scopes those associations to its control while reflecting the field's validation\n * state. Mirrors Base UI's `Field.Item`.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldItem]',\n exportAs: 'rdxFieldItem',\n providers: [\n provideFieldRootContext(fieldItemContext),\n // Items delegate validity to the root; expose the root's tri-state to controls inside the item.\n { provide: RDX_FIELD_VALIDITY, useFactory: () => inject(RdxFieldItem).root.validState }\n ],\n host: {\n // Tri-state, mirroring the root: neither attribute while the root's `validState` is neutral.\n '[attr.data-invalid]': 'dataAttr(root.validState() === false)',\n '[attr.data-valid]': 'dataAttr(root.validState() === true)',\n '[attr.data-disabled]': 'dataAttr(disabledState())',\n '[attr.data-required]': 'dataAttr(root.requiredState())',\n '[attr.data-dirty]': 'dataAttr(root.dirtyState())',\n '[attr.data-touched]': 'dataAttr(root.touchedState())',\n '[attr.data-filled]': 'dataAttr(root.filledState())',\n '[attr.data-focused]': 'dataAttr(root.focusedState())'\n }\n})\nexport class RdxFieldItem {\n /** The enclosing field root (items are leaves under the root, so `skipSelf` reaches it). */\n readonly root = inject(RdxFieldRoot, { skipSelf: true });\n\n /**\n * Whether the wrapped control should ignore user interaction. The `disabled` on `rdxFieldRoot` takes\n * precedence (it is OR'd in).\n *\n * @group Props\n * @defaultValue false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** This item's control id — label / description / control inside the item associate with it. */\n readonly controlId = signal(injectId('rdx-field-item-control-'));\n /** Description ids for this item's control `aria-describedby`. */\n readonly descriptionIds = signal<string[]>([]);\n\n /** The item's effective disabled state: the root's disabled OR the item's. */\n readonly disabledState = computed(() => this.root.disabledState() || this.disabled());\n\n protected readonly dataAttr = attr;\n}\n","import { Directive, input } from '@angular/core';\nimport { injectId, rdxCheckLabelElement } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Labels the field control.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxFieldLabel]',\n exportAs: 'rdxFieldLabel',\n host: {\n '[attr.id]': 'id()',\n '[attr.for]': 'htmlFor()',\n '[attr.data-invalid]': 'dataAttr(rootContext.invalidState())',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())',\n '[attr.data-required]': 'dataAttr(rootContext.requiredState())'\n }\n})\nexport class RdxFieldLabel {\n protected readonly rootContext = injectFieldRootContext();\n\n /**\n * Label id.\n *\n * @group Props\n */\n readonly id = input(injectId('rdx-field-label-'));\n\n readonly htmlFor = () => this.rootContext.controlId();\n\n constructor() {\n rdxCheckLabelElement('rdxFieldLabel', 'field/unassociated-label', 'components/field');\n }\n\n protected readonly dataAttr = attr;\n}\n","import { Directive, effect, untracked } from '@angular/core';\nimport { injectNgControlState } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext, RdxFieldState } from './field-root';\n\n/**\n * Bridges a same-host Reactive Forms or template-driven `NgControl` into an enclosing `rdxFieldRoot`.\n * Place it next to `formControl`, `formControlName`, or `ngModel`; Angular remains the source of value,\n * validation, and interaction state while Field owns when that state is displayed.\n *\n * ```html\n * <div rdxFieldRoot>\n * <label rdxFieldLabel>Email</label>\n * <input formControlName=\"email\" rdxFieldControl rdxNgControlField />\n * <p match=\"required\" rdxFieldError>Email is required.</p>\n * </div>\n * ```\n *\n * The adapter also infers the Field name from `formControlName` / `ngModel` for Form-level server-error\n * routing. An explicit `name` on `rdxFieldRoot` takes precedence (useful for nested or remapped keys).\n *\n * @group Components\n */\n@Directive({\n selector: '[formControl][rdxNgControlField], [formControlName][rdxNgControlField], [ngModel][rdxNgControlField]',\n exportAs: 'rdxNgControlField'\n})\nexport class RdxNgControlField {\n private readonly ngControlState = injectNgControlState();\n private readonly fieldContext = injectFieldRootContext();\n\n /** Normalized Angular validation errors (`{ kind, message? }[]`). */\n readonly validationErrors = this.ngControlState.errors;\n\n constructor() {\n effect(\n (onCleanup) => {\n if (!this.ngControlState.connected()) {\n return;\n }\n\n const state: RdxFieldState = {\n name: () => this.ngControlState.name(),\n invalid: () => this.ngControlState.invalid(),\n pending: () => this.ngControlState.pending(),\n disabled: () => this.ngControlState.disabled(),\n dirty: () => this.ngControlState.dirty(),\n touched: () => this.ngControlState.touched(),\n errors: () => this.ngControlState.errors()\n };\n\n // Registration reads the previous provider internally. Keep that bookkeeping outside\n // this effect's dependency graph or replacing the provider would retrigger itself.\n const previous = untracked(() => this.fieldContext.setStateProvider(state));\n onCleanup(() => untracked(() => this.fieldContext.clearStateProvider(state, previous)));\n },\n { debugName: 'RdxNgControlField.connect' }\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["attr","addId","removeId"],"mappings":";;;;;AAuBA,MAAMA,MAAI,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AAwCzD,MAAMC,OAAK,GAAG,CAAC,GAAa,EAAE,EAAU,MAAM,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE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AA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,sGAAsG;AAChH,oBAAA,QAAQ,EAAE;AACb,iBAAA;;;ACzBD;;AAEG;;;;"}
@@ -403,6 +403,15 @@ class RdxFloatingFocusManager {
403
403
  * - an element (direct or from a callback) → that element (returned **explicitly**, bypassing the
404
404
  * "focus moved elsewhere" guard).
405
405
  */
406
+ /**
407
+ * Public view of {@link resolveReturnFocusTarget} for a **keep-mounted** primitive to apply
408
+ * return-focus on *close* — the composed scope's unmount-driven return never runs while the popup
409
+ * stays in the DOM. Returns an explicit element, `false` (suppress), or `undefined` (default →
410
+ * caller restores the previously-focused element, e.g. the trigger).
411
+ */
412
+ resolveReturnTarget() {
413
+ return this.resolveReturnFocusTarget();
414
+ }
406
415
  resolveReturnFocusTarget() {
407
416
  const resolved = resolveReturnFocus(this.effectiveReturnFocus(), this.effectiveCloseInteractionType());
408
417
  if (resolved === false) {