@radix-ng/primitives 1.0.3 → 1.0.4

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.
@@ -4,18 +4,18 @@ import * as i1$1 from '@radix-ng/primitives/collapsible';
4
4
  import { injectCollapsibleRootContext, RdxCollapsibleRootDirective, RdxCollapsiblePanelDirective } from '@radix-ng/primitives/collapsible';
5
5
  import * as i1 from '@radix-ng/primitives/composite';
6
6
  import { RdxCompositeList, RdxCompositeListItem } from '@radix-ng/primitives/composite';
7
- import { createContext, injectId } from '@radix-ng/primitives/core';
7
+ import { createContext, createCancelableChangeEventDetails, injectId } from '@radix-ng/primitives/core';
8
8
 
9
9
  const [injectAccordionRootContext, provideAccordionRootContext] = createContext('AccordionRootContext', 'components/accordion');
10
10
  const rootContext = () => {
11
11
  const instance = inject(RdxAccordionRootDirective);
12
12
  return {
13
13
  disabled: instance.disabled,
14
- collapsible: instance.collapsible,
15
14
  orientation: instance.orientation,
16
15
  value: instance.value,
17
16
  isSingle: instance.isSingle,
18
17
  keepMounted: instance.keepMounted,
18
+ hiddenUntilFound: instance.hiddenUntilFound,
19
19
  changeModelValue: instance.changeModelValue
20
20
  };
21
21
  };
@@ -24,7 +24,6 @@ const rootContext = () => {
24
24
  */
25
25
  class RdxAccordionRootDirective {
26
26
  constructor() {
27
- this.id = input(injectId('rdx-accordion-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
28
27
  /** Whether the Accordion is disabled.
29
28
  * @defaultValue false
30
29
  * @group Props
@@ -55,23 +54,8 @@ class RdxAccordionRootDirective {
55
54
  */
56
55
  this.value = model(...(ngDevMode ? [undefined, { debugName: "value" }] : /* istanbul ignore next */ []));
57
56
  /**
58
- * When type is "single", allows closing content when clicking trigger for an open item.
59
- * When type is "multiple", this prop has no effect.
60
- *
61
- * @defaultValue false
62
- * @group Props
63
- */
64
- this.collapsible = input(false, { ...(ngDevMode ? { debugName: "collapsible" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
65
- /**
66
- * Determines whether a "single" or "multiple" items can be selected at a time.
67
- *
68
- * @defaultValue 'single'
69
- * @group Props
70
- */
71
- this.type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
72
- /**
73
- * Allow multiple panels to be open simultaneously.
74
- * Takes precedence over `type` when `true`.
57
+ * Allow multiple panels to be open simultaneously. In single mode an open item can always be
58
+ * closed by clicking its trigger again (Base UI parity — there is no separate `collapsible`).
75
59
  *
76
60
  * @defaultValue false
77
61
  * @group Props
@@ -95,14 +79,24 @@ class RdxAccordionRootDirective {
95
79
  */
96
80
  this.keepMounted = input(false, { ...(ngDevMode ? { debugName: "keepMounted" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
97
81
  /**
98
- * Event handler called when the expanded state of an item changes.
82
+ * Allow collapsed panels to remain mounted (but hidden) so the browser's in-page search
83
+ * can find and reveal them. Mirrors Base UI's `hiddenUntilFound`.
84
+ *
85
+ * @defaultValue false
86
+ * @group Props
87
+ */
88
+ this.hiddenUntilFound = input(false, { ...(ngDevMode ? { debugName: "hiddenUntilFound" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
89
+ /**
90
+ * Event handler called when the expanded value changes. Emits the next value plus a cancelable
91
+ * `eventDetails` (Base UI parity); call `eventDetails.cancel()` to reject the change.
99
92
  * @group Emits
100
93
  */
101
94
  this.onValueChange = output();
102
- this.isSingle = computed(() => !this.multiple() && this.type() !== 'multiple', ...(ngDevMode ? [{ debugName: "isSingle" }] : /* istanbul ignore next */ []));
103
- this.changeModelValue = (newValue) => {
95
+ this.isSingle = computed(() => !this.multiple(), ...(ngDevMode ? [{ debugName: "isSingle" }] : /* istanbul ignore next */ []));
96
+ this.changeModelValue = (newValue, event) => {
97
+ let nextValue;
104
98
  if (this.isSingle()) {
105
- this.value.set(this.isEqual(newValue, this.value()) ? undefined : newValue);
99
+ nextValue = this.isEqual(newValue, this.value()) ? undefined : newValue;
106
100
  }
107
101
  else {
108
102
  const currentValue = this.value();
@@ -122,9 +116,14 @@ class RdxAccordionRootDirective {
122
116
  else {
123
117
  modelValueArray.push(newValue);
124
118
  }
125
- this.value.set(modelValueArray);
119
+ nextValue = modelValueArray;
120
+ }
121
+ const { eventDetails } = createCancelableChangeEventDetails(event ? 'trigger-press' : 'none', event ?? new Event('change'));
122
+ this.onValueChange.emit({ value: nextValue, eventDetails });
123
+ if (eventDetails.isCanceled()) {
124
+ return;
126
125
  }
127
- this.onValueChange.emit(this.value());
126
+ this.value.set(nextValue);
128
127
  };
129
128
  effect(() => {
130
129
  if (this.defaultValue() !== undefined) {
@@ -139,7 +138,7 @@ class RdxAccordionRootDirective {
139
138
  return JSON.stringify(a) === JSON.stringify(b);
140
139
  }
141
140
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
142
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxAccordionRootDirective, isStandalone: true, selector: "[rdxAccordionRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, collapsible: { classPropertyName: "collapsible", publicName: "collapsible", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, loopFocus: { classPropertyName: "loopFocus", publicName: "loopFocus", isSignal: true, isRequired: false, transformFunction: null }, keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { properties: { "attr.data-orientation": "orientation()", "attr.data-disabled": "disabled() ? \"\" : undefined" } }, providers: [provideAccordionRootContext(rootContext)], exportAs: ["rdxAccordionRoot"], hostDirectives: [{ directive: i1.RdxCompositeList }], ngImport: i0 }); }
141
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxAccordionRootDirective, isStandalone: true, selector: "[rdxAccordionRoot]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, multiple: { classPropertyName: "multiple", publicName: "multiple", isSignal: true, isRequired: false, transformFunction: null }, loopFocus: { classPropertyName: "loopFocus", publicName: "loopFocus", isSignal: true, isRequired: false, transformFunction: null }, keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null }, hiddenUntilFound: { classPropertyName: "hiddenUntilFound", publicName: "hiddenUntilFound", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { properties: { "attr.data-orientation": "orientation()", "attr.data-disabled": "disabled() ? \"\" : undefined" } }, providers: [provideAccordionRootContext(rootContext)], exportAs: ["rdxAccordionRoot"], hostDirectives: [{ directive: i1.RdxCompositeList }], ngImport: i0 }); }
143
142
  }
144
143
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionRootDirective, decorators: [{
145
144
  type: Directive,
@@ -153,14 +152,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
153
152
  '[attr.data-disabled]': 'disabled() ? "" : undefined'
154
153
  }
155
154
  }]
156
- }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], loopFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "loopFocus", required: false }] }], keepMounted: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepMounted", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
155
+ }], ctorParameters: () => [], propDecorators: { disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], loopFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "loopFocus", required: false }] }], keepMounted: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepMounted", required: false }] }], hiddenUntilFound: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenUntilFound", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
157
156
 
158
157
  const [injectAccordionItemContext, provideAccordionItemContext] = createContext('AccordionItemContext', 'components/accordion');
159
158
  const itemContext = () => {
160
159
  const instance = inject(RdxAccordionItemDirective);
161
160
  return {
162
161
  open: instance.open,
163
- dataState: instance.dataState,
164
162
  disabled: instance.disabled,
165
163
  dataDisabled: instance.isDisabled,
166
164
  triggerId: instance.triggerId,
@@ -191,7 +189,8 @@ class RdxAccordionItemDirective {
191
189
  */
192
190
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
193
191
  /**
194
- * Event handler called when the panel open state changes.
192
+ * Event handler called when the panel open state changes. Emits `{ open, eventDetails }`
193
+ * (Base UI parity).
195
194
  * @group Emits
196
195
  */
197
196
  this.onOpenChange = output();
@@ -204,22 +203,22 @@ class RdxAccordionItemDirective {
204
203
  ? this.value() === rootValue
205
204
  : Array.isArray(rootValue) && rootValue.includes(this.value());
206
205
  }, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
207
- this.dataState = computed(() => (this.open() ? 'open' : 'closed'), ...(ngDevMode ? [{ debugName: "dataState" }] : /* istanbul ignore next */ []));
208
206
  /** Set by the trigger; links the content's `aria-labelledby` to the trigger `id`. */
209
207
  this.triggerId = signal('', ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
210
208
  this.index = this.listItem.index;
211
209
  this.updateOpen = () => {
212
210
  this.collapsibleContext.open.set(this.open());
213
211
  };
214
- // Collapsed accordion panels stay findable by the browser's in-page search; opening one
215
- // via find-in-page expands the item. (The standalone Collapsible defaults to plain `hidden`.)
216
- this.collapsibleContext.hiddenUntilFound.set(true);
217
212
  effect(() => {
218
213
  this.updateOpen();
219
214
  });
215
+ // Forward the accordion-level mount controls onto the composed collapsible panel.
220
216
  effect(() => {
221
217
  this.collapsibleContext.keepMounted.set(this.rootContext.keepMounted());
222
218
  });
219
+ effect(() => {
220
+ this.collapsibleContext.hiddenUntilFound.set(this.rootContext.hiddenUntilFound());
221
+ });
223
222
  let initialized = false;
224
223
  effect(() => {
225
224
  const isOpen = this.open();
@@ -227,11 +226,12 @@ class RdxAccordionItemDirective {
227
226
  initialized = true;
228
227
  return;
229
228
  }
230
- this.onOpenChange.emit(isOpen);
229
+ const { eventDetails } = createCancelableChangeEventDetails('none', new Event('change'));
230
+ this.onOpenChange.emit({ open: isOpen, eventDetails });
231
231
  });
232
232
  }
233
233
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
234
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxAccordionItemDirective, isStandalone: true, selector: "[rdxAccordionItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onOpenChange: "onOpenChange" }, host: { properties: { "attr.data-orientation": "rootContext.orientation()", "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-state": "dataState()", "attr.data-index": "index()" } }, providers: [provideAccordionItemContext(itemContext)], exportAs: ["rdxAccordionItem"], hostDirectives: [{ directive: i1$1.RdxCollapsibleRootDirective, inputs: ["disabled", "disabled", "open", "open"] }, { directive: i1.RdxCompositeListItem }], ngImport: i0 }); }
234
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxAccordionItemDirective, isStandalone: true, selector: "[rdxAccordionItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onOpenChange: "onOpenChange" }, host: { properties: { "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-open": "open() ? \"\" : undefined", "attr.data-index": "index()" } }, providers: [provideAccordionItemContext(itemContext)], exportAs: ["rdxAccordionItem"], hostDirectives: [{ directive: i1$1.RdxCollapsibleRootDirective, inputs: ["disabled", "disabled", "open", "open"] }, { directive: i1.RdxCompositeListItem }], ngImport: i0 }); }
235
235
  }
236
236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionItemDirective, decorators: [{
237
237
  type: Directive,
@@ -247,59 +247,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
247
247
  RdxCompositeListItem
248
248
  ],
249
249
  host: {
250
- '[attr.data-orientation]': 'rootContext.orientation()',
251
250
  '[attr.data-disabled]': 'isDisabled() ? "" : undefined',
252
- '[attr.data-state]': 'dataState()',
251
+ '[attr.data-open]': 'open() ? "" : undefined',
253
252
  '[attr.data-index]': 'index()'
254
253
  }
255
254
  }]
256
255
  }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], onOpenChange: [{ type: i0.Output, args: ["onOpenChange"] }] } });
257
256
 
258
- class RdxAccordionContentDirective {
257
+ class RdxAccordionHeaderDirective {
259
258
  constructor() {
260
- this.rootContext = injectAccordionRootContext();
261
259
  this.itemContext = injectAccordionItemContext();
262
260
  }
263
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
264
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionContentDirective, isStandalone: true, selector: "[rdxAccordionContent]", host: { attributes: { "role": "region" }, properties: { "attr.aria-labelledby": "itemContext.triggerId()", "attr.data-state": "itemContext.dataState()", "attr.data-disabled": "itemContext.dataDisabled() ? \"\" : undefined", "attr.data-orientation": "rootContext.orientation()", "attr.data-index": "itemContext.index()", "style": "{\n '--radix-accordion-content-height': 'var(--collapsible-panel-height)',\n '--radix-accordion-content-width': 'var(--collapsible-panel-width)',\n }" } }, hostDirectives: [{ directive: i1$1.RdxCollapsiblePanelDirective }], ngImport: i0 }); }
261
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
262
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionHeaderDirective, isStandalone: true, selector: "[rdxAccordionHeader]", host: { properties: { "attr.data-open": "itemContext.open() ? \"\" : undefined", "attr.data-disabled": "itemContext.dataDisabled() ? \"\" : undefined", "attr.data-index": "itemContext.index()" } }, ngImport: i0 }); }
265
263
  }
266
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentDirective, decorators: [{
264
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionHeaderDirective, decorators: [{
267
265
  type: Directive,
268
266
  args: [{
269
- selector: '[rdxAccordionContent]',
270
- hostDirectives: [RdxCollapsiblePanelDirective],
267
+ selector: '[rdxAccordionHeader]',
271
268
  host: {
272
- role: 'region',
273
- '[attr.aria-labelledby]': 'itemContext.triggerId()',
274
- '[attr.data-state]': 'itemContext.dataState()',
269
+ '[attr.data-open]': 'itemContext.open() ? "" : undefined',
275
270
  '[attr.data-disabled]': 'itemContext.dataDisabled() ? "" : undefined',
276
- '[attr.data-orientation]': 'rootContext.orientation()',
277
- '[attr.data-index]': 'itemContext.index()',
278
- '[style]': `{
279
- '--radix-accordion-content-height': 'var(--collapsible-panel-height)',
280
- '--radix-accordion-content-width': 'var(--collapsible-panel-width)',
281
- }`
271
+ '[attr.data-index]': 'itemContext.index()'
282
272
  }
283
273
  }]
284
274
  }] });
285
275
 
286
- class RdxAccordionHeaderDirective {
276
+ class RdxAccordionPanelDirective {
287
277
  constructor() {
288
278
  this.rootContext = injectAccordionRootContext();
289
279
  this.itemContext = injectAccordionItemContext();
290
280
  }
291
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
292
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionHeaderDirective, isStandalone: true, selector: "[rdxAccordionHeader]", host: { properties: { "attr.data-state": "itemContext.dataState()", "attr.data-disabled": "itemContext.dataDisabled() ? \"\" : undefined", "attr.data-orientation": "rootContext.orientation()", "attr.data-index": "itemContext.index()" } }, ngImport: i0 }); }
281
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionPanelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
282
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionPanelDirective, isStandalone: true, selector: "[rdxAccordionPanel]", host: { attributes: { "role": "region" }, properties: { "attr.aria-labelledby": "itemContext.triggerId()", "attr.data-disabled": "itemContext.dataDisabled() ? \"\" : undefined", "attr.data-orientation": "rootContext.orientation()", "attr.data-index": "itemContext.index()", "attr.data-closed": "undefined", "style": "{\n '--accordion-panel-height': 'var(--collapsible-panel-height)',\n '--accordion-panel-width': 'var(--collapsible-panel-width)',\n }" } }, hostDirectives: [{ directive: i1$1.RdxCollapsiblePanelDirective }], ngImport: i0 }); }
293
283
  }
294
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionHeaderDirective, decorators: [{
284
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionPanelDirective, decorators: [{
295
285
  type: Directive,
296
286
  args: [{
297
- selector: '[rdxAccordionHeader]',
287
+ selector: '[rdxAccordionPanel]',
288
+ hostDirectives: [RdxCollapsiblePanelDirective],
298
289
  host: {
299
- '[attr.data-state]': 'itemContext.dataState()',
290
+ role: 'region',
291
+ '[attr.aria-labelledby]': 'itemContext.triggerId()',
300
292
  '[attr.data-disabled]': 'itemContext.dataDisabled() ? "" : undefined',
301
293
  '[attr.data-orientation]': 'rootContext.orientation()',
302
- '[attr.data-index]': 'itemContext.index()'
294
+ '[attr.data-index]': 'itemContext.index()',
295
+ // Base UI's accordion panel exposes `data-open` (no `data-closed`) — suppress the
296
+ // `data-closed` the composed RdxCollapsiblePanelDirective would otherwise add.
297
+ '[attr.data-closed]': 'undefined',
298
+ // `data-open` / `data-starting-style` / `data-ending-style` and the `--collapsible-panel-*`
299
+ // size vars come from the composed RdxCollapsiblePanelDirective.
300
+ // Re-expose the size vars under Base UI's accordion-scoped names.
301
+ '[style]': `{
302
+ '--accordion-panel-height': 'var(--collapsible-panel-height)',
303
+ '--accordion-panel-width': 'var(--collapsible-panel-width)',
304
+ }`
303
305
  }
304
306
  }]
305
307
  }] });
@@ -310,17 +312,15 @@ class RdxAccordionTriggerDirective {
310
312
  this.itemContext = injectAccordionItemContext();
311
313
  this.itemContext.triggerId.set(injectId('rdx-accordion-trigger-'));
312
314
  }
313
- changeItem() {
314
- // In single mode an open item stays open (unless `collapsible`), so a click on it is a no-op.
315
- const lockedOpen = this.rootContext.isSingle() && this.itemContext.open() && !this.rootContext.collapsible();
315
+ changeItem(event) {
316
316
  // `dataDisabled` is the effective disabled state (accordion-root OR item level).
317
- if (this.itemContext.dataDisabled() || lockedOpen) {
317
+ if (this.itemContext.dataDisabled()) {
318
318
  return;
319
319
  }
320
- this.rootContext.changeModelValue(this.itemContext.value());
320
+ this.rootContext.changeModelValue(this.itemContext.value(), event);
321
321
  }
322
322
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
323
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionTriggerDirective, isStandalone: true, selector: "[rdxAccordionTrigger]", host: { listeners: { "click": "changeItem()" }, properties: { "id": "itemContext.triggerId()", "attr.data-rdx-collection-item": "\"\"", "attr.role": "\"button\"", "attr.aria-expanded": "itemContext.open()", "attr.aria-disabled": "itemContext.open() && !rootContext.collapsible() ? \"true\" : undefined", "attr.data-orientation": "rootContext.orientation()", "attr.data-state": "itemContext.dataState()", "attr.disabled": "itemContext.dataDisabled() ? \"\" : undefined", "attr.data-panel-open": "itemContext.open() ? \"\" : undefined", "attr.data-index": "itemContext.index()" } }, ngImport: i0 }); }
323
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionTriggerDirective, isStandalone: true, selector: "[rdxAccordionTrigger]", host: { listeners: { "click": "changeItem($event)" }, properties: { "id": "itemContext.triggerId()", "attr.role": "\"button\"", "attr.aria-expanded": "itemContext.open()", "attr.aria-disabled": "itemContext.dataDisabled() ? \"true\" : undefined", "attr.data-disabled": "itemContext.dataDisabled() ? \"\" : undefined", "attr.data-panel-open": "itemContext.open() ? \"\" : undefined" } }, ngImport: i0 }); }
324
324
  }
325
325
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionTriggerDirective, decorators: [{
326
326
  type: Directive,
@@ -328,36 +328,33 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
328
328
  selector: '[rdxAccordionTrigger]',
329
329
  host: {
330
330
  '[id]': 'itemContext.triggerId()',
331
- '[attr.data-rdx-collection-item]': '""',
332
331
  '[attr.role]': '"button"',
333
332
  '[attr.aria-expanded]': 'itemContext.open()',
334
- '[attr.aria-disabled]': 'itemContext.open() && !rootContext.collapsible() ? "true" : undefined',
335
- '[attr.data-orientation]': 'rootContext.orientation()',
336
- '[attr.data-state]': 'itemContext.dataState()',
337
- '[attr.disabled]': 'itemContext.dataDisabled() ? "" : undefined',
333
+ // Disabled triggers stay focusable (Base UI parity) `aria-disabled`, not native `disabled`.
334
+ '[attr.aria-disabled]': 'itemContext.dataDisabled() ? "true" : undefined',
335
+ '[attr.data-disabled]': 'itemContext.dataDisabled() ? "" : undefined',
338
336
  '[attr.data-panel-open]': 'itemContext.open() ? "" : undefined',
339
- '[attr.data-index]': 'itemContext.index()',
340
- '(click)': 'changeItem()'
337
+ '(click)': 'changeItem($event)'
341
338
  }
342
339
  }]
343
340
  }], ctorParameters: () => [] });
344
341
 
345
342
  const _imports = [
346
- RdxAccordionContentDirective,
347
343
  RdxAccordionHeaderDirective,
348
344
  RdxAccordionItemDirective,
345
+ RdxAccordionPanelDirective,
349
346
  RdxAccordionRootDirective,
350
347
  RdxAccordionTriggerDirective
351
348
  ];
352
349
  class RdxAccordionModule {
353
350
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
354
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionModule, imports: [RdxAccordionContentDirective,
355
- RdxAccordionHeaderDirective,
351
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionModule, imports: [RdxAccordionHeaderDirective,
356
352
  RdxAccordionItemDirective,
353
+ RdxAccordionPanelDirective,
357
354
  RdxAccordionRootDirective,
358
- RdxAccordionTriggerDirective], exports: [RdxAccordionContentDirective,
359
- RdxAccordionHeaderDirective,
355
+ RdxAccordionTriggerDirective], exports: [RdxAccordionHeaderDirective,
360
356
  RdxAccordionItemDirective,
357
+ RdxAccordionPanelDirective,
361
358
  RdxAccordionRootDirective,
362
359
  RdxAccordionTriggerDirective] }); }
363
360
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionModule }); }
@@ -374,5 +371,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
374
371
  * Generated bundle index. Do not edit.
375
372
  */
376
373
 
377
- export { RdxAccordionContentDirective, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionModule, RdxAccordionRootDirective, RdxAccordionTriggerDirective, injectAccordionItemContext, injectAccordionRootContext, provideAccordionItemContext, provideAccordionRootContext };
374
+ export { RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionModule, RdxAccordionPanelDirective, RdxAccordionRootDirective, RdxAccordionTriggerDirective, injectAccordionItemContext, injectAccordionRootContext, provideAccordionItemContext, provideAccordionRootContext };
378
375
  //# sourceMappingURL=radix-ng-primitives-accordion.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-accordion.mjs","sources":["../../../packages/primitives/accordion/src/accordion-root.directive.ts","../../../packages/primitives/accordion/src/accordion-item.directive.ts","../../../packages/primitives/accordion/src/accordion-content.directive.ts","../../../packages/primitives/accordion/src/accordion-header.directive.ts","../../../packages/primitives/accordion/src/accordion-trigger.directive.ts","../../../packages/primitives/accordion/index.ts","../../../packages/primitives/accordion/radix-ng-primitives-accordion.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n inject,\n input,\n InputSignal,\n InputSignalWithTransform,\n model,\n ModelSignal,\n output,\n Signal\n} from '@angular/core';\nimport { RdxCompositeList } from '@radix-ng/primitives/composite';\nimport { AcceptableValue, BooleanInput, createContext, DataOrientation, injectId } from '@radix-ng/primitives/core';\n\nexport type AccordionRootContext = {\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n orientation: InputSignal<DataOrientation>;\n value: ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;\n collapsible: Signal<boolean>;\n isSingle: Signal<boolean>;\n keepMounted: InputSignalWithTransform<boolean, BooleanInput>;\n changeModelValue: (value: string) => void;\n};\n\nexport const [injectAccordionRootContext, provideAccordionRootContext] = createContext<AccordionRootContext>(\n 'AccordionRootContext',\n 'components/accordion'\n);\n\nconst rootContext = (): AccordionRootContext => {\n const instance = inject(RdxAccordionRootDirective);\n\n return {\n disabled: instance.disabled,\n collapsible: instance.collapsible,\n orientation: instance.orientation,\n value: instance.value,\n isSingle: instance.isSingle,\n keepMounted: instance.keepMounted,\n changeModelValue: instance.changeModelValue\n };\n};\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxAccordionRoot]',\n exportAs: 'rdxAccordionRoot',\n providers: [provideAccordionRootContext(rootContext)],\n hostDirectives: [RdxCompositeList],\n host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined'\n }\n})\nexport class RdxAccordionRootDirective {\n readonly id = input<string>(injectId('rdx-accordion-'));\n\n /** Whether the Accordion is disabled.\n * @defaultValue false\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The orientation of the accordion.\n *\n * Deprecated following the APG guidance update to remove roving focus.\n * This prop no longer affects keyboard focus behavior.\n *\n * @defaultValue 'vertical'\n * @group Props\n * @deprecated\n */\n readonly orientation = input<DataOrientation>('vertical');\n\n /**\n * The default active value of the item(s).\n *\n * Use when you do not need to control the state of the item(s).\n * @group Props\n */\n readonly defaultValue = input<string | string[]>();\n\n /**\n * The controlled value of the item to expand.\n *\n * @group Props\n */\n readonly value = model<AcceptableValue | AcceptableValue[]>();\n\n /**\n * When type is \"single\", allows closing content when clicking trigger for an open item.\n * When type is \"multiple\", this prop has no effect.\n *\n * @defaultValue false\n * @group Props\n */\n readonly collapsible = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Determines whether a \"single\" or \"multiple\" items can be selected at a time.\n *\n * @defaultValue 'single'\n * @group Props\n */\n readonly type = input<'multiple' | 'single'>('single');\n\n /**\n * Allow multiple panels to be open simultaneously.\n * Takes precedence over `type` when `true`.\n *\n * @defaultValue false\n * @group Props\n */\n readonly multiple = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Deprecated following the APG guidance update to remove roving focus.\n * This prop no longer affects keyboard focus behavior.\n *\n * @defaultValue true\n * @group Props\n * @deprecated\n */\n readonly loopFocus = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /**\n * Whether to keep the content of collapsed items mounted in the DOM.\n * When `true`, closed panels keep their element in the DOM while hidden.\n *\n * @defaultValue false\n * @group Props\n */\n readonly keepMounted = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the expanded state of an item changes.\n * @group Emits\n */\n readonly onValueChange = output<AcceptableValue | AcceptableValue[] | undefined>();\n\n readonly isSingle = computed(() => !this.multiple() && this.type() !== 'multiple');\n\n constructor() {\n effect(() => {\n if (this.defaultValue() !== undefined) {\n this.value.set(this.defaultValue());\n }\n });\n }\n\n changeModelValue = (newValue: string) => {\n if (this.isSingle()) {\n this.value.set(this.isEqual(newValue, this.value()) ? undefined : newValue);\n } else {\n const currentValue = this.value();\n let modelValueArray: AcceptableValue[] = [];\n\n if (Array.isArray(currentValue)) {\n modelValueArray = [...currentValue];\n } else if (currentValue !== undefined && currentValue !== null) {\n modelValueArray = [currentValue];\n }\n\n if (this.isValueEqualOrExist(modelValueArray, newValue)) {\n const index = modelValueArray.findIndex((item) => this.isEqual(item, newValue));\n if (index !== -1) {\n modelValueArray.splice(index, 1);\n }\n } else {\n modelValueArray.push(newValue);\n }\n\n this.value.set(modelValueArray);\n }\n\n this.onValueChange.emit(this.value());\n };\n\n private isValueEqualOrExist(arr: AcceptableValue[], value: AcceptableValue): boolean {\n return arr.some((item) => this.isEqual(item, value));\n }\n\n private isEqual(a: any, b: any): boolean {\n return JSON.stringify(a) === JSON.stringify(b);\n }\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n Signal,\n WritableSignal\n} from '@angular/core';\nimport { injectCollapsibleRootContext, RdxCollapsibleRootDirective } from '@radix-ng/primitives/collapsible';\nimport { RdxCompositeListItem } from '@radix-ng/primitives/composite';\nimport { BooleanInput, createContext } from '@radix-ng/primitives/core';\nimport { injectAccordionRootContext } from './accordion-root.directive';\n\nexport type RdxAccordionItemState = 'open' | 'closed';\n\nexport type AccordionItemContext = {\n open: Signal<boolean>;\n disabled: Signal<boolean>;\n triggerId: WritableSignal<string>;\n dataState: Signal<RdxAccordionItemState>;\n dataDisabled: Signal<boolean>;\n currentElement: ElementRef<HTMLElement>;\n value: Signal<string | undefined>;\n updateOpen: () => void;\n index: Signal<number>;\n};\n\nexport const [injectAccordionItemContext, provideAccordionItemContext] = createContext<AccordionItemContext>(\n 'AccordionItemContext',\n 'components/accordion'\n);\n\nconst itemContext = (): AccordionItemContext => {\n const instance = inject(RdxAccordionItemDirective);\n\n return {\n open: instance.open,\n dataState: instance.dataState,\n disabled: instance.disabled,\n dataDisabled: instance.isDisabled,\n triggerId: instance.triggerId,\n currentElement: instance.elementRef,\n value: computed(() => instance.value()),\n updateOpen: instance.updateOpen,\n index: instance.index\n };\n};\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxAccordionItem]',\n exportAs: 'rdxAccordionItem',\n providers: [provideAccordionItemContext(itemContext)],\n hostDirectives: [\n {\n directive: RdxCollapsibleRootDirective,\n inputs: ['disabled: disabled', 'open: open']\n },\n RdxCompositeListItem\n ],\n host: {\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-state]': 'dataState()',\n '[attr.data-index]': 'index()'\n }\n})\nexport class RdxAccordionItemDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private readonly collapsibleContext = injectCollapsibleRootContext();\n private readonly listItem = inject(RdxCompositeListItem, { self: true });\n\n protected readonly rootContext = injectAccordionRootContext();\n\n /**\n * A string value for the accordion item. All items within an accordion should use a unique value.\n * @group Props\n */\n readonly value = input<string>();\n\n /**\n * Whether or not an accordion item is disabled from user interaction.\n * When `true`, prevents the user from interacting with the item.\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the panel open state changes.\n * @group Emits\n */\n readonly onOpenChange = output<boolean>();\n\n readonly isDisabled = computed(() => {\n return this.rootContext.disabled() || this.disabled();\n });\n\n readonly open = computed(() => {\n const rootValue = this.rootContext.value();\n\n return this.rootContext.isSingle()\n ? this.value() === rootValue\n : Array.isArray(rootValue) && rootValue.includes(this.value()!);\n });\n\n readonly dataState = computed((): RdxAccordionItemState => (this.open() ? 'open' : 'closed'));\n\n /** Set by the trigger; links the content's `aria-labelledby` to the trigger `id`. */\n readonly triggerId = signal('');\n\n readonly index = this.listItem.index;\n\n constructor() {\n // Collapsed accordion panels stay findable by the browser's in-page search; opening one\n // via find-in-page expands the item. (The standalone Collapsible defaults to plain `hidden`.)\n this.collapsibleContext.hiddenUntilFound.set(true);\n\n effect(() => {\n this.updateOpen();\n });\n\n effect(() => {\n this.collapsibleContext.keepMounted.set(this.rootContext.keepMounted());\n });\n\n let initialized = false;\n effect(() => {\n const isOpen = this.open();\n if (!initialized) {\n initialized = true;\n return;\n }\n this.onOpenChange.emit(isOpen);\n });\n }\n\n updateOpen = () => {\n this.collapsibleContext.open.set(this.open());\n };\n}\n","import { Directive } from '@angular/core';\nimport { RdxCollapsiblePanelDirective } from '@radix-ng/primitives/collapsible';\nimport { injectAccordionItemContext } from './accordion-item.directive';\nimport { injectAccordionRootContext } from './accordion-root.directive';\n\n@Directive({\n selector: '[rdxAccordionContent]',\n hostDirectives: [RdxCollapsiblePanelDirective],\n host: {\n role: 'region',\n '[attr.aria-labelledby]': 'itemContext.triggerId()',\n '[attr.data-state]': 'itemContext.dataState()',\n '[attr.data-disabled]': 'itemContext.dataDisabled() ? \"\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-index]': 'itemContext.index()',\n '[style]': `{\n '--radix-accordion-content-height': 'var(--collapsible-panel-height)',\n '--radix-accordion-content-width': 'var(--collapsible-panel-width)',\n }`\n }\n})\nexport class RdxAccordionContentDirective {\n protected readonly rootContext = injectAccordionRootContext();\n protected readonly itemContext = injectAccordionItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectAccordionItemContext } from './accordion-item.directive';\nimport { injectAccordionRootContext } from './accordion-root.directive';\n\n@Directive({\n selector: '[rdxAccordionHeader]',\n host: {\n '[attr.data-state]': 'itemContext.dataState()',\n '[attr.data-disabled]': 'itemContext.dataDisabled() ? \"\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-index]': 'itemContext.index()'\n }\n})\nexport class RdxAccordionHeaderDirective {\n protected readonly rootContext = injectAccordionRootContext();\n protected readonly itemContext = injectAccordionItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectId } from '@radix-ng/primitives/core';\nimport { injectAccordionItemContext } from './accordion-item.directive';\nimport { injectAccordionRootContext } from './accordion-root.directive';\n\n@Directive({\n selector: '[rdxAccordionTrigger]',\n host: {\n '[id]': 'itemContext.triggerId()',\n '[attr.data-rdx-collection-item]': '\"\"',\n '[attr.role]': '\"button\"',\n '[attr.aria-expanded]': 'itemContext.open()',\n '[attr.aria-disabled]': 'itemContext.open() && !rootContext.collapsible() ? \"true\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-state]': 'itemContext.dataState()',\n '[attr.disabled]': 'itemContext.dataDisabled() ? \"\" : undefined',\n '[attr.data-panel-open]': 'itemContext.open() ? \"\" : undefined',\n '[attr.data-index]': 'itemContext.index()',\n\n '(click)': 'changeItem()'\n }\n})\nexport class RdxAccordionTriggerDirective {\n protected readonly rootContext = injectAccordionRootContext();\n protected readonly itemContext = injectAccordionItemContext();\n\n constructor() {\n this.itemContext.triggerId.set(injectId('rdx-accordion-trigger-'));\n }\n\n changeItem() {\n // In single mode an open item stays open (unless `collapsible`), so a click on it is a no-op.\n const lockedOpen = this.rootContext.isSingle() && this.itemContext.open() && !this.rootContext.collapsible();\n\n // `dataDisabled` is the effective disabled state (accordion-root OR item level).\n if (this.itemContext.dataDisabled() || lockedOpen) {\n return;\n }\n\n this.rootContext.changeModelValue(this.itemContext.value()!);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxAccordionContentDirective } from './src/accordion-content.directive';\nimport { RdxAccordionHeaderDirective } from './src/accordion-header.directive';\nimport { RdxAccordionItemDirective } from './src/accordion-item.directive';\nimport { RdxAccordionRootDirective } from './src/accordion-root.directive';\nimport { RdxAccordionTriggerDirective } from './src/accordion-trigger.directive';\n\nexport * from './src/accordion-content.directive';\nexport * from './src/accordion-header.directive';\nexport * from './src/accordion-item.directive';\nexport * from './src/accordion-root.directive';\nexport * from './src/accordion-trigger.directive';\n\nconst _imports = [\n RdxAccordionContentDirective,\n RdxAccordionHeaderDirective,\n RdxAccordionItemDirective,\n RdxAccordionRootDirective,\n RdxAccordionTriggerDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxAccordionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;AA2BO,MAAM,CAAC,0BAA0B,EAAE,2BAA2B,CAAC,GAAG,aAAa,CAClF,sBAAsB,EACtB,sBAAsB;AAG1B,MAAM,WAAW,GAAG,MAA2B;AAC3C,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,yBAAyB,CAAC;IAElD,OAAO;QACH,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,KAAK,EAAE,QAAQ,CAAC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;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-accordion.mjs","sources":["../../../packages/primitives/accordion/src/accordion-root.directive.ts","../../../packages/primitives/accordion/src/accordion-item.directive.ts","../../../packages/primitives/accordion/src/accordion-header.directive.ts","../../../packages/primitives/accordion/src/accordion-panel.directive.ts","../../../packages/primitives/accordion/src/accordion-trigger.directive.ts","../../../packages/primitives/accordion/index.ts","../../../packages/primitives/accordion/radix-ng-primitives-accordion.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n inject,\n input,\n InputSignal,\n InputSignalWithTransform,\n model,\n ModelSignal,\n output,\n Signal\n} from '@angular/core';\nimport { RdxCompositeList } from '@radix-ng/primitives/composite';\nimport {\n AcceptableValue,\n BooleanInput,\n createCancelableChangeEventDetails,\n createContext,\n DataOrientation,\n RdxCancelableChangeEventDetails\n} from '@radix-ng/primitives/core';\n\n/** The reason an accordion value change was requested. */\nexport type RdxAccordionValueChangeReason = 'trigger-press' | 'none';\nexport type RdxAccordionValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxAccordionValueChangeReason>;\n\n/** Payload of {@link RdxAccordionRootDirective.onValueChange}, mirroring Base UI's `(value, eventDetails)`. */\nexport interface RdxAccordionValueChangeEvent {\n value: AcceptableValue | AcceptableValue[] | undefined;\n eventDetails: RdxAccordionValueChangeEventDetails;\n}\n\nexport type AccordionRootContext = {\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n orientation: InputSignal<DataOrientation>;\n value: ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;\n isSingle: Signal<boolean>;\n keepMounted: InputSignalWithTransform<boolean, BooleanInput>;\n hiddenUntilFound: InputSignalWithTransform<boolean, BooleanInput>;\n changeModelValue: (value: string, event?: Event) => void;\n};\n\nexport const [injectAccordionRootContext, provideAccordionRootContext] = createContext<AccordionRootContext>(\n 'AccordionRootContext',\n 'components/accordion'\n);\n\nconst rootContext = (): AccordionRootContext => {\n const instance = inject(RdxAccordionRootDirective);\n\n return {\n disabled: instance.disabled,\n orientation: instance.orientation,\n value: instance.value,\n isSingle: instance.isSingle,\n keepMounted: instance.keepMounted,\n hiddenUntilFound: instance.hiddenUntilFound,\n changeModelValue: instance.changeModelValue\n };\n};\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxAccordionRoot]',\n exportAs: 'rdxAccordionRoot',\n providers: [provideAccordionRootContext(rootContext)],\n hostDirectives: [RdxCompositeList],\n host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined'\n }\n})\nexport class RdxAccordionRootDirective {\n /** Whether the Accordion is disabled.\n * @defaultValue false\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * The orientation of the accordion.\n *\n * Deprecated following the APG guidance update to remove roving focus.\n * This prop no longer affects keyboard focus behavior.\n *\n * @defaultValue 'vertical'\n * @group Props\n * @deprecated\n */\n readonly orientation = input<DataOrientation>('vertical');\n\n /**\n * The default active value of the item(s).\n *\n * Use when you do not need to control the state of the item(s).\n * @group Props\n */\n readonly defaultValue = input<string | string[]>();\n\n /**\n * The controlled value of the item to expand.\n *\n * @group Props\n */\n readonly value = model<AcceptableValue | AcceptableValue[]>();\n\n /**\n * Allow multiple panels to be open simultaneously. In single mode an open item can always be\n * closed by clicking its trigger again (Base UI parity — there is no separate `collapsible`).\n *\n * @defaultValue false\n * @group Props\n */\n readonly multiple = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Deprecated following the APG guidance update to remove roving focus.\n * This prop no longer affects keyboard focus behavior.\n *\n * @defaultValue true\n * @group Props\n * @deprecated\n */\n readonly loopFocus = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n /**\n * Whether to keep the content of collapsed items mounted in the DOM.\n * When `true`, closed panels keep their element in the DOM while hidden.\n *\n * @defaultValue false\n * @group Props\n */\n readonly keepMounted = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Allow collapsed panels to remain mounted (but hidden) so the browser's in-page search\n * can find and reveal them. Mirrors Base UI's `hiddenUntilFound`.\n *\n * @defaultValue false\n * @group Props\n */\n readonly hiddenUntilFound = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the expanded value changes. Emits the next value plus a cancelable\n * `eventDetails` (Base UI parity); call `eventDetails.cancel()` to reject the change.\n * @group Emits\n */\n readonly onValueChange = output<RdxAccordionValueChangeEvent>();\n\n readonly isSingle = computed(() => !this.multiple());\n\n constructor() {\n effect(() => {\n if (this.defaultValue() !== undefined) {\n this.value.set(this.defaultValue());\n }\n });\n }\n\n changeModelValue = (newValue: string, event?: Event) => {\n let nextValue: AcceptableValue | AcceptableValue[] | undefined;\n\n if (this.isSingle()) {\n nextValue = this.isEqual(newValue, this.value()) ? undefined : newValue;\n } else {\n const currentValue = this.value();\n let modelValueArray: AcceptableValue[] = [];\n\n if (Array.isArray(currentValue)) {\n modelValueArray = [...currentValue];\n } else if (currentValue !== undefined && currentValue !== null) {\n modelValueArray = [currentValue];\n }\n\n if (this.isValueEqualOrExist(modelValueArray, newValue)) {\n const index = modelValueArray.findIndex((item) => this.isEqual(item, newValue));\n if (index !== -1) {\n modelValueArray.splice(index, 1);\n }\n } else {\n modelValueArray.push(newValue);\n }\n\n nextValue = modelValueArray;\n }\n\n const { eventDetails } = createCancelableChangeEventDetails<RdxAccordionValueChangeReason>(\n event ? 'trigger-press' : 'none',\n event ?? new Event('change')\n );\n\n this.onValueChange.emit({ value: nextValue, eventDetails });\n\n if (eventDetails.isCanceled()) {\n return;\n }\n\n this.value.set(nextValue);\n };\n\n private isValueEqualOrExist(arr: AcceptableValue[], value: AcceptableValue): boolean {\n return arr.some((item) => this.isEqual(item, value));\n }\n\n private isEqual(a: any, b: any): boolean {\n return JSON.stringify(a) === JSON.stringify(b);\n }\n}\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n output,\n signal,\n Signal,\n WritableSignal\n} from '@angular/core';\nimport { injectCollapsibleRootContext, RdxCollapsibleRootDirective } from '@radix-ng/primitives/collapsible';\nimport { RdxCompositeListItem } from '@radix-ng/primitives/composite';\nimport { BooleanInput, createCancelableChangeEventDetails, createContext } from '@radix-ng/primitives/core';\nimport { injectAccordionRootContext, RdxAccordionValueChangeEventDetails } from './accordion-root.directive';\n\n/** Payload of {@link RdxAccordionItemDirective.onOpenChange}, mirroring Base UI's `(open, eventDetails)`. */\nexport interface RdxAccordionItemOpenChangeEvent {\n open: boolean;\n eventDetails: RdxAccordionValueChangeEventDetails;\n}\n\nexport type AccordionItemContext = {\n open: Signal<boolean>;\n disabled: Signal<boolean>;\n triggerId: WritableSignal<string>;\n dataDisabled: Signal<boolean>;\n currentElement: ElementRef<HTMLElement>;\n value: Signal<string | undefined>;\n updateOpen: () => void;\n index: Signal<number>;\n};\n\nexport const [injectAccordionItemContext, provideAccordionItemContext] = createContext<AccordionItemContext>(\n 'AccordionItemContext',\n 'components/accordion'\n);\n\nconst itemContext = (): AccordionItemContext => {\n const instance = inject(RdxAccordionItemDirective);\n\n return {\n open: instance.open,\n disabled: instance.disabled,\n dataDisabled: instance.isDisabled,\n triggerId: instance.triggerId,\n currentElement: instance.elementRef,\n value: computed(() => instance.value()),\n updateOpen: instance.updateOpen,\n index: instance.index\n };\n};\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxAccordionItem]',\n exportAs: 'rdxAccordionItem',\n providers: [provideAccordionItemContext(itemContext)],\n hostDirectives: [\n {\n directive: RdxCollapsibleRootDirective,\n inputs: ['disabled: disabled', 'open: open']\n },\n RdxCompositeListItem\n ],\n host: {\n '[attr.data-disabled]': 'isDisabled() ? \"\" : undefined',\n '[attr.data-open]': 'open() ? \"\" : undefined',\n '[attr.data-index]': 'index()'\n }\n})\nexport class RdxAccordionItemDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private readonly collapsibleContext = injectCollapsibleRootContext();\n private readonly listItem = inject(RdxCompositeListItem, { self: true });\n\n protected readonly rootContext = injectAccordionRootContext();\n\n /**\n * A string value for the accordion item. All items within an accordion should use a unique value.\n * @group Props\n */\n readonly value = input<string>();\n\n /**\n * Whether or not an accordion item is disabled from user interaction.\n * When `true`, prevents the user from interacting with the item.\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the panel open state changes. Emits `{ open, eventDetails }`\n * (Base UI parity).\n * @group Emits\n */\n readonly onOpenChange = output<RdxAccordionItemOpenChangeEvent>();\n\n readonly isDisabled = computed(() => {\n return this.rootContext.disabled() || this.disabled();\n });\n\n readonly open = computed(() => {\n const rootValue = this.rootContext.value();\n\n return this.rootContext.isSingle()\n ? this.value() === rootValue\n : Array.isArray(rootValue) && rootValue.includes(this.value()!);\n });\n\n /** Set by the trigger; links the content's `aria-labelledby` to the trigger `id`. */\n readonly triggerId = signal('');\n\n readonly index = this.listItem.index;\n\n constructor() {\n effect(() => {\n this.updateOpen();\n });\n\n // Forward the accordion-level mount controls onto the composed collapsible panel.\n effect(() => {\n this.collapsibleContext.keepMounted.set(this.rootContext.keepMounted());\n });\n effect(() => {\n this.collapsibleContext.hiddenUntilFound.set(this.rootContext.hiddenUntilFound());\n });\n\n let initialized = false;\n effect(() => {\n const isOpen = this.open();\n if (!initialized) {\n initialized = true;\n return;\n }\n const { eventDetails } = createCancelableChangeEventDetails('none', new Event('change'));\n this.onOpenChange.emit({ open: isOpen, eventDetails });\n });\n }\n\n updateOpen = () => {\n this.collapsibleContext.open.set(this.open());\n };\n}\n","import { Directive } from '@angular/core';\nimport { injectAccordionItemContext } from './accordion-item.directive';\n\n@Directive({\n selector: '[rdxAccordionHeader]',\n host: {\n '[attr.data-open]': 'itemContext.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'itemContext.dataDisabled() ? \"\" : undefined',\n '[attr.data-index]': 'itemContext.index()'\n }\n})\nexport class RdxAccordionHeaderDirective {\n protected readonly itemContext = injectAccordionItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { RdxCollapsiblePanelDirective } from '@radix-ng/primitives/collapsible';\nimport { injectAccordionItemContext } from './accordion-item.directive';\nimport { injectAccordionRootContext } from './accordion-root.directive';\n\n@Directive({\n selector: '[rdxAccordionPanel]',\n hostDirectives: [RdxCollapsiblePanelDirective],\n host: {\n role: 'region',\n '[attr.aria-labelledby]': 'itemContext.triggerId()',\n '[attr.data-disabled]': 'itemContext.dataDisabled() ? \"\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-index]': 'itemContext.index()',\n // Base UI's accordion panel exposes `data-open` (no `data-closed`) — suppress the\n // `data-closed` the composed RdxCollapsiblePanelDirective would otherwise add.\n '[attr.data-closed]': 'undefined',\n // `data-open` / `data-starting-style` / `data-ending-style` and the `--collapsible-panel-*`\n // size vars come from the composed RdxCollapsiblePanelDirective.\n // Re-expose the size vars under Base UI's accordion-scoped names.\n '[style]': `{\n '--accordion-panel-height': 'var(--collapsible-panel-height)',\n '--accordion-panel-width': 'var(--collapsible-panel-width)',\n }`\n }\n})\nexport class RdxAccordionPanelDirective {\n protected readonly rootContext = injectAccordionRootContext();\n protected readonly itemContext = injectAccordionItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectId } from '@radix-ng/primitives/core';\nimport { injectAccordionItemContext } from './accordion-item.directive';\nimport { injectAccordionRootContext } from './accordion-root.directive';\n\n@Directive({\n selector: '[rdxAccordionTrigger]',\n host: {\n '[id]': 'itemContext.triggerId()',\n '[attr.role]': '\"button\"',\n '[attr.aria-expanded]': 'itemContext.open()',\n // Disabled triggers stay focusable (Base UI parity) — `aria-disabled`, not native `disabled`.\n '[attr.aria-disabled]': 'itemContext.dataDisabled() ? \"true\" : undefined',\n '[attr.data-disabled]': 'itemContext.dataDisabled() ? \"\" : undefined',\n '[attr.data-panel-open]': 'itemContext.open() ? \"\" : undefined',\n\n '(click)': 'changeItem($event)'\n }\n})\nexport class RdxAccordionTriggerDirective {\n protected readonly rootContext = injectAccordionRootContext();\n protected readonly itemContext = injectAccordionItemContext();\n\n constructor() {\n this.itemContext.triggerId.set(injectId('rdx-accordion-trigger-'));\n }\n\n changeItem(event: Event) {\n // `dataDisabled` is the effective disabled state (accordion-root OR item level).\n if (this.itemContext.dataDisabled()) {\n return;\n }\n\n this.rootContext.changeModelValue(this.itemContext.value()!, event);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxAccordionHeaderDirective } from './src/accordion-header.directive';\nimport { RdxAccordionItemDirective } from './src/accordion-item.directive';\nimport { RdxAccordionPanelDirective } from './src/accordion-panel.directive';\nimport { RdxAccordionRootDirective } from './src/accordion-root.directive';\nimport { RdxAccordionTriggerDirective } from './src/accordion-trigger.directive';\n\nexport * from './src/accordion-header.directive';\nexport * from './src/accordion-item.directive';\nexport * from './src/accordion-panel.directive';\nexport * from './src/accordion-root.directive';\nexport * from './src/accordion-trigger.directive';\n\nconst _imports = [\n RdxAccordionHeaderDirective,\n RdxAccordionItemDirective,\n RdxAccordionPanelDirective,\n RdxAccordionRootDirective,\n RdxAccordionTriggerDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxAccordionModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1","i2"],"mappings":";;;;;;;;AA4CO,MAAM,CAAC,0BAA0B,EAAE,2BAA2B,CAAC,GAAG,aAAa,CAClF,sBAAsB,EACtB,sBAAsB;AAG1B,MAAM,WAAW,GAAG,MAA2B;AAC3C,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,yBAAyB,CAAC;IAElD,OAAO;QACH,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,WAAW,EAAE,QAAQ,CAAC,WAAW;QACjC,gBAAgB,EAAE,QAAQ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BAA2B;IAC3B,yBAAyB;IACzB,0BAA0B;IAC1B,yBAAyB;IACzB;CACH;MAMY,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAX3B,2BAA2B;YAC3B,yBAAyB;YACzB,0BAA0B;YAC1B,yBAAyB;AACzB,YAAA,4BAA4B,aAJ5B,2BAA2B;YAC3B,yBAAyB;YACzB,0BAA0B;YAC1B,yBAAyB;YACzB,4BAA4B,CAAA,EAAA,CAAA,CAAA;+GAOnB,kBAAkB,EAAA,CAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAJ9B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;ACxBD;;AAEG;;;;"}
@@ -313,12 +313,11 @@ class RdxCheckboxRootDirective {
313
313
  */
314
314
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
315
315
  /**
316
- * Whether the user should be unable to tick or untick the checkbox.
316
+ * Whether the user should be unable to tick or untick the checkbox. Bound in templates as
317
+ * `readOnly` (Base UI spelling); the TS member stays `readonly` to satisfy `RdxFormCheckboxControl`.
317
318
  * @group Props
318
319
  */
319
- this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
320
- /** Alias matching Base UI's `readOnly` prop spelling. */
321
- this.readOnly = input(false, { ...(ngDevMode ? { debugName: "readOnly" } : /* istanbul ignore next */ {}), alias: 'readOnly', transform: booleanAttribute });
320
+ this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), alias: 'readOnly', transform: booleanAttribute });
322
321
  /**
323
322
  * Whether or not the checkbox is required.
324
323
  * @group Props
@@ -379,7 +378,7 @@ class RdxCheckboxRootDirective {
379
378
  }, ...(ngDevMode ? [{ debugName: "indeterminateState" }] : /* istanbul ignore next */ []));
380
379
  /** @ignore The effective disabled state, including the group. */
381
380
  this.disabledState = computed(() => this.controlValueAccessor.disabled() || (this.group?.disabled() ?? false), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
382
- this.readOnlyState = computed(() => this.readonly() || this.readOnly(), ...(ngDevMode ? [{ debugName: "readOnlyState" }] : /* istanbul ignore next */ []));
381
+ this.readOnlyState = computed(() => this.readonly(), ...(ngDevMode ? [{ debugName: "readOnlyState" }] : /* istanbul ignore next */ []));
383
382
  this.state = computed(() => this.indeterminateState() ? 'indeterminate' : this.checkedState() ? 'checked' : 'unchecked', ...(ngDevMode ? [{ debugName: "state" }] : /* istanbul ignore next */ []));
384
383
  // Inside a group, register this child's name and its own disabled state so a `parent`
385
384
  // checkbox can preserve disabled-but-checked children when selecting/deselecting all.
@@ -493,7 +492,7 @@ class RdxCheckboxRootDirective {
493
492
  }
494
493
  }
495
494
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCheckboxRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
496
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", 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 }, 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": "isDisabled() ? \"\" : 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 }); }
495
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", 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": "isDisabled() ? \"\" : 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 }); }
497
496
  }
498
497
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCheckboxRootDirective, decorators: [{
499
498
  type: Directive,
@@ -515,7 +514,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
515
514
  '[attr.data-required]': 'required() ? "" : undefined'
516
515
  }
517
516
  }]
518
- }], 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 }] }], 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"] }] } });
517
+ }], 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"] }] } });
519
518
 
520
519
  /**
521
520
  * Directive: rdxCheckboxButton
@@ -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} 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\nconst rootContext = () => {\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 type CheckboxRootContext = ReturnType<typeof rootContext>;\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]': 'isDisabled() ? \"\" : 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 * @ignore\n * Reflects the effective disabled state (CVA, covering reactive-forms `.disable()`, plus the\n * group's disabled state), used for the `data-disabled` host attribute.\n */\n protected readonly isDisabled = computed(() => this.disabledState());\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.\n * @group Props\n */\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Alias matching Base UI's `readOnly` prop spelling. */\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() || 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 }\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 exports: [...checkboxImports]\n})\nexport class RdxCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit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AS,EAAE,CAAA;;;;;;;AAOT,SAAA;AACL;AACJ,iBAAA;;;ACbM,MAAM,eAAe,GAAG;IAC3B,yBAAyB;IACzB,wBAAwB;IACxB,0BAA0B;IAC1B,6BAA6B;IAC7B;;MAOS,iBAAiB,CAAA;8GAAjB,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAX1B,yBAAyB;YACzB,wBAAwB;YACxB,0BAA0B;YAC1B,6BAA6B;AAC7B,YAAA,yBAAyB,aAJzB,yBAAyB;YACzB,wBAAwB;YACxB,0BAA0B;YAC1B,6BAA6B;YAC7B,yBAAyB,CAAA,EAAA,CAAA,CAAA;+GAOhB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,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 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} 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\nconst rootContext = () => {\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 type CheckboxRootContext = ReturnType<typeof rootContext>;\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]': 'isDisabled() ? \"\" : 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 * @ignore\n * Reflects the effective disabled state (CVA, covering reactive-forms `.disable()`, plus the\n * group's disabled state), used for the `data-disabled` host attribute.\n */\n protected readonly isDisabled = computed(() => this.disabledState());\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 }\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 exports: [...checkboxImports]\n})\nexport class RdxCheckboxModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAsDO,MAAM,CAAC,0BAA0B,EAAE,2BAA2B,CAAC,GAAG,aAAa,CAClF,sBAAsB,EACtB,qBAAqB;AAGzB,MAAM,YAAY,GAAG,MAA8B;AAC/C,IAAA,MAAM,KAAK,GAAG,MAAM,CAAC,yBAAyB,CAAC;IAC/C,OAAO;QACH,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,QAAQ,EAAE,KAAK,CAAC,aAAa;QAC7B,WAAW,EAAE,KAAK,CAAC,WAAW;QAC9B,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,SAAS,EAAE,CAAC,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC;AAC1C,QAAA,WAAW,EAAE,CAAC,IAAI,EAAE,KAAK,KAAK,KAAK,CAAC,WAAW,C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AA,CAAA,CAAA;+GAOhB,iBAAiB,EAAA,CAAA,CAAA;;2FAAjB,iBAAiB,EAAA,UAAA,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;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ng/primitives",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Headless, signals-first UI primitives for Angular.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -1,83 +1,33 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Signal, WritableSignal, ElementRef, InputSignalWithTransform, InputSignal, ModelSignal } from '@angular/core';
2
+ import { InputSignalWithTransform, InputSignal, ModelSignal, Signal, WritableSignal, ElementRef } from '@angular/core';
3
3
  import * as _radix_ng_primitives_accordion from '@radix-ng/primitives/accordion';
4
- import * as i1 from '@radix-ng/primitives/collapsible';
5
4
  import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
6
- import { BooleanInput, DataOrientation, AcceptableValue } from '@radix-ng/primitives/core';
7
- import * as i2 from '@radix-ng/primitives/composite';
8
-
9
- declare class RdxAccordionContentDirective {
10
- protected readonly rootContext: _radix_ng_primitives_accordion.AccordionRootContext;
11
- protected readonly itemContext: _radix_ng_primitives_accordion.AccordionItemContext;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionContentDirective, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionContentDirective, "[rdxAccordionContent]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxCollapsiblePanelDirective; inputs: {}; outputs: {}; }]>;
14
- }
5
+ import { BooleanInput, DataOrientation, AcceptableValue, RdxCancelableChangeEventDetails } from '@radix-ng/primitives/core';
6
+ import * as i1 from '@radix-ng/primitives/composite';
7
+ import * as i1$1 from '@radix-ng/primitives/collapsible';
15
8
 
16
9
  declare class RdxAccordionHeaderDirective {
17
- protected readonly rootContext: _radix_ng_primitives_accordion.AccordionRootContext;
18
10
  protected readonly itemContext: _radix_ng_primitives_accordion.AccordionItemContext;
19
11
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionHeaderDirective, never>;
20
12
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionHeaderDirective, "[rdxAccordionHeader]", never, {}, {}, never, never, true, never>;
21
13
  }
22
14
 
23
- type RdxAccordionItemState = 'open' | 'closed';
24
- type AccordionItemContext = {
25
- open: Signal<boolean>;
26
- disabled: Signal<boolean>;
27
- triggerId: WritableSignal<string>;
28
- dataState: Signal<RdxAccordionItemState>;
29
- dataDisabled: Signal<boolean>;
30
- currentElement: ElementRef<HTMLElement>;
31
- value: Signal<string | undefined>;
32
- updateOpen: () => void;
33
- index: Signal<number>;
34
- };
35
- declare const injectAccordionItemContext: _radix_ng_primitives_core.InjectContext<AccordionItemContext>;
36
- declare const provideAccordionItemContext: (useFactory: () => AccordionItemContext) => i0.Provider;
37
- /**
38
- * @group Components
39
- */
40
- declare class RdxAccordionItemDirective {
41
- readonly elementRef: ElementRef<HTMLElement>;
42
- private readonly collapsibleContext;
43
- private readonly listItem;
44
- protected readonly rootContext: _radix_ng_primitives_accordion.AccordionRootContext;
45
- /**
46
- * A string value for the accordion item. All items within an accordion should use a unique value.
47
- * @group Props
48
- */
49
- readonly value: i0.InputSignal<string | undefined>;
50
- /**
51
- * Whether or not an accordion item is disabled from user interaction.
52
- * When `true`, prevents the user from interacting with the item.
53
- * @group Props
54
- */
55
- readonly disabled: i0.InputSignalWithTransform<boolean, BooleanInput>;
56
- /**
57
- * Event handler called when the panel open state changes.
58
- * @group Emits
59
- */
60
- readonly onOpenChange: i0.OutputEmitterRef<boolean>;
61
- readonly isDisabled: Signal<boolean>;
62
- readonly open: Signal<boolean>;
63
- readonly dataState: Signal<RdxAccordionItemState>;
64
- /** Set by the trigger; links the content's `aria-labelledby` to the trigger `id`. */
65
- readonly triggerId: WritableSignal<string>;
66
- readonly index: Signal<number>;
67
- constructor();
68
- updateOpen: () => void;
69
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionItemDirective, never>;
70
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionItemDirective, "[rdxAccordionItem]", ["rdxAccordionItem"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "onOpenChange": "onOpenChange"; }, never, never, true, [{ directive: typeof i1.RdxCollapsibleRootDirective; inputs: { "disabled": "disabled"; "open": "open"; }; outputs: {}; }, { directive: typeof i2.RdxCompositeListItem; inputs: {}; outputs: {}; }]>;
15
+ /** The reason an accordion value change was requested. */
16
+ type RdxAccordionValueChangeReason = 'trigger-press' | 'none';
17
+ type RdxAccordionValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxAccordionValueChangeReason>;
18
+ /** Payload of {@link RdxAccordionRootDirective.onValueChange}, mirroring Base UI's `(value, eventDetails)`. */
19
+ interface RdxAccordionValueChangeEvent {
20
+ value: AcceptableValue | AcceptableValue[] | undefined;
21
+ eventDetails: RdxAccordionValueChangeEventDetails;
71
22
  }
72
-
73
23
  type AccordionRootContext = {
74
24
  disabled: InputSignalWithTransform<boolean, BooleanInput>;
75
25
  orientation: InputSignal<DataOrientation>;
76
26
  value: ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;
77
- collapsible: Signal<boolean>;
78
27
  isSingle: Signal<boolean>;
79
28
  keepMounted: InputSignalWithTransform<boolean, BooleanInput>;
80
- changeModelValue: (value: string) => void;
29
+ hiddenUntilFound: InputSignalWithTransform<boolean, BooleanInput>;
30
+ changeModelValue: (value: string, event?: Event) => void;
81
31
  };
82
32
  declare const injectAccordionRootContext: _radix_ng_primitives_core.InjectContext<AccordionRootContext>;
83
33
  declare const provideAccordionRootContext: (useFactory: () => AccordionRootContext) => i0.Provider;
@@ -85,7 +35,6 @@ declare const provideAccordionRootContext: (useFactory: () => AccordionRootConte
85
35
  * @group Components
86
36
  */
87
37
  declare class RdxAccordionRootDirective {
88
- readonly id: InputSignal<string>;
89
38
  /** Whether the Accordion is disabled.
90
39
  * @defaultValue false
91
40
  * @group Props
@@ -116,23 +65,8 @@ declare class RdxAccordionRootDirective {
116
65
  */
117
66
  readonly value: ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;
118
67
  /**
119
- * When type is "single", allows closing content when clicking trigger for an open item.
120
- * When type is "multiple", this prop has no effect.
121
- *
122
- * @defaultValue false
123
- * @group Props
124
- */
125
- readonly collapsible: InputSignalWithTransform<boolean, BooleanInput>;
126
- /**
127
- * Determines whether a "single" or "multiple" items can be selected at a time.
128
- *
129
- * @defaultValue 'single'
130
- * @group Props
131
- */
132
- readonly type: InputSignal<"multiple" | "single">;
133
- /**
134
- * Allow multiple panels to be open simultaneously.
135
- * Takes precedence over `type` when `true`.
68
+ * Allow multiple panels to be open simultaneously. In single mode an open item can always be
69
+ * closed by clicking its trigger again (Base UI parity — there is no separate `collapsible`).
136
70
  *
137
71
  * @defaultValue false
138
72
  * @group Props
@@ -156,33 +90,102 @@ declare class RdxAccordionRootDirective {
156
90
  */
157
91
  readonly keepMounted: InputSignalWithTransform<boolean, BooleanInput>;
158
92
  /**
159
- * Event handler called when the expanded state of an item changes.
93
+ * Allow collapsed panels to remain mounted (but hidden) so the browser's in-page search
94
+ * can find and reveal them. Mirrors Base UI's `hiddenUntilFound`.
95
+ *
96
+ * @defaultValue false
97
+ * @group Props
98
+ */
99
+ readonly hiddenUntilFound: InputSignalWithTransform<boolean, BooleanInput>;
100
+ /**
101
+ * Event handler called when the expanded value changes. Emits the next value plus a cancelable
102
+ * `eventDetails` (Base UI parity); call `eventDetails.cancel()` to reject the change.
160
103
  * @group Emits
161
104
  */
162
- readonly onValueChange: i0.OutputEmitterRef<AcceptableValue | AcceptableValue[] | undefined>;
105
+ readonly onValueChange: i0.OutputEmitterRef<RdxAccordionValueChangeEvent>;
163
106
  readonly isSingle: Signal<boolean>;
164
107
  constructor();
165
- changeModelValue: (newValue: string) => void;
108
+ changeModelValue: (newValue: string, event?: Event) => void;
166
109
  private isValueEqualOrExist;
167
110
  private isEqual;
168
111
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionRootDirective, never>;
169
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionRootDirective, "[rdxAccordionRoot]", ["rdxAccordionRoot"], { "id": { "alias": "id"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "collapsible": { "alias": "collapsible"; "required": false; "isSignal": true; }; "type": { "alias": "type"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, [{ directive: typeof i2.RdxCompositeList; inputs: {}; outputs: {}; }]>;
112
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionRootDirective, "[rdxAccordionRoot]", ["rdxAccordionRoot"], { "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "orientation": { "alias": "orientation"; "required": false; "isSignal": true; }; "defaultValue": { "alias": "defaultValue"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "loopFocus": { "alias": "loopFocus"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "hiddenUntilFound": { "alias": "hiddenUntilFound"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "onValueChange": "onValueChange"; }, never, never, true, [{ directive: typeof i1.RdxCompositeList; inputs: {}; outputs: {}; }]>;
113
+ }
114
+
115
+ /** Payload of {@link RdxAccordionItemDirective.onOpenChange}, mirroring Base UI's `(open, eventDetails)`. */
116
+ interface RdxAccordionItemOpenChangeEvent {
117
+ open: boolean;
118
+ eventDetails: RdxAccordionValueChangeEventDetails;
119
+ }
120
+ type AccordionItemContext = {
121
+ open: Signal<boolean>;
122
+ disabled: Signal<boolean>;
123
+ triggerId: WritableSignal<string>;
124
+ dataDisabled: Signal<boolean>;
125
+ currentElement: ElementRef<HTMLElement>;
126
+ value: Signal<string | undefined>;
127
+ updateOpen: () => void;
128
+ index: Signal<number>;
129
+ };
130
+ declare const injectAccordionItemContext: _radix_ng_primitives_core.InjectContext<AccordionItemContext>;
131
+ declare const provideAccordionItemContext: (useFactory: () => AccordionItemContext) => i0.Provider;
132
+ /**
133
+ * @group Components
134
+ */
135
+ declare class RdxAccordionItemDirective {
136
+ readonly elementRef: ElementRef<HTMLElement>;
137
+ private readonly collapsibleContext;
138
+ private readonly listItem;
139
+ protected readonly rootContext: _radix_ng_primitives_accordion.AccordionRootContext;
140
+ /**
141
+ * A string value for the accordion item. All items within an accordion should use a unique value.
142
+ * @group Props
143
+ */
144
+ readonly value: i0.InputSignal<string | undefined>;
145
+ /**
146
+ * Whether or not an accordion item is disabled from user interaction.
147
+ * When `true`, prevents the user from interacting with the item.
148
+ * @group Props
149
+ */
150
+ readonly disabled: i0.InputSignalWithTransform<boolean, BooleanInput>;
151
+ /**
152
+ * Event handler called when the panel open state changes. Emits `{ open, eventDetails }`
153
+ * (Base UI parity).
154
+ * @group Emits
155
+ */
156
+ readonly onOpenChange: i0.OutputEmitterRef<RdxAccordionItemOpenChangeEvent>;
157
+ readonly isDisabled: Signal<boolean>;
158
+ readonly open: Signal<boolean>;
159
+ /** Set by the trigger; links the content's `aria-labelledby` to the trigger `id`. */
160
+ readonly triggerId: WritableSignal<string>;
161
+ readonly index: Signal<number>;
162
+ constructor();
163
+ updateOpen: () => void;
164
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionItemDirective, never>;
165
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionItemDirective, "[rdxAccordionItem]", ["rdxAccordionItem"], { "value": { "alias": "value"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; }, { "onOpenChange": "onOpenChange"; }, never, never, true, [{ directive: typeof i1$1.RdxCollapsibleRootDirective; inputs: { "disabled": "disabled"; "open": "open"; }; outputs: {}; }, { directive: typeof i1.RdxCompositeListItem; inputs: {}; outputs: {}; }]>;
166
+ }
167
+
168
+ declare class RdxAccordionPanelDirective {
169
+ protected readonly rootContext: _radix_ng_primitives_accordion.AccordionRootContext;
170
+ protected readonly itemContext: _radix_ng_primitives_accordion.AccordionItemContext;
171
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionPanelDirective, never>;
172
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionPanelDirective, "[rdxAccordionPanel]", never, {}, {}, never, never, true, [{ directive: typeof i1$1.RdxCollapsiblePanelDirective; inputs: {}; outputs: {}; }]>;
170
173
  }
171
174
 
172
175
  declare class RdxAccordionTriggerDirective {
173
176
  protected readonly rootContext: _radix_ng_primitives_accordion.AccordionRootContext;
174
177
  protected readonly itemContext: _radix_ng_primitives_accordion.AccordionItemContext;
175
178
  constructor();
176
- changeItem(): void;
179
+ changeItem(event: Event): void;
177
180
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionTriggerDirective, never>;
178
181
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionTriggerDirective, "[rdxAccordionTrigger]", never, {}, {}, never, never, true, never>;
179
182
  }
180
183
 
181
184
  declare class RdxAccordionModule {
182
185
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionModule, never>;
183
- static ɵmod: i0.ɵɵNgModuleDeclaration<RdxAccordionModule, never, [typeof RdxAccordionContentDirective, typeof RdxAccordionHeaderDirective, typeof RdxAccordionItemDirective, typeof RdxAccordionRootDirective, typeof RdxAccordionTriggerDirective], [typeof RdxAccordionContentDirective, typeof RdxAccordionHeaderDirective, typeof RdxAccordionItemDirective, typeof RdxAccordionRootDirective, typeof RdxAccordionTriggerDirective]>;
186
+ static ɵmod: i0.ɵɵNgModuleDeclaration<RdxAccordionModule, never, [typeof RdxAccordionHeaderDirective, typeof RdxAccordionItemDirective, typeof RdxAccordionPanelDirective, typeof RdxAccordionRootDirective, typeof RdxAccordionTriggerDirective], [typeof RdxAccordionHeaderDirective, typeof RdxAccordionItemDirective, typeof RdxAccordionPanelDirective, typeof RdxAccordionRootDirective, typeof RdxAccordionTriggerDirective]>;
184
187
  static ɵinj: i0.ɵɵInjectorDeclaration<RdxAccordionModule>;
185
188
  }
186
189
 
187
- export { RdxAccordionContentDirective, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionModule, RdxAccordionRootDirective, RdxAccordionTriggerDirective, injectAccordionItemContext, injectAccordionRootContext, provideAccordionItemContext, provideAccordionRootContext };
188
- export type { AccordionItemContext, AccordionRootContext, RdxAccordionItemState };
190
+ export { RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionModule, RdxAccordionPanelDirective, RdxAccordionRootDirective, RdxAccordionTriggerDirective, injectAccordionItemContext, injectAccordionRootContext, provideAccordionItemContext, provideAccordionRootContext };
191
+ export type { AccordionItemContext, AccordionRootContext, RdxAccordionItemOpenChangeEvent, RdxAccordionValueChangeEvent, RdxAccordionValueChangeEventDetails, RdxAccordionValueChangeReason };
@@ -157,12 +157,11 @@ declare class RdxCheckboxRootDirective implements RdxFormCheckboxControl {
157
157
  */
158
158
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
159
159
  /**
160
- * Whether the user should be unable to tick or untick the checkbox.
160
+ * Whether the user should be unable to tick or untick the checkbox. Bound in templates as
161
+ * `readOnly` (Base UI spelling); the TS member stays `readonly` to satisfy `RdxFormCheckboxControl`.
161
162
  * @group Props
162
163
  */
163
164
  readonly readonly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
164
- /** Alias matching Base UI's `readOnly` prop spelling. */
165
- readonly readOnly: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
166
165
  /**
167
166
  * Whether or not the checkbox is required.
168
167
  * @group Props
@@ -215,7 +214,7 @@ declare class RdxCheckboxRootDirective implements RdxFormCheckboxControl {
215
214
  private setOptionalAttribute;
216
215
  private setBooleanAttribute;
217
216
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCheckboxRootDirective, never>;
218
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxRootDirective, "[rdxCheckboxRoot]", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "defaultChecked": { "alias": "defaultChecked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "submitValue": { "alias": "value"; "required": false; "isSignal": true; }; "uncheckedValue": { "alias": "uncheckedValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "readOnly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "parent": { "alias": "parent"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "indeterminate": "indeterminateChange"; "onCheckedChange": "onCheckedChange"; }, never, never, true, [{ directive: typeof _radix_ng_primitives_core.RdxControlValueAccessor; inputs: { "value": "checked"; "disabled": "disabled"; }; outputs: {}; }]>;
217
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCheckboxRootDirective, "[rdxCheckboxRoot]", never, { "checked": { "alias": "checked"; "required": false; "isSignal": true; }; "defaultChecked": { "alias": "defaultChecked"; "required": false; "isSignal": true; }; "indeterminate": { "alias": "indeterminate"; "required": false; "isSignal": true; }; "submitValue": { "alias": "value"; "required": false; "isSignal": true; }; "uncheckedValue": { "alias": "uncheckedValue"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "readonly": { "alias": "readOnly"; "required": false; "isSignal": true; }; "required": { "alias": "required"; "required": false; "isSignal": true; }; "name": { "alias": "name"; "required": false; "isSignal": true; }; "parent": { "alias": "parent"; "required": false; "isSignal": true; }; "form": { "alias": "form"; "required": false; "isSignal": true; }; }, { "checked": "checkedChange"; "indeterminate": "indeterminateChange"; "onCheckedChange": "onCheckedChange"; }, never, never, true, [{ directive: typeof _radix_ng_primitives_core.RdxControlValueAccessor; inputs: { "value": "checked"; "disabled": "disabled"; }; outputs: {}; }]>;
219
218
  }
220
219
 
221
220
  type RdxCheckboxGroupValueChangeReason = 'none';