@radix-ng/primitives 1.0.5 → 1.0.6

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 (123) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +35 -27
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +34 -34
  4. package/fesm2022/radix-ng-primitives-arrow.mjs +3 -3
  5. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +5 -4
  6. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-autocomplete.mjs +175 -125
  8. package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
  9. package/fesm2022/radix-ng-primitives-avatar.mjs +25 -19
  10. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  11. package/fesm2022/radix-ng-primitives-button.mjs +11 -7
  12. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -1
  13. package/fesm2022/radix-ng-primitives-calendar.mjs +140 -90
  14. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  15. package/fesm2022/radix-ng-primitives-checkbox.mjs +61 -40
  16. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  17. package/fesm2022/radix-ng-primitives-collapsible.mjs +35 -24
  18. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-combobox.mjs +278 -177
  20. package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-composite.mjs +50 -33
  22. package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-config.mjs +7 -5
  24. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-context-menu.mjs +48 -22
  26. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  27. package/fesm2022/radix-ng-primitives-core.mjs +44 -28
  28. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  29. package/fesm2022/radix-ng-primitives-cropper.mjs +73 -45
  30. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  31. package/fesm2022/radix-ng-primitives-date-field.mjs +70 -40
  32. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-dialog.mjs +93 -67
  34. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  35. package/fesm2022/radix-ng-primitives-direction-provider.mjs +5 -4
  36. package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -1
  37. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +20 -16
  38. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  39. package/fesm2022/radix-ng-primitives-drawer.mjs +107 -81
  40. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
  41. package/fesm2022/radix-ng-primitives-editable.mjs +53 -39
  42. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  43. package/fesm2022/radix-ng-primitives-field.mjs +69 -42
  44. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
  45. package/fesm2022/radix-ng-primitives-fieldset.mjs +8 -7
  46. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +77 -40
  48. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
  50. package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -5
  51. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  52. package/fesm2022/radix-ng-primitives-form.mjs +25 -16
  53. package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
  54. package/fesm2022/radix-ng-primitives-input.mjs +41 -22
  55. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
  56. package/fesm2022/radix-ng-primitives-label.mjs +7 -5
  57. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-menu.mjs +274 -154
  59. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-menubar.mjs +35 -17
  61. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-meter.mjs +41 -30
  63. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +220 -183
  65. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-number-field.mjs +87 -59
  67. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  68. package/fesm2022/radix-ng-primitives-pagination.mjs +48 -38
  69. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-popover.mjs +150 -107
  71. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-popper.mjs +79 -47
  73. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-portal.mjs +20 -13
  75. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  76. package/fesm2022/radix-ng-primitives-presence.mjs +3 -3
  77. package/fesm2022/radix-ng-primitives-preview-card.mjs +119 -74
  78. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
  79. package/fesm2022/radix-ng-primitives-progress.mjs +43 -31
  80. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  81. package/fesm2022/radix-ng-primitives-radio.mjs +58 -35
  82. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  83. package/fesm2022/radix-ng-primitives-scroll-area.mjs +54 -38
  84. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  85. package/fesm2022/radix-ng-primitives-select.mjs +595 -102
  86. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  87. package/fesm2022/radix-ng-primitives-separator.mjs +7 -5
  88. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  89. package/fesm2022/radix-ng-primitives-slider.mjs +101 -63
  90. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  91. package/fesm2022/radix-ng-primitives-stepper.mjs +53 -39
  92. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  93. package/fesm2022/radix-ng-primitives-switch.mjs +23 -18
  94. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  95. package/fesm2022/radix-ng-primitives-tabs.mjs +72 -47
  96. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  97. package/fesm2022/radix-ng-primitives-time-field.mjs +72 -41
  98. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  99. package/fesm2022/radix-ng-primitives-toast.mjs +75 -56
  100. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
  101. package/fesm2022/radix-ng-primitives-toggle-group.mjs +29 -19
  102. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  103. package/fesm2022/radix-ng-primitives-toggle.mjs +16 -11
  104. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  105. package/fesm2022/radix-ng-primitives-toolbar.mjs +38 -30
  106. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  107. package/fesm2022/radix-ng-primitives-tooltip.mjs +118 -63
  108. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  109. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -20
  110. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  111. package/package.json +2 -2
  112. package/types/radix-ng-primitives-autocomplete.d.ts +3 -1
  113. package/types/radix-ng-primitives-combobox.d.ts +28 -9
  114. package/types/radix-ng-primitives-context-menu.d.ts +2 -0
  115. package/types/radix-ng-primitives-dialog.d.ts +6 -3
  116. package/types/radix-ng-primitives-floating-focus-manager.d.ts +11 -0
  117. package/types/radix-ng-primitives-menu.d.ts +47 -15
  118. package/types/radix-ng-primitives-menubar.d.ts +6 -1
  119. package/types/radix-ng-primitives-navigation-menu.d.ts +8 -6
  120. package/types/radix-ng-primitives-popover.d.ts +12 -4
  121. package/types/radix-ng-primitives-preview-card.d.ts +18 -5
  122. package/types/radix-ng-primitives-select.d.ts +186 -391
  123. package/types/radix-ng-primitives-tooltip.d.ts +17 -3
@@ -92,42 +92,57 @@ class RdxFieldRoot {
92
92
  *
93
93
  * @group Props
94
94
  */
95
- this.filled = input(...(ngDevMode ? [undefined, { debugName: "filled" }] : /* istanbul ignore next */ []));
95
+ this.filled = input(/* @ts-ignore */
96
+ ...(ngDevMode ? [undefined, { debugName: "filled" }] : /* istanbul ignore next */ []));
96
97
  /**
97
98
  * Overrides whether the control is focused.
98
99
  *
99
100
  * @group Props
100
101
  */
101
- this.focused = input(...(ngDevMode ? [undefined, { debugName: "focused" }] : /* istanbul ignore next */ []));
102
+ this.focused = input(/* @ts-ignore */
103
+ ...(ngDevMode ? [undefined, { debugName: "focused" }] : /* istanbul ignore next */ []));
102
104
  /**
103
105
  * Identifies the field to an enclosing Form for external (server) error matching. Fields without a
104
106
  * `name` never match external errors.
105
107
  *
106
108
  * @group Props
107
109
  */
108
- this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
110
+ this.name = input(/* @ts-ignore */
111
+ ...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
109
112
  /** The enclosing Form, if any. All Form-related behavior is a no-op when this is `null`. */
110
113
  this.formContext = injectFormRootContext(true);
111
- this.controlId = signal(`rdx-field-control-${fieldId++}`, ...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
112
- this.descriptionIds = signal([], ...(ngDevMode ? [{ debugName: "descriptionIds" }] : /* istanbul ignore next */ []));
113
- this.errorIds = signal([], ...(ngDevMode ? [{ debugName: "errorIds" }] : /* istanbul ignore next */ []));
114
- this.focusedValue = signal(false, ...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
115
- this.filledValue = signal(false, ...(ngDevMode ? [{ debugName: "filledValue" }] : /* istanbul ignore next */ []));
116
- this.dirtyValue = signal(false, ...(ngDevMode ? [{ debugName: "dirtyValue" }] : /* istanbul ignore next */ []));
117
- this.touchedValue = signal(false, ...(ngDevMode ? [{ debugName: "touchedValue" }] : /* istanbul ignore next */ []));
114
+ this.controlId = signal(`rdx-field-control-${fieldId++}`, /* @ts-ignore */
115
+ ...(ngDevMode ? [{ debugName: "controlId" }] : /* istanbul ignore next */ []));
116
+ this.descriptionIds = signal([], /* @ts-ignore */
117
+ ...(ngDevMode ? [{ debugName: "descriptionIds" }] : /* istanbul ignore next */ []));
118
+ this.errorIds = signal([], /* @ts-ignore */
119
+ ...(ngDevMode ? [{ debugName: "errorIds" }] : /* istanbul ignore next */ []));
120
+ this.focusedValue = signal(false, /* @ts-ignore */
121
+ ...(ngDevMode ? [{ debugName: "focusedValue" }] : /* istanbul ignore next */ []));
122
+ this.filledValue = signal(false, /* @ts-ignore */
123
+ ...(ngDevMode ? [{ debugName: "filledValue" }] : /* istanbul ignore next */ []));
124
+ this.dirtyValue = signal(false, /* @ts-ignore */
125
+ ...(ngDevMode ? [{ debugName: "dirtyValue" }] : /* istanbul ignore next */ []));
126
+ this.touchedValue = signal(false, /* @ts-ignore */
127
+ ...(ngDevMode ? [{ debugName: "touchedValue" }] : /* istanbul ignore next */ []));
118
128
  /** External state owner registered through the context; `null` when Field self-computes. */
119
- this.stateProvider = signal(null, ...(ngDevMode ? [{ debugName: "stateProvider" }] : /* istanbul ignore next */ []));
129
+ this.stateProvider = signal(null, /* @ts-ignore */
130
+ ...(ngDevMode ? [{ debugName: "stateProvider" }] : /* istanbul ignore next */ []));
120
131
  /** Whether an external adapter currently owns field state. */
121
- this.hasStateProvider = computed(() => this.stateProvider() !== null, ...(ngDevMode ? [{ debugName: "hasStateProvider" }] : /* istanbul ignore next */ []));
132
+ this.hasStateProvider = computed(() => this.stateProvider() !== null, /* @ts-ignore */
133
+ ...(ngDevMode ? [{ debugName: "hasStateProvider" }] : /* istanbul ignore next */ []));
122
134
  /** Error content from a registered state provider (e.g. a Signal Forms adapter). */
123
- this.providerErrors = computed(() => this.stateProvider()?.errors?.() ?? [], ...(ngDevMode ? [{ debugName: "providerErrors" }] : /* istanbul ignore next */ []));
135
+ this.providerErrors = computed(() => this.stateProvider()?.errors?.() ?? [], /* @ts-ignore */
136
+ ...(ngDevMode ? [{ debugName: "providerErrors" }] : /* istanbul ignore next */ []));
124
137
  /** External messages from the enclosing Form matched by this field's `name`. */
125
- this.externalErrors = computed(() => this.formContext?.errorsFor(this.name()) ?? [], ...(ngDevMode ? [{ debugName: "externalErrors" }] : /* istanbul ignore next */ []));
138
+ this.externalErrors = computed(() => this.formContext?.errorsFor(this.name()) ?? [], /* @ts-ignore */
139
+ ...(ngDevMode ? [{ debugName: "externalErrors" }] : /* istanbul ignore next */ []));
126
140
  /** Provider messages first (`message ?? kind`), then the Form's external messages. */
127
141
  this.messages = computed(() => [
128
142
  ...this.providerErrors().map((error) => error.message ?? error.kind),
129
143
  ...this.externalErrors()
130
- ], ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
144
+ ], /* @ts-ignore */
145
+ ...(ngDevMode ? [{ debugName: "messages" }] : /* istanbul ignore next */ []));
131
146
  // External errors (provider content or Form server errors) force invalid regardless of the input or
132
147
  // a provider's `invalid` accessor — a server error must show even when client-side validity passes.
133
148
  this.invalidState = computed(() => {
@@ -135,13 +150,20 @@ class RdxFieldRoot {
135
150
  return true;
136
151
  }
137
152
  return this.resolve('invalid', () => this.invalid());
138
- }, ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
139
- this.disabledState = computed(() => this.resolve('disabled', () => this.disabled()), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
140
- this.requiredState = computed(() => this.resolve('required', () => this.required()), ...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
141
- this.dirtyState = computed(() => this.resolve('dirty', () => this.dirty() || this.dirtyValue()), ...(ngDevMode ? [{ debugName: "dirtyState" }] : /* istanbul ignore next */ []));
142
- this.touchedState = computed(() => this.resolve('touched', () => this.touched() || this.touchedValue()), ...(ngDevMode ? [{ debugName: "touchedState" }] : /* istanbul ignore next */ []));
143
- this.filledState = computed(() => this.resolve('filled', () => this.filled() ?? this.filledValue()), ...(ngDevMode ? [{ debugName: "filledState" }] : /* istanbul ignore next */ []));
144
- this.focusedState = computed(() => this.resolve('focused', () => this.focused() ?? this.focusedValue()), ...(ngDevMode ? [{ debugName: "focusedState" }] : /* istanbul ignore next */ []));
153
+ }, /* @ts-ignore */
154
+ ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
155
+ this.disabledState = computed(() => this.resolve('disabled', () => this.disabled()), /* @ts-ignore */
156
+ ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
157
+ this.requiredState = computed(() => this.resolve('required', () => this.required()), /* @ts-ignore */
158
+ ...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
159
+ this.dirtyState = computed(() => this.resolve('dirty', () => this.dirty() || this.dirtyValue()), /* @ts-ignore */
160
+ ...(ngDevMode ? [{ debugName: "dirtyState" }] : /* istanbul ignore next */ []));
161
+ this.touchedState = computed(() => this.resolve('touched', () => this.touched() || this.touchedValue()), /* @ts-ignore */
162
+ ...(ngDevMode ? [{ debugName: "touchedState" }] : /* istanbul ignore next */ []));
163
+ this.filledState = computed(() => this.resolve('filled', () => this.filled() ?? this.filledValue()), /* @ts-ignore */
164
+ ...(ngDevMode ? [{ debugName: "filledState" }] : /* istanbul ignore next */ []));
165
+ this.focusedState = computed(() => this.resolve('focused', () => this.focused() ?? this.focusedValue()), /* @ts-ignore */
166
+ ...(ngDevMode ? [{ debugName: "focusedState" }] : /* istanbul ignore next */ []));
145
167
  this.dataAttr = attr$4;
146
168
  this.host = inject(ElementRef).nativeElement;
147
169
  // Register with an enclosing Form (if any) for aggregate state, submit guard, and reset; a
@@ -202,10 +224,10 @@ class RdxFieldRoot {
202
224
  const accessor = this.stateProvider()?.[key];
203
225
  return accessor ? accessor() : fallback();
204
226
  }
205
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
206
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxFieldRoot, isStandalone: true, selector: "[rdxFieldRoot]", inputs: { invalid: { classPropertyName: "invalid", publicName: "invalid", 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 }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, filled: { classPropertyName: "filled", publicName: "filled", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "notifyEdited()", "change": "notifyEdited()" }, properties: { "attr.data-invalid": "dataAttr(invalidState())", "attr.data-valid": "dataAttr(!invalidState())", "attr.data-disabled": "dataAttr(disabledState())", "attr.data-required": "dataAttr(requiredState())", "attr.data-dirty": "dataAttr(dirtyState())", "attr.data-touched": "dataAttr(touchedState())", "attr.data-filled": "dataAttr(filledState())", "attr.data-focused": "dataAttr(focusedState())" } }, providers: [provideFieldRootContext(fieldRootContext)], exportAs: ["rdxFieldRoot"], ngImport: i0 }); }
227
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
228
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxFieldRoot, isStandalone: true, selector: "[rdxFieldRoot]", inputs: { invalid: { classPropertyName: "invalid", publicName: "invalid", 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 }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, filled: { classPropertyName: "filled", publicName: "filled", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "input": "notifyEdited()", "change": "notifyEdited()" }, properties: { "attr.data-invalid": "dataAttr(invalidState())", "attr.data-valid": "dataAttr(!invalidState())", "attr.data-disabled": "dataAttr(disabledState())", "attr.data-required": "dataAttr(requiredState())", "attr.data-dirty": "dataAttr(dirtyState())", "attr.data-touched": "dataAttr(touchedState())", "attr.data-filled": "dataAttr(filledState())", "attr.data-focused": "dataAttr(focusedState())" } }, providers: [provideFieldRootContext(fieldRootContext)], exportAs: ["rdxFieldRoot"], ngImport: i0 }); }
207
229
  }
208
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldRoot, decorators: [{
230
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldRoot, decorators: [{
209
231
  type: Directive,
210
232
  args: [{
211
233
  selector: '[rdxFieldRoot]',
@@ -246,14 +268,16 @@ class RdxFieldControl {
246
268
  *
247
269
  * @group Props
248
270
  */
249
- this.id = input(`rdx-field-control-${controlId++}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
271
+ this.id = input(`rdx-field-control-${controlId++}`, /* @ts-ignore */
272
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
250
273
  this.describedBy = computed(() => {
251
274
  const ids = [
252
275
  ...this.rootContext.descriptionIds(),
253
276
  ...(this.rootContext.invalidState() ? this.rootContext.errorIds() : [])
254
277
  ];
255
278
  return ids.length ? ids.join(' ') : undefined;
256
- }, ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
279
+ }, /* @ts-ignore */
280
+ ...(ngDevMode ? [{ debugName: "describedBy" }] : /* istanbul ignore next */ []));
257
281
  this.dataAttr = attr$3;
258
282
  effect(() => {
259
283
  this.rootContext.setControlId(this.id());
@@ -282,10 +306,10 @@ class RdxFieldControl {
282
306
  const element = this.elementRef.nativeElement;
283
307
  return element.value ?? '';
284
308
  }
285
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
286
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxFieldControl, isStandalone: true, selector: "[rdxFieldControl]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "input": "syncFilled()", "change": "syncFilled()" }, properties: { "attr.id": "id()", "attr.aria-describedby": "describedBy()", "attr.aria-invalid": "rootContext.invalidState() ? \"true\" : undefined", "attr.aria-required": "rootContext.requiredState() ? \"true\" : undefined", "attr.aria-disabled": "rootContext.disabledState() ? \"true\" : undefined", "attr.disabled": "isNativeFormControl() && rootContext.disabledState() ? \"\" : undefined", "attr.required": "isNativeFormControl() && rootContext.requiredState() ? \"\" : undefined", "attr.data-invalid": "dataAttr(rootContext.invalidState())", "attr.data-valid": "dataAttr(!rootContext.invalidState())", "attr.data-disabled": "dataAttr(rootContext.disabledState())", "attr.data-required": "dataAttr(rootContext.requiredState())", "attr.data-filled": "dataAttr(rootContext.filledState())", "attr.data-focused": "dataAttr(rootContext.focusedState())" } }, exportAs: ["rdxFieldControl"], ngImport: i0 }); }
309
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldControl, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
310
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxFieldControl, isStandalone: true, selector: "[rdxFieldControl]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus()", "blur": "onBlur()", "input": "syncFilled()", "change": "syncFilled()" }, properties: { "attr.id": "id()", "attr.aria-describedby": "describedBy()", "attr.aria-invalid": "rootContext.invalidState() ? \"true\" : undefined", "attr.aria-required": "rootContext.requiredState() ? \"true\" : undefined", "attr.aria-disabled": "rootContext.disabledState() ? \"true\" : undefined", "attr.disabled": "isNativeFormControl() && rootContext.disabledState() ? \"\" : undefined", "attr.required": "isNativeFormControl() && rootContext.requiredState() ? \"\" : undefined", "attr.data-invalid": "dataAttr(rootContext.invalidState())", "attr.data-valid": "dataAttr(!rootContext.invalidState())", "attr.data-disabled": "dataAttr(rootContext.disabledState())", "attr.data-required": "dataAttr(rootContext.requiredState())", "attr.data-filled": "dataAttr(rootContext.filledState())", "attr.data-focused": "dataAttr(rootContext.focusedState())" } }, exportAs: ["rdxFieldControl"], ngImport: i0 }); }
287
311
  }
288
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldControl, decorators: [{
312
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldControl, decorators: [{
289
313
  type: Directive,
290
314
  args: [{
291
315
  selector: '[rdxFieldControl]',
@@ -327,7 +351,8 @@ class RdxFieldDescription {
327
351
  *
328
352
  * @group Props
329
353
  */
330
- this.id = input(`rdx-field-description-${descriptionId++}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
354
+ this.id = input(`rdx-field-description-${descriptionId++}`, /* @ts-ignore */
355
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
331
356
  this.dataAttr = attr$2;
332
357
  effect((onCleanup) => {
333
358
  const id = this.id();
@@ -335,10 +360,10 @@ class RdxFieldDescription {
335
360
  onCleanup(() => this.rootContext.removeDescriptionId(id));
336
361
  });
337
362
  }
338
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
339
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxFieldDescription, isStandalone: true, selector: "[rdxFieldDescription]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "attr.data-invalid": "dataAttr(rootContext.invalidState())", "attr.data-disabled": "dataAttr(rootContext.disabledState())" } }, exportAs: ["rdxFieldDescription"], ngImport: i0 }); }
363
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
364
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxFieldDescription, isStandalone: true, selector: "[rdxFieldDescription]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "attr.data-invalid": "dataAttr(rootContext.invalidState())", "attr.data-disabled": "dataAttr(rootContext.disabledState())" } }, exportAs: ["rdxFieldDescription"], ngImport: i0 }); }
340
365
  }
341
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldDescription, decorators: [{
366
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldDescription, decorators: [{
342
367
  type: Directive,
343
368
  args: [{
344
369
  selector: '[rdxFieldDescription]',
@@ -366,7 +391,8 @@ class RdxFieldError {
366
391
  *
367
392
  * @group Props
368
393
  */
369
- this.id = input(`rdx-field-error-${errorId++}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
394
+ this.id = input(`rdx-field-error-${errorId++}`, /* @ts-ignore */
395
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
370
396
  /**
371
397
  * The field's external messages (state provider's, then enclosing Form's), `[]` when none. Render
372
398
  * them explicitly via the `exportAs` reference — the directive never injects text content itself:
@@ -380,10 +406,10 @@ class RdxFieldError {
380
406
  onCleanup(() => this.rootContext.removeErrorId(id));
381
407
  });
382
408
  }
383
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldError, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
384
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxFieldError, isStandalone: true, selector: "[rdxFieldError]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "attr.hidden": "rootContext.invalidState() ? undefined : \"\"", "attr.aria-live": "\"polite\"", "attr.data-invalid": "dataAttr(rootContext.invalidState())", "attr.data-disabled": "dataAttr(rootContext.disabledState())" } }, exportAs: ["rdxFieldError"], ngImport: i0 }); }
409
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldError, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
410
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxFieldError, isStandalone: true, selector: "[rdxFieldError]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "attr.hidden": "rootContext.invalidState() ? undefined : \"\"", "attr.aria-live": "\"polite\"", "attr.data-invalid": "dataAttr(rootContext.invalidState())", "attr.data-disabled": "dataAttr(rootContext.disabledState())" } }, exportAs: ["rdxFieldError"], ngImport: i0 }); }
385
411
  }
386
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldError, decorators: [{
412
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldError, decorators: [{
387
413
  type: Directive,
388
414
  args: [{
389
415
  selector: '[rdxFieldError]',
@@ -413,15 +439,16 @@ class RdxFieldLabel {
413
439
  *
414
440
  * @group Props
415
441
  */
416
- this.id = input(`rdx-field-label-${labelId++}`, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
442
+ this.id = input(`rdx-field-label-${labelId++}`, /* @ts-ignore */
443
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
417
444
  this.htmlFor = () => this.rootContext.controlId();
418
445
  this.dataAttr = attr;
419
446
  rdxCheckLabelElement('rdxFieldLabel', 'field/unassociated-label', 'components/field');
420
447
  }
421
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
422
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxFieldLabel, isStandalone: true, selector: "[rdxFieldLabel]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "attr.for": "htmlFor()", "attr.data-invalid": "dataAttr(rootContext.invalidState())", "attr.data-disabled": "dataAttr(rootContext.disabledState())", "attr.data-required": "dataAttr(rootContext.requiredState())" } }, exportAs: ["rdxFieldLabel"], ngImport: i0 }); }
448
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
449
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxFieldLabel, isStandalone: true, selector: "[rdxFieldLabel]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.id": "id()", "attr.for": "htmlFor()", "attr.data-invalid": "dataAttr(rootContext.invalidState())", "attr.data-disabled": "dataAttr(rootContext.disabledState())", "attr.data-required": "dataAttr(rootContext.requiredState())" } }, exportAs: ["rdxFieldLabel"], ngImport: i0 }); }
423
450
  }
424
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldLabel, decorators: [{
451
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldLabel, decorators: [{
425
452
  type: Directive,
426
453
  args: [{
427
454
  selector: '[rdxFieldLabel]',
@@ -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-label.ts","../../../packages/primitives/field/radix-ng-primitives-field.ts"],"sourcesContent":["import { booleanAttribute, computed, DestroyRef, Directive, ElementRef, inject, input, signal } from '@angular/core';\nimport { BooleanInput, createContext, RdxValidationError } from '@radix-ng/primitives/core';\nimport { injectFormRootContext, RdxFormFieldRegistration } from '@radix-ng/primitives/form';\n\nlet fieldId = 0;\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 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). When provided and non-empty\n * it forces `invalidState` true, and its messages (`message ?? kind` per error) surface through\n * `RdxFieldError.messages()` ahead of any enclosing Form's external messages. Uses `core`'s\n * framework-free shim type so the seam stays free of `@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\nconst fieldRootContext = () => {\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 external messages (state provider's, then enclosing Form's), for `RdxFieldError`. */\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 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 hasStateProvider: root.hasStateProvider\n };\n};\n\nexport type RdxFieldRootContext = ReturnType<typeof fieldRootContext>;\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: [provideFieldRootContext(fieldRootContext)],\n host: {\n '[attr.data-invalid]': 'dataAttr(invalidState())',\n '[attr.data-valid]': 'dataAttr(!invalidState())',\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 /** 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(`rdx-field-control-${fieldId++}`);\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 /** External messages from the enclosing Form matched by this field's `name`. */\n readonly externalErrors = computed(() => this.formContext?.errorsFor(this.name()) ?? []);\n\n /** Provider messages first (`message ?? kind`), then the Form's external messages. */\n readonly messages = computed(() => [\n ...this.providerErrors().map((error) => error.message ?? error.kind),\n ...this.externalErrors()\n ]);\n\n // External errors (provider content or Form server errors) force invalid regardless of the input or\n // a provider's `invalid` accessor — a server error must show even when client-side validity passes.\n readonly invalidState = computed(() => {\n if (this.externalErrors().length > 0 || this.providerErrors().length > 0) {\n return true;\n }\n return this.resolve('invalid', () => this.invalid());\n });\n readonly disabledState = computed(() => this.resolve('disabled', () => this.disabled()));\n readonly requiredState = computed(() => this.resolve('required', () => this.required()));\n readonly dirtyState = computed(() => this.resolve('dirty', () => this.dirty() || this.dirtyValue()));\n readonly touchedState = computed(() => this.resolve('touched', () => this.touched() || this.touchedValue()));\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: () => this.invalidState(),\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 * Prefer the registered provider's value for `key` when it exposes one,\n * otherwise fall back to the root inputs / DOM-derived signals.\n */\n private resolve(key: Exclude<keyof RdxFieldState, '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 { injectFieldRootContext } from './field-root';\n\nlet controlId = 0;\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 '[attr.aria-invalid]': 'rootContext.invalidState() ? \"true\" : undefined',\n '[attr.aria-required]': 'rootContext.requiredState() ? \"true\" : undefined',\n '[attr.aria-disabled]': 'rootContext.disabledState() ? \"true\" : undefined',\n '[attr.disabled]': 'isNativeFormControl() && rootContext.disabledState() ? \"\" : undefined',\n '[attr.required]': 'isNativeFormControl() && rootContext.requiredState() ? \"\" : undefined',\n '[attr.data-invalid]': 'dataAttr(rootContext.invalidState())',\n '[attr.data-valid]': 'dataAttr(!rootContext.invalidState())',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())',\n '[attr.data-required]': 'dataAttr(rootContext.requiredState())',\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(`rdx-field-control-${controlId++}`);\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 { injectFieldRootContext } from './field-root';\n\nlet descriptionId = 0;\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(`rdx-field-description-${descriptionId++}`);\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 { injectFieldRootContext } from './field-root';\n\nlet errorId = 0;\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(`rdx-field-error-${errorId++}`);\n\n /**\n * The field's external messages (state provider's, then enclosing Form's), `[]` when none. Render\n * them 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 { Directive, input } from '@angular/core';\nimport { rdxCheckLabelElement } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nlet labelId = 0;\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(`rdx-field-label-${labelId++}`);\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"],"mappings":";;;;;AAIA,IAAI,OAAO,GAAG,CAAC;AAEf,MAAMA,MAAI,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AA+BzD,MAAM,KAAK,GAAG,CAAC,GAAa,EAAE,EAAU,MAAM,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,CAAC;AACpF,MAAM,QAAQ,GAAG,CAAC,GAAa,EAAE,EAAU,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;AAEjF,MAAM,gBAAgB,GAAG,MAAK;AAC1B,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;;QAEvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;;AAEvB,QAAA,YAAY,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE;QACvC,YAAY,EA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AA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,UAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,sCAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAXzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,IAAI,EAAE;AACF,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,YAAY,EAAE,WAAW;AACzB,wBAAA,qBAAqB,EAAE,sCAAsC;AAC7D,wBAAA,sBAAsB,EAAE,uCAAuC;AAC/D,wBAAA,sBAAsB,EAAE;AAC3B;AACJ,iBAAA;;;ACvBD;;AAEG;;;;"}
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-label.ts","../../../packages/primitives/field/radix-ng-primitives-field.ts"],"sourcesContent":["import { booleanAttribute, computed, DestroyRef, Directive, ElementRef, inject, input, signal } from '@angular/core';\nimport { BooleanInput, createContext, RdxValidationError } from '@radix-ng/primitives/core';\nimport { injectFormRootContext, RdxFormFieldRegistration } from '@radix-ng/primitives/form';\n\nlet fieldId = 0;\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 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). When provided and non-empty\n * it forces `invalidState` true, and its messages (`message ?? kind` per error) surface through\n * `RdxFieldError.messages()` ahead of any enclosing Form's external messages. Uses `core`'s\n * framework-free shim type so the seam stays free of `@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\nconst fieldRootContext = () => {\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 external messages (state provider's, then enclosing Form's), for `RdxFieldError`. */\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 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 hasStateProvider: root.hasStateProvider\n };\n};\n\nexport type RdxFieldRootContext = ReturnType<typeof fieldRootContext>;\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: [provideFieldRootContext(fieldRootContext)],\n host: {\n '[attr.data-invalid]': 'dataAttr(invalidState())',\n '[attr.data-valid]': 'dataAttr(!invalidState())',\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 /** 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(`rdx-field-control-${fieldId++}`);\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 /** External messages from the enclosing Form matched by this field's `name`. */\n readonly externalErrors = computed(() => this.formContext?.errorsFor(this.name()) ?? []);\n\n /** Provider messages first (`message ?? kind`), then the Form's external messages. */\n readonly messages = computed(() => [\n ...this.providerErrors().map((error) => error.message ?? error.kind),\n ...this.externalErrors()\n ]);\n\n // External errors (provider content or Form server errors) force invalid regardless of the input or\n // a provider's `invalid` accessor — a server error must show even when client-side validity passes.\n readonly invalidState = computed(() => {\n if (this.externalErrors().length > 0 || this.providerErrors().length > 0) {\n return true;\n }\n return this.resolve('invalid', () => this.invalid());\n });\n readonly disabledState = computed(() => this.resolve('disabled', () => this.disabled()));\n readonly requiredState = computed(() => this.resolve('required', () => this.required()));\n readonly dirtyState = computed(() => this.resolve('dirty', () => this.dirty() || this.dirtyValue()));\n readonly touchedState = computed(() => this.resolve('touched', () => this.touched() || this.touchedValue()));\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: () => this.invalidState(),\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 * Prefer the registered provider's value for `key` when it exposes one,\n * otherwise fall back to the root inputs / DOM-derived signals.\n */\n private resolve(key: Exclude<keyof RdxFieldState, '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 { injectFieldRootContext } from './field-root';\n\nlet controlId = 0;\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 '[attr.aria-invalid]': 'rootContext.invalidState() ? \"true\" : undefined',\n '[attr.aria-required]': 'rootContext.requiredState() ? \"true\" : undefined',\n '[attr.aria-disabled]': 'rootContext.disabledState() ? \"true\" : undefined',\n '[attr.disabled]': 'isNativeFormControl() && rootContext.disabledState() ? \"\" : undefined',\n '[attr.required]': 'isNativeFormControl() && rootContext.requiredState() ? \"\" : undefined',\n '[attr.data-invalid]': 'dataAttr(rootContext.invalidState())',\n '[attr.data-valid]': 'dataAttr(!rootContext.invalidState())',\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())',\n '[attr.data-required]': 'dataAttr(rootContext.requiredState())',\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(`rdx-field-control-${controlId++}`);\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 { injectFieldRootContext } from './field-root';\n\nlet descriptionId = 0;\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(`rdx-field-description-${descriptionId++}`);\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 { injectFieldRootContext } from './field-root';\n\nlet errorId = 0;\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(`rdx-field-error-${errorId++}`);\n\n /**\n * The field's external messages (state provider's, then enclosing Form's), `[]` when none. Render\n * them 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 { Directive, input } from '@angular/core';\nimport { rdxCheckLabelElement } from '@radix-ng/primitives/core';\nimport { injectFieldRootContext } from './field-root';\n\nlet labelId = 0;\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(`rdx-field-label-${labelId++}`);\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"],"mappings":";;;;;AAIA,IAAI,OAAO,GAAG,CAAC;AAEf,MAAMA,MAAI,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AA+BzD,MAAM,KAAK,GAAG,CAAC,GAAa,EAAE,EAAU,MAAM,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,GAAG,GAAG,GAAG,CAAC,GAAG,GAAG,EAAE,EAAE,CAAC,CAAC;AACpF,MAAM,QAAQ,GAAG,CAAC,GAAa,EAAE,EAAU,KAAK,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;AAEjF,MAAM,gBAAgB,GAAG,MAAK;AAC1B,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;;QAEvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;;AAEvB,QAAA,YAAY,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE;QACvC,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,UAAU,EAAE,IAAI,CAAC,UAAU;QAC3B,YAAY,EAAE,IAAI,CAAC,YAAY;QAC/B,WAAW,EAAE,IAAI,CAAC,WAAW;QAC7B,YAAY,EAAE,IAAI,CAAC,YAAY;AAC/B,QAAA,YAAY,EAAE,CAA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AAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,EAAA,EAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,UAAA,EAAA,WAAA,EAAA,mBAAA,EAAA,sCAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,eAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAb,aAAa,EAAA,UAAA,EAAA,CAAA;kBAXzB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,IAAI,EAAE;AACF,wBAAA,WAAW,EAAE,MAAM;AACnB,wBAAA,YAAY,EAAE,WAAW;AACzB,wBAAA,qBAAqB,EAAE,sCAAsC;AAC7D,wBAAA,sBAAsB,EAAE,uCAAuC;AAC/D,wBAAA,sBAAsB,EAAE;AAC3B;AACJ,iBAAA;;;ACvBD;;AAEG;;;;"}
@@ -24,13 +24,14 @@ class RdxFieldsetRoot {
24
24
  * @defaultValue false
25
25
  */
26
26
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
27
- this.disabledState = computed(() => this.disabled(), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
27
+ this.disabledState = computed(() => this.disabled(), /* @ts-ignore */
28
+ ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
28
29
  this.dataAttr = attr$1;
29
30
  }
30
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldsetRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
31
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxFieldsetRoot, isStandalone: true, selector: "fieldset[rdxFieldsetRoot]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "disabledState() ? \"\" : undefined", "attr.data-disabled": "dataAttr(disabledState())" } }, providers: [provideFieldsetRootContext(fieldsetRootContext)], exportAs: ["rdxFieldsetRoot"], ngImport: i0 }); }
31
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldsetRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
32
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxFieldsetRoot, isStandalone: true, selector: "fieldset[rdxFieldsetRoot]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.disabled": "disabledState() ? \"\" : undefined", "attr.data-disabled": "dataAttr(disabledState())" } }, providers: [provideFieldsetRootContext(fieldsetRootContext)], exportAs: ["rdxFieldsetRoot"], ngImport: i0 }); }
32
33
  }
33
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldsetRoot, decorators: [{
34
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldsetRoot, decorators: [{
34
35
  type: Directive,
35
36
  args: [{
36
37
  selector: 'fieldset[rdxFieldsetRoot]',
@@ -57,10 +58,10 @@ class RdxFieldsetLegend {
57
58
  this.rootContext = injectFieldsetRootContext();
58
59
  this.dataAttr = attr;
59
60
  }
60
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldsetLegend, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
61
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxFieldsetLegend, isStandalone: true, selector: "legend[rdxFieldsetLegend]", host: { properties: { "attr.data-disabled": "dataAttr(rootContext.disabledState())" } }, exportAs: ["rdxFieldsetLegend"], ngImport: i0 }); }
61
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldsetLegend, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
62
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxFieldsetLegend, isStandalone: true, selector: "legend[rdxFieldsetLegend]", host: { properties: { "attr.data-disabled": "dataAttr(rootContext.disabledState())" } }, exportAs: ["rdxFieldsetLegend"], ngImport: i0 }); }
62
63
  }
63
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxFieldsetLegend, decorators: [{
64
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxFieldsetLegend, decorators: [{
64
65
  type: Directive,
65
66
  args: [{
66
67
  selector: 'legend[rdxFieldsetLegend]',
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-fieldset.mjs","sources":["../../../packages/primitives/fieldset/src/fieldset-root.ts","../../../packages/primitives/fieldset/src/fieldset-legend.ts","../../../packages/primitives/fieldset/radix-ng-primitives-fieldset.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';\nimport { BooleanInput, createContext } from '@radix-ng/primitives/core';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\nconst fieldsetRootContext = () => {\n const root = injectFieldsetRoot();\n\n return {\n disabledState: root.disabledState\n };\n};\n\nexport type RdxFieldsetRootContext = ReturnType<typeof fieldsetRootContext>;\n\nexport const [injectFieldsetRootContext, provideFieldsetRootContext] = createContext<RdxFieldsetRootContext>(\n 'RdxFieldsetRoot',\n 'components/fieldset'\n);\n\n/**\n * Groups related form controls and disables them as a set.\n *\n * @group Components\n */\n@Directive({\n selector: 'fieldset[rdxFieldsetRoot]',\n exportAs: 'rdxFieldsetRoot',\n providers: [provideFieldsetRootContext(fieldsetRootContext)],\n host: {\n '[attr.disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-disabled]': 'dataAttr(disabledState())'\n }\n})\nexport class RdxFieldsetRoot {\n /**\n * Whether all controls in the fieldset are disabled.\n *\n * @group Props\n * @defaultValue false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabledState = computed(() => this.disabled());\n\n protected readonly dataAttr = attr;\n}\n\nfunction injectFieldsetRoot(): RdxFieldsetRoot {\n return inject(RdxFieldsetRoot);\n}\n","import { Directive } from '@angular/core';\nimport { injectFieldsetRootContext } from './fieldset-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Labels the fieldset.\n *\n * @group Components\n */\n@Directive({\n selector: 'legend[rdxFieldsetLegend]',\n exportAs: 'rdxFieldsetLegend',\n host: {\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())'\n }\n})\nexport class RdxFieldsetLegend {\n protected readonly rootContext = injectFieldsetRootContext();\n protected readonly dataAttr = attr;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["attr"],"mappings":";;;;AAGA,MAAMA,MAAI,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AAEzD,MAAM,mBAAmB,GAAG,MAAK;AAC7B,IAAA,MAAM,IAAI,GAAG,kBAAkB,EAAE;IAEjC,OAAO;QACH,aAAa,EAAE,IAAI,CAAC;KACvB;AACL,CAAC;AAIM,MAAM,CAAC,yBAAyB,EAAE,0BAA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AG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AAEzD;;;;AAIG;MAQU,iBAAiB,CAAA;AAP9B,IAAA,WAAA,GAAA;QAQuB,IAAA,CAAA,WAAW,GAAG,yBAAyB,EAAE;QACzC,IAAA,CAAA,QAAQ,GAAG,IAAI;AACrC,IAAA;8GAHY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAjB,iBAAiB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,2BAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,oBAAA,EAAA,uCAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAP7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE;AACF,wBAAA,sBAAsB,EAAE;AAC3B;AACJ,iBAAA;;;AChBD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-fieldset.mjs","sources":["../../../packages/primitives/fieldset/src/fieldset-root.ts","../../../packages/primitives/fieldset/src/fieldset-legend.ts","../../../packages/primitives/fieldset/radix-ng-primitives-fieldset.ts"],"sourcesContent":["import { booleanAttribute, computed, Directive, inject, input } from '@angular/core';\nimport { BooleanInput, createContext } from '@radix-ng/primitives/core';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\nconst fieldsetRootContext = () => {\n const root = injectFieldsetRoot();\n\n return {\n disabledState: root.disabledState\n };\n};\n\nexport type RdxFieldsetRootContext = ReturnType<typeof fieldsetRootContext>;\n\nexport const [injectFieldsetRootContext, provideFieldsetRootContext] = createContext<RdxFieldsetRootContext>(\n 'RdxFieldsetRoot',\n 'components/fieldset'\n);\n\n/**\n * Groups related form controls and disables them as a set.\n *\n * @group Components\n */\n@Directive({\n selector: 'fieldset[rdxFieldsetRoot]',\n exportAs: 'rdxFieldsetRoot',\n providers: [provideFieldsetRootContext(fieldsetRootContext)],\n host: {\n '[attr.disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-disabled]': 'dataAttr(disabledState())'\n }\n})\nexport class RdxFieldsetRoot {\n /**\n * Whether all controls in the fieldset are disabled.\n *\n * @group Props\n * @defaultValue false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabledState = computed(() => this.disabled());\n\n protected readonly dataAttr = attr;\n}\n\nfunction injectFieldsetRoot(): RdxFieldsetRoot {\n return inject(RdxFieldsetRoot);\n}\n","import { Directive } from '@angular/core';\nimport { injectFieldsetRootContext } from './fieldset-root';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Labels the fieldset.\n *\n * @group Components\n */\n@Directive({\n selector: 'legend[rdxFieldsetLegend]',\n exportAs: 'rdxFieldsetLegend',\n host: {\n '[attr.data-disabled]': 'dataAttr(rootContext.disabledState())'\n }\n})\nexport class RdxFieldsetLegend {\n protected readonly rootContext = injectFieldsetRootContext();\n protected readonly dataAttr = attr;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["attr"],"mappings":";;;;AAGA,MAAMA,MAAI,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AAEzD,MAAM,mBAAmB,GAAG,MAAK;AAC7B,IAAA,MAAM,IAAI,GAAG,kBAAkB,EAAE;IAEjC,OAAO;QACH,aAAa,EAAE,IAAI,CAAC;KACvB;AACL,CAAC;AAIM,MAAM,CAAC,yBAAyB,EAAE,0BAA0B,CAAC,GAAG,aAAa,CAChF,iBAAiB,EACjB,qBAAqB;AAGzB;;;;AAIG;MAUU,eAAe,CAAA;AA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