@radix-ng/primitives 1.0.7 → 1.0.8

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 (52) hide show
  1. package/fesm2022/radix-ng-primitives-autocomplete.mjs +43 -9
  2. package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-checkbox.mjs +89 -8
  4. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  5. package/fesm2022/radix-ng-primitives-combobox.mjs +43 -9
  6. package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-core.mjs +208 -2
  8. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  9. package/fesm2022/radix-ng-primitives-date-field.mjs +50 -9
  10. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  11. package/fesm2022/radix-ng-primitives-editable.mjs +31 -5
  12. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  13. package/fesm2022/radix-ng-primitives-field.mjs +265 -46
  14. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
  15. package/fesm2022/radix-ng-primitives-form.mjs +110 -26
  16. package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
  17. package/fesm2022/radix-ng-primitives-input.mjs +16 -6
  18. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-number-field.mjs +32 -7
  20. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-radio.mjs +18 -4
  22. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-select.mjs +26 -8
  24. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-signal-forms.mjs +184 -0
  26. package/fesm2022/radix-ng-primitives-signal-forms.mjs.map +1 -0
  27. package/fesm2022/radix-ng-primitives-slider.mjs +24 -8
  28. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  29. package/fesm2022/radix-ng-primitives-switch.mjs +29 -5
  30. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  31. package/fesm2022/radix-ng-primitives-time-field.mjs +49 -9
  32. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-toggle-group.mjs +23 -12
  34. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  35. package/package.json +11 -1
  36. package/types/radix-ng-primitives-autocomplete.d.ts +21 -2
  37. package/types/radix-ng-primitives-checkbox.d.ts +53 -4
  38. package/types/radix-ng-primitives-combobox.d.ts +51 -2
  39. package/types/radix-ng-primitives-core.d.ts +206 -3
  40. package/types/radix-ng-primitives-date-field.d.ts +27 -2
  41. package/types/radix-ng-primitives-editable.d.ts +15 -2
  42. package/types/radix-ng-primitives-field.d.ts +136 -33
  43. package/types/radix-ng-primitives-form.d.ts +115 -21
  44. package/types/radix-ng-primitives-input.d.ts +8 -1
  45. package/types/radix-ng-primitives-number-field.d.ts +14 -3
  46. package/types/radix-ng-primitives-radio.d.ts +7 -2
  47. package/types/radix-ng-primitives-select.d.ts +11 -3
  48. package/types/radix-ng-primitives-signal-forms.d.ts +97 -0
  49. package/types/radix-ng-primitives-slider.d.ts +9 -7
  50. package/types/radix-ng-primitives-switch.d.ts +15 -2
  51. package/types/radix-ng-primitives-time-field.d.ts +26 -2
  52. package/types/radix-ng-primitives-toggle-group.d.ts +6 -4
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, model, input, booleanAttribute, output, signal, computed, effect, Directive, ElementRef, Renderer2, DestroyRef, NgModule } from '@angular/core';
3
3
  import * as i1 from '@radix-ng/primitives/core';
4
- import { createContext, createCancelableChangeEventDetails, provideValueAccessor, RdxControlValueAccessor } from '@radix-ng/primitives/core';
4
+ import { createContext, RdxFormUiControlBase, createCancelableChangeEventDetails, provideValueAccessor, provideFormUiState, RdxFormUiStateHost, RdxControlValueAccessor, RDX_FIELD_VALIDITY } from '@radix-ng/primitives/core';
5
5
 
6
6
  const [injectCheckboxGroupContext, provideCheckboxGroupContext] = createContext('CheckboxGroupContext', 'components/checkbox');
7
7
  const groupContext = () => {
@@ -26,8 +26,9 @@ let nextCheckboxGroupId = 0;
26
26
  * Each child `rdxCheckboxRoot` participates by its `name`. A child marked `parent` becomes a
27
27
  * "select all" checkbox whose state is derived from `allValues`.
28
28
  */
29
- class RdxCheckboxGroupDirective {
29
+ class RdxCheckboxGroupDirective extends RdxFormUiControlBase {
30
30
  constructor() {
31
+ super();
31
32
  /** The names of the currently checked checkboxes. Use with `onValueChange` or `[(value)]`. */
32
33
  this.value = model([], /* @ts-ignore */
33
34
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
@@ -94,6 +95,10 @@ class RdxCheckboxGroupDirective {
94
95
  }
95
96
  });
96
97
  }
98
+ /** @ignore Bridge the CVA `onTouched` so `markAsTouched()` also notifies Reactive/template forms. */
99
+ formUiTouchTarget() {
100
+ return { markAsTouched: () => this.onTouched() };
101
+ }
97
102
  /** @ignore Register a child's disabled signal keyed by its name. */
98
103
  registerChild(name, disabled) {
99
104
  this.disabledByName.set(name, disabled);
@@ -193,6 +198,7 @@ class RdxCheckboxGroupDirective {
193
198
  return false;
194
199
  }
195
200
  this.value.set(next);
201
+ this.formUi.markDirty();
196
202
  this.onChange(next);
197
203
  this.onTouched();
198
204
  return true;
@@ -214,14 +220,23 @@ class RdxCheckboxGroupDirective {
214
220
  this.disabledByCva.set(isDisabled);
215
221
  }
216
222
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCheckboxGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
217
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxCheckboxGroupDirective, isStandalone: true, selector: "[rdxCheckboxGroup]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, allValues: { classPropertyName: "allValues", publicName: "allValues", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "group" }, properties: { "attr.data-disabled": "disabledState() ? \"\" : undefined" } }, providers: [provideValueAccessor(RdxCheckboxGroupDirective), provideCheckboxGroupContext(groupContext)], exportAs: ["rdxCheckboxGroup"], ngImport: i0 }); }
223
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxCheckboxGroupDirective, isStandalone: true, selector: "[rdxCheckboxGroup]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, allValues: { classPropertyName: "allValues", publicName: "allValues", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "group" }, properties: { "attr.data-disabled": "disabledState() ? \"\" : undefined" } }, providers: [
224
+ provideValueAccessor(RdxCheckboxGroupDirective),
225
+ provideCheckboxGroupContext(groupContext),
226
+ provideFormUiState(() => inject(RdxCheckboxGroupDirective).formUi)
227
+ ], exportAs: ["rdxCheckboxGroup"], usesInheritance: true, hostDirectives: [{ directive: i1.RdxFormUiStateHost }], ngImport: i0 }); }
218
228
  }
219
229
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCheckboxGroupDirective, decorators: [{
220
230
  type: Directive,
221
231
  args: [{
222
232
  selector: '[rdxCheckboxGroup]',
223
233
  exportAs: 'rdxCheckboxGroup',
224
- providers: [provideValueAccessor(RdxCheckboxGroupDirective), provideCheckboxGroupContext(groupContext)],
234
+ hostDirectives: [RdxFormUiStateHost],
235
+ providers: [
236
+ provideValueAccessor(RdxCheckboxGroupDirective),
237
+ provideCheckboxGroupContext(groupContext),
238
+ provideFormUiState(() => inject(RdxCheckboxGroupDirective).formUi)
239
+ ],
225
240
  host: {
226
241
  role: 'group',
227
242
  '[attr.data-disabled]': 'disabledState() ? "" : undefined'
@@ -250,6 +265,10 @@ const rootContext = () => {
250
265
  form: checkbox.form,
251
266
  readonly: checkbox.readOnlyState,
252
267
  state: checkbox.state,
268
+ invalidState: checkbox.invalidState,
269
+ displayValid: checkbox.displayValid,
270
+ touchedState: checkbox.touchedState,
271
+ dirtyState: checkbox.dirtyState,
253
272
  uncheckedValue: checkbox.uncheckedValue,
254
273
  toggle(event) {
255
274
  checkbox.toggle(event);
@@ -328,6 +347,29 @@ class RdxCheckboxRootDirective {
328
347
  * @group Props
329
348
  */
330
349
  this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
350
+ /**
351
+ * Whether the checkbox is invalid. A non-empty {@link errors} list also marks it invalid.
352
+ * @group Props
353
+ */
354
+ this.invalid = input(false, { ...(ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
355
+ /**
356
+ * Whether the checkbox has been touched. A `model()` so Signal Forms can write it; the checkbox
357
+ * also sets it on toggle (and emits {@link touch}).
358
+ * @group Props
359
+ */
360
+ this.touched = model(false, /* @ts-ignore */
361
+ ...(ngDevMode ? [{ debugName: "touched" }] : /* istanbul ignore next */ []));
362
+ /**
363
+ * Whether the checked state changed from its initial value. Merged with internal tracking.
364
+ * @group Props
365
+ */
366
+ this.dirty = input(false, { ...(ngDevMode ? { debugName: "dirty" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
367
+ /**
368
+ * Validation errors for the checkbox. A non-empty list marks it invalid.
369
+ * @group Props
370
+ */
371
+ this.errors = input([], /* @ts-ignore */
372
+ ...(ngDevMode ? [{ debugName: "errors" }] : /* istanbul ignore next */ []));
331
373
  /**
332
374
  * Name of the form control. Submitted with the form as part of a name/value pair. Inside a
333
375
  * `rdxCheckboxGroup` this also identifies the checkbox in the group's value array.
@@ -352,6 +394,11 @@ class RdxCheckboxRootDirective {
352
394
  * @group Emits
353
395
  */
354
396
  this.onCheckedChange = output();
397
+ /**
398
+ * Emits on interaction, notifying Signal Forms the checkbox was touched.
399
+ * @group Emits
400
+ */
401
+ this.touch = output();
355
402
  /**
356
403
  * @ignore
357
404
  * The effective checked state as a `boolean`. Inside a `rdxCheckboxGroup` it is derived from the
@@ -390,6 +437,27 @@ class RdxCheckboxRootDirective {
390
437
  ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
391
438
  this.readOnlyState = computed(() => this.readonly(), /* @ts-ignore */
392
439
  ...(ngDevMode ? [{ debugName: "readOnlyState" }] : /* istanbul ignore next */ []));
440
+ this.dirtyValue = signal(false, /* @ts-ignore */
441
+ ...(ngDevMode ? [{ debugName: "dirtyValue" }] : /* istanbul ignore next */ []));
442
+ /** @ignore Invalid when the `invalid` input is set or the `errors` list is non-empty. */
443
+ this.invalidState = computed(() => this.invalid() || (this.errors()?.length ?? 0) > 0, /* @ts-ignore */
444
+ ...(ngDevMode ? [{ debugName: "invalidState" }] : /* istanbul ignore next */ []));
445
+ /** Tri-state display validity exposed by an enclosing Field; absent when standalone. */
446
+ this.fieldValidity = inject(RDX_FIELD_VALIDITY, { optional: true });
447
+ /**
448
+ * @ignore Tri-state *displayed* validity. A **standalone** checkbox inside a `rdxFieldRoot` defers to
449
+ * the field's gated `validState` (so a field whose `validationMode` defers display (e.g. `onBlur`) stays neutral); inside a
450
+ * `rdxCheckboxGroup` the group owns the field relationship, so the item keeps its own binary validity
451
+ * (the field's invalid must not paint every checkbox red).
452
+ */
453
+ this.displayValid = computed(() => !this.group && this.fieldValidity ? this.fieldValidity() : this.invalidState() ? false : true, /* @ts-ignore */
454
+ ...(ngDevMode ? [{ debugName: "displayValid" }] : /* istanbul ignore next */ []));
455
+ /** @ignore */
456
+ this.touchedState = computed(() => this.touched(), /* @ts-ignore */
457
+ ...(ngDevMode ? [{ debugName: "touchedState" }] : /* istanbul ignore next */ []));
458
+ /** @ignore */
459
+ this.dirtyState = computed(() => this.dirty() || this.dirtyValue(), /* @ts-ignore */
460
+ ...(ngDevMode ? [{ debugName: "dirtyState" }] : /* istanbul ignore next */ []));
393
461
  this.state = computed(() => this.indeterminateState() ? 'indeterminate' : this.checkedState() ? 'checked' : 'unchecked', /* @ts-ignore */
394
462
  ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
395
463
  // Inside a group, register this child's name and its own disabled state so a `parent`
@@ -447,9 +515,13 @@ class RdxCheckboxRootDirective {
447
515
  this.indeterminate.set(false);
448
516
  this.checked.set(next);
449
517
  this.controlValueAccessor.setValue(next);
518
+ this.dirtyValue.set(true);
450
519
  // Mark the form control touched on user interaction so `touched`-gated validation shows
451
520
  // (the visible control is the button, not the hidden input, so blur alone is unreliable).
521
+ // Both channels: CVA for Reactive forms, the `touched` model + `touch` output for Signal Forms.
452
522
  this.controlValueAccessor.markAsTouched();
523
+ this.touched.set(true);
524
+ this.touch.emit();
453
525
  }
454
526
  syncUncheckedInput() {
455
527
  const name = this.name();
@@ -507,7 +579,7 @@ class RdxCheckboxRootDirective {
507
579
  }
508
580
  }
509
581
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCheckboxRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
510
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxCheckboxRootDirective, isStandalone: true, selector: "[rdxCheckboxRoot]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, submitValue: { classPropertyName: "submitValue", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, uncheckedValue: { classPropertyName: "uncheckedValue", publicName: "uncheckedValue", 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 }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, parent: { classPropertyName: "parent", publicName: "parent", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", indeterminate: "indeterminateChange", onCheckedChange: "onCheckedChange" }, host: { properties: { "attr.data-checked": "checkedState() && !indeterminateState() ? \"\" : undefined", "attr.data-unchecked": "!checkedState() && !indeterminateState() ? \"\" : undefined", "attr.data-indeterminate": "indeterminateState() ? \"\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readOnlyState() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined" } }, providers: [provideCheckboxRootContext(rootContext)], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
582
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxCheckboxRootDirective, isStandalone: true, selector: "[rdxCheckboxRoot]", inputs: { checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null }, submitValue: { classPropertyName: "submitValue", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, uncheckedValue: { classPropertyName: "uncheckedValue", publicName: "uncheckedValue", 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 }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, touched: { classPropertyName: "touched", publicName: "touched", isSignal: true, isRequired: false, transformFunction: null }, dirty: { classPropertyName: "dirty", publicName: "dirty", isSignal: true, isRequired: false, transformFunction: null }, errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, parent: { classPropertyName: "parent", publicName: "parent", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", indeterminate: "indeterminateChange", touched: "touchedChange", onCheckedChange: "onCheckedChange", touch: "touch" }, host: { properties: { "attr.data-checked": "checkedState() && !indeterminateState() ? \"\" : undefined", "attr.data-unchecked": "!checkedState() && !indeterminateState() ? \"\" : undefined", "attr.data-indeterminate": "indeterminateState() ? \"\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readOnlyState() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined", "attr.data-invalid": "displayValid() === false ? \"\" : undefined", "attr.data-valid": "displayValid() === true ? \"\" : undefined", "attr.data-touched": "touchedState() ? \"\" : undefined", "attr.data-dirty": "dirtyState() ? \"\" : undefined" } }, providers: [provideCheckboxRootContext(rootContext)], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
511
583
  }
512
584
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCheckboxRootDirective, decorators: [{
513
585
  type: Directive,
@@ -526,10 +598,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
526
598
  '[attr.data-indeterminate]': 'indeterminateState() ? "" : undefined',
527
599
  '[attr.data-disabled]': 'disabledState() ? "" : undefined',
528
600
  '[attr.data-readonly]': 'readOnlyState() ? "" : undefined',
529
- '[attr.data-required]': 'required() ? "" : undefined'
601
+ '[attr.data-required]': 'required() ? "" : undefined',
602
+ '[attr.data-invalid]': 'displayValid() === false ? "" : undefined',
603
+ '[attr.data-valid]': 'displayValid() === true ? "" : undefined',
604
+ '[attr.data-touched]': 'touchedState() ? "" : undefined',
605
+ '[attr.data-dirty]': 'dirtyState() ? "" : undefined'
530
606
  }
531
607
  }]
532
- }], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], defaultChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultChecked", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], submitValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], uncheckedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "uncheckedValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], parent: [{ type: i0.Input, args: [{ isSignal: true, alias: "parent", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], onCheckedChange: [{ type: i0.Output, args: ["onCheckedChange"] }] } });
608
+ }], ctorParameters: () => [], propDecorators: { checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], defaultChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultChecked", required: false }] }], indeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "indeterminate", required: false }] }, { type: i0.Output, args: ["indeterminateChange"] }], submitValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], uncheckedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "uncheckedValue", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readOnly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], invalid: [{ type: i0.Input, args: [{ isSignal: true, alias: "invalid", required: false }] }], touched: [{ type: i0.Input, args: [{ isSignal: true, alias: "touched", required: false }] }, { type: i0.Output, args: ["touchedChange"] }], dirty: [{ type: i0.Input, args: [{ isSignal: true, alias: "dirty", required: false }] }], errors: [{ type: i0.Input, args: [{ isSignal: true, alias: "errors", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], parent: [{ type: i0.Input, args: [{ isSignal: true, alias: "parent", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", required: false }] }], onCheckedChange: [{ type: i0.Output, args: ["onCheckedChange"] }], touch: [{ type: i0.Output, args: ["touch"] }] } });
533
609
 
534
610
  /**
535
611
  * Directive: rdxCheckboxButton
@@ -573,7 +649,7 @@ class RdxCheckboxButtonDirective {
573
649
  }
574
650
  }
575
651
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCheckboxButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
576
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxCheckboxButtonDirective, isStandalone: true, selector: "button[rdxCheckboxButton]", host: { attributes: { "type": "button", "role": "checkbox" }, listeners: { "click": "clicked($event)", "keydown.enter": "$event.preventDefault()" }, properties: { "attr.aria-checked": "rootContext.indeterminate() ? \"mixed\" : rootContext.checked()", "attr.aria-controls": "ariaControls()", "attr.aria-disabled": "rootContext.disabled() ? \"true\" : undefined", "attr.aria-required": "rootContext.required() || undefined", "attr.aria-readonly": "rootContext.readonly() || undefined", "attr.data-checked": "rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined", "attr.data-unchecked": "!rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined", "attr.data-indeterminate": "rootContext.indeterminate() ? \"\" : undefined", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.data-readonly": "rootContext.readonly() ? \"\" : undefined", "attr.data-required": "rootContext.required() ? \"\" : undefined" } }, ngImport: i0 }); }
652
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxCheckboxButtonDirective, isStandalone: true, selector: "button[rdxCheckboxButton]", host: { attributes: { "type": "button", "role": "checkbox" }, listeners: { "click": "clicked($event)", "keydown.enter": "$event.preventDefault()" }, properties: { "attr.aria-checked": "rootContext.indeterminate() ? \"mixed\" : rootContext.checked()", "attr.aria-controls": "ariaControls()", "attr.aria-disabled": "rootContext.disabled() ? \"true\" : undefined", "attr.aria-required": "rootContext.required() || undefined", "attr.aria-readonly": "rootContext.readonly() || undefined", "attr.aria-invalid": "rootContext.displayValid() === false ? \"true\" : undefined", "attr.data-checked": "rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined", "attr.data-unchecked": "!rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined", "attr.data-indeterminate": "rootContext.indeterminate() ? \"\" : undefined", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.data-readonly": "rootContext.readonly() ? \"\" : undefined", "attr.data-required": "rootContext.required() ? \"\" : undefined", "attr.data-invalid": "rootContext.displayValid() === false ? \"\" : undefined", "attr.data-valid": "rootContext.displayValid() === true ? \"\" : undefined", "attr.data-touched": "rootContext.touchedState() ? \"\" : undefined", "attr.data-dirty": "rootContext.dirtyState() ? \"\" : undefined" } }, ngImport: i0 }); }
577
653
  }
578
654
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxCheckboxButtonDirective, decorators: [{
579
655
  type: Directive,
@@ -587,12 +663,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImpor
587
663
  '[attr.aria-disabled]': 'rootContext.disabled() ? "true" : undefined',
588
664
  '[attr.aria-required]': 'rootContext.required() || undefined',
589
665
  '[attr.aria-readonly]': 'rootContext.readonly() || undefined',
666
+ '[attr.aria-invalid]': 'rootContext.displayValid() === false ? "true" : undefined',
590
667
  '[attr.data-checked]': 'rootContext.checked() && !rootContext.indeterminate() ? "" : undefined',
591
668
  '[attr.data-unchecked]': '!rootContext.checked() && !rootContext.indeterminate() ? "" : undefined',
592
669
  '[attr.data-indeterminate]': 'rootContext.indeterminate() ? "" : undefined',
593
670
  '[attr.data-disabled]': 'rootContext.disabled() ? "" : undefined',
594
671
  '[attr.data-readonly]': 'rootContext.readonly() ? "" : undefined',
595
672
  '[attr.data-required]': 'rootContext.required() ? "" : undefined',
673
+ '[attr.data-invalid]': 'rootContext.displayValid() === false ? "" : undefined',
674
+ '[attr.data-valid]': 'rootContext.displayValid() === true ? "" : undefined',
675
+ '[attr.data-touched]': 'rootContext.touchedState() ? "" : undefined',
676
+ '[attr.data-dirty]': 'rootContext.dirtyState() ? "" : undefined',
596
677
  '(click)': 'clicked($event)',
597
678
  // According to WAI ARIA, Checkboxes don't activate on enter keypress
598
679
  '(keydown.enter)': '$event.preventDefault()'
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-checkbox.mjs","sources":["../../../packages/primitives/checkbox/src/checkbox-group.ts","../../../packages/primitives/checkbox/src/checkbox-root.ts","../../../packages/primitives/checkbox/src/checkbox-button.ts","../../../packages/primitives/checkbox/src/checkbox-indicator.ts","../../../packages/primitives/checkbox/src/checkbox-input.ts","../../../packages/primitives/checkbox/index.ts","../../../packages/primitives/checkbox/radix-ng-primitives-checkbox.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n Signal\n} from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n createContext,\n provideValueAccessor,\n RdxCancelableChangeEventDetails\n} from '@radix-ng/primitives/core';\nimport type { CheckedState } from './checkbox-root';\n\nexport type RdxCheckboxGroupValueChangeReason = 'none';\nexport type RdxCheckboxGroupValueChangeEventDetails =\n RdxCancelableChangeEventDetails<RdxCheckboxGroupValueChangeReason>;\n\nexport interface RdxCheckboxGroupValueChangeEvent {\n value: string[];\n eventDetails: RdxCheckboxGroupValueChangeEventDetails;\n}\n\nexport interface RdxCheckboxGroupContext {\n /** The names of the currently checked checkboxes. */\n value: Signal<string[]>;\n /** All checkbox names, used by a `parent` checkbox to check/uncheck every child. */\n allValues: Signal<string[]>;\n /** Whether the whole group is disabled. */\n disabled: Signal<boolean>;\n /** The derived state of a `parent` checkbox: all / none / some checked. */\n parentState: Signal<CheckedState>;\n /** The space-separated control ids the `parent` checkbox controls (for `aria-controls`). */\n controlledIds: Signal<string | undefined>;\n /** A stable id for a child's control element, derived from the group id and the child name. */\n controlId: (name: string) => string;\n /** Toggle a single child by name. */\n toggleValue: (name: string, event?: Event) => void;\n /** Toggle every child on or off (used by a `parent` checkbox). */\n toggleAll: (event?: Event) => void;\n /** Register a child's name and disabled state so the parent can preserve disabled items. */\n registerChild: (name: string, disabled: Signal<boolean>) => () => void;\n /** Register a child's control element id so the parent can reference it via `aria-controls`. */\n registerControl: (name: string, id: string) => () => void;\n}\n\nexport const [injectCheckboxGroupContext, provideCheckboxGroupContext] = createContext<RdxCheckboxGroupContext>(\n 'CheckboxGroupContext',\n 'components/checkbox'\n);\n\nconst groupContext = (): RdxCheckboxGroupContext => {\n const group = inject(RdxCheckboxGroupDirective);\n return {\n value: group.value,\n allValues: group.allValues,\n disabled: group.disabledState,\n parentState: group.parentState,\n controlledIds: group.controlledIds,\n controlId: (name) => group.controlId(name),\n toggleValue: (name, event) => group.toggleValue(name, event),\n toggleAll: (event) => group.toggleAll(event),\n registerChild: (name, disabled) => group.registerChild(name, disabled),\n registerControl: (name, id) => group.registerControl(name, id)\n };\n};\n\nlet nextCheckboxGroupId = 0;\n\n/**\n * Groups a set of checkboxes that share a single array value (the names of the checked boxes).\n *\n * Each child `rdxCheckboxRoot` participates by its `name`. A child marked `parent` becomes a\n * \"select all\" checkbox whose state is derived from `allValues`.\n */\n@Directive({\n selector: '[rdxCheckboxGroup]',\n exportAs: 'rdxCheckboxGroup',\n providers: [provideValueAccessor(RdxCheckboxGroupDirective), provideCheckboxGroupContext(groupContext)],\n host: {\n role: 'group',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined'\n }\n})\nexport class RdxCheckboxGroupDirective implements ControlValueAccessor {\n /** The names of the currently checked checkboxes. Use with `onValueChange` or `[(value)]`. */\n readonly value = model<string[]>([]);\n\n /** The names checked initially when the group is uncontrolled. */\n readonly defaultValue = input<string[]>();\n\n /** All checkbox names in the group. Required for a `parent` (select-all) checkbox. */\n readonly allValues = input<string[]>([]);\n\n /** Whether the whole group is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Emits the new array of checked names whenever the value changes. */\n readonly onValueChange = output<RdxCheckboxGroupValueChangeEvent>();\n\n private readonly disabledByCva = signal(false);\n readonly disabledState = computed(() => this.disabledByCva() || this.disabled());\n\n /** Derived state for a `parent` checkbox: `true` (all), `false` (none) or `'indeterminate'`. */\n readonly parentState = computed<CheckedState>(() => {\n const total = this.allValues().length;\n const count = this.value().length;\n if (total > 0 && count === total) {\n return true;\n }\n return count > 0 ? 'indeterminate' : false;\n });\n\n /**\n * The value as last set directly by a child (or the initial value) — the \"remembered\" partial\n * selection that a `parent` checkbox cycles back to, mirroring Base UI's `uncontrolledStateRef`.\n */\n private uncontrolledState: string[] = [];\n private seeded = false;\n /** Where the parent is in its mixed → on → off cycle. Reset to `mixed` on any direct child change. */\n private parentStatus: 'on' | 'off' | 'mixed' = 'mixed';\n /** Per-name disabled signals, so the parent can preserve disabled-but-checked children. */\n private readonly disabledByName = new Map<string, Signal<boolean>>();\n\n /** Stable group id used to derive child control ids when the consumer sets none. */\n private readonly elementId = `rdx-checkbox-group-${nextCheckboxGroupId++}`;\n /** Registered control element ids, keyed by child name. */\n private readonly controlIds = signal<Record<string, string>>({});\n\n /** The space-separated control ids in `allValues` order, for the parent's `aria-controls`. */\n readonly controlledIds = computed<string | undefined>(() => {\n const ids = this.controlIds();\n const list = this.allValues()\n .map((name) => ids[name])\n .filter((id): id is string => id !== undefined);\n return list.length > 0 ? list.join(' ') : undefined;\n });\n\n private hasAppliedDefault = false;\n private onChange: (value: string[]) => void = () => {\n /* Empty */\n };\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n effect(() => {\n const defaultValue = this.defaultValue();\n if (!this.hasAppliedDefault && defaultValue !== undefined) {\n this.hasAppliedDefault = true;\n this.value.set(defaultValue);\n }\n });\n }\n\n /** @ignore Register a child's disabled signal keyed by its name. */\n registerChild(name: string, disabled: Signal<boolean>): () => void {\n this.disabledByName.set(name, disabled);\n return () => {\n if (this.disabledByName.get(name) === disabled) {\n this.disabledByName.delete(name);\n }\n };\n }\n\n /** A stable control id for a child, derived from the group id and the child name. */\n controlId(name: string): string {\n return `${this.elementId}-${name}`;\n }\n\n /** @ignore Register a child's control element id so the parent can list it in `aria-controls`. */\n registerControl(name: string, id: string): () => void {\n this.controlIds.update((ids) => ({ ...ids, [name]: id }));\n return () => {\n this.controlIds.update((ids) => {\n if (ids[name] !== id) {\n return ids;\n }\n const next = { ...ids };\n delete next[name];\n return next;\n });\n };\n }\n\n /** Add/remove a single child name from the value (a direct child change). */\n toggleValue(name: string, event?: Event): void {\n if (this.disabledState()) {\n return;\n }\n\n const current = this.value();\n const next = current.includes(name) ? current.filter((v) => v !== name) : [...current, name];\n if (!this.emit(next, event)) {\n return;\n }\n\n // A direct child change becomes the new \"remembered\" selection and resets the parent cycle.\n this.seeded = true;\n this.uncontrolledState = next;\n this.parentStatus = 'mixed';\n }\n\n /**\n * Toggle from the `parent` checkbox. Mirrors Base UI's `useCheckboxGroupParent`:\n *\n * - When the remembered selection is all/none, this is a plain check-all ↔ uncheck-all toggle.\n * - When it is a partial selection, clicks cycle: partial → all → none → partial → …, so the\n * user's original partial choice is restored rather than lost.\n *\n * Disabled-but-checked children are always preserved (they cannot be toggled programmatically).\n */\n toggleAll(event?: Event): void {\n if (this.disabledState()) {\n return;\n }\n\n this.ensureSeeded();\n\n const allValues = this.allValues();\n const remembered = this.uncontrolledState;\n\n // Disabled children that were checked stay checked through every transition.\n const none = allValues.filter((name) => this.isNameDisabled(name) && remembered.includes(name));\n const all = allValues.filter((name) => !this.isNameDisabled(name) || remembered.includes(name));\n\n const rememberedIsAllOrNone = remembered.length === all.length || remembered.length === 0;\n if (rememberedIsAllOrNone) {\n this.emit(this.value().length === all.length ? none : all, event);\n return;\n }\n\n let nextStatus: 'on' | 'off' | 'mixed' = 'mixed';\n let nextValue = remembered;\n if (this.parentStatus === 'mixed') {\n nextStatus = 'on';\n nextValue = all;\n } else if (this.parentStatus === 'on') {\n nextStatus = 'off';\n nextValue = none;\n }\n\n if (!this.emit(nextValue, event)) {\n return;\n }\n this.parentStatus = nextStatus;\n }\n\n private isNameDisabled(name: string): boolean {\n return this.disabledByName.get(name)?.() ?? false;\n }\n\n /** Seed the remembered selection from the current value the first time the parent is used. */\n private ensureSeeded(): void {\n if (!this.seeded) {\n this.seeded = true;\n this.uncontrolledState = this.value();\n }\n }\n\n private emit(next: string[], event?: Event): boolean {\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n 'none',\n event ?? new Event('checkbox-group.value-change'),\n trigger\n );\n this.onValueChange.emit({ value: next, eventDetails });\n if (eventDetails.isCanceled()) {\n return false;\n }\n\n this.value.set(next);\n this.onChange(next);\n this.onTouched();\n return true;\n }\n\n /** @ignore */\n writeValue(value: string[] | null): void {\n this.value.set(value ?? []);\n }\n\n /** @ignore */\n registerOnChange(fn: (value: string[]) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.disabledByCva.set(isDisabled);\n }\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n Renderer2,\n Signal\n} from '@angular/core';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n createContext,\n RdxCancelableChangeEventDetails,\n RdxControlValueAccessor,\n RdxFormCheckboxControl\n} from '@radix-ng/primitives/core';\nimport { injectCheckboxGroupContext } from './checkbox-group';\n\n/**\n * Internal tri-state used only for the derived `parent` (select-all) state in\n * `rdxCheckboxGroup` and compatibility helpers. The public `checked` member is\n * a plain `boolean`; mixed state is exposed via the separate `indeterminate`\n * member (Base UI shape).\n */\nexport type CheckedState = boolean | 'indeterminate';\n\nexport function isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n return checked === 'indeterminate';\n}\n\nexport function getState(checked: CheckedState) {\n return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\n\nexport type RdxCheckboxCheckedChangeReason = 'none';\nexport type RdxCheckboxCheckedChangeEventDetails = RdxCancelableChangeEventDetails<RdxCheckboxCheckedChangeReason>;\n\nexport interface RdxCheckboxCheckedChangeEvent {\n checked: boolean;\n eventDetails: RdxCheckboxCheckedChangeEventDetails;\n}\n\nexport interface CheckboxRootContext {\n checked: Signal<boolean>;\n indeterminate: Signal<boolean>;\n disabled: Signal<boolean>;\n required: Signal<boolean>;\n value: Signal<string>;\n name: Signal<string | undefined>;\n parent: Signal<boolean>;\n form: Signal<string | undefined>;\n readonly: Signal<boolean>;\n state: Signal<'indeterminate' | 'checked' | 'unchecked'>;\n uncheckedValue: Signal<string | undefined>;\n toggle: (event?: Event) => void;\n}\n\nconst rootContext = (): CheckboxRootContext => {\n const checkbox = inject(RdxCheckboxRootDirective);\n\n // `checked`/`disabled` come from the directive so they reflect group membership when the\n // checkbox is inside a `rdxCheckboxGroup`; otherwise they fall back to the CVA.\n return {\n checked: checkbox.checkedState,\n indeterminate: checkbox.indeterminateState,\n disabled: checkbox.disabledState,\n required: checkbox.required,\n value: checkbox.submitValue,\n name: checkbox.name,\n parent: checkbox.parent,\n form: checkbox.form,\n readonly: checkbox.readOnlyState,\n state: checkbox.state,\n uncheckedValue: checkbox.uncheckedValue,\n toggle(event?: Event) {\n checkbox.toggle(event);\n }\n };\n};\n\nexport const [injectCheckboxRootContext, provideCheckboxRootContext] = createContext<CheckboxRootContext>(\n 'CheckboxRootContext',\n 'components/checkbox'\n);\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxCheckboxRoot]',\n providers: [provideCheckboxRootContext(rootContext)],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value:checked', 'disabled']\n }\n ],\n host: {\n '[attr.data-checked]': 'checkedState() && !indeterminateState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() && !indeterminateState() ? \"\" : undefined',\n '[attr.data-indeterminate]': 'indeterminateState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readOnlyState() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined'\n }\n})\nexport class RdxCheckboxRootDirective implements RdxFormCheckboxControl {\n private readonly controlValueAccessor = inject(RdxControlValueAccessor);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private uncheckedInputElement: HTMLInputElement | null = null;\n\n /** The group this checkbox belongs to, if it is rendered inside a `rdxCheckboxGroup`. */\n private readonly group = injectCheckboxGroupContext(true);\n\n /**\n * The controlled checked state of the checkbox. Must be used in conjunction with onCheckedChange.\n *\n * Mixed state is no longer expressed through `checked` — use the separate\n * `indeterminate` input (Base UI shape). This `boolean` model is what\n * `RdxFormCheckboxControl` / Angular Signal Forms bind to.\n * @group Props\n */\n readonly checked = model<boolean>(false);\n\n /**\n * The state of the checkbox when it is initially rendered.\n *\n * @default false\n * @group Props\n */\n readonly defaultChecked = input<boolean | undefined, BooleanInput | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value))\n });\n\n /**\n * Whether the checkbox is in a mixed state: neither ticked nor unticked.\n * Orthogonal to `checked` and not part of the submitted form value. A user\n * click resolves the checkbox to `checked` and clears `indeterminate`.\n * @group Props\n */\n readonly indeterminate = model<boolean>(false);\n\n /**\n * The value of the checkbox. This is what is submitted with the form when the checkbox is checked.\n *\n * Bound publicly as `[value]`; the TS member is named `submitValue` so the\n * directive can satisfy `RdxFormCheckboxControl`, whose contract reserves a\n * `value` member for `RdxFormValueControl` and forbids it on checkbox-style\n * controls. (Checkbox is not yet marked `implements` — its `checked` is still\n * `CheckedState`; see the `indeterminate` half of collision #1.)\n * @group Props\n */\n readonly submitValue = input<string>('on', { alias: 'value' });\n\n /**\n * The value submitted with the form when the checkbox is unchecked.\n * By default, unchecked checkboxes do not submit any value, matching native checkbox behavior.\n *\n * @group Props\n */\n readonly uncheckedValue = input<string>();\n\n /**\n * Whether or not the checkbox button is disabled. This prevents the user from interacting with it.\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the user should be unable to tick or untick the checkbox. Bound in templates as\n * `readOnly` (Base UI spelling); the TS member stays `readonly` to satisfy `RdxFormCheckboxControl`.\n * @group Props\n */\n readonly readonly = input<boolean, BooleanInput>(false, { alias: 'readOnly', transform: booleanAttribute });\n\n /**\n * Whether or not the checkbox is required.\n * @group Props\n */\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Name of the form control. Submitted with the form as part of a name/value pair. Inside a\n * `rdxCheckboxGroup` this also identifies the checkbox in the group's value array.\n * @group Props\n */\n readonly name = input<string>();\n\n /**\n * When inside a `rdxCheckboxGroup`, marks this as the \"select all\" checkbox: its state is\n * derived from the group's `allValues`, and toggling it checks or unchecks every child.\n * @group Props\n */\n readonly parent = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Associates the control with a form element.\n * @group Props\n */\n readonly form = input<string>();\n\n /**\n * Event emitted when the checkbox checked state changes.\n * @group Emits\n */\n readonly onCheckedChange = output<RdxCheckboxCheckedChangeEvent>();\n\n /**\n * @ignore\n * The effective checked state as a `boolean`. Inside a `rdxCheckboxGroup` it is derived from the\n * group (a `parent` checkbox is checked only when every child is; a child from whether its `name`\n * is in the group value); standalone it reads the CVA value.\n */\n readonly checkedState = computed<boolean>(() => {\n const group = this.group;\n if (group) {\n if (this.parent()) {\n return group.parentState() === true;\n }\n\n const name = this.name();\n if (name !== undefined) {\n return group.value().includes(name);\n }\n }\n\n return !!this.controlValueAccessor.value();\n });\n\n /**\n * @ignore\n * The effective mixed state. A `parent` checkbox is indeterminate when some — but not all —\n * children are checked; otherwise it follows the `indeterminate` input.\n */\n readonly indeterminateState = computed<boolean>(() => {\n const group = this.group;\n if (group && this.parent()) {\n return group.parentState() === 'indeterminate';\n }\n\n return this.indeterminate();\n });\n\n /** @ignore The effective disabled state, including the group. */\n readonly disabledState = computed(() => this.controlValueAccessor.disabled() || (this.group?.disabled() ?? false));\n readonly readOnlyState = computed(() => this.readonly());\n\n readonly state = computed(() =>\n this.indeterminateState() ? 'indeterminate' : this.checkedState() ? 'checked' : 'unchecked'\n );\n\n constructor() {\n // Inside a group, register this child's name and its own disabled state so a `parent`\n // checkbox can preserve disabled-but-checked children when selecting/deselecting all.\n effect((onCleanup) => {\n const group = this.group;\n const name = this.name();\n if (group && !this.parent() && name !== undefined) {\n onCleanup(group.registerChild(name, this.controlValueAccessor.disabled));\n }\n });\n\n let hasAppliedDefault = false;\n effect(() => {\n const defaultChecked = this.defaultChecked();\n if (!hasAppliedDefault && defaultChecked !== undefined) {\n hasAppliedDefault = true;\n this.checked.set(defaultChecked);\n this.controlValueAccessor.setValue(defaultChecked);\n }\n });\n\n effect(() => {\n this.syncUncheckedInput();\n });\n\n inject(DestroyRef).onDestroy(() => {\n this.removeUncheckedInput();\n });\n }\n\n toggle(event?: Event) {\n if (this.disabledState() || this.readOnlyState()) {\n return;\n }\n\n const group = this.group;\n if (group) {\n if (this.parent()) {\n group.toggleAll(event);\n return;\n }\n\n const name = this.name();\n if (name !== undefined) {\n group.toggleValue(name, event);\n return;\n }\n }\n\n // From the indeterminate state a click resolves to checked (matching\n // native + Base UI), otherwise it flips the boolean. A single setValue so\n // onCheckedChange fires once; the `checked`/`indeterminate` models are\n // kept in sync so `[(checked)]` / `[(indeterminate)]` reflect the change.\n const next = this.indeterminateState() ? true : !this.checkedState();\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n 'none',\n event ?? new Event('checkbox.checked-change'),\n trigger\n );\n this.onCheckedChange.emit({ checked: next, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n\n this.indeterminate.set(false);\n this.checked.set(next);\n this.controlValueAccessor.setValue(next);\n // Mark the form control touched on user interaction so `touched`-gated validation shows\n // (the visible control is the button, not the hidden input, so blur alone is unreliable).\n this.controlValueAccessor.markAsTouched();\n }\n\n private syncUncheckedInput(): void {\n const name = this.name();\n const uncheckedValue = this.uncheckedValue();\n const shouldRender =\n !this.checkedState() && !this.group && !this.parent() && name !== undefined && uncheckedValue !== undefined;\n\n if (!shouldRender) {\n this.removeUncheckedInput();\n return;\n }\n\n const input = this.ensureUncheckedInput();\n this.renderer.setAttribute(input, 'type', 'hidden');\n this.renderer.setAttribute(input, 'name', name);\n this.renderer.setAttribute(input, 'value', uncheckedValue);\n this.setOptionalAttribute(input, 'form', this.form());\n this.setBooleanAttribute(input, 'disabled', this.disabledState());\n }\n\n private ensureUncheckedInput(): HTMLInputElement {\n if (this.uncheckedInputElement) {\n return this.uncheckedInputElement;\n }\n\n const host = this.elementRef.nativeElement;\n const parent = host.parentNode;\n const input = this.renderer.createElement('input') as HTMLInputElement;\n if (parent) {\n this.renderer.insertBefore(parent, input, host.nextSibling);\n }\n this.uncheckedInputElement = input;\n return input;\n }\n\n private removeUncheckedInput(): void {\n const input = this.uncheckedInputElement;\n if (!input) {\n return;\n }\n\n const parent = input.parentNode;\n if (parent) {\n this.renderer.removeChild(parent, input);\n }\n this.uncheckedInputElement = null;\n }\n\n private setOptionalAttribute(element: HTMLElement, name: string, value: string | undefined): void {\n if (value) {\n this.renderer.setAttribute(element, name, value);\n } else {\n this.renderer.removeAttribute(element, name);\n }\n }\n\n private setBooleanAttribute(element: HTMLElement, name: string, value: boolean): void {\n if (value) {\n this.renderer.setAttribute(element, name, '');\n } else {\n this.renderer.removeAttribute(element, name);\n }\n }\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { injectCheckboxGroupContext } from './checkbox-group';\nimport { injectCheckboxRootContext } from './checkbox-root';\n\n/**\n * Directive: rdxCheckboxButton\n * Purpose: Turns a native <button> into an accessible checkbox control bound to the Radix Checkbox context.\n * It mirrors the checkbox state via ARIA/data attributes, toggles on click, and prevents Enter activation per WAI-ARIA.\n * In forms, it stops the button's click from bubbling so only the hidden input emits the native event used for form/validator integration.\n */\n@Directive({\n selector: 'button[rdxCheckboxButton]',\n host: {\n type: 'button',\n role: 'checkbox',\n '[attr.aria-checked]': 'rootContext.indeterminate() ? \"mixed\" : rootContext.checked()',\n '[attr.aria-controls]': 'ariaControls()',\n '[attr.aria-disabled]': 'rootContext.disabled() ? \"true\" : undefined',\n '[attr.aria-required]': 'rootContext.required() || undefined',\n '[attr.aria-readonly]': 'rootContext.readonly() || undefined',\n '[attr.data-checked]': 'rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-unchecked]': '!rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-indeterminate]': 'rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'rootContext.readonly() ? \"\" : undefined',\n '[attr.data-required]': 'rootContext.required() ? \"\" : undefined',\n '(click)': 'clicked($event)',\n // According to WAI ARIA, Checkboxes don't activate on enter keypress\n '(keydown.enter)': '$event.preventDefault()'\n }\n})\nexport class RdxCheckboxButtonDirective {\n protected readonly rootContext = injectCheckboxRootContext();\n private readonly group = injectCheckboxGroupContext(true);\n\n private readonly elementRef = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n /** A `parent` checkbox lists the ids of the children it controls. */\n protected readonly ariaControls = computed(() =>\n this.group && this.rootContext.parent() ? this.group.controlledIds() : undefined\n );\n\n constructor() {\n // A child checkbox in a group exposes its control id so the parent can reference it via\n // `aria-controls`. Use the consumer's id when present, otherwise derive a stable one.\n effect((onCleanup) => {\n const group = this.group;\n const name = this.rootContext.name();\n if (!group || this.rootContext.parent() || name === undefined) {\n return;\n }\n\n const el = this.elementRef.nativeElement;\n if (!el.id) {\n el.id = group.controlId(name);\n }\n onCleanup(group.registerControl(name, el.id));\n });\n }\n\n protected clicked(event: MouseEvent) {\n if (event.defaultPrevented || this.rootContext.disabled() || this.rootContext.readonly()) {\n return;\n }\n\n this.rootContext.toggle(event);\n\n if (this.rootContext.form() || this.elementRef.nativeElement.closest('form')) {\n // if checkbox is in a form, stop propagation from the button so that we only propagate\n // one click event (from the input). We propagate changes from an input so that native\n // form validation works and form events reflect checkbox updates.\n event.stopPropagation();\n }\n }\n}\n","import { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectCheckboxRootContext } from './checkbox-root';\n\n@Directive({\n selector: '[rdxCheckboxIndicator]',\n host: {\n '[attr.data-checked]': 'rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-unchecked]': '!rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-indeterminate]': 'rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'rootContext.readonly() ? \"\" : undefined',\n '[attr.data-required]': 'rootContext.required() ? \"\" : 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 RdxCheckboxIndicatorDirective {\n protected readonly rootContext = injectCheckboxRootContext();\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.rootContext.checked() || this.rootContext.indeterminate());\n}\n","import { Directive, effect, ElementRef, inject } from '@angular/core';\nimport { injectCheckboxRootContext } from './checkbox-root';\n\n@Directive({\n selector: 'input[rdxCheckboxInput]',\n host: {\n type: 'checkbox',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'rootContext.parent() ? undefined : rootContext.name() || undefined',\n // Only a truly checked box is submitted; `indeterminate` is a property\n // (set below), never a submitted \"checked\" value.\n '[attr.checked]': 'rootContext.state() === \"checked\" ? \"\" : undefined',\n '[checked]': 'rootContext.checked()',\n '[attr.form]': 'rootContext.form() || undefined',\n '[attr.value]': 'rootContext.value()',\n '[required]': 'rootContext.required()',\n '[disabled]': 'rootContext.disabled()',\n '[style]': `{\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n inset: 0,\n transform: 'translateX(-100%)',\n }`\n }\n})\nexport class RdxCheckboxInputDirective {\n protected readonly rootContext = injectCheckboxRootContext();\n\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n constructor() {\n let isInitial = true;\n\n /**\n * Keeps the hidden native input in sync so form submission, native\n * validation and form events reflect the checkbox state.\n *\n * - `indeterminate` is a native property (not a submittable value), so we\n * mirror it here rather than via an attribute.\n * - On every change (but not the initial render) we emit bubbling\n * `input`/`change` events so native form listeners react. We do NOT\n * dispatch a `click`: a click on a checkbox runs the toggle activation\n * behavior and would desync the input from the bound state.\n */\n effect(() => {\n // Track both so the native input mirrors the checkbox and emits change\n // events when either the checked or indeterminate state moves.\n this.rootContext.checked();\n this.input.indeterminate = this.rootContext.indeterminate();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxCheckboxButtonDirective } from './src/checkbox-button';\nimport { RdxCheckboxGroupDirective } from './src/checkbox-group';\nimport { RdxCheckboxIndicatorDirective } from './src/checkbox-indicator';\nimport { RdxCheckboxInputDirective } from './src/checkbox-input';\nimport { RdxCheckboxRootDirective } from './src/checkbox-root';\n\nexport * from './src/checkbox-button';\nexport * from './src/checkbox-group';\nexport * from './src/checkbox-indicator';\nexport * from './src/checkbox-input';\nexport * from './src/checkbox-root';\nexport type { CheckedState } from './src/checkbox-root';\n\nexport const checkboxImports = [\n RdxCheckboxInputDirective,\n RdxCheckboxRootDirective,\n RdxCheckboxButtonDirective,\n RdxCheckboxIndicatorDirective,\n RdxCheckboxGroupDirective\n];\n\n@NgModule({\n imports: [...checkboxImports],\n ex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,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe,CAAC;AAC7B,oBAAA,OAAO,EAAE,CAAC,GAAG,eAAe;AAC/B,iBAAA;;;ACzBD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-checkbox.mjs","sources":["../../../packages/primitives/checkbox/src/checkbox-group.ts","../../../packages/primitives/checkbox/src/checkbox-root.ts","../../../packages/primitives/checkbox/src/checkbox-button.ts","../../../packages/primitives/checkbox/src/checkbox-indicator.ts","../../../packages/primitives/checkbox/src/checkbox-input.ts","../../../packages/primitives/checkbox/index.ts","../../../packages/primitives/checkbox/radix-ng-primitives-checkbox.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n inject,\n input,\n model,\n output,\n signal,\n Signal\n} from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n createContext,\n provideFormUiState,\n provideValueAccessor,\n RdxCancelableChangeEventDetails,\n RdxFormUiControlBase,\n RdxFormUiStateHost,\n RdxFormUiTouchTarget,\n RdxFormValueControl\n} from '@radix-ng/primitives/core';\nimport type { CheckedState } from './checkbox-root';\n\nexport type RdxCheckboxGroupValueChangeReason = 'none';\nexport type RdxCheckboxGroupValueChangeEventDetails =\n RdxCancelableChangeEventDetails<RdxCheckboxGroupValueChangeReason>;\n\nexport interface RdxCheckboxGroupValueChangeEvent {\n value: string[];\n eventDetails: RdxCheckboxGroupValueChangeEventDetails;\n}\n\nexport interface RdxCheckboxGroupContext {\n /** The names of the currently checked checkboxes. */\n value: Signal<string[]>;\n /** All checkbox names, used by a `parent` checkbox to check/uncheck every child. */\n allValues: Signal<string[]>;\n /** Whether the whole group is disabled. */\n disabled: Signal<boolean>;\n /** The derived state of a `parent` checkbox: all / none / some checked. */\n parentState: Signal<CheckedState>;\n /** The space-separated control ids the `parent` checkbox controls (for `aria-controls`). */\n controlledIds: Signal<string | undefined>;\n /** A stable id for a child's control element, derived from the group id and the child name. */\n controlId: (name: string) => string;\n /** Toggle a single child by name. */\n toggleValue: (name: string, event?: Event) => void;\n /** Toggle every child on or off (used by a `parent` checkbox). */\n toggleAll: (event?: Event) => void;\n /** Register a child's name and disabled state so the parent can preserve disabled items. */\n registerChild: (name: string, disabled: Signal<boolean>) => () => void;\n /** Register a child's control element id so the parent can reference it via `aria-controls`. */\n registerControl: (name: string, id: string) => () => void;\n}\n\nexport const [injectCheckboxGroupContext, provideCheckboxGroupContext] = createContext<RdxCheckboxGroupContext>(\n 'CheckboxGroupContext',\n 'components/checkbox'\n);\n\nconst groupContext = (): RdxCheckboxGroupContext => {\n const group = inject(RdxCheckboxGroupDirective);\n return {\n value: group.value,\n allValues: group.allValues,\n disabled: group.disabledState,\n parentState: group.parentState,\n controlledIds: group.controlledIds,\n controlId: (name) => group.controlId(name),\n toggleValue: (name, event) => group.toggleValue(name, event),\n toggleAll: (event) => group.toggleAll(event),\n registerChild: (name, disabled) => group.registerChild(name, disabled),\n registerControl: (name, id) => group.registerControl(name, id)\n };\n};\n\nlet nextCheckboxGroupId = 0;\n\n/**\n * Groups a set of checkboxes that share a single array value (the names of the checked boxes).\n *\n * Each child `rdxCheckboxRoot` participates by its `name`. A child marked `parent` becomes a\n * \"select all\" checkbox whose state is derived from `allValues`.\n */\n@Directive({\n selector: '[rdxCheckboxGroup]',\n exportAs: 'rdxCheckboxGroup',\n hostDirectives: [RdxFormUiStateHost],\n providers: [\n provideValueAccessor(RdxCheckboxGroupDirective),\n provideCheckboxGroupContext(groupContext),\n provideFormUiState(() => inject(RdxCheckboxGroupDirective).formUi)\n ],\n host: {\n role: 'group',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined'\n }\n})\nexport class RdxCheckboxGroupDirective\n extends RdxFormUiControlBase\n implements ControlValueAccessor, RdxFormValueControl<string[]>\n{\n /** The names of the currently checked checkboxes. Use with `onValueChange` or `[(value)]`. */\n readonly value = model<string[]>([]);\n\n /** The names checked initially when the group is uncontrolled. */\n readonly defaultValue = input<string[]>();\n\n /** All checkbox names in the group. Required for a `parent` (select-all) checkbox. */\n readonly allValues = input<string[]>([]);\n\n /** Whether the whole group is disabled. */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Emits the new array of checked names whenever the value changes. */\n readonly onValueChange = output<RdxCheckboxGroupValueChangeEvent>();\n\n private readonly disabledByCva = signal(false);\n readonly disabledState = computed(() => this.disabledByCva() || this.disabled());\n\n /** Derived state for a `parent` checkbox: `true` (all), `false` (none) or `'indeterminate'`. */\n readonly parentState = computed<CheckedState>(() => {\n const total = this.allValues().length;\n const count = this.value().length;\n if (total > 0 && count === total) {\n return true;\n }\n return count > 0 ? 'indeterminate' : false;\n });\n\n /**\n * The value as last set directly by a child (or the initial value) — the \"remembered\" partial\n * selection that a `parent` checkbox cycles back to, mirroring Base UI's `uncontrolledStateRef`.\n */\n private uncontrolledState: string[] = [];\n private seeded = false;\n /** Where the parent is in its mixed → on → off cycle. Reset to `mixed` on any direct child change. */\n private parentStatus: 'on' | 'off' | 'mixed' = 'mixed';\n /** Per-name disabled signals, so the parent can preserve disabled-but-checked children. */\n private readonly disabledByName = new Map<string, Signal<boolean>>();\n\n /** Stable group id used to derive child control ids when the consumer sets none. */\n private readonly elementId = `rdx-checkbox-group-${nextCheckboxGroupId++}`;\n /** Registered control element ids, keyed by child name. */\n private readonly controlIds = signal<Record<string, string>>({});\n\n /** The space-separated control ids in `allValues` order, for the parent's `aria-controls`. */\n readonly controlledIds = computed<string | undefined>(() => {\n const ids = this.controlIds();\n const list = this.allValues()\n .map((name) => ids[name])\n .filter((id): id is string => id !== undefined);\n return list.length > 0 ? list.join(' ') : undefined;\n });\n\n private hasAppliedDefault = false;\n private onChange: (value: string[]) => void = () => {\n /* Empty */\n };\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n super();\n\n effect(() => {\n const defaultValue = this.defaultValue();\n if (!this.hasAppliedDefault && defaultValue !== undefined) {\n this.hasAppliedDefault = true;\n this.value.set(defaultValue);\n }\n });\n }\n\n /** @ignore Bridge the CVA `onTouched` so `markAsTouched()` also notifies Reactive/template forms. */\n protected override formUiTouchTarget(): RdxFormUiTouchTarget {\n return { markAsTouched: () => this.onTouched() };\n }\n\n /** @ignore Register a child's disabled signal keyed by its name. */\n registerChild(name: string, disabled: Signal<boolean>): () => void {\n this.disabledByName.set(name, disabled);\n return () => {\n if (this.disabledByName.get(name) === disabled) {\n this.disabledByName.delete(name);\n }\n };\n }\n\n /** A stable control id for a child, derived from the group id and the child name. */\n controlId(name: string): string {\n return `${this.elementId}-${name}`;\n }\n\n /** @ignore Register a child's control element id so the parent can list it in `aria-controls`. */\n registerControl(name: string, id: string): () => void {\n this.controlIds.update((ids) => ({ ...ids, [name]: id }));\n return () => {\n this.controlIds.update((ids) => {\n if (ids[name] !== id) {\n return ids;\n }\n const next = { ...ids };\n delete next[name];\n return next;\n });\n };\n }\n\n /** Add/remove a single child name from the value (a direct child change). */\n toggleValue(name: string, event?: Event): void {\n if (this.disabledState()) {\n return;\n }\n\n const current = this.value();\n const next = current.includes(name) ? current.filter((v) => v !== name) : [...current, name];\n if (!this.emit(next, event)) {\n return;\n }\n\n // A direct child change becomes the new \"remembered\" selection and resets the parent cycle.\n this.seeded = true;\n this.uncontrolledState = next;\n this.parentStatus = 'mixed';\n }\n\n /**\n * Toggle from the `parent` checkbox. Mirrors Base UI's `useCheckboxGroupParent`:\n *\n * - When the remembered selection is all/none, this is a plain check-all ↔ uncheck-all toggle.\n * - When it is a partial selection, clicks cycle: partial → all → none → partial → …, so the\n * user's original partial choice is restored rather than lost.\n *\n * Disabled-but-checked children are always preserved (they cannot be toggled programmatically).\n */\n toggleAll(event?: Event): void {\n if (this.disabledState()) {\n return;\n }\n\n this.ensureSeeded();\n\n const allValues = this.allValues();\n const remembered = this.uncontrolledState;\n\n // Disabled children that were checked stay checked through every transition.\n const none = allValues.filter((name) => this.isNameDisabled(name) && remembered.includes(name));\n const all = allValues.filter((name) => !this.isNameDisabled(name) || remembered.includes(name));\n\n const rememberedIsAllOrNone = remembered.length === all.length || remembered.length === 0;\n if (rememberedIsAllOrNone) {\n this.emit(this.value().length === all.length ? none : all, event);\n return;\n }\n\n let nextStatus: 'on' | 'off' | 'mixed' = 'mixed';\n let nextValue = remembered;\n if (this.parentStatus === 'mixed') {\n nextStatus = 'on';\n nextValue = all;\n } else if (this.parentStatus === 'on') {\n nextStatus = 'off';\n nextValue = none;\n }\n\n if (!this.emit(nextValue, event)) {\n return;\n }\n this.parentStatus = nextStatus;\n }\n\n private isNameDisabled(name: string): boolean {\n return this.disabledByName.get(name)?.() ?? false;\n }\n\n /** Seed the remembered selection from the current value the first time the parent is used. */\n private ensureSeeded(): void {\n if (!this.seeded) {\n this.seeded = true;\n this.uncontrolledState = this.value();\n }\n }\n\n private emit(next: string[], event?: Event): boolean {\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n 'none',\n event ?? new Event('checkbox-group.value-change'),\n trigger\n );\n this.onValueChange.emit({ value: next, eventDetails });\n if (eventDetails.isCanceled()) {\n return false;\n }\n\n this.value.set(next);\n this.formUi.markDirty();\n this.onChange(next);\n this.onTouched();\n return true;\n }\n\n /** @ignore */\n writeValue(value: string[] | null): void {\n this.value.set(value ?? []);\n }\n\n /** @ignore */\n registerOnChange(fn: (value: string[]) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /** @ignore */\n setDisabledState(isDisabled: boolean): void {\n this.disabledByCva.set(isDisabled);\n }\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n Renderer2,\n signal,\n Signal\n} from '@angular/core';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n createContext,\n RDX_FIELD_VALIDITY,\n RdxCancelableChangeEventDetails,\n RdxControlValueAccessor,\n RdxFormCheckboxControl,\n RdxValidationError\n} from '@radix-ng/primitives/core';\nimport { injectCheckboxGroupContext } from './checkbox-group';\n\n/**\n * Internal tri-state used only for the derived `parent` (select-all) state in\n * `rdxCheckboxGroup` and compatibility helpers. The public `checked` member is\n * a plain `boolean`; mixed state is exposed via the separate `indeterminate`\n * member (Base UI shape).\n */\nexport type CheckedState = boolean | 'indeterminate';\n\nexport function isIndeterminate(checked?: CheckedState): checked is 'indeterminate' {\n return checked === 'indeterminate';\n}\n\nexport function getState(checked: CheckedState) {\n return isIndeterminate(checked) ? 'indeterminate' : checked ? 'checked' : 'unchecked';\n}\n\nexport type RdxCheckboxCheckedChangeReason = 'none';\nexport type RdxCheckboxCheckedChangeEventDetails = RdxCancelableChangeEventDetails<RdxCheckboxCheckedChangeReason>;\n\nexport interface RdxCheckboxCheckedChangeEvent {\n checked: boolean;\n eventDetails: RdxCheckboxCheckedChangeEventDetails;\n}\n\nexport interface CheckboxRootContext {\n checked: Signal<boolean>;\n indeterminate: Signal<boolean>;\n disabled: Signal<boolean>;\n required: Signal<boolean>;\n value: Signal<string>;\n name: Signal<string | undefined>;\n parent: Signal<boolean>;\n form: Signal<string | undefined>;\n readonly: Signal<boolean>;\n state: Signal<'indeterminate' | 'checked' | 'unchecked'>;\n invalidState: Signal<boolean>;\n /** Tri-state displayed validity (`true`/`false`/`null`) — the field's gated state when standalone in a Field. */\n displayValid: Signal<boolean | null>;\n touchedState: Signal<boolean>;\n dirtyState: Signal<boolean>;\n uncheckedValue: Signal<string | undefined>;\n toggle: (event?: Event) => void;\n}\n\nconst rootContext = (): CheckboxRootContext => {\n const checkbox = inject(RdxCheckboxRootDirective);\n\n // `checked`/`disabled` come from the directive so they reflect group membership when the\n // checkbox is inside a `rdxCheckboxGroup`; otherwise they fall back to the CVA.\n return {\n checked: checkbox.checkedState,\n indeterminate: checkbox.indeterminateState,\n disabled: checkbox.disabledState,\n required: checkbox.required,\n value: checkbox.submitValue,\n name: checkbox.name,\n parent: checkbox.parent,\n form: checkbox.form,\n readonly: checkbox.readOnlyState,\n state: checkbox.state,\n invalidState: checkbox.invalidState,\n displayValid: checkbox.displayValid,\n touchedState: checkbox.touchedState,\n dirtyState: checkbox.dirtyState,\n uncheckedValue: checkbox.uncheckedValue,\n toggle(event?: Event) {\n checkbox.toggle(event);\n }\n };\n};\n\nexport const [injectCheckboxRootContext, provideCheckboxRootContext] = createContext<CheckboxRootContext>(\n 'CheckboxRootContext',\n 'components/checkbox'\n);\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxCheckboxRoot]',\n providers: [provideCheckboxRootContext(rootContext)],\n hostDirectives: [\n {\n directive: RdxControlValueAccessor,\n inputs: ['value:checked', 'disabled']\n }\n ],\n host: {\n '[attr.data-checked]': 'checkedState() && !indeterminateState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() && !indeterminateState() ? \"\" : undefined',\n '[attr.data-indeterminate]': 'indeterminateState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readOnlyState() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '[attr.data-invalid]': 'displayValid() === false ? \"\" : undefined',\n '[attr.data-valid]': 'displayValid() === true ? \"\" : undefined',\n '[attr.data-touched]': 'touchedState() ? \"\" : undefined',\n '[attr.data-dirty]': 'dirtyState() ? \"\" : undefined'\n }\n})\nexport class RdxCheckboxRootDirective implements RdxFormCheckboxControl {\n private readonly controlValueAccessor = inject(RdxControlValueAccessor);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private uncheckedInputElement: HTMLInputElement | null = null;\n\n /** The group this checkbox belongs to, if it is rendered inside a `rdxCheckboxGroup`. */\n private readonly group = injectCheckboxGroupContext(true);\n\n /**\n * The controlled checked state of the checkbox. Must be used in conjunction with onCheckedChange.\n *\n * Mixed state is no longer expressed through `checked` — use the separate\n * `indeterminate` input (Base UI shape). This `boolean` model is what\n * `RdxFormCheckboxControl` / Angular Signal Forms bind to.\n * @group Props\n */\n readonly checked = model<boolean>(false);\n\n /**\n * The state of the checkbox when it is initially rendered.\n *\n * @default false\n * @group Props\n */\n readonly defaultChecked = input<boolean | undefined, BooleanInput | undefined>(undefined, {\n transform: (value) => (value === undefined ? undefined : booleanAttribute(value))\n });\n\n /**\n * Whether the checkbox is in a mixed state: neither ticked nor unticked.\n * Orthogonal to `checked` and not part of the submitted form value. A user\n * click resolves the checkbox to `checked` and clears `indeterminate`.\n * @group Props\n */\n readonly indeterminate = model<boolean>(false);\n\n /**\n * The value of the checkbox. This is what is submitted with the form when the checkbox is checked.\n *\n * Bound publicly as `[value]`; the TS member is named `submitValue` so the\n * directive can satisfy `RdxFormCheckboxControl`, whose contract reserves a\n * `value` member for `RdxFormValueControl` and forbids it on checkbox-style\n * controls. (Checkbox is not yet marked `implements` — its `checked` is still\n * `CheckedState`; see the `indeterminate` half of collision #1.)\n * @group Props\n */\n readonly submitValue = input<string>('on', { alias: 'value' });\n\n /**\n * The value submitted with the form when the checkbox is unchecked.\n * By default, unchecked checkboxes do not submit any value, matching native checkbox behavior.\n *\n * @group Props\n */\n readonly uncheckedValue = input<string>();\n\n /**\n * Whether or not the checkbox button is disabled. This prevents the user from interacting with it.\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the user should be unable to tick or untick the checkbox. Bound in templates as\n * `readOnly` (Base UI spelling); the TS member stays `readonly` to satisfy `RdxFormCheckboxControl`.\n * @group Props\n */\n readonly readonly = input<boolean, BooleanInput>(false, { alias: 'readOnly', transform: booleanAttribute });\n\n /**\n * Whether or not the checkbox is required.\n * @group Props\n */\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the checkbox is invalid. A non-empty {@link errors} list also marks it invalid.\n * @group Props\n */\n readonly invalid = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the checkbox has been touched. A `model()` so Signal Forms can write it; the checkbox\n * also sets it on toggle (and emits {@link touch}).\n * @group Props\n */\n readonly touched = model<boolean>(false);\n\n /**\n * Whether the checked state changed from its initial value. Merged with internal tracking.\n * @group Props\n */\n readonly dirty = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Validation errors for the checkbox. A non-empty list marks it invalid.\n * @group Props\n */\n readonly errors = input<readonly RdxValidationError[]>([]);\n\n /**\n * Name of the form control. Submitted with the form as part of a name/value pair. Inside a\n * `rdxCheckboxGroup` this also identifies the checkbox in the group's value array.\n * @group Props\n */\n readonly name = input<string>();\n\n /**\n * When inside a `rdxCheckboxGroup`, marks this as the \"select all\" checkbox: its state is\n * derived from the group's `allValues`, and toggling it checks or unchecks every child.\n * @group Props\n */\n readonly parent = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Associates the control with a form element.\n * @group Props\n */\n readonly form = input<string>();\n\n /**\n * Event emitted when the checkbox checked state changes.\n * @group Emits\n */\n readonly onCheckedChange = output<RdxCheckboxCheckedChangeEvent>();\n\n /**\n * Emits on interaction, notifying Signal Forms the checkbox was touched.\n * @group Emits\n */\n readonly touch = output<void>();\n\n /**\n * @ignore\n * The effective checked state as a `boolean`. Inside a `rdxCheckboxGroup` it is derived from the\n * group (a `parent` checkbox is checked only when every child is; a child from whether its `name`\n * is in the group value); standalone it reads the CVA value.\n */\n readonly checkedState = computed<boolean>(() => {\n const group = this.group;\n if (group) {\n if (this.parent()) {\n return group.parentState() === true;\n }\n\n const name = this.name();\n if (name !== undefined) {\n return group.value().includes(name);\n }\n }\n\n return !!this.controlValueAccessor.value();\n });\n\n /**\n * @ignore\n * The effective mixed state. A `parent` checkbox is indeterminate when some — but not all —\n * children are checked; otherwise it follows the `indeterminate` input.\n */\n readonly indeterminateState = computed<boolean>(() => {\n const group = this.group;\n if (group && this.parent()) {\n return group.parentState() === 'indeterminate';\n }\n\n return this.indeterminate();\n });\n\n /** @ignore The effective disabled state, including the group. */\n readonly disabledState = computed(() => this.controlValueAccessor.disabled() || (this.group?.disabled() ?? false));\n readonly readOnlyState = computed(() => this.readonly());\n\n private readonly dirtyValue = signal(false);\n /** @ignore Invalid when the `invalid` input is set or the `errors` list is non-empty. */\n readonly invalidState = computed(() => this.invalid() || (this.errors()?.length ?? 0) > 0);\n\n /** Tri-state display validity exposed by an enclosing Field; absent when standalone. */\n private readonly fieldValidity = inject(RDX_FIELD_VALIDITY, { optional: true });\n /**\n * @ignore Tri-state *displayed* validity. A **standalone** checkbox inside a `rdxFieldRoot` defers to\n * the field's gated `validState` (so a field whose `validationMode` defers display (e.g. `onBlur`) stays neutral); inside a\n * `rdxCheckboxGroup` the group owns the field relationship, so the item keeps its own binary validity\n * (the field's invalid must not paint every checkbox red).\n */\n readonly displayValid = computed<boolean | null>(() =>\n !this.group && this.fieldValidity ? this.fieldValidity() : this.invalidState() ? false : true\n );\n /** @ignore */\n readonly touchedState = computed(() => this.touched());\n /** @ignore */\n readonly dirtyState = computed(() => this.dirty() || this.dirtyValue());\n\n readonly state = computed(() =>\n this.indeterminateState() ? 'indeterminate' : this.checkedState() ? 'checked' : 'unchecked'\n );\n\n constructor() {\n // Inside a group, register this child's name and its own disabled state so a `parent`\n // checkbox can preserve disabled-but-checked children when selecting/deselecting all.\n effect((onCleanup) => {\n const group = this.group;\n const name = this.name();\n if (group && !this.parent() && name !== undefined) {\n onCleanup(group.registerChild(name, this.controlValueAccessor.disabled));\n }\n });\n\n let hasAppliedDefault = false;\n effect(() => {\n const defaultChecked = this.defaultChecked();\n if (!hasAppliedDefault && defaultChecked !== undefined) {\n hasAppliedDefault = true;\n this.checked.set(defaultChecked);\n this.controlValueAccessor.setValue(defaultChecked);\n }\n });\n\n effect(() => {\n this.syncUncheckedInput();\n });\n\n inject(DestroyRef).onDestroy(() => {\n this.removeUncheckedInput();\n });\n }\n\n toggle(event?: Event) {\n if (this.disabledState() || this.readOnlyState()) {\n return;\n }\n\n const group = this.group;\n if (group) {\n if (this.parent()) {\n group.toggleAll(event);\n return;\n }\n\n const name = this.name();\n if (name !== undefined) {\n group.toggleValue(name, event);\n return;\n }\n }\n\n // From the indeterminate state a click resolves to checked (matching\n // native + Base UI), otherwise it flips the boolean. A single setValue so\n // onCheckedChange fires once; the `checked`/`indeterminate` models are\n // kept in sync so `[(checked)]` / `[(indeterminate)]` reflect the change.\n const next = this.indeterminateState() ? true : !this.checkedState();\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n 'none',\n event ?? new Event('checkbox.checked-change'),\n trigger\n );\n this.onCheckedChange.emit({ checked: next, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n\n this.indeterminate.set(false);\n this.checked.set(next);\n this.controlValueAccessor.setValue(next);\n this.dirtyValue.set(true);\n // Mark the form control touched on user interaction so `touched`-gated validation shows\n // (the visible control is the button, not the hidden input, so blur alone is unreliable).\n // Both channels: CVA for Reactive forms, the `touched` model + `touch` output for Signal Forms.\n this.controlValueAccessor.markAsTouched();\n this.touched.set(true);\n this.touch.emit();\n }\n\n private syncUncheckedInput(): void {\n const name = this.name();\n const uncheckedValue = this.uncheckedValue();\n const shouldRender =\n !this.checkedState() && !this.group && !this.parent() && name !== undefined && uncheckedValue !== undefined;\n\n if (!shouldRender) {\n this.removeUncheckedInput();\n return;\n }\n\n const input = this.ensureUncheckedInput();\n this.renderer.setAttribute(input, 'type', 'hidden');\n this.renderer.setAttribute(input, 'name', name);\n this.renderer.setAttribute(input, 'value', uncheckedValue);\n this.setOptionalAttribute(input, 'form', this.form());\n this.setBooleanAttribute(input, 'disabled', this.disabledState());\n }\n\n private ensureUncheckedInput(): HTMLInputElement {\n if (this.uncheckedInputElement) {\n return this.uncheckedInputElement;\n }\n\n const host = this.elementRef.nativeElement;\n const parent = host.parentNode;\n const input = this.renderer.createElement('input') as HTMLInputElement;\n if (parent) {\n this.renderer.insertBefore(parent, input, host.nextSibling);\n }\n this.uncheckedInputElement = input;\n return input;\n }\n\n private removeUncheckedInput(): void {\n const input = this.uncheckedInputElement;\n if (!input) {\n return;\n }\n\n const parent = input.parentNode;\n if (parent) {\n this.renderer.removeChild(parent, input);\n }\n this.uncheckedInputElement = null;\n }\n\n private setOptionalAttribute(element: HTMLElement, name: string, value: string | undefined): void {\n if (value) {\n this.renderer.setAttribute(element, name, value);\n } else {\n this.renderer.removeAttribute(element, name);\n }\n }\n\n private setBooleanAttribute(element: HTMLElement, name: string, value: boolean): void {\n if (value) {\n this.renderer.setAttribute(element, name, '');\n } else {\n this.renderer.removeAttribute(element, name);\n }\n }\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { injectCheckboxGroupContext } from './checkbox-group';\nimport { injectCheckboxRootContext } from './checkbox-root';\n\n/**\n * Directive: rdxCheckboxButton\n * Purpose: Turns a native <button> into an accessible checkbox control bound to the Radix Checkbox context.\n * It mirrors the checkbox state via ARIA/data attributes, toggles on click, and prevents Enter activation per WAI-ARIA.\n * In forms, it stops the button's click from bubbling so only the hidden input emits the native event used for form/validator integration.\n */\n@Directive({\n selector: 'button[rdxCheckboxButton]',\n host: {\n type: 'button',\n role: 'checkbox',\n '[attr.aria-checked]': 'rootContext.indeterminate() ? \"mixed\" : rootContext.checked()',\n '[attr.aria-controls]': 'ariaControls()',\n '[attr.aria-disabled]': 'rootContext.disabled() ? \"true\" : undefined',\n '[attr.aria-required]': 'rootContext.required() || undefined',\n '[attr.aria-readonly]': 'rootContext.readonly() || undefined',\n '[attr.aria-invalid]': 'rootContext.displayValid() === false ? \"true\" : undefined',\n '[attr.data-checked]': 'rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-unchecked]': '!rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-indeterminate]': 'rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'rootContext.readonly() ? \"\" : undefined',\n '[attr.data-required]': 'rootContext.required() ? \"\" : undefined',\n '[attr.data-invalid]': 'rootContext.displayValid() === false ? \"\" : undefined',\n '[attr.data-valid]': 'rootContext.displayValid() === true ? \"\" : undefined',\n '[attr.data-touched]': 'rootContext.touchedState() ? \"\" : undefined',\n '[attr.data-dirty]': 'rootContext.dirtyState() ? \"\" : undefined',\n '(click)': 'clicked($event)',\n // According to WAI ARIA, Checkboxes don't activate on enter keypress\n '(keydown.enter)': '$event.preventDefault()'\n }\n})\nexport class RdxCheckboxButtonDirective {\n protected readonly rootContext = injectCheckboxRootContext();\n private readonly group = injectCheckboxGroupContext(true);\n\n private readonly elementRef = inject<ElementRef<HTMLButtonElement>>(ElementRef);\n\n /** A `parent` checkbox lists the ids of the children it controls. */\n protected readonly ariaControls = computed(() =>\n this.group && this.rootContext.parent() ? this.group.controlledIds() : undefined\n );\n\n constructor() {\n // A child checkbox in a group exposes its control id so the parent can reference it via\n // `aria-controls`. Use the consumer's id when present, otherwise derive a stable one.\n effect((onCleanup) => {\n const group = this.group;\n const name = this.rootContext.name();\n if (!group || this.rootContext.parent() || name === undefined) {\n return;\n }\n\n const el = this.elementRef.nativeElement;\n if (!el.id) {\n el.id = group.controlId(name);\n }\n onCleanup(group.registerControl(name, el.id));\n });\n }\n\n protected clicked(event: MouseEvent) {\n if (event.defaultPrevented || this.rootContext.disabled() || this.rootContext.readonly()) {\n return;\n }\n\n this.rootContext.toggle(event);\n\n if (this.rootContext.form() || this.elementRef.nativeElement.closest('form')) {\n // if checkbox is in a form, stop propagation from the button so that we only propagate\n // one click event (from the input). We propagate changes from an input so that native\n // form validation works and form events reflect checkbox updates.\n event.stopPropagation();\n }\n }\n}\n","import { booleanAttribute, computed, Directive, input } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectCheckboxRootContext } from './checkbox-root';\n\n@Directive({\n selector: '[rdxCheckboxIndicator]',\n host: {\n '[attr.data-checked]': 'rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-unchecked]': '!rootContext.checked() && !rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-indeterminate]': 'rootContext.indeterminate() ? \"\" : undefined',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-readonly]': 'rootContext.readonly() ? \"\" : undefined',\n '[attr.data-required]': 'rootContext.required() ? \"\" : 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 RdxCheckboxIndicatorDirective {\n protected readonly rootContext = injectCheckboxRootContext();\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.rootContext.checked() || this.rootContext.indeterminate());\n}\n","import { Directive, effect, ElementRef, inject } from '@angular/core';\nimport { injectCheckboxRootContext } from './checkbox-root';\n\n@Directive({\n selector: 'input[rdxCheckboxInput]',\n host: {\n type: 'checkbox',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'rootContext.parent() ? undefined : rootContext.name() || undefined',\n // Only a truly checked box is submitted; `indeterminate` is a property\n // (set below), never a submitted \"checked\" value.\n '[attr.checked]': 'rootContext.state() === \"checked\" ? \"\" : undefined',\n '[checked]': 'rootContext.checked()',\n '[attr.form]': 'rootContext.form() || undefined',\n '[attr.value]': 'rootContext.value()',\n '[required]': 'rootContext.required()',\n '[disabled]': 'rootContext.disabled()',\n '[style]': `{\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n inset: 0,\n transform: 'translateX(-100%)',\n }`\n }\n})\nexport class RdxCheckboxInputDirective {\n protected readonly rootContext = injectCheckboxRootContext();\n\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n constructor() {\n let isInitial = true;\n\n /**\n * Keeps the hidden native input in sync so form submission, native\n * validation and form events reflect the checkbox state.\n *\n * - `indeterminate` is a native property (not a submittable value), so we\n * mirror it here rather than via an attribute.\n * - On every change (but not the initial render) we emit bubbling\n * `input`/`change` events so native form listeners react. We do NOT\n * dispatch a `click`: a click on a checkbox runs the toggle activation\n * behavior and would desync the input from the bound state.\n */\n effect(() => {\n // Track both so the native input mirrors the checkbox and emits change\n // events when either the checked or indeterminate state moves.\n this.rootContext.checked();\n this.input.indeterminate = this.rootContext.indeterminate();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n });\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxCheckboxButtonDirective } from './src/checkbox-button';\nimport { RdxCheckboxGroupDirective } from './src/checkbox-group';\nimport { RdxCheckboxIndicatorDirective } from './src/checkbox-indicator';\nimport { RdxCheckboxInputDirective } from './src/checkbox-input';\nimport { RdxCheckboxRootDirective } from './src/checkbox-root';\n\nexport * from './src/checkbox-button';\nexport * from './src/checkbox-group';\nexport * from './src/checkbox-indicator';\nexport * from './src/checkbox-input';\nexport * from './src/checkbox-root';\nexport type { CheckedState } from './src/checkbox-root';\n\nexport const checkboxImports = [\n RdxCheckboxInputDirective,\n RdxCheckboxRootDirective,\n RdxCheckboxButtonDirective,\n RdxCheckboxIndicatorDirective,\n RdxCheckboxGroupDirective\n];\n\n@NgModule({\n imports: [...checkboxImports],\n exports: [...checkboxImports]\n})\nexport class RdxCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AA2DO,MAAM,CAAC,0BAA0B,EAAE,2BAA2B,CAAC,GAAG,aAAa,CAClF,sBAAsB,EACtB,qBAAqB;AAGzB,MAAM,YAAY,GAAG,MAA8B;AA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