@radix-ng/primitives 1.0.6 → 1.0.7

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 (54) hide show
  1. package/aspect-ratio/README.md +1 -1
  2. package/fesm2022/radix-ng-primitives-accordion.mjs +6 -1
  3. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  4. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +9 -34
  5. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  6. package/fesm2022/radix-ng-primitives-avatar.mjs +69 -18
  7. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-checkbox.mjs +5 -9
  9. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-collapsible.mjs +4 -3
  11. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  12. package/fesm2022/radix-ng-primitives-field.mjs +13 -14
  13. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-form.mjs +1 -1
  15. package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-label.mjs +5 -4
  17. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-number-field.mjs +7 -3
  19. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-progress.mjs +37 -22
  21. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-radio.mjs +1 -6
  23. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  24. package/fesm2022/radix-ng-primitives-scroll-area.mjs +4 -4
  25. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-separator.mjs +7 -13
  27. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-slider.mjs +1 -2
  29. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-switch.mjs +3 -3
  31. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-tabs.mjs +4 -4
  33. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  34. package/fesm2022/radix-ng-primitives-toggle-group.mjs +10 -4
  35. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  36. package/fesm2022/radix-ng-primitives-toggle.mjs +24 -29
  37. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  38. package/fesm2022/radix-ng-primitives-toolbar.mjs +15 -2
  39. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  40. package/package.json +1 -1
  41. package/types/radix-ng-primitives-accordion.d.ts +1 -0
  42. package/types/radix-ng-primitives-aspect-ratio.d.ts +10 -23
  43. package/types/radix-ng-primitives-avatar.d.ts +51 -25
  44. package/types/radix-ng-primitives-checkbox.d.ts +26 -98
  45. package/types/radix-ng-primitives-field.d.ts +33 -207
  46. package/types/radix-ng-primitives-form.d.ts +24 -33
  47. package/types/radix-ng-primitives-label.d.ts +3 -2
  48. package/types/radix-ng-primitives-number-field.d.ts +1 -1
  49. package/types/radix-ng-primitives-progress.d.ts +59 -121
  50. package/types/radix-ng-primitives-radio.d.ts +0 -1
  51. package/types/radix-ng-primitives-separator.d.ts +0 -7
  52. package/types/radix-ng-primitives-toggle-group.d.ts +7 -3
  53. package/types/radix-ng-primitives-toggle.d.ts +8 -8
  54. package/types/radix-ng-primitives-toolbar.d.ts +2 -0
@@ -1,8 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
- import { input, numberAttribute, computed, Directive, inject, NgModule } from '@angular/core';
3
- import { createContext } from '@radix-ng/primitives/core';
2
+ import { input, numberAttribute, computed, signal, Directive, inject, DestroyRef, NgModule } from '@angular/core';
3
+ import { createContext, injectId } from '@radix-ng/primitives/core';
4
4
 
5
- let progressId = 0;
6
5
  const attr$4 = (value) => (value ? '' : undefined);
7
6
  const DEFAULT_MIN = 0;
8
7
  const DEFAULT_MAX = 100;
@@ -21,7 +20,8 @@ const progressRootContext = () => {
21
20
  progressState: root.progressState,
22
21
  completeState: root.completeState,
23
22
  progressingState: root.progressingState,
24
- indeterminateState: root.indeterminateState
23
+ indeterminateState: root.indeterminateState,
24
+ registerLabel: () => root.registerLabel()
25
25
  };
26
26
  };
27
27
  const [injectProgressRootContext, provideProgressRootContext] = createContext('RdxProgressRoot', 'components/progress');
@@ -60,9 +60,9 @@ class RdxProgressRootDirective {
60
60
  */
61
61
  this.valueLabel = input((value, min, max) => this.defaultValueLabel(value, min, max), /* @ts-ignore */
62
62
  ...(ngDevMode ? [{ debugName: "valueLabel" }] : /* istanbul ignore next */ []));
63
- this.labelId = input(`rdx-progress-label-${progressId++}`, /* @ts-ignore */
63
+ this.labelId = input(injectId('rdx-progress-label-'), /* @ts-ignore */
64
64
  ...(ngDevMode ? [{ debugName: "labelId" }] : /* istanbul ignore next */ []));
65
- this.valueId = input(`rdx-progress-value-${progressId++}`, /* @ts-ignore */
65
+ this.valueId = input(injectId('rdx-progress-value-'), /* @ts-ignore */
66
66
  ...(ngDevMode ? [{ debugName: "valueId" }] : /* istanbul ignore next */ []));
67
67
  this.minState = computed(() => (isValidNumber(this.min()) ? this.min() : DEFAULT_MIN), /* @ts-ignore */
68
68
  ...(ngDevMode ? [{ debugName: "minState" }] : /* istanbul ignore next */ []));
@@ -95,6 +95,9 @@ class RdxProgressRootDirective {
95
95
  return value === null ? undefined : this.valueLabel()(value, this.minState(), this.maxState());
96
96
  }, /* @ts-ignore */
97
97
  ...(ngDevMode ? [{ debugName: "valueLabelState" }] : /* istanbul ignore next */ []));
98
+ /** `aria-valuetext`: the formatted label, or an explicit "indeterminate progress" (Base UI parity). */
99
+ this.ariaValueText = computed(() => this.valueLabelState() ?? (this.indeterminateState() ? 'indeterminate progress' : undefined), /* @ts-ignore */
100
+ ...(ngDevMode ? [{ debugName: "ariaValueText" }] : /* istanbul ignore next */ []));
98
101
  this.progressState = computed(() => {
99
102
  const value = this.valueState();
100
103
  if (value === null) {
@@ -113,6 +116,16 @@ class RdxProgressRootDirective {
113
116
  this.indeterminateState = computed(() => this.progressState() === 'indeterminate', /* @ts-ignore */
114
117
  ...(ngDevMode ? [{ debugName: "indeterminateState" }] : /* istanbul ignore next */ []));
115
118
  this.dataAttr = attr$4;
119
+ this.labelCount = signal(0, /* @ts-ignore */
120
+ ...(ngDevMode ? [{ debugName: "labelCount" }] : /* istanbul ignore next */ []));
121
+ /** Whether at least one `rdxProgressLabel` is currently mounted. */
122
+ this.hasLabel = computed(() => this.labelCount() > 0, /* @ts-ignore */
123
+ ...(ngDevMode ? [{ debugName: "hasLabel" }] : /* istanbul ignore next */ []));
124
+ }
125
+ /** @ignore Called by `rdxProgressLabel` on mount; returns its unregister callback. */
126
+ registerLabel() {
127
+ this.labelCount.update((count) => count + 1);
128
+ return () => this.labelCount.update((count) => count - 1);
116
129
  }
117
130
  valueTransform(value) {
118
131
  return value === null ? null : numberAttribute(value);
@@ -121,7 +134,7 @@ class RdxProgressRootDirective {
121
134
  return `${Math.round(((value - min) / (max - min)) * 100)}%`;
122
135
  }
123
136
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
124
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxProgressRootDirective, isStandalone: true, selector: "[rdxProgressRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, valueLabel: { classPropertyName: "valueLabel", publicName: "valueLabel", isSignal: true, isRequired: false, transformFunction: null }, labelId: { classPropertyName: "labelId", publicName: "labelId", isSignal: true, isRequired: false, transformFunction: null }, valueId: { classPropertyName: "valueId", publicName: "valueId", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-labelledby": "labelId()", "attr.aria-describedby": "valueId()", "attr.aria-valuemin": "indeterminateState() ? undefined : minState()", "attr.aria-valuemax": "indeterminateState() ? undefined : maxState()", "attr.aria-valuenow": "valueState() ?? undefined", "attr.aria-valuetext": "valueLabelState()", "attr.data-state": "progressState()", "attr.data-value": "valueState() ?? undefined", "attr.data-min": "minState()", "attr.data-max": "maxState()", "attr.data-complete": "dataAttr(completeState())", "attr.data-progressing": "dataAttr(progressingState())", "attr.data-indeterminate": "dataAttr(indeterminateState())" } }, providers: [provideProgressRootContext(progressRootContext)], exportAs: ["rdxProgressRoot"], ngImport: i0 }); }
137
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxProgressRootDirective, isStandalone: true, selector: "[rdxProgressRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, min: { classPropertyName: "min", publicName: "min", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "max", isSignal: true, isRequired: false, transformFunction: null }, valueLabel: { classPropertyName: "valueLabel", publicName: "valueLabel", isSignal: true, isRequired: false, transformFunction: null }, labelId: { classPropertyName: "labelId", publicName: "labelId", isSignal: true, isRequired: false, transformFunction: null }, valueId: { classPropertyName: "valueId", publicName: "valueId", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-labelledby": "hasLabel() ? labelId() : undefined", "attr.aria-valuemin": "minState()", "attr.aria-valuemax": "maxState()", "attr.aria-valuenow": "valueState() ?? undefined", "attr.aria-valuetext": "ariaValueText()", "attr.data-value": "valueState() ?? undefined", "attr.data-min": "minState()", "attr.data-max": "maxState()", "attr.data-complete": "dataAttr(completeState())", "attr.data-progressing": "dataAttr(progressingState())", "attr.data-indeterminate": "dataAttr(indeterminateState())" } }, providers: [provideProgressRootContext(progressRootContext)], exportAs: ["rdxProgressRoot"], ngImport: i0 }); }
125
138
  }
126
139
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressRootDirective, decorators: [{
127
140
  type: Directive,
@@ -131,13 +144,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
131
144
  providers: [provideProgressRootContext(progressRootContext)],
132
145
  host: {
133
146
  role: 'progressbar',
134
- '[attr.aria-labelledby]': 'labelId()',
135
- '[attr.aria-describedby]': 'valueId()',
136
- '[attr.aria-valuemin]': 'indeterminateState() ? undefined : minState()',
137
- '[attr.aria-valuemax]': 'indeterminateState() ? undefined : maxState()',
147
+ // Only reference the label id once a `rdxProgressLabel` is actually mounted, otherwise
148
+ // `aria-labelledby` would point at a non-existent element.
149
+ '[attr.aria-labelledby]': 'hasLabel() ? labelId() : undefined',
150
+ // min/max are always present (Base UI + APG), only `aria-valuenow` is dropped when indeterminate.
151
+ '[attr.aria-valuemin]': 'minState()',
152
+ '[attr.aria-valuemax]': 'maxState()',
138
153
  '[attr.aria-valuenow]': 'valueState() ?? undefined',
139
- '[attr.aria-valuetext]': 'valueLabelState()',
140
- '[attr.data-state]': 'progressState()',
154
+ '[attr.aria-valuetext]': 'ariaValueText()',
141
155
  '[attr.data-value]': 'valueState() ?? undefined',
142
156
  '[attr.data-min]': 'minState()',
143
157
  '[attr.data-max]': 'maxState()',
@@ -163,7 +177,7 @@ class RdxProgressIndicatorDirective {
163
177
  this.dataAttr = attr$3;
164
178
  }
165
179
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
166
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxProgressIndicatorDirective, isStandalone: true, selector: "[rdxProgressIndicator]", host: { properties: { "attr.data-state": "progress.progressState()", "attr.data-value": "progress.valueState() ?? undefined", "attr.data-min": "progress.minState()", "attr.data-max": "progress.maxState()", "attr.data-percent": "progress.percentageState() ?? undefined", "attr.data-complete": "dataAttr(progress.completeState())", "attr.data-progressing": "dataAttr(progress.progressingState())", "attr.data-indeterminate": "dataAttr(progress.indeterminateState())" } }, exportAs: ["rdxProgressIndicator"], ngImport: i0 }); }
180
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxProgressIndicatorDirective, isStandalone: true, selector: "[rdxProgressIndicator]", host: { properties: { "attr.data-value": "progress.valueState() ?? undefined", "attr.data-min": "progress.minState()", "attr.data-max": "progress.maxState()", "attr.data-percent": "progress.percentageState() ?? undefined", "attr.data-complete": "dataAttr(progress.completeState())", "attr.data-progressing": "dataAttr(progress.progressingState())", "attr.data-indeterminate": "dataAttr(progress.indeterminateState())" } }, exportAs: ["rdxProgressIndicator"], ngImport: i0 }); }
167
181
  }
168
182
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressIndicatorDirective, decorators: [{
169
183
  type: Directive,
@@ -171,7 +185,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
171
185
  selector: '[rdxProgressIndicator]',
172
186
  exportAs: 'rdxProgressIndicator',
173
187
  host: {
174
- '[attr.data-state]': 'progress.progressState()',
175
188
  '[attr.data-value]': 'progress.valueState() ?? undefined',
176
189
  '[attr.data-min]': 'progress.minState()',
177
190
  '[attr.data-max]': 'progress.maxState()',
@@ -193,9 +206,11 @@ class RdxProgressLabelDirective {
193
206
  constructor() {
194
207
  this.progress = injectProgressRootContext();
195
208
  this.dataAttr = attr$2;
209
+ // Register presence so the root's `aria-labelledby` only resolves while a label exists.
210
+ inject(DestroyRef).onDestroy(this.progress.registerLabel());
196
211
  }
197
212
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
198
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxProgressLabelDirective, isStandalone: true, selector: "[rdxProgressLabel]", host: { properties: { "attr.id": "progress.labelId()", "attr.data-state": "progress.progressState()", "attr.data-complete": "dataAttr(progress.completeState())", "attr.data-progressing": "dataAttr(progress.progressingState())", "attr.data-indeterminate": "dataAttr(progress.indeterminateState())" } }, exportAs: ["rdxProgressLabel"], ngImport: i0 }); }
213
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxProgressLabelDirective, isStandalone: true, selector: "[rdxProgressLabel]", host: { properties: { "attr.id": "progress.labelId()", "attr.data-complete": "dataAttr(progress.completeState())", "attr.data-progressing": "dataAttr(progress.progressingState())", "attr.data-indeterminate": "dataAttr(progress.indeterminateState())" } }, exportAs: ["rdxProgressLabel"], ngImport: i0 }); }
199
214
  }
200
215
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressLabelDirective, decorators: [{
201
216
  type: Directive,
@@ -204,13 +219,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
204
219
  exportAs: 'rdxProgressLabel',
205
220
  host: {
206
221
  '[attr.id]': 'progress.labelId()',
207
- '[attr.data-state]': 'progress.progressState()',
208
222
  '[attr.data-complete]': 'dataAttr(progress.completeState())',
209
223
  '[attr.data-progressing]': 'dataAttr(progress.progressingState())',
210
224
  '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'
211
225
  }
212
226
  }]
213
- }] });
227
+ }], ctorParameters: () => [] });
214
228
 
215
229
  const attr$1 = (value) => (value ? '' : undefined);
216
230
  /**
@@ -224,7 +238,7 @@ class RdxProgressTrackDirective {
224
238
  this.dataAttr = attr$1;
225
239
  }
226
240
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressTrackDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
227
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxProgressTrackDirective, isStandalone: true, selector: "[rdxProgressTrack]", host: { properties: { "attr.data-state": "progress.progressState()", "attr.data-value": "progress.valueState() ?? undefined", "attr.data-min": "progress.minState()", "attr.data-max": "progress.maxState()", "attr.data-complete": "dataAttr(progress.completeState())", "attr.data-progressing": "dataAttr(progress.progressingState())", "attr.data-indeterminate": "dataAttr(progress.indeterminateState())" } }, exportAs: ["rdxProgressTrack"], ngImport: i0 }); }
241
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxProgressTrackDirective, isStandalone: true, selector: "[rdxProgressTrack]", host: { properties: { "attr.data-value": "progress.valueState() ?? undefined", "attr.data-min": "progress.minState()", "attr.data-max": "progress.maxState()", "attr.data-complete": "dataAttr(progress.completeState())", "attr.data-progressing": "dataAttr(progress.progressingState())", "attr.data-indeterminate": "dataAttr(progress.indeterminateState())" } }, exportAs: ["rdxProgressTrack"], ngImport: i0 }); }
228
242
  }
229
243
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressTrackDirective, decorators: [{
230
244
  type: Directive,
@@ -232,7 +246,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
232
246
  selector: '[rdxProgressTrack]',
233
247
  exportAs: 'rdxProgressTrack',
234
248
  host: {
235
- '[attr.data-state]': 'progress.progressState()',
236
249
  '[attr.data-value]': 'progress.valueState() ?? undefined',
237
250
  '[attr.data-min]': 'progress.minState()',
238
251
  '[attr.data-max]': 'progress.maxState()',
@@ -255,7 +268,7 @@ class RdxProgressValueDirective {
255
268
  this.dataAttr = attr;
256
269
  }
257
270
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressValueDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
258
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxProgressValueDirective, isStandalone: true, selector: "[rdxProgressValue]", host: { properties: { "attr.id": "progress.valueId()", "textContent": "progress.valueLabelState() ?? \"\"", "attr.data-state": "progress.progressState()", "attr.data-value": "progress.valueState() ?? undefined", "attr.data-min": "progress.minState()", "attr.data-max": "progress.maxState()", "attr.data-complete": "dataAttr(progress.completeState())", "attr.data-progressing": "dataAttr(progress.progressingState())", "attr.data-indeterminate": "dataAttr(progress.indeterminateState())" } }, exportAs: ["rdxProgressValue"], ngImport: i0 }); }
271
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxProgressValueDirective, isStandalone: true, selector: "[rdxProgressValue]", host: { attributes: { "aria-hidden": "true" }, properties: { "attr.id": "progress.valueId()", "textContent": "progress.valueLabelState() ?? \"\"", "attr.data-value": "progress.valueState() ?? undefined", "attr.data-min": "progress.minState()", "attr.data-max": "progress.maxState()", "attr.data-complete": "dataAttr(progress.completeState())", "attr.data-progressing": "dataAttr(progress.progressingState())", "attr.data-indeterminate": "dataAttr(progress.indeterminateState())" } }, exportAs: ["rdxProgressValue"], ngImport: i0 }); }
259
272
  }
260
273
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxProgressValueDirective, decorators: [{
261
274
  type: Directive,
@@ -264,8 +277,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
264
277
  exportAs: 'rdxProgressValue',
265
278
  host: {
266
279
  '[attr.id]': 'progress.valueId()',
280
+ // The value is already announced via the root's aria-valuenow/aria-valuetext, so hide the
281
+ // visual duplicate from assistive tech (Base UI parity).
282
+ 'aria-hidden': 'true',
267
283
  '[textContent]': 'progress.valueLabelState() ?? ""',
268
- '[attr.data-state]': 'progress.progressState()',
269
284
  '[attr.data-value]': 'progress.valueState() ?? undefined',
270
285
  '[attr.data-min]': 'progress.minState()',
271
286
  '[attr.data-max]': 'progress.maxState()',
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-progress.mjs","sources":["../../../packages/primitives/progress/src/progress-root.directive.ts","../../../packages/primitives/progress/src/progress-indicator.directive.ts","../../../packages/primitives/progress/src/progress-label.directive.ts","../../../packages/primitives/progress/src/progress-track.directive.ts","../../../packages/primitives/progress/src/progress-value.directive.ts","../../../packages/primitives/progress/index.ts","../../../packages/primitives/progress/radix-ng-primitives-progress.ts"],"sourcesContent":["import { computed, Directive, inject, input, numberAttribute } from '@angular/core';\nimport { createContext } from '@radix-ng/primitives/core';\n\nlet progressId = 0;\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\nexport type ProgressState = 'indeterminate' | 'complete' | 'progressing';\n\nexport type ProgressValueFormatter = (value: number, min: number, max: number) => string;\n\nexport interface ProgressProps {\n value?: number | null;\n min?: number;\n max?: number;\n valueLabel?: ProgressValueFormatter;\n}\n\nconst DEFAULT_MIN = 0;\nconst DEFAULT_MAX = 100;\n\nconst isValidNumber = (value: unknown): value is number => typeof value === 'number' && !Number.isNaN(value);\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nconst progressRootContext = () => {\n const root = injectProgressRoot();\n\n return {\n labelId: root.labelId,\n valueId: root.valueId,\n minState: root.minState,\n maxState: root.maxState,\n valueState: root.valueState,\n percentageState: root.percentageState,\n valueLabelState: root.valueLabelState,\n progressState: root.progressState,\n completeState: root.completeState,\n progressingState: root.progressingState,\n indeterminateState: root.indeterminateState\n };\n};\n\nexport type RdxProgressRootContext = ReturnType<typeof progressRootContext>;\n\nexport const [injectProgressRootContext, provideProgressRootContext] = createContext<RdxProgressRootContext>(\n 'RdxProgressRoot',\n 'components/progress'\n);\n\n/**\n * Provides progress state and accessibility attributes.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressRoot]',\n exportAs: 'rdxProgressRoot',\n providers: [provideProgressRootContext(progressRootContext)],\n host: {\n role: 'progressbar',\n '[attr.aria-labelledby]': 'labelId()',\n '[attr.aria-describedby]': 'valueId()',\n '[attr.aria-valuemin]': 'indeterminateState() ? undefined : minState()',\n '[attr.aria-valuemax]': 'indeterminateState() ? undefined : maxState()',\n '[attr.aria-valuenow]': 'valueState() ?? undefined',\n '[attr.aria-valuetext]': 'valueLabelState()',\n '[attr.data-state]': 'progressState()',\n '[attr.data-value]': 'valueState() ?? undefined',\n '[attr.data-min]': 'minState()',\n '[attr.data-max]': 'maxState()',\n '[attr.data-complete]': 'dataAttr(completeState())',\n '[attr.data-progressing]': 'dataAttr(progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(indeterminateState())'\n }\n})\nexport class RdxProgressRootDirective {\n /**\n * Current progress value. Set to `null` for indeterminate progress.\n *\n * @group Props\n * @defaultValue null\n */\n readonly value = input<number | null, number | null>(null, { transform: (value) => this.valueTransform(value) });\n\n /**\n * Minimum progress value.\n *\n * @group Props\n * @defaultValue 0\n */\n readonly min = input(DEFAULT_MIN, { transform: numberAttribute });\n\n /**\n * Maximum progress value.\n *\n * @group Props\n * @defaultValue 100\n */\n readonly max = input(DEFAULT_MAX, { transform: numberAttribute });\n\n /**\n * Formats the current value for assistive technologies and `rdxProgressValue`.\n *\n * @group Props\n */\n readonly valueLabel = input<ProgressValueFormatter>((value, min, max) => this.defaultValueLabel(value, min, max));\n\n readonly labelId = input(`rdx-progress-label-${progressId++}`);\n readonly valueId = input(`rdx-progress-value-${progressId++}`);\n\n readonly minState = computed(() => (isValidNumber(this.min()) ? this.min() : DEFAULT_MIN));\n readonly maxState = computed(() => {\n const min = this.minState();\n const max = this.max();\n\n return isValidNumber(max) && max > min ? max : min + DEFAULT_MAX;\n });\n\n readonly valueState = computed(() => {\n const value = this.value();\n\n if (value === null || !isValidNumber(value)) {\n return null;\n }\n\n return clamp(value, this.minState(), this.maxState());\n });\n\n readonly percentageState = computed(() => {\n const value = this.valueState();\n\n if (value === null) {\n return null;\n }\n\n const min = this.minState();\n const max = this.maxState();\n\n return ((value - min) / (max - min)) * 100;\n });\n\n readonly valueLabelState = computed(() => {\n const value = this.valueState();\n\n return value === null ? undefined : this.valueLabel()(value, this.minState(), this.maxState());\n });\n\n readonly progressState = computed<ProgressState>(() => {\n const value = this.valueState();\n\n if (value === null) {\n return 'indeterminate';\n }\n\n if (value === this.maxState()) {\n return 'complete';\n }\n\n return 'progressing';\n });\n\n readonly completeState = computed(() => this.progressState() === 'complete');\n readonly progressingState = computed(() => this.progressState() === 'progressing');\n readonly indeterminateState = computed(() => this.progressState() === 'indeterminate');\n\n protected readonly dataAttr = attr;\n\n private valueTransform(value: number | null): number | null {\n return value === null ? null : numberAttribute(value);\n }\n\n private defaultValueLabel(value: number, min: number, max: number) {\n return `${Math.round(((value - min) / (max - min)) * 100)}%`;\n }\n}\n\nfunction injectProgressRoot(): RdxProgressRootDirective {\n return inject(RdxProgressRootDirective);\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Displays the visual progress fill.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressIndicator]',\n exportAs: 'rdxProgressIndicator',\n host: {\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-percent]': 'progress.percentageState() ?? undefined',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressIndicatorDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Labels the progress task.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressLabel]',\n exportAs: 'rdxProgressLabel',\n host: {\n '[attr.id]': 'progress.labelId()',\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressLabelDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Contains the visual progress indicator.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressTrack]',\n exportAs: 'rdxProgressTrack',\n host: {\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressTrackDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Displays the formatted progress value.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressValue]',\n exportAs: 'rdxProgressValue',\n host: {\n '[attr.id]': 'progress.valueId()',\n '[textContent]': 'progress.valueLabelState() ?? \"\"',\n '[attr.data-state]': 'progress.progressState()',\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressValueDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { NgModule } from '@angular/core';\nimport { RdxProgressIndicatorDirective } from './src/progress-indicator.directive';\nimport { RdxProgressLabelDirective } from './src/progress-label.directive';\nimport { RdxProgressRootDirective } from './src/progress-root.directive';\nimport { RdxProgressTrackDirective } from './src/progress-track.directive';\nimport { RdxProgressValueDirective } from './src/progress-value.directive';\n\nexport * from './src/progress-indicator.directive';\nexport * from './src/progress-label.directive';\nexport * from './src/progress-root.directive';\nexport * from './src/progress-track.directive';\nexport * from './src/progress-value.directive';\n\nexport type { ProgressProps, ProgressState, ProgressValueFormatter } from './src/progress-root.directive';\n\nconst _imports = [\n RdxProgressRootDirective,\n RdxProgressLabelDirective,\n RdxProgressValueDirective,\n RdxProgressTrackDirective,\n RdxProgressIndicatorDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxProgressModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["attr"],"mappings":";;;;AAGA,IAAI,UAAU,GAAG,CAAC;AAElB,MAAMA,MAAI,GAAG,CAAC,KAAc,MAAM,KAAK,GAAG,EAAE,GAAG,SAAS,CAAC;AAazD,MAAM,WAAW,GAAG,CAAC;AACrB,MAAM,WAAW,GAAG,GAAG;AAEvB,MAAM,aAAa,GAAG,CAAC,KAAc,KAAsB,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,KAAK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B,EAAE,oCAAoC;AACzD,wBAAA,iBAAiB,EAAE,qBAAqB;AACxC,wBAAA,iBAAiB,EAAE,qBAAqB;AACxC,wBAAA,sBAAsB,EAAE,oCAAoC;AAC5D,wBAAA,yBAAyB,EAAE,uCAAuC;AAClE,wBAAA,2BAA2B,EAAE;AAChC;AACJ,iBAAA;;;ACTD,MAAM,QAAQ,GAAG;IACb,wBAAwB;IACxB,yBAAyB;IACzB,yBAAyB;IACzB,yBAAyB;IACzB;CACH;MAMY,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAX1B,wBAAwB;YACxB,yBAAyB;YACzB,yBAAyB;YACzB,yBAAyB;AACzB,YAAA,6BAA6B,aAJ7B,wBAAwB;YACxB,yBAAyB;YACzB,yBAAyB;YACzB,yBAAyB;YACzB,6BAA6B,CAAA,EAAA,CAAA,CAAA;+GAOpB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;AC1BD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-progress.mjs","sources":["../../../packages/primitives/progress/src/progress-root.directive.ts","../../../packages/primitives/progress/src/progress-indicator.directive.ts","../../../packages/primitives/progress/src/progress-label.directive.ts","../../../packages/primitives/progress/src/progress-track.directive.ts","../../../packages/primitives/progress/src/progress-value.directive.ts","../../../packages/primitives/progress/index.ts","../../../packages/primitives/progress/radix-ng-primitives-progress.ts"],"sourcesContent":["import { computed, Directive, inject, input, numberAttribute, signal, Signal } from '@angular/core';\nimport { createContext, injectId } from '@radix-ng/primitives/core';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\nexport type ProgressState = 'indeterminate' | 'complete' | 'progressing';\n\nexport type ProgressValueFormatter = (value: number, min: number, max: number) => string;\n\nexport interface ProgressProps {\n value?: number | null;\n min?: number;\n max?: number;\n valueLabel?: ProgressValueFormatter;\n}\n\nconst DEFAULT_MIN = 0;\nconst DEFAULT_MAX = 100;\n\nconst isValidNumber = (value: unknown): value is number => typeof value === 'number' && !Number.isNaN(value);\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nexport interface RdxProgressRootContext {\n labelId: Signal<string>;\n valueId: Signal<string>;\n minState: Signal<number>;\n maxState: Signal<number>;\n valueState: Signal<number | null>;\n percentageState: Signal<number | null>;\n valueLabelState: Signal<string | undefined>;\n progressState: Signal<ProgressState>;\n completeState: Signal<boolean>;\n progressingState: Signal<boolean>;\n indeterminateState: Signal<boolean>;\n /** A Label part registers its presence; returns its unregister callback. */\n registerLabel: () => () => void;\n}\n\nconst progressRootContext = (): RdxProgressRootContext => {\n const root = injectProgressRoot();\n\n return {\n labelId: root.labelId,\n valueId: root.valueId,\n minState: root.minState,\n maxState: root.maxState,\n valueState: root.valueState,\n percentageState: root.percentageState,\n valueLabelState: root.valueLabelState,\n progressState: root.progressState,\n completeState: root.completeState,\n progressingState: root.progressingState,\n indeterminateState: root.indeterminateState,\n registerLabel: () => root.registerLabel()\n };\n};\n\nexport const [injectProgressRootContext, provideProgressRootContext] = createContext<RdxProgressRootContext>(\n 'RdxProgressRoot',\n 'components/progress'\n);\n\n/**\n * Provides progress state and accessibility attributes.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressRoot]',\n exportAs: 'rdxProgressRoot',\n providers: [provideProgressRootContext(progressRootContext)],\n host: {\n role: 'progressbar',\n // Only reference the label id once a `rdxProgressLabel` is actually mounted, otherwise\n // `aria-labelledby` would point at a non-existent element.\n '[attr.aria-labelledby]': 'hasLabel() ? labelId() : undefined',\n // min/max are always present (Base UI + APG), only `aria-valuenow` is dropped when indeterminate.\n '[attr.aria-valuemin]': 'minState()',\n '[attr.aria-valuemax]': 'maxState()',\n '[attr.aria-valuenow]': 'valueState() ?? undefined',\n '[attr.aria-valuetext]': 'ariaValueText()',\n '[attr.data-value]': 'valueState() ?? undefined',\n '[attr.data-min]': 'minState()',\n '[attr.data-max]': 'maxState()',\n '[attr.data-complete]': 'dataAttr(completeState())',\n '[attr.data-progressing]': 'dataAttr(progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(indeterminateState())'\n }\n})\nexport class RdxProgressRootDirective {\n /**\n * Current progress value. Set to `null` for indeterminate progress.\n *\n * @group Props\n * @defaultValue null\n */\n readonly value = input<number | null, number | null>(null, { transform: (value) => this.valueTransform(value) });\n\n /**\n * Minimum progress value.\n *\n * @group Props\n * @defaultValue 0\n */\n readonly min = input(DEFAULT_MIN, { transform: numberAttribute });\n\n /**\n * Maximum progress value.\n *\n * @group Props\n * @defaultValue 100\n */\n readonly max = input(DEFAULT_MAX, { transform: numberAttribute });\n\n /**\n * Formats the current value for assistive technologies and `rdxProgressValue`.\n *\n * @group Props\n */\n readonly valueLabel = input<ProgressValueFormatter>((value, min, max) => this.defaultValueLabel(value, min, max));\n\n readonly labelId = input(injectId('rdx-progress-label-'));\n readonly valueId = input(injectId('rdx-progress-value-'));\n\n readonly minState = computed(() => (isValidNumber(this.min()) ? this.min() : DEFAULT_MIN));\n readonly maxState = computed(() => {\n const min = this.minState();\n const max = this.max();\n\n return isValidNumber(max) && max > min ? max : min + DEFAULT_MAX;\n });\n\n readonly valueState = computed(() => {\n const value = this.value();\n\n if (value === null || !isValidNumber(value)) {\n return null;\n }\n\n return clamp(value, this.minState(), this.maxState());\n });\n\n readonly percentageState = computed(() => {\n const value = this.valueState();\n\n if (value === null) {\n return null;\n }\n\n const min = this.minState();\n const max = this.maxState();\n\n return ((value - min) / (max - min)) * 100;\n });\n\n readonly valueLabelState = computed(() => {\n const value = this.valueState();\n\n return value === null ? undefined : this.valueLabel()(value, this.minState(), this.maxState());\n });\n\n /** `aria-valuetext`: the formatted label, or an explicit \"indeterminate progress\" (Base UI parity). */\n readonly ariaValueText = computed(\n () => this.valueLabelState() ?? (this.indeterminateState() ? 'indeterminate progress' : undefined)\n );\n\n readonly progressState = computed<ProgressState>(() => {\n const value = this.valueState();\n\n if (value === null) {\n return 'indeterminate';\n }\n\n if (value === this.maxState()) {\n return 'complete';\n }\n\n return 'progressing';\n });\n\n readonly completeState = computed(() => this.progressState() === 'complete');\n readonly progressingState = computed(() => this.progressState() === 'progressing');\n readonly indeterminateState = computed(() => this.progressState() === 'indeterminate');\n\n protected readonly dataAttr = attr;\n\n private readonly labelCount = signal(0);\n /** Whether at least one `rdxProgressLabel` is currently mounted. */\n readonly hasLabel = computed(() => this.labelCount() > 0);\n\n /** @ignore Called by `rdxProgressLabel` on mount; returns its unregister callback. */\n registerLabel(): () => void {\n this.labelCount.update((count) => count + 1);\n return () => this.labelCount.update((count) => count - 1);\n }\n\n private valueTransform(value: number | null): number | null {\n return value === null ? null : numberAttribute(value);\n }\n\n private defaultValueLabel(value: number, min: number, max: number) {\n return `${Math.round(((value - min) / (max - min)) * 100)}%`;\n }\n}\n\nfunction injectProgressRoot(): RdxProgressRootDirective {\n return inject(RdxProgressRootDirective);\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Displays the visual progress fill.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressIndicator]',\n exportAs: 'rdxProgressIndicator',\n host: {\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-percent]': 'progress.percentageState() ?? undefined',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressIndicatorDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { DestroyRef, Directive, inject } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Labels the progress task.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressLabel]',\n exportAs: 'rdxProgressLabel',\n host: {\n '[attr.id]': 'progress.labelId()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressLabelDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n\n constructor() {\n // Register presence so the root's `aria-labelledby` only resolves while a label exists.\n inject(DestroyRef).onDestroy(this.progress.registerLabel());\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Contains the visual progress indicator.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressTrack]',\n exportAs: 'rdxProgressTrack',\n host: {\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressTrackDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { Directive } from '@angular/core';\nimport { injectProgressRootContext } from './progress-root.directive';\n\nconst attr = (value: boolean) => (value ? '' : undefined);\n\n/**\n * Displays the formatted progress value.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxProgressValue]',\n exportAs: 'rdxProgressValue',\n host: {\n '[attr.id]': 'progress.valueId()',\n // The value is already announced via the root's aria-valuenow/aria-valuetext, so hide the\n // visual duplicate from assistive tech (Base UI parity).\n 'aria-hidden': 'true',\n '[textContent]': 'progress.valueLabelState() ?? \"\"',\n '[attr.data-value]': 'progress.valueState() ?? undefined',\n '[attr.data-min]': 'progress.minState()',\n '[attr.data-max]': 'progress.maxState()',\n '[attr.data-complete]': 'dataAttr(progress.completeState())',\n '[attr.data-progressing]': 'dataAttr(progress.progressingState())',\n '[attr.data-indeterminate]': 'dataAttr(progress.indeterminateState())'\n }\n})\nexport class RdxProgressValueDirective {\n protected readonly progress = injectProgressRootContext();\n protected readonly dataAttr = attr;\n}\n","import { NgModule } from '@angular/core';\nimport { RdxProgressIndicatorDirective } from './src/progress-indicator.directive';\nimport { RdxProgressLabelDirective } from './src/progress-label.directive';\nimport { RdxProgressRootDirective } from './src/progress-root.directive';\nimport { RdxProgressTrackDirective } from './src/progress-track.directive';\nimport { RdxProgressValueDirective } from './src/progress-value.directive';\n\nexport * from './src/progress-indicator.directive';\nexport * from './src/progress-label.directive';\nexport * from './src/progress-root.directive';\nexport * from './src/progress-track.directive';\nexport * from './src/progress-value.directive';\n\nexport type { ProgressProps, ProgressState, ProgressValueFormatter } from './src/progress-root.directive';\n\nconst _imports = [\n RdxProgressRootDirective,\n RdxProgressLabelDirective,\n RdxProgressValueDirective,\n RdxProgressTrackDirective,\n RdxProgressIndicatorDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxProgressModule {}\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;AAazD,MAAM,WAAW,GAAG,CA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AAwB;YACxB,yBAAyB;YACzB,yBAAyB;YACzB,yBAAyB;YACzB,6BAA6B,CAAA,EAAA,CAAA,CAAA;+GAOpB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;AC1BD;;AAEG;;;;"}
@@ -165,10 +165,6 @@ class RdxRadioGroupDirective {
165
165
  isArrowNavigation() {
166
166
  return this.arrowNavigation();
167
167
  }
168
- onKeydown() {
169
- if (this.disabledState())
170
- return;
171
- }
172
168
  /**
173
169
  * Marks the control touched when focus leaves the whole group (Base UI `RadioGroup` parity and the
174
170
  * ADR 0004 CVA strategy) — moving focus between items stays inside, so `relatedTarget` is checked.
@@ -180,7 +176,7 @@ class RdxRadioGroupDirective {
180
176
  }
181
177
  }
182
178
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
183
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "keydown": "onKeydown()", "focusout": "onFocusOut($event)" }, properties: { "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-disabled": "disabledState() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined" } }, providers: [provideValueAccessor(RdxRadioGroupDirective), provideRadioRootContext(rootContext)], exportAs: ["rdxRadioRoot"], hostDirectives: [{ directive: i1.RdxCompositeRoot }], ngImport: i0 }); }
179
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "focusout": "onFocusOut($event)" }, properties: { "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-disabled": "disabledState() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined" } }, providers: [provideValueAccessor(RdxRadioGroupDirective), provideRadioRootContext(rootContext)], exportAs: ["rdxRadioRoot"], hostDirectives: [{ directive: i1.RdxCompositeRoot }], ngImport: i0 }); }
184
180
  }
185
181
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxRadioGroupDirective, decorators: [{
186
182
  type: Directive,
@@ -195,7 +191,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
195
191
  '[attr.aria-disabled]': 'disabledState() ? "true" : undefined',
196
192
  '[attr.aria-readonly]': 'readonly() ? "true" : undefined',
197
193
  '[attr.data-disabled]': 'disabledState() ? "" : undefined',
198
- '(keydown)': 'onKeydown()',
199
194
  '(focusout)': 'onFocusOut($event)'
200
195
  }
201
196
  }]
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal,\n Signal,\n untracked\n} from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { RdxCompositeMetadata, RdxCompositeRoot } from '@radix-ng/primitives/composite';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n createContext,\n provideValueAccessor,\n RdxCancelableChangeEventDetails,\n RdxFormValueControl\n} from '@radix-ng/primitives/core';\nimport { RdxRadioValueChangeReason } from './radio-tokens';\n\nexport type { RdxRadioValueChangeReason } from './radio-tokens';\n\nexport type RdxRadioValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxRadioValueChangeReason>;\n\nexport interface RdxRadioValueChangeEvent {\n value: string;\n eventDetails: RdxRadioValueChangeEventDetails;\n}\n\nexport interface RadioRootContext {\n value: Signal<string | null>;\n disabledState: Signal<boolean>;\n readonly: Signal<boolean>;\n required: Signal<boolean>;\n name: Signal<string | undefined>;\n form: Signal<string | undefined>;\n select(value: string | null, event?: Event, reason?: RdxRadioValueChangeReason): void;\n setArrowNavigation(value: boolean): void;\n isArrowNavigation(): boolean;\n}\n\nconst rootContext = (): RadioRootContext => {\n const root = inject(RdxRadioGroupDirective);\n\n return {\n value: root.value,\n disabledState: root.disabledState,\n readonly: root.readonly,\n required: root.required,\n name: root.name,\n form: root.form,\n select: (value, event, reason) => root.select(value, event, reason),\n setArrowNavigation: (value) => root.setArrowNavigation(value),\n isArrowNavigation: () => root.isArrowNavigation()\n };\n};\n\nexport const [injectRadioRootContext, provideRadioRootContext] = createContext<RadioRootContext>(\n 'RadioRootContext',\n 'components/radio'\n);\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n providers: [provideValueAccessor(RdxRadioGroupDirective), provideRadioRootContext(rootContext)],\n hostDirectives: [RdxCompositeRoot],\n host: {\n role: 'radiogroup',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.aria-disabled]': 'disabledState() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '(keydown)': 'onKeydown()',\n '(focusout)': 'onFocusOut($event)'\n }\n})\nexport class RdxRadioGroupDirective implements ControlValueAccessor, RdxFormValueControl<string | null> {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly compositeRoot = inject(RdxCompositeRoot, { self: true });\n\n /**\n * The selected value. Deliberately typed as `string` (not Base UI's generic `Value`):\n * a radio group maps onto native radio inputs whose form value is a string, so values are\n * the option identifiers. Use the string key of your option as the value.\n */\n readonly value = model<string | null>(null);\n\n readonly defaultValue = input<string>();\n\n readonly name = input<string>();\n\n readonly form = input<string>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the user should be unable to select a different radio button. Bound in templates as\n * `readOnly` (Base UI spelling); the TS member stays `readonly` for cross-primitive consistency.\n */\n readonly readonly = input<boolean, BooleanInput>(false, { alias: 'readOnly', transform: booleanAttribute });\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<RdxRadioValueChangeEvent>();\n\n private readonly disable = signal<boolean>(false);\n readonly disabledState = computed(() => this.disable() || this.disabled());\n private readonly arrowNavigation = signal(false);\n private readonly itemMetadata = computed(() =>\n Array.from(this.compositeRoot.itemMap().values()).filter(isRadioItemMetadata)\n );\n private readonly disabledIndices = computed(() =>\n this.itemMetadata()\n .filter((metadata) => metadata.disabled)\n .map((metadata) => metadata.index)\n );\n private readonly activeIndex = computed(() => {\n const value = this.value();\n if (value === null) {\n return -1;\n }\n\n return this.itemMetadata().find((metadata) => metadata.value === value)?.index ?? -1;\n });\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string | null) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n let hasAppliedDefault = false;\n effect(() => {\n const defaultValue = this.defaultValue();\n if (hasAppliedDefault || defaultValue === undefined) {\n return;\n }\n\n hasAppliedDefault = true;\n if (untracked(this.value) === null) {\n this.value.set(defaultValue);\n }\n });\n\n effect(() => {\n this.compositeRoot.setEnableHomeAndEndKeys(false);\n this.compositeRoot.setModifierKeys(['Shift']);\n });\n\n effect(() => {\n this.compositeRoot.setDisabledIndices(this.disabledIndices());\n });\n\n effect(() => {\n const activeIndex = this.activeIndex();\n\n if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {\n return;\n }\n\n const activeElement = this.elementRef.nativeElement.ownerDocument.activeElement;\n if (activeElement && this.elementRef.nativeElement.contains(activeElement)) {\n return;\n }\n\n this.compositeRoot.setHighlightedIndex(activeIndex);\n });\n }\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string | null, event?: Event, reason: RdxRadioValueChangeReason = 'none'): void {\n if (this.disabledState() || this.readonly() || this.value() === value) {\n return;\n }\n\n if (value !== null) {\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n reason,\n event ?? new Event('radio.value-change'),\n trigger\n );\n this.onValueChange.emit({ value, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n }\n\n this.value.set(value);\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\n */\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @ignore\n */\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n setArrowNavigation(value: boolean): void {\n this.arrowNavigation.set(value);\n }\n\n isArrowNavigation(): boolean {\n return this.arrowNavigation();\n }\n\n protected onKeydown(): void {\n if (this.disabledState()) return;\n }\n\n /**\n * Marks the control touched when focus leaves the whole group (Base UI `RadioGroup` parity and the\n * ADR 0004 CVA strategy) — moving focus between items stays inside, so `relatedTarget` is checked.\n */\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!this.elementRef.nativeElement.contains(next)) {\n this.onTouched();\n }\n }\n}\n\ninterface RdxRadioItemMetadata {\n [key: string]: unknown;\n disabled: boolean;\n value: string;\n}\n\nfunction isRadioItemMetadata(metadata: RdxCompositeMetadata): metadata is RdxCompositeMetadata<RdxRadioItemMetadata> {\n return typeof metadata['disabled'] === 'boolean' && typeof metadata['value'] === 'string';\n}\n","import { booleanAttribute, computed, Directive, effect, ElementRef, inject, input, Signal } from '@angular/core';\nimport { RdxCompositeItem } from '@radix-ng/primitives/composite';\nimport { BooleanInput, createContext } from '@radix-ng/primitives/core';\nimport { injectRadioRootContext } from './radio-root.directive';\n\nexport interface RadioItemContext {\n value: Signal<string>;\n checkedState: Signal<boolean>;\n disabledState: Signal<boolean>;\n readonlyState: Signal<boolean>;\n requiredState: Signal<boolean>;\n}\n\nconst itemContext = (): RadioItemContext => {\n const item = inject(RdxRadioItemDirective);\n\n return {\n value: item.value,\n checkedState: item.checkedState,\n disabledState: item.disabledState,\n readonlyState: item.readonlyState,\n requiredState: item.requiredState\n };\n};\n\nexport const [injectRadioItemContext, provideRadioItemContext] = createContext<RadioItemContext>(\n 'RadioItemContext',\n 'components/radio'\n);\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n providers: [provideRadioItemContext(itemContext)],\n hostDirectives: [RdxCompositeItem],\n\n host: {\n '[attr.type]': 'isNativeButton ? \"button\" : undefined',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-disabled]': 'disabledState() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonlyState() ? \"true\" : undefined',\n '[attr.aria-required]': 'requiredState() ? \"true\" : undefined',\n '[attr.data-composite-item-active]': 'checkedState() ? \"\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'requiredState() ? \"\" : undefined',\n '[attr.disabled]': 'isNativeButton && disabledState() ? \"\" : undefined',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus($event)'\n }\n})\nexport class RdxRadioItemDirective {\n private readonly rootContext = injectRadioRootContext();\n private readonly compositeItem = inject(RdxCompositeItem, { self: true });\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the user should be unable to select this radio button. Bound in templates as\n * `readOnly` (Base UI spelling); the TS member stays `readonly` for cross-primitive consistency.\n */\n readonly readonly = input<boolean, BooleanInput>(false, { alias: 'readOnly', transform: booleanAttribute });\n\n /**\n * Whether the host is a native `<button>`. Detected from the host tag (unlike Base UI's explicit\n * `nativeButton` prop, the rendered element is statically known in Angular templates), and used to\n * apply `type=\"button\"` and the native `disabled` attribute.\n */\n protected readonly isNativeButton = this.elementRef.nativeElement.tagName === 'BUTTON';\n\n readonly disabledState = computed(() => this.rootContext.disabledState() || this.disabled());\n\n readonly readonlyState = computed(() => this.rootContext.readonly() || this.readonly());\n\n readonly requiredState = computed(() => this.rootContext.required() || this.required());\n\n readonly checkedState = computed(() => this.rootContext.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'] as const;\n\n constructor() {\n effect(() => {\n this.compositeItem.setMetadata({\n disabled: this.disabledState(),\n value: this.value()\n });\n });\n }\n\n /** @ignore */\n onClick(event?: Event) {\n if (!this.disabledState() && !this.readonlyState()) {\n this.rootContext.select(this.value(), event);\n }\n }\n\n /** @ignore */\n onKeyDown(event: Event): void {\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === ' ') {\n this.onClick(keyEvent);\n return;\n }\n\n if (keyEvent.key === 'Enter') {\n keyEvent.preventDefault();\n return;\n }\n\n if (this.isAllowedArrowKey(keyEvent.key)) {\n this.rootContext.setArrowNavigation(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.rootContext.setArrowNavigation(false);\n }\n\n /** @ignore */\n onFocus(event?: FocusEvent) {\n queueMicrotask(() => {\n if (this.rootContext.isArrowNavigation()) {\n this.rootContext.select(this.value(), event);\n this.rootContext.setArrowNavigation(false);\n }\n });\n }\n\n private isAllowedArrowKey(key: string): boolean {\n return (this.ARROW_KEYS as readonly string[]).includes(key);\n }\n}\n","import { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectRadioItemContext } from './radio-item.directive';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n host: {\n '[attr.data-checked]': 'itemContext.checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!itemContext.checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'itemContext.disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'itemContext.readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'itemContext.requiredState() ? \"\" : undefined',\n '[attr.data-starting-style]': 'isVisible() ? \"\" : undefined',\n '[attr.data-ending-style]': '!isVisible() ? \"\" : undefined',\n '[style.display]': '!keepMounted() && !isVisible() ? \"none\" : null',\n '[style.pointer-events]': '\"none\"'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly itemContext = injectRadioItemContext();\n\n /** Keep the indicator in the DOM when unchecked so CSS exit animations can play. */\n readonly keepMounted = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly isVisible = computed(() => this.itemContext.checkedState());\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { injectRadioItemContext } from './radio-item.directive';\nimport { injectRadioRootContext } from './radio-root.directive';\n\n/**\n * The hidden native radio input that mirrors the item state for form submission, native validation,\n * and `<label>` activation. Place it inside an `rdxRadioItem`.\n *\n * @see https://base-ui.com/react/components/radio\n */\n@Directive({\n selector: 'input[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n host: {\n type: 'radio',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'name()',\n '[attr.form]': 'form()',\n '[attr.required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'disabled() ? \"\" : undefined',\n '[attr.checked]': 'checked() ? \"\" : undefined',\n '[checked]': 'checked()',\n '[attr.value]': 'value()',\n '(change)': 'onInputChange($event)',\n style: 'transform: translateX(-100%); position: absolute; pointer-events: none; opacity: 0; margin: 0; inset: 0;'\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly rootContext = injectRadioRootContext();\n private readonly itemContext = injectRadioItemContext();\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly name = computed(() => this.rootContext.name());\n readonly form = computed(() => this.rootContext.form());\n readonly value = computed(() => this.itemContext.value() || undefined);\n readonly checked = computed(() => this.itemContext.checkedState());\n readonly required = computed(() => this.itemContext.requiredState());\n readonly disabled = computed(() => this.itemContext.disabledState());\n\n constructor() {\n let isInitial = true;\n\n effect(() => {\n const checked = this.checked();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n if (checked) {\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n });\n }\n\n /**\n * Selects this item when the native input is checked — covers `<label>` activation,\n * where clicking the label toggles the hidden radio input rather than the visible item.\n * `select()` is a no-op when the value is already current, so the programmatic\n * `change` dispatched above does not re-trigger selection.\n * @ignore\n */\n protected onInputChange(event: Event): void {\n if (this.input.checked) {\n this.rootContext.select(this.itemContext.value(), event);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA+CA,MAAM,WAAW,GAAG,MAAuB;AACvC,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAE3C,OAAO;QACH,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,IAAI,EAAE,IAAI,CAAC,IAAI;QACf,IAAI,E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S;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0BAA0B;AACpC,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,gBAAgB,EAAE,4BAA4B;AAC9C,wBAAA,WAAW,EAAE,WAAW;AACxB,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,UAAU,EAAE,uBAAuB;AACnC,wBAAA,KAAK,EAAE;AACV;AACJ,iBAAA;;;AC3BD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal,\n Signal,\n untracked\n} from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { RdxCompositeMetadata, RdxCompositeRoot } from '@radix-ng/primitives/composite';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n createContext,\n provideValueAccessor,\n RdxCancelableChangeEventDetails,\n RdxFormValueControl\n} from '@radix-ng/primitives/core';\nimport { RdxRadioValueChangeReason } from './radio-tokens';\n\nexport type { RdxRadioValueChangeReason } from './radio-tokens';\n\nexport type RdxRadioValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxRadioValueChangeReason>;\n\nexport interface RdxRadioValueChangeEvent {\n value: string;\n eventDetails: RdxRadioValueChangeEventDetails;\n}\n\nexport interface RadioRootContext {\n value: Signal<string | null>;\n disabledState: Signal<boolean>;\n readonly: Signal<boolean>;\n required: Signal<boolean>;\n name: Signal<string | undefined>;\n form: Signal<string | undefined>;\n select(value: string | null, event?: Event, reason?: RdxRadioValueChangeReason): void;\n setArrowNavigation(value: boolean): void;\n isArrowNavigation(): boolean;\n}\n\nconst rootContext = (): RadioRootContext => {\n const root = inject(RdxRadioGroupDirective);\n\n return {\n value: root.value,\n disabledState: root.disabledState,\n readonly: root.readonly,\n required: root.required,\n name: root.name,\n form: root.form,\n select: (value, event, reason) => root.select(value, event, reason),\n setArrowNavigation: (value) => root.setArrowNavigation(value),\n isArrowNavigation: () => root.isArrowNavigation()\n };\n};\n\nexport const [injectRadioRootContext, provideRadioRootContext] = createContext<RadioRootContext>(\n 'RadioRootContext',\n 'components/radio'\n);\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n providers: [provideValueAccessor(RdxRadioGroupDirective), provideRadioRootContext(rootContext)],\n hostDirectives: [RdxCompositeRoot],\n host: {\n role: 'radiogroup',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.aria-disabled]': 'disabledState() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '(focusout)': 'onFocusOut($event)'\n }\n})\nexport class RdxRadioGroupDirective implements ControlValueAccessor, RdxFormValueControl<string | null> {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly compositeRoot = inject(RdxCompositeRoot, { self: true });\n\n /**\n * The selected value. Deliberately typed as `string` (not Base UI's generic `Value`):\n * a radio group maps onto native radio inputs whose form value is a string, so values are\n * the option identifiers. Use the string key of your option as the value.\n */\n readonly value = model<string | null>(null);\n\n readonly defaultValue = input<string>();\n\n readonly name = input<string>();\n\n readonly form = input<string>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the user should be unable to select a different radio button. Bound in templates as\n * `readOnly` (Base UI spelling); the TS member stays `readonly` for cross-primitive consistency.\n */\n readonly readonly = input<boolean, BooleanInput>(false, { alias: 'readOnly', transform: booleanAttribute });\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<RdxRadioValueChangeEvent>();\n\n private readonly disable = signal<boolean>(false);\n readonly disabledState = computed(() => this.disable() || this.disabled());\n private readonly arrowNavigation = signal(false);\n private readonly itemMetadata = computed(() =>\n Array.from(this.compositeRoot.itemMap().values()).filter(isRadioItemMetadata)\n );\n private readonly disabledIndices = computed(() =>\n this.itemMetadata()\n .filter((metadata) => metadata.disabled)\n .map((metadata) => metadata.index)\n );\n private readonly activeIndex = computed(() => {\n const value = this.value();\n if (value === null) {\n return -1;\n }\n\n return this.itemMetadata().find((metadata) => metadata.value === value)?.index ?? -1;\n });\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string | null) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n let hasAppliedDefault = false;\n effect(() => {\n const defaultValue = this.defaultValue();\n if (hasAppliedDefault || defaultValue === undefined) {\n return;\n }\n\n hasAppliedDefault = true;\n if (untracked(this.value) === null) {\n this.value.set(defaultValue);\n }\n });\n\n effect(() => {\n this.compositeRoot.setEnableHomeAndEndKeys(false);\n this.compositeRoot.setModifierKeys(['Shift']);\n });\n\n effect(() => {\n this.compositeRoot.setDisabledIndices(this.disabledIndices());\n });\n\n effect(() => {\n const activeIndex = this.activeIndex();\n\n if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {\n return;\n }\n\n const activeElement = this.elementRef.nativeElement.ownerDocument.activeElement;\n if (activeElement && this.elementRef.nativeElement.contains(activeElement)) {\n return;\n }\n\n this.compositeRoot.setHighlightedIndex(activeIndex);\n });\n }\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string | null, event?: Event, reason: RdxRadioValueChangeReason = 'none'): void {\n if (this.disabledState() || this.readonly() || this.value() === value) {\n return;\n }\n\n if (value !== null) {\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n reason,\n event ?? new Event('radio.value-change'),\n trigger\n );\n this.onValueChange.emit({ value, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n }\n\n this.value.set(value);\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\n */\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @ignore\n */\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n setArrowNavigation(value: boolean): void {\n this.arrowNavigation.set(value);\n }\n\n isArrowNavigation(): boolean {\n return this.arrowNavigation();\n }\n\n /**\n * Marks the control touched when focus leaves the whole group (Base UI `RadioGroup` parity and the\n * ADR 0004 CVA strategy) — moving focus between items stays inside, so `relatedTarget` is checked.\n */\n protected onFocusOut(event: FocusEvent): void {\n const next = event.relatedTarget as Node | null;\n if (!this.elementRef.nativeElement.contains(next)) {\n this.onTouched();\n }\n }\n}\n\ninterface RdxRadioItemMetadata {\n [key: string]: unknown;\n disabled: boolean;\n value: string;\n}\n\nfunction isRadioItemMetadata(metadata: RdxCompositeMetadata): metadata is RdxCompositeMetadata<RdxRadioItemMetadata> {\n return typeof metadata['disabled'] === 'boolean' && typeof metadata['value'] === 'string';\n}\n","import { booleanAttribute, computed, Directive, effect, ElementRef, inject, input, Signal } from '@angular/core';\nimport { RdxCompositeItem } from '@radix-ng/primitives/composite';\nimport { BooleanInput, createContext } from '@radix-ng/primitives/core';\nimport { injectRadioRootContext } from './radio-root.directive';\n\nexport interface RadioItemContext {\n value: Signal<string>;\n checkedState: Signal<boolean>;\n disabledState: Signal<boolean>;\n readonlyState: Signal<boolean>;\n requiredState: Signal<boolean>;\n}\n\nconst itemContext = (): RadioItemContext => {\n const item = inject(RdxRadioItemDirective);\n\n return {\n value: item.value,\n checkedState: item.checkedState,\n disabledState: item.disabledState,\n readonlyState: item.readonlyState,\n requiredState: item.requiredState\n };\n};\n\nexport const [injectRadioItemContext, provideRadioItemContext] = createContext<RadioItemContext>(\n 'RadioItemContext',\n 'components/radio'\n);\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n providers: [provideRadioItemContext(itemContext)],\n hostDirectives: [RdxCompositeItem],\n\n host: {\n '[attr.type]': 'isNativeButton ? \"button\" : undefined',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-disabled]': 'disabledState() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonlyState() ? \"true\" : undefined',\n '[attr.aria-required]': 'requiredState() ? \"true\" : undefined',\n '[attr.data-composite-item-active]': 'checkedState() ? \"\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'requiredState() ? \"\" : undefined',\n '[attr.disabled]': 'isNativeButton && disabledState() ? \"\" : undefined',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus($event)'\n }\n})\nexport class RdxRadioItemDirective {\n private readonly rootContext = injectRadioRootContext();\n private readonly compositeItem = inject(RdxCompositeItem, { self: true });\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the user should be unable to select this radio button. Bound in templates as\n * `readOnly` (Base UI spelling); the TS member stays `readonly` for cross-primitive consistency.\n */\n readonly readonly = input<boolean, BooleanInput>(false, { alias: 'readOnly', transform: booleanAttribute });\n\n /**\n * Whether the host is a native `<button>`. Detected from the host tag (unlike Base UI's explicit\n * `nativeButton` prop, the rendered element is statically known in Angular templates), and used to\n * apply `type=\"button\"` and the native `disabled` attribute.\n */\n protected readonly isNativeButton = this.elementRef.nativeElement.tagName === 'BUTTON';\n\n readonly disabledState = computed(() => this.rootContext.disabledState() || this.disabled());\n\n readonly readonlyState = computed(() => this.rootContext.readonly() || this.readonly());\n\n readonly requiredState = computed(() => this.rootContext.required() || this.required());\n\n readonly checkedState = computed(() => this.rootContext.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'] as const;\n\n constructor() {\n effect(() => {\n this.compositeItem.setMetadata({\n disabled: this.disabledState(),\n value: this.value()\n });\n });\n }\n\n /** @ignore */\n onClick(event?: Event) {\n if (!this.disabledState() && !this.readonlyState()) {\n this.rootContext.select(this.value(), event);\n }\n }\n\n /** @ignore */\n onKeyDown(event: Event): void {\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === ' ') {\n this.onClick(keyEvent);\n return;\n }\n\n if (keyEvent.key === 'Enter') {\n keyEvent.preventDefault();\n return;\n }\n\n if (this.isAllowedArrowKey(keyEvent.key)) {\n this.rootContext.setArrowNavigation(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.rootContext.setArrowNavigation(false);\n }\n\n /** @ignore */\n onFocus(event?: FocusEvent) {\n queueMicrotask(() => {\n if (this.rootContext.isArrowNavigation()) {\n this.rootContext.select(this.value(), event);\n this.rootContext.setArrowNavigation(false);\n }\n });\n }\n\n private isAllowedArrowKey(key: string): boolean {\n return (this.ARROW_KEYS as readonly string[]).includes(key);\n }\n}\n","import { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectRadioItemContext } from './radio-item.directive';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n host: {\n '[attr.data-checked]': 'itemContext.checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!itemContext.checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'itemContext.disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'itemContext.readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'itemContext.requiredState() ? \"\" : undefined',\n '[attr.data-starting-style]': 'isVisible() ? \"\" : undefined',\n '[attr.data-ending-style]': '!isVisible() ? \"\" : undefined',\n '[style.display]': '!keepMounted() && !isVisible() ? \"none\" : null',\n '[style.pointer-events]': '\"none\"'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly itemContext = injectRadioItemContext();\n\n /** Keep the indicator in the DOM when unchecked so CSS exit animations can play. */\n readonly keepMounted = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n protected readonly isVisible = computed(() => this.itemContext.checkedState());\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { injectRadioItemContext } from './radio-item.directive';\nimport { injectRadioRootContext } from './radio-root.directive';\n\n/**\n * The hidden native radio input that mirrors the item state for form submission, native validation,\n * and `<label>` activation. Place it inside an `rdxRadioItem`.\n *\n * @see https://base-ui.com/react/components/radio\n */\n@Directive({\n selector: 'input[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n host: {\n type: 'radio',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'name()',\n '[attr.form]': 'form()',\n '[attr.required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'disabled() ? \"\" : undefined',\n '[attr.checked]': 'checked() ? \"\" : undefined',\n '[checked]': 'checked()',\n '[attr.value]': 'value()',\n '(change)': 'onInputChange($event)',\n style: 'transform: translateX(-100%); position: absolute; pointer-events: none; opacity: 0; margin: 0; inset: 0;'\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly rootContext = injectRadioRootContext();\n private readonly itemContext = injectRadioItemContext();\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly name = computed(() => this.rootContext.name());\n readonly form = computed(() => this.rootContext.form());\n readonly value = computed(() => this.itemContext.value() || undefined);\n readonly checked = computed(() => this.itemContext.checkedState());\n readonly required = computed(() => this.itemContext.requiredState());\n readonly disabled = computed(() => this.itemContext.disabledState());\n\n constructor() {\n let isInitial = true;\n\n effect(() => {\n const checked = this.checked();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n if (checked) {\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n });\n }\n\n /**\n * Selects this item when the native input is checked — covers `<label>` activation,\n * where clicking the label toggles the hidden radio input rather than the visible item.\n * `select()` is a no-op when the value is already current, so the programmatic\n * `change` dispatched above does not re-trigger selection.\n * @ignore\n */\n protected onInputChange(event: Event): void {\n if (this.input.checked) {\n this.rootContext.select(this.itemContext.value(), event);\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA+CA,MAAM,WAAW,GAAG,MAAuB;AACvC,IAAA,MAAM,IAAI,GAAG,MAAM,CAAC,sBAAsB,CAAC;IAE3C,OAAO;QACH,KAAK,EAAE,IAAI,CAAC,KAAK;QACjB,aAAa,EAAE,IAAI,CAAC,aAAa;QACjC,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,QAAQ,EAAE,I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E,0BAA0B;AACpC,oBAAA,QAAQ,EAAE,mBAAmB;AAC7B,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AACb,wBAAA,QAAQ,EAAE,IAAI;AACd,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,aAAa,EAAE,QAAQ;AACvB,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,iBAAiB,EAAE,6BAA6B;AAChD,wBAAA,gBAAgB,EAAE,4BAA4B;AAC9C,wBAAA,WAAW,EAAE,WAAW;AACxB,wBAAA,cAAc,EAAE,SAAS;AACzB,wBAAA,UAAU,EAAE,uBAAuB;AACnC,wBAAA,KAAK,EAAE;AACV;AACJ,iBAAA;;;AC3BD;;AAEG;;;;"}
@@ -1,6 +1,6 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, DestroyRef, input, booleanAttribute, computed, signal, ElementRef, Directive, PLATFORM_ID, CSP_NONCE, effect, afterNextRender, NgModule } from '@angular/core';
3
- import { clamp, createContext } from '@radix-ng/primitives/core';
3
+ import { clamp, createContext, injectId } from '@radix-ng/primitives/core';
4
4
  import { injectDirection } from '@radix-ng/primitives/direction-provider';
5
5
  import { isPlatformBrowser } from '@angular/common';
6
6
 
@@ -114,7 +114,6 @@ const rootContext = () => {
114
114
  handlePointerUp: (e) => root.handlePointerUp(e)
115
115
  };
116
116
  };
117
- let idCounter = 0;
118
117
  /**
119
118
  * Groups all parts of the scroll area.
120
119
  * Renders a `<div>` element.
@@ -124,7 +123,7 @@ let idCounter = 0;
124
123
  class RdxScrollAreaRoot {
125
124
  constructor() {
126
125
  this.destroyRef = inject(DestroyRef);
127
- this.rootId = `rdx-scroll-area-${idCounter++}`;
126
+ this.rootId = injectId('rdx-scroll-area-');
128
127
  /** Text direction of the scroll area. Affects horizontal (RTL) scroll math. */
129
128
  this.dirInput = input(undefined, { ...(ngDevMode ? { debugName: "dirInput" } : /* istanbul ignore next */ {}), alias: 'dir' });
130
129
  this.direction = injectDirection(this.dirInput);
@@ -912,7 +911,7 @@ class RdxScrollAreaThumb {
912
911
  this.rootContext.handlePointerUp(event);
913
912
  }
914
913
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
915
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxScrollAreaThumb, isStandalone: true, selector: "[rdxScrollAreaThumb]", host: { listeners: { "pointerdown": "rootContext.handlePointerDown($event)", "pointermove": "rootContext.handlePointerMove($event)", "pointerup": "endDrag($event)", "pointercancel": "endDrag($event)" }, properties: { "attr.data-orientation": "scrollbarContext.orientation()", "style.visibility": "rootContext.hasMeasuredScrollbar() ? null : \"hidden\"", "style.height": "scrollbarContext.orientation() === \"vertical\" ? \"var(--scroll-area-thumb-height)\" : null", "style.width": "scrollbarContext.orientation() === \"horizontal\" ? \"var(--scroll-area-thumb-width)\" : null" } }, exportAs: ["rdxScrollAreaThumb"], ngImport: i0 }); }
914
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxScrollAreaThumb, isStandalone: true, selector: "[rdxScrollAreaThumb]", host: { listeners: { "pointerdown": "rootContext.handlePointerDown($event)", "pointermove": "rootContext.handlePointerMove($event)", "pointerup": "endDrag($event)", "pointercancel": "endDrag($event)" }, properties: { "attr.data-orientation": "scrollbarContext.orientation()", "attr.data-scrolling": "(scrollbarContext.orientation() === \"horizontal\" ? rootContext.scrollingX() : rootContext.scrollingY()) ? \"\" : undefined", "style.visibility": "rootContext.hasMeasuredScrollbar() ? null : \"hidden\"", "style.height": "scrollbarContext.orientation() === \"vertical\" ? \"var(--scroll-area-thumb-height)\" : null", "style.width": "scrollbarContext.orientation() === \"horizontal\" ? \"var(--scroll-area-thumb-width)\" : null" } }, exportAs: ["rdxScrollAreaThumb"], ngImport: i0 }); }
916
915
  }
917
916
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxScrollAreaThumb, decorators: [{
918
917
  type: Directive,
@@ -921,6 +920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
921
920
  exportAs: 'rdxScrollAreaThumb',
922
921
  host: {
923
922
  '[attr.data-orientation]': 'scrollbarContext.orientation()',
923
+ '[attr.data-scrolling]': '(scrollbarContext.orientation() === "horizontal" ? rootContext.scrollingX() : rootContext.scrollingY()) ? "" : undefined',
924
924
  '[style.visibility]': 'rootContext.hasMeasuredScrollbar() ? null : "hidden"',
925
925
  '[style.height]': 'scrollbarContext.orientation() === "vertical" ? "var(--scroll-area-thumb-height)" : null',
926
926
  '[style.width]': 'scrollbarContext.orientation() === "horizontal" ? "var(--scroll-area-thumb-width)" : null',