@radix-ng/primitives 1.0.2 → 1.0.3

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.
@@ -1,23 +1,11 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, inject, input, booleanAttribute, model, output, computed, effect, ElementRef, signal, NgModule } from '@angular/core';
3
- import * as i1 from '@radix-ng/primitives/collapsible';
4
- import { RdxCollapsiblePanelPresenceDirective, injectCollapsibleRootContext, RdxCollapsibleRootDirective, RdxCollapsiblePanelDirective } from '@radix-ng/primitives/collapsible';
5
- import * as i1$1 from '@radix-ng/primitives/composite';
2
+ import { inject, input, booleanAttribute, model, output, computed, effect, Directive, ElementRef, signal, NgModule } from '@angular/core';
3
+ import * as i1$1 from '@radix-ng/primitives/collapsible';
4
+ import { injectCollapsibleRootContext, RdxCollapsibleRootDirective, RdxCollapsiblePanelDirective } from '@radix-ng/primitives/collapsible';
5
+ import * as i1 from '@radix-ng/primitives/composite';
6
6
  import { RdxCompositeList, RdxCompositeListItem } from '@radix-ng/primitives/composite';
7
7
  import { createContext, injectId } from '@radix-ng/primitives/core';
8
8
 
9
- class RdxAccordionContentPresenceDirective {
10
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentPresenceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
11
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionContentPresenceDirective, isStandalone: true, selector: "ng-template[rdxAccordionContentPresence]", hostDirectives: [{ directive: i1.RdxCollapsiblePanelPresenceDirective }], ngImport: i0 }); }
12
- }
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentPresenceDirective, decorators: [{
14
- type: Directive,
15
- args: [{
16
- selector: 'ng-template[rdxAccordionContentPresence]',
17
- hostDirectives: [RdxCollapsiblePanelPresenceDirective]
18
- }]
19
- }] });
20
-
21
9
  const [injectAccordionRootContext, provideAccordionRootContext] = createContext('AccordionRootContext', 'components/accordion');
22
10
  const rootContext = () => {
23
11
  const instance = inject(RdxAccordionRootDirective);
@@ -100,10 +88,7 @@ class RdxAccordionRootDirective {
100
88
  this.loopFocus = input(true, { ...(ngDevMode ? { debugName: "loopFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
101
89
  /**
102
90
  * Whether to keep the content of collapsed items mounted in the DOM.
103
- * When `true`, closed panels keep their element in the DOM instead of
104
- * receiving a `hidden` attribute. Applies to the always-mounted
105
- * `rdxAccordionContent`; the `rdxAccordionContentPresence` variant always
106
- * unmounts.
91
+ * When `true`, closed panels keep their element in the DOM while hidden.
107
92
  *
108
93
  * @defaultValue false
109
94
  * @group Props
@@ -154,7 +139,7 @@ class RdxAccordionRootDirective {
154
139
  return JSON.stringify(a) === JSON.stringify(b);
155
140
  }
156
141
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
157
- 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$1.RdxCompositeList }], ngImport: i0 }); }
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 }); }
158
143
  }
159
144
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionRootDirective, decorators: [{
160
145
  type: Directive,
@@ -246,7 +231,7 @@ class RdxAccordionItemDirective {
246
231
  });
247
232
  }
248
233
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
249
- 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.RdxCollapsibleRootDirective, inputs: ["disabled", "disabled", "open", "open"] }, { directive: i1$1.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-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 }); }
250
235
  }
251
236
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionItemDirective, decorators: [{
252
237
  type: Directive,
@@ -276,7 +261,7 @@ class RdxAccordionContentDirective {
276
261
  this.itemContext = injectAccordionItemContext();
277
262
  }
278
263
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
279
- 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.RdxCollapsiblePanelDirective }], ngImport: i0 }); }
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 }); }
280
265
  }
281
266
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentDirective, decorators: [{
282
267
  type: Directive,
@@ -362,8 +347,7 @@ const _imports = [
362
347
  RdxAccordionHeaderDirective,
363
348
  RdxAccordionItemDirective,
364
349
  RdxAccordionRootDirective,
365
- RdxAccordionTriggerDirective,
366
- RdxAccordionContentPresenceDirective
350
+ RdxAccordionTriggerDirective
367
351
  ];
368
352
  class RdxAccordionModule {
369
353
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
@@ -371,13 +355,11 @@ class RdxAccordionModule {
371
355
  RdxAccordionHeaderDirective,
372
356
  RdxAccordionItemDirective,
373
357
  RdxAccordionRootDirective,
374
- RdxAccordionTriggerDirective,
375
- RdxAccordionContentPresenceDirective], exports: [RdxAccordionContentDirective,
358
+ RdxAccordionTriggerDirective], exports: [RdxAccordionContentDirective,
376
359
  RdxAccordionHeaderDirective,
377
360
  RdxAccordionItemDirective,
378
361
  RdxAccordionRootDirective,
379
- RdxAccordionTriggerDirective,
380
- RdxAccordionContentPresenceDirective] }); }
362
+ RdxAccordionTriggerDirective] }); }
381
363
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionModule }); }
382
364
  }
383
365
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionModule, decorators: [{
@@ -392,5 +374,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
392
374
  * Generated bundle index. Do not edit.
393
375
  */
394
376
 
395
- export { RdxAccordionContentDirective, RdxAccordionContentPresenceDirective, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionModule, RdxAccordionRootDirective, RdxAccordionTriggerDirective, injectAccordionItemContext, injectAccordionRootContext, provideAccordionItemContext, provideAccordionRootContext };
377
+ export { RdxAccordionContentDirective, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionModule, RdxAccordionRootDirective, RdxAccordionTriggerDirective, injectAccordionItemContext, injectAccordionRootContext, provideAccordionItemContext, provideAccordionRootContext };
396
378
  //# sourceMappingURL=radix-ng-primitives-accordion.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-accordion.mjs","sources":["../../../packages/primitives/accordion/src/accordion-content-presence.directive.ts","../../../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 { Directive } from '@angular/core';\nimport { RdxCollapsiblePanelPresenceDirective } from '@radix-ng/primitives/collapsible';\n\n@Directive({\n selector: 'ng-template[rdxAccordionContentPresence]',\n hostDirectives: [RdxCollapsiblePanelPresenceDirective]\n})\nexport class RdxAccordionContentPresenceDirective {}\n","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 instead of\n * receiving a `hidden` attribute. Applies to the always-mounted\n * `rdxAccordionContent`; the `rdxAccordionContentPresence` variant always\n * unmounts.\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 { RdxAccordionContentPresenceDirective } from './src/accordion-content-presence.directive';\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-presence.directive';\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 RdxAccordionContentPresenceDirective\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":";;;;;;;;MAOa,oCAAoC,CAAA;8GAApC,oCAAoC,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAApC,oCAAoC,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,0CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,oCAAA,EAAA,CAAA,EAAA,QAAA,EAAA,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AA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,YAZ3B,4BAA4B;YAC5B,2BAA2B;YAC3B,yBAAyB;YACzB,yBAAyB;YACzB,4BAA4B;AAC5B,YAAA,oCAAoC,aALpC,4BAA4B;YAC5B,2BAA2B;YAC3B,yBAAyB;YACzB,yBAAyB;YACzB,4BAA4B;YAC5B,oCAAoC,CAAA,EAAA,CAAA,CAAA;+GAO3B,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;;;AC3BD;;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-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,KAAK;QACrB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,WAAW,EAAE,QAAQ,CAAC,WAAW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ute, signal, computed, output, effect, Directive, ElementRef, DestroyRef, afterRenderEffect, NgModule } from '@angular/core';
3
- import * as i1 from '@radix-ng/primitives/presence';
4
- import { provideRdxPresenceContext, RdxPresenceDirective } from '@radix-ng/primitives/presence';
5
- import { createContext, useTransitionStatus, injectId } from '@radix-ng/primitives/core';
2
+ import { inject, untracked, signal, model, input, booleanAttribute, computed, output, effect, Directive, ElementRef, Renderer2, DestroyRef, afterRenderEffect, NgModule } from '@angular/core';
3
+ import { createContext, createCancelableChangeEventDetails, useTransitionStatus, injectId } from '@radix-ng/primitives/core';
6
4
 
7
5
  const [injectCollapsibleRootContext, provideCollapsibleRootContext] = createContext('CollapsibleRootContext', 'components/collapsible');
8
6
  const rootContext = () => {
9
7
  const instance = inject(RdxCollapsibleRootDirective);
10
8
  return {
11
- panelId: instance.panelId,
9
+ panelId: instance.resolvedPanelId,
12
10
  open: instance.open,
13
11
  disabled: instance.disabled,
14
12
  transitionStatus: instance.transitionStatus,
15
13
  mounted: instance.mounted,
16
14
  keepMounted: instance.keepMountedContext,
17
15
  hiddenUntilFound: instance.hiddenUntilFoundContext,
16
+ setOpen: (open, reason, event, trigger) => instance.setOpen(open, reason, event, trigger),
17
+ setPanelIdState: (id) => instance.setPanelIdState(id),
18
18
  registerTransitionElement: (element) => instance.registerTransitionElement(element),
19
- toggle: () => {
19
+ toggle: (event, trigger) => {
20
20
  if (instance.disabled()) {
21
21
  return;
22
22
  }
23
- untracked(() => {
24
- instance.open.set(!instance.open());
25
- });
26
- instance.onOpenChange.emit(instance.open());
23
+ instance.setOpen(!instance.open(), 'trigger-press', event, trigger);
27
24
  }
28
25
  };
29
26
  };
@@ -33,8 +30,27 @@ const rootContext = () => {
33
30
  * @group Components
34
31
  */
35
32
  class RdxCollapsibleRootDirective {
33
+ setPanelIdState(id) {
34
+ this.panelIdState.set(id);
35
+ }
36
+ setOpen(nextOpen, reason, event, trigger) {
37
+ if (nextOpen === this.open()) {
38
+ return true;
39
+ }
40
+ const { eventDetails } = createCancelableChangeEventDetails(reason, event, trigger);
41
+ this.onOpenChange.emit({ open: nextOpen, eventDetails });
42
+ if (eventDetails.isCanceled()) {
43
+ return false;
44
+ }
45
+ untracked(() => {
46
+ this.open.set(nextOpen);
47
+ });
48
+ return true;
49
+ }
36
50
  constructor() {
37
51
  this.transition = useTransitionStatus((open) => this.onOpenChangeComplete.emit(open));
52
+ this.generatedPanelId = injectId('rdx-collapsible-panel-');
53
+ this.panelIdState = signal(undefined, ...(ngDevMode ? [{ debugName: "panelIdState" }] : /* istanbul ignore next */ []));
38
54
  /** Reactive open/close transition phase (`'starting'` | `'ending'` | `undefined`). */
39
55
  this.transitionStatus = this.transition.status;
40
56
  /** Registers the panel element whose transition duration gates the close completion. */
@@ -63,7 +79,9 @@ class RdxCollapsibleRootDirective {
63
79
  */
64
80
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
65
81
  /** Stable id linking the trigger's `aria-controls` to the panel. */
66
- this.panelId = input(injectId('rdx-collapsible-panel-'), ...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
82
+ this.panelId = input(undefined, ...(ngDevMode ? [{ debugName: "panelId" }] : /* istanbul ignore next */ []));
83
+ /** Stable id linking the trigger's `aria-controls` to the panel. */
84
+ this.resolvedPanelId = computed(() => this.panelIdState() ?? this.panelId() ?? this.generatedPanelId, ...(ngDevMode ? [{ debugName: "resolvedPanelId" }] : /* istanbul ignore next */ []));
67
85
  /** Composition fallbacks (see {@link CollapsibleRootContext}). Default `false`. */
68
86
  this.keepMountedContext = signal(false, ...(ngDevMode ? [{ debugName: "keepMountedContext" }] : /* istanbul ignore next */ []));
69
87
  this.hiddenUntilFoundContext = signal(false, ...(ngDevMode ? [{ debugName: "hiddenUntilFoundContext" }] : /* istanbul ignore next */ []));
@@ -120,32 +138,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
120
138
  }]
121
139
  }], ctorParameters: () => [], propDecorators: { open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }, { type: i0.Output, args: ["openChange"] }], defaultOpen: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultOpen", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], panelId: [{ type: i0.Input, args: [{ isSignal: true, alias: "panelId", required: false }] }], onOpenChange: [{ type: i0.Output, args: ["onOpenChange"] }], onOpenChangeComplete: [{ type: i0.Output, args: ["onOpenChangeComplete"] }] } });
122
140
 
123
- /**
124
- * Structural directive that mounts the collapsible panel contents only while open, unmounting them
125
- * once the exit animation finishes. Opt into this when the closed contents should leave the DOM;
126
- * otherwise apply `rdxCollapsiblePanel` directly (optionally with `keepMounted`).
127
- */
128
- class RdxCollapsiblePanelPresenceDirective {
129
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsiblePanelPresenceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
130
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxCollapsiblePanelPresenceDirective, isStandalone: true, selector: "ng-template[rdxCollapsiblePanelPresence]", providers: [
131
- provideRdxPresenceContext(() => ({
132
- present: injectCollapsibleRootContext().open
133
- }))
134
- ], hostDirectives: [{ directive: i1.RdxPresenceDirective }], ngImport: i0 }); }
135
- }
136
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsiblePanelPresenceDirective, decorators: [{
137
- type: Directive,
138
- args: [{
139
- selector: 'ng-template[rdxCollapsiblePanelPresence]',
140
- providers: [
141
- provideRdxPresenceContext(() => ({
142
- present: injectCollapsibleRootContext().open
143
- }))
144
- ],
145
- hostDirectives: [RdxPresenceDirective]
146
- }]
147
- }] });
148
-
149
141
  /**
150
142
  * Coerces a collapsible boolean input that distinguishes "not set" (`undefined`) from `false`,
151
143
  * so the Panel only overrides the shared context value when the consumer passes the input.
@@ -157,11 +149,22 @@ const optionalBoolean = (value) => value === undefined ? undefined : booleanAttr
157
149
  class RdxCollapsiblePanelDirective {
158
150
  constructor() {
159
151
  this.elementRef = inject(ElementRef);
152
+ this.renderer = inject(Renderer2);
153
+ this.destroyRef = inject(DestroyRef);
154
+ this.marker = this.renderer.createComment('rdx-collapsible-panel');
155
+ this.parentNode = null;
156
+ this.isAttached = true;
160
157
  this.rootContext = injectCollapsibleRootContext();
158
+ /**
159
+ * Optional explicit panel id. When set, the trigger's `aria-controls` points to this id.
160
+ *
161
+ * @group Props
162
+ */
163
+ this.id = input(undefined, { ...(ngDevMode ? { debugName: "id" } : /* istanbul ignore next */ {}), alias: 'id' });
161
164
  /**
162
165
  * Whether to keep the element in the DOM while the panel is closed.
163
- * When `true`, the closed panel keeps its element (no `hidden` attribute) so the consumer's
164
- * `data-closed` CSS is responsible for visually collapsing it.
166
+ * When `true`, the closed panel keeps its element and receives the `hidden` attribute once the
167
+ * close transition finishes.
165
168
  *
166
169
  * @group Props
167
170
  * @defaultValue false
@@ -177,14 +180,18 @@ class RdxCollapsiblePanelDirective {
177
180
  this.hiddenUntilFound = input(undefined, { ...(ngDevMode ? { debugName: "hiddenUntilFound" } : /* istanbul ignore next */ {}), transform: optionalBoolean });
178
181
  this.height = signal(null, ...(ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []));
179
182
  this.width = signal(null, ...(ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []));
183
+ /** Mirrors Base UI's `shouldRender`: hidden panels unmount unless kept for search/measurement. */
184
+ this.shouldRender = computed(() => this.rootContext.keepMounted() ||
185
+ this.rootContext.hiddenUntilFound() ||
186
+ this.rootContext.mounted() ||
187
+ this.rootContext.open(), ...(ngDevMode ? [{ debugName: "shouldRender" }] : /* istanbul ignore next */ []));
180
188
  /**
181
- * The `hidden` attribute value. The panel is shown while open or while its exit transition runs;
182
- * a kept-mounted panel stays visible (the consumer collapses it via CSS); otherwise the closed
183
- * panel is hidden — with `until-found` when find-in-page support is requested.
189
+ * The `hidden` attribute value. The panel is shown while open or while its exit transition runs.
190
+ * A kept-mounted panel remains in the DOM but is still hidden while closed.
184
191
  */
185
192
  this.hidden = computed(() => {
186
193
  const visible = this.rootContext.open() || this.rootContext.transitionStatus() === 'ending';
187
- if (visible || this.rootContext.keepMounted()) {
194
+ if (visible) {
188
195
  return undefined;
189
196
  }
190
197
  return this.rootContext.hiddenUntilFound() ? 'until-found' : '';
@@ -195,7 +202,24 @@ class RdxCollapsiblePanelDirective {
195
202
  */
196
203
  this.isFirstMeasure = true;
197
204
  const unregister = this.rootContext.registerTransitionElement(this.elementRef.nativeElement);
198
- inject(DestroyRef).onDestroy(unregister);
205
+ this.destroyRef.onDestroy(unregister);
206
+ this.insertMarker();
207
+ const unlistenBeforeMatch = this.renderer.listen(this.elementRef.nativeElement, 'beforematch', (event) => {
208
+ this.rootContext.setOpen(true, 'none', event);
209
+ });
210
+ this.destroyRef.onDestroy(() => {
211
+ unlistenBeforeMatch();
212
+ this.removeMarker();
213
+ });
214
+ effect(() => {
215
+ this.rootContext.setPanelIdState(this.id());
216
+ });
217
+ this.destroyRef.onDestroy(() => {
218
+ this.rootContext.setPanelIdState(undefined);
219
+ });
220
+ effect(() => {
221
+ this.syncRenderedState();
222
+ });
199
223
  // Forward the Panel inputs into the shared context, but only when the consumer actually
200
224
  // sets them — so Accordion's context writes are never clobbered by the Panel defaults.
201
225
  effect(() => {
@@ -219,6 +243,38 @@ class RdxCollapsiblePanelDirective {
219
243
  this.updateDimensions();
220
244
  });
221
245
  }
246
+ insertMarker() {
247
+ const host = this.elementRef.nativeElement;
248
+ const parent = this.renderer.parentNode(host);
249
+ if (!parent) {
250
+ return;
251
+ }
252
+ this.parentNode = parent;
253
+ this.renderer.insertBefore(parent, this.marker, host);
254
+ }
255
+ removeMarker() {
256
+ const parent = this.renderer.parentNode(this.marker);
257
+ if (parent) {
258
+ this.renderer.removeChild(parent, this.marker);
259
+ }
260
+ }
261
+ syncRenderedState() {
262
+ const parent = this.parentNode;
263
+ if (!parent) {
264
+ return;
265
+ }
266
+ const host = this.elementRef.nativeElement;
267
+ const shouldRender = this.shouldRender();
268
+ if (shouldRender && !this.isAttached) {
269
+ this.renderer.insertBefore(parent, host, this.renderer.nextSibling(this.marker));
270
+ this.isAttached = true;
271
+ return;
272
+ }
273
+ if (!shouldRender && this.isAttached) {
274
+ this.renderer.removeChild(parent, host);
275
+ this.isAttached = false;
276
+ }
277
+ }
222
278
  updateDimensions() {
223
279
  const node = this.elementRef.nativeElement;
224
280
  if (!node)
@@ -246,7 +302,7 @@ class RdxCollapsiblePanelDirective {
246
302
  this.isFirstMeasure = false;
247
303
  }
248
304
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsiblePanelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
249
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxCollapsiblePanelDirective, isStandalone: true, selector: "[rdxCollapsiblePanel]", inputs: { keepMounted: { classPropertyName: "keepMounted", publicName: "keepMounted", isSignal: true, isRequired: false, transformFunction: null }, hiddenUntilFound: { classPropertyName: "hiddenUntilFound", publicName: "hiddenUntilFound", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "rootContext.panelId()", "attr.data-open": "rootContext.open() ? \"\" : undefined", "attr.data-closed": "rootContext.open() ? undefined : \"\"", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.hidden": "hidden()", "style.--collapsible-panel-width.px": "width()", "style.--collapsible-panel-height.px": "height()" } }, ngImport: i0 }); }
305
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxCollapsiblePanelDirective, isStandalone: true, selector: "[rdxCollapsiblePanel]", inputs: { id: { classPropertyName: "id", publicName: "id", 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 } }, host: { properties: { "id": "rootContext.panelId()", "attr.data-open": "rootContext.open() ? \"\" : undefined", "attr.data-closed": "rootContext.open() ? undefined : \"\"", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.data-starting-style": "rootContext.transitionStatus() === \"starting\" ? \"\" : undefined", "attr.data-ending-style": "rootContext.transitionStatus() === \"ending\" ? \"\" : undefined", "attr.hidden": "hidden()", "style.--collapsible-panel-width.px": "width()", "style.--collapsible-panel-height.px": "height()" } }, ngImport: i0 }); }
250
306
  }
251
307
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsiblePanelDirective, decorators: [{
252
308
  type: Directive,
@@ -264,48 +320,41 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
264
320
  '[style.--collapsible-panel-height.px]': 'height()'
265
321
  }
266
322
  }]
267
- }], ctorParameters: () => [], propDecorators: { keepMounted: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepMounted", required: false }] }], hiddenUntilFound: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenUntilFound", required: false }] }] } });
323
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], keepMounted: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepMounted", required: false }] }], hiddenUntilFound: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenUntilFound", required: false }] }] } });
268
324
 
269
325
  /**
270
326
  * A button that opens and closes the collapsible panel.
271
327
  */
272
328
  class RdxCollapsibleTriggerDirective {
273
329
  constructor() {
330
+ this.elementRef = inject(ElementRef);
274
331
  this.rootContext = injectCollapsibleRootContext();
275
332
  }
333
+ handleClick(event) {
334
+ this.rootContext.toggle(event, this.elementRef.nativeElement);
335
+ }
276
336
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsibleTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
277
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxCollapsibleTriggerDirective, isStandalone: true, selector: "[rdxCollapsibleTrigger]", host: { listeners: { "click": "rootContext.toggle()" }, properties: { "attr.aria-controls": "rootContext.panelId()", "attr.aria-expanded": "rootContext.open()", "attr.data-panel-open": "rootContext.open() ? \"\" : undefined", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.disabled": "rootContext.disabled() || undefined" } }, ngImport: i0 }); }
337
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxCollapsibleTriggerDirective, isStandalone: true, selector: "[rdxCollapsibleTrigger]", host: { listeners: { "click": "handleClick($event)" }, properties: { "attr.aria-controls": "rootContext.open() ? rootContext.panelId() : undefined", "attr.aria-expanded": "rootContext.open()", "attr.data-panel-open": "rootContext.open() ? \"\" : undefined", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.aria-disabled": "rootContext.disabled() ? \"true\" : undefined" } }, ngImport: i0 }); }
278
338
  }
279
339
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsibleTriggerDirective, decorators: [{
280
340
  type: Directive,
281
341
  args: [{
282
342
  selector: '[rdxCollapsibleTrigger]',
283
343
  host: {
284
- '[attr.aria-controls]': 'rootContext.panelId()',
344
+ '[attr.aria-controls]': 'rootContext.open() ? rootContext.panelId() : undefined',
285
345
  '[attr.aria-expanded]': 'rootContext.open()',
286
346
  '[attr.data-panel-open]': 'rootContext.open() ? "" : undefined',
287
347
  '[attr.data-disabled]': 'rootContext.disabled() ? "" : undefined',
288
- '[attr.disabled]': 'rootContext.disabled() || undefined',
289
- '(click)': 'rootContext.toggle()'
348
+ '[attr.aria-disabled]': 'rootContext.disabled() ? "true" : undefined',
349
+ '(click)': 'handleClick($event)'
290
350
  }
291
351
  }]
292
352
  }] });
293
353
 
294
- const _imports = [
295
- RdxCollapsiblePanelDirective,
296
- RdxCollapsibleRootDirective,
297
- RdxCollapsibleTriggerDirective,
298
- RdxCollapsiblePanelPresenceDirective
299
- ];
354
+ const _imports = [RdxCollapsiblePanelDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective];
300
355
  class RdxCollapsibleModule {
301
356
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsibleModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
302
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsibleModule, imports: [RdxCollapsiblePanelDirective,
303
- RdxCollapsibleRootDirective,
304
- RdxCollapsibleTriggerDirective,
305
- RdxCollapsiblePanelPresenceDirective], exports: [RdxCollapsiblePanelDirective,
306
- RdxCollapsibleRootDirective,
307
- RdxCollapsibleTriggerDirective,
308
- RdxCollapsiblePanelPresenceDirective] }); }
357
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsibleModule, imports: [RdxCollapsiblePanelDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective], exports: [RdxCollapsiblePanelDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective] }); }
309
358
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsibleModule }); }
310
359
  }
311
360
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxCollapsibleModule, decorators: [{
@@ -320,5 +369,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
320
369
  * Generated bundle index. Do not edit.
321
370
  */
322
371
 
323
- export { RdxCollapsibleModule, RdxCollapsiblePanelDirective, RdxCollapsiblePanelPresenceDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective, injectCollapsibleRootContext, provideCollapsibleRootContext };
372
+ export { RdxCollapsibleModule, RdxCollapsiblePanelDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective, injectCollapsibleRootContext, provideCollapsibleRootContext };
324
373
  //# sourceMappingURL=radix-ng-primitives-collapsible.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-collapsible.mjs","sources":["../../../packages/primitives/collapsible/src/collapsible-root.directive.ts","../../../packages/primitives/collapsible/src/collapsible-panel-presence.directive.ts","../../../packages/primitives/collapsible/src/collapsible-panel.directive.ts","../../../packages/primitives/collapsible/src/collapsible-trigger.directive.ts","../../../packages/primitives/collapsible/index.ts","../../../packages/primitives/collapsible/radix-ng-primitives-collapsible.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n inject,\n input,\n model,\n ModelSignal,\n output,\n signal,\n Signal,\n untracked,\n WritableSignal\n} from '@angular/core';\nimport {\n BooleanInput,\n createContext,\n injectId,\n RdxTransitionStatus,\n useTransitionStatus\n} from '@radix-ng/primitives/core';\n\nexport type RdxCollapsibleState = 'open' | 'closed';\n\nexport interface CollapsibleRootContext {\n /** Stable id linking the trigger's `aria-controls` to the panel. */\n panelId: Signal<string>;\n /** Writable so composing primitives (Accordion) can drive the state. */\n open: ModelSignal<boolean>;\n disabled: Signal<boolean>;\n /** Open/close transition phase, for `data-starting-style` / `data-ending-style`. */\n transitionStatus: Signal<RdxTransitionStatus>;\n /** `true` while the panel should stay rendered: open, or running its exit transition. */\n mounted: Signal<boolean>;\n /**\n * Composition fallbacks. The standalone Panel inputs write here, and Accordion writes here\n * directly; the Panel reads these so both wiring paths converge on a single source of truth.\n */\n keepMounted: WritableSignal<boolean>;\n hiddenUntilFound: WritableSignal<boolean>;\n toggle: () => void;\n /** Registers the panel element whose transition duration gates the close completion. */\n registerTransitionElement: (element: HTMLElement) => () => void;\n}\n\nexport const [injectCollapsibleRootContext, provideCollapsibleRootContext] = createContext<CollapsibleRootContext>(\n 'CollapsibleRootContext',\n 'components/collapsible'\n);\n\nconst rootContext = (): CollapsibleRootContext => {\n const instance = inject(RdxCollapsibleRootDirective);\n\n return {\n panelId: instance.panelId,\n open: instance.open,\n disabled: instance.disabled,\n transitionStatus: instance.transitionStatus,\n mounted: instance.mounted,\n keepMounted: instance.keepMountedContext,\n hiddenUntilFound: instance.hiddenUntilFoundContext,\n registerTransitionElement: (element) => instance.registerTransitionElement(element),\n toggle: () => {\n if (instance.disabled()) {\n return;\n }\n\n untracked(() => {\n instance.open.set(!instance.open());\n });\n\n instance.onOpenChange.emit(instance.open());\n }\n };\n};\n\n/**\n * Groups all parts of the collapsible.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxCollapsibleRoot]',\n exportAs: 'rdxCollapsibleRoot',\n providers: [provideCollapsibleRootContext(rootContext)],\n host: {\n '[attr.data-open]': 'open() ? \"\" : undefined',\n '[attr.data-closed]': 'open() ? undefined : \"\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined'\n }\n})\nexport class RdxCollapsibleRootDirective {\n private readonly transition = useTransitionStatus((open) => this.onOpenChangeComplete.emit(open));\n\n /** Reactive open/close transition phase (`'starting'` | `'ending'` | `undefined`). */\n readonly transitionStatus = this.transition.status;\n\n /** Registers the panel element whose transition duration gates the close completion. */\n readonly registerTransitionElement = this.transition.registerElement;\n\n /**\n * The controlled open state of the collapsible.\n * `true` - expanded, `false` - collapsed.\n *\n * @group Props\n * @defaultValue false\n */\n readonly open = model<boolean>(false);\n\n /**\n * The open state of the collapsible when it is initially rendered.\n * Use when you do not need to control its open state.\n *\n * @group Props\n * @defaultValue false\n */\n readonly defaultOpen = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the component should ignore user interaction.\n *\n * @group Props\n * @defaultValue false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Stable id linking the trigger's `aria-controls` to the panel. */\n readonly panelId = input<string>(injectId('rdx-collapsible-panel-'));\n\n /** Composition fallbacks (see {@link CollapsibleRootContext}). Default `false`. */\n readonly keepMountedContext = signal(false);\n readonly hiddenUntilFoundContext = signal(false);\n\n /** `true` while the panel must stay rendered: open, or mid exit transition. */\n readonly mounted = computed(() => this.open() || this.transitionStatus() === 'ending');\n\n /**\n * Event handler called when the open state of the collapsible changes.\n *\n * @group Emits\n */\n readonly onOpenChange = output<boolean>();\n\n /**\n * Event handler called after the open/close transition has finished.\n *\n * @group Emits\n */\n readonly onOpenChangeComplete = output<boolean>();\n\n private hasAppliedDefaultOpen = false;\n private previousOpen = this.open();\n\n constructor() {\n effect(() => {\n const defaultOpen = this.defaultOpen();\n\n if (!this.hasAppliedDefaultOpen && defaultOpen) {\n this.hasAppliedDefaultOpen = true;\n untracked(() => {\n this.open.set(true);\n // Treat an initially-open collapsible as settled so it doesn't play an\n // enter transition on first render.\n this.previousOpen = true;\n });\n }\n });\n\n effect(() => {\n const open = this.open();\n\n if (open !== this.previousOpen) {\n this.previousOpen = open;\n untracked(() => this.transition.start(open));\n }\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { provideRdxPresenceContext, RdxPresenceDirective } from '@radix-ng/primitives/presence';\nimport { injectCollapsibleRootContext } from './collapsible-root.directive';\n\n/**\n * Structural directive that mounts the collapsible panel contents only while open, unmounting them\n * once the exit animation finishes. Opt into this when the closed contents should leave the DOM;\n * otherwise apply `rdxCollapsiblePanel` directly (optionally with `keepMounted`).\n */\n@Directive({\n selector: 'ng-template[rdxCollapsiblePanelPresence]',\n providers: [\n provideRdxPresenceContext(() => ({\n present: injectCollapsibleRootContext().open\n }))\n ],\n hostDirectives: [RdxPresenceDirective]\n})\nexport class RdxCollapsiblePanelPresenceDirective {}\n","import {\n afterRenderEffect,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n signal,\n untracked\n} from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectCollapsibleRootContext } from './collapsible-root.directive';\n\n/**\n * Coerces a collapsible boolean input that distinguishes \"not set\" (`undefined`) from `false`,\n * so the Panel only overrides the shared context value when the consumer passes the input.\n */\nconst optionalBoolean = (value: BooleanInput | undefined): boolean | undefined =>\n value === undefined ? undefined : booleanAttribute(value);\n\n/**\n * A panel with the collapsible contents.\n */\n@Directive({\n selector: '[rdxCollapsiblePanel]',\n host: {\n '[id]': 'rootContext.panelId()',\n '[attr.data-open]': 'rootContext.open() ? \"\" : undefined',\n '[attr.data-closed]': 'rootContext.open() ? undefined : \"\"',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-starting-style]': 'rootContext.transitionStatus() === \"starting\" ? \"\" : undefined',\n '[attr.data-ending-style]': 'rootContext.transitionStatus() === \"ending\" ? \"\" : undefined',\n '[attr.hidden]': 'hidden()',\n '[style.--collapsible-panel-width.px]': 'width()',\n '[style.--collapsible-panel-height.px]': 'height()'\n }\n})\nexport class RdxCollapsiblePanelDirective {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected readonly rootContext = injectCollapsibleRootContext();\n\n /**\n * Whether to keep the element in the DOM while the panel is closed.\n * When `true`, the closed panel keeps its element (no `hidden` attribute) so the consumer's\n * `data-closed` CSS is responsible for visually collapsing it.\n *\n * @group Props\n * @defaultValue false\n */\n readonly keepMounted = input<boolean | undefined, BooleanInput | undefined>(undefined, {\n transform: optionalBoolean\n });\n\n /**\n * Allows the browser's built-in page search to find and expand the panel contents.\n * When `true`, the closed panel uses `hidden=\"until-found\"` instead of plain `hidden`.\n *\n * @group Props\n * @defaultValue false\n */\n readonly hiddenUntilFound = input<boolean | undefined, BooleanInput | undefined>(undefined, {\n transform: optionalBoolean\n });\n\n readonly height = signal<number | null>(null);\n readonly width = signal<number | null>(null);\n\n /**\n * The `hidden` attribute value. The panel is shown while open or while its exit transition runs;\n * a kept-mounted panel stays visible (the consumer collapses it via CSS); otherwise the closed\n * panel is hidden — with `until-found` when find-in-page support is requested.\n */\n readonly hidden = computed<'' | 'until-found' | undefined>(() => {\n const visible = this.rootContext.open() || this.rootContext.transitionStatus() === 'ending';\n\n if (visible || this.rootContext.keepMounted()) {\n return undefined;\n }\n\n return this.rootContext.hiddenUntilFound() ? 'until-found' : '';\n });\n\n /**\n * The first measurement (the initial mount) must not re-enable animations, so an element that\n * mounts already open renders at its final size without playing the open animation.\n */\n private isFirstMeasure = true;\n private originalStyles?: { transitionDuration: string; animationName: string };\n\n constructor() {\n const unregister = this.rootContext.registerTransitionElement(this.elementRef.nativeElement);\n inject(DestroyRef).onDestroy(unregister);\n\n // Forward the Panel inputs into the shared context, but only when the consumer actually\n // sets them — so Accordion's context writes are never clobbered by the Panel defaults.\n effect(() => {\n const keepMounted = this.keepMounted();\n if (keepMounted !== undefined) {\n untracked(() => this.rootContext.keepMounted.set(keepMounted));\n }\n });\n\n effect(() => {\n const hiddenUntilFound = this.hiddenUntilFound();\n if (hiddenUntilFound !== undefined) {\n untracked(() => this.rootContext.hiddenUntilFound.set(hiddenUntilFound));\n }\n });\n\n // `afterRenderEffect` runs after the DOM is committed (but before paint) with the settled\n // `open` state — no `requestAnimationFrame` race — and is a no-op during SSR.\n afterRenderEffect(() => {\n // Re-measure whenever the open state flips; the panel is visible at that point (during\n // an exit it is kept rendered by the `ending` transition phase).\n this.rootContext.open();\n this.updateDimensions();\n });\n }\n\n private updateDimensions(): void {\n const node = this.elementRef.nativeElement;\n if (!node) return;\n\n this.originalStyles ??= {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n };\n\n // Block any animation/transition so we can measure the element at its natural size.\n node.style.transitionDuration = '0s';\n node.style.animationName = 'none';\n\n // Let the element take its natural height while measuring, so a `height` bound to the very\n // variable we are computing (the Base UI collapse pattern) does not feed back into itself.\n const previousHeight = node.style.height;\n node.style.height = 'auto';\n\n const rect = node.getBoundingClientRect();\n this.height.set(rect.height);\n this.width.set(rect.width);\n\n node.style.height = previousHeight;\n\n // Re-enable the original animation, unless this is the very first (mount) measurement.\n if (!this.isFirstMeasure) {\n node.style.transitionDuration = this.originalStyles.transitionDuration;\n node.style.animationName = this.originalStyles.animationName;\n }\n\n this.isFirstMeasure = false;\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectCollapsibleRootContext } from './collapsible-root.directive';\n\n/**\n * A button that opens and closes the collapsible panel.\n */\n@Directive({\n selector: '[rdxCollapsibleTrigger]',\n host: {\n '[attr.aria-controls]': 'rootContext.panelId()',\n '[attr.aria-expanded]': 'rootContext.open()',\n '[attr.data-panel-open]': 'rootContext.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.disabled]': 'rootContext.disabled() || undefined',\n\n '(click)': 'rootContext.toggle()'\n }\n})\nexport class RdxCollapsibleTriggerDirective {\n protected readonly rootContext = injectCollapsibleRootContext();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxCollapsiblePanelPresenceDirective } from './src/collapsible-panel-presence.directive';\nimport { RdxCollapsiblePanelDirective } from './src/collapsible-panel.directive';\nimport { RdxCollapsibleRootDirective } from './src/collapsible-root.directive';\nimport { RdxCollapsibleTriggerDirective } from './src/collapsible-trigger.directive';\n\nexport * from './src/collapsible-panel-presence.directive';\nexport * from './src/collapsible-panel.directive';\nexport * from './src/collapsible-root.directive';\nexport * from './src/collapsible-trigger.directive';\n\nconst _imports = [\n RdxCollapsiblePanelDirective,\n RdxCollapsibleRootDirective,\n RdxCollapsibleTriggerDirective,\n RdxCollapsiblePanelPresenceDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxCollapsibleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AA8CO,MAAM,CAAC,4BAA4B,EAAE,6BAA6B,CAAC,GAAG,aAAa,CACtF,wBAAwB,EACxB,wBAAwB;AAG5B,MAAM,WAAW,GAAG,MAA6B;AAC7C,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,2BAA2B,CAAC;IAEpD,OAAO;QACH,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;QAC3C,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,WAAW,EAAE,QAAQ,CAAC,kBAAkB;QACxC,gBAAgB,EAAE,QAAQ,CAAC,uBAAuB;QAClD,yBAAyB,EAAE,CAAC,OAAO,KAAK,QAAQ,CAAC,yBAAyB,CAAC,OAAO,CAAC;QACnF,MAAM,EAAE,MAAK;AACT,YAAA,IAAI,QAAQ,CAAC,QAAQ,EAAE,EAAE;gBACrB;YACJ;YAEA,SAAS,CAAC,MAAK;gBACX,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;AACvC,YAAA,CAAC,CAAC;YAEF,QAAQ,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC;QAC/C;KACH;AACL,CAAC;AAED;;;;AAIG;MAWU,2BAA2B,CAAA;AA8DpC,IAAA,WAAA,GAAA;AA7DiB,QAAA,IAAA,CAAA,UAAU,GAAG,mBAAmB,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,IAAI,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AA,EAAA,CAAA,CAAA;AAApB,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,oBAAoB,YAV7B,4BAA4B;YAC5B,2BAA2B;YAC3B,8BAA8B;AAC9B,YAAA,oCAAoC,aAHpC,4BAA4B;YAC5B,2BAA2B;YAC3B,8BAA8B;YAC9B,oCAAoC,CAAA,EAAA,CAAA,CAAA;+GAO3B,oBAAoB,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;ACrBD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-collapsible.mjs","sources":["../../../packages/primitives/collapsible/src/collapsible-root.directive.ts","../../../packages/primitives/collapsible/src/collapsible-panel.directive.ts","../../../packages/primitives/collapsible/src/collapsible-trigger.directive.ts","../../../packages/primitives/collapsible/index.ts","../../../packages/primitives/collapsible/radix-ng-primitives-collapsible.ts"],"sourcesContent":["import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n inject,\n input,\n model,\n ModelSignal,\n output,\n signal,\n Signal,\n untracked,\n WritableSignal\n} from '@angular/core';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n createContext,\n injectId,\n RdxCancelableChangeEventDetails,\n RdxTransitionStatus,\n useTransitionStatus\n} from '@radix-ng/primitives/core';\n\nexport type RdxCollapsibleState = 'open' | 'closed';\nexport type RdxCollapsibleOpenChangeReason = 'trigger-press' | 'none';\nexport type RdxCollapsibleOpenChangeEventDetails = RdxCancelableChangeEventDetails<RdxCollapsibleOpenChangeReason>;\nexport interface RdxCollapsibleOpenChangeEvent {\n open: boolean;\n eventDetails: RdxCollapsibleOpenChangeEventDetails;\n}\n\nexport interface CollapsibleRootContext {\n /** Stable id linking the trigger's `aria-controls` to the panel. */\n panelId: Signal<string>;\n /** Writable so composing primitives (Accordion) can drive the state. */\n open: ModelSignal<boolean>;\n disabled: Signal<boolean>;\n /** Open/close transition phase, for `data-starting-style` / `data-ending-style`. */\n transitionStatus: Signal<RdxTransitionStatus>;\n /** `true` while the panel should stay rendered: open, or running its exit transition. */\n mounted: Signal<boolean>;\n /**\n * Composition fallbacks. The standalone Panel inputs write here, and Accordion writes here\n * directly; the Panel reads these so both wiring paths converge on a single source of truth.\n */\n keepMounted: WritableSignal<boolean>;\n hiddenUntilFound: WritableSignal<boolean>;\n toggle: (event: Event, trigger?: HTMLElement) => void;\n setOpen: (open: boolean, reason: RdxCollapsibleOpenChangeReason, event: Event, trigger?: HTMLElement) => boolean;\n setPanelIdState: (id: string | undefined) => void;\n /** Registers the panel element whose transition duration gates the close completion. */\n registerTransitionElement: (element: HTMLElement) => () => void;\n}\n\nexport const [injectCollapsibleRootContext, provideCollapsibleRootContext] = createContext<CollapsibleRootContext>(\n 'CollapsibleRootContext',\n 'components/collapsible'\n);\n\nconst rootContext = (): CollapsibleRootContext => {\n const instance = inject(RdxCollapsibleRootDirective);\n\n return {\n panelId: instance.resolvedPanelId,\n open: instance.open,\n disabled: instance.disabled,\n transitionStatus: instance.transitionStatus,\n mounted: instance.mounted,\n keepMounted: instance.keepMountedContext,\n hiddenUntilFound: instance.hiddenUntilFoundContext,\n setOpen: (open, reason, event, trigger) => instance.setOpen(open, reason, event, trigger),\n setPanelIdState: (id) => instance.setPanelIdState(id),\n registerTransitionElement: (element) => instance.registerTransitionElement(element),\n toggle: (event, trigger) => {\n if (instance.disabled()) {\n return;\n }\n\n instance.setOpen(!instance.open(), 'trigger-press', event, trigger);\n }\n };\n};\n\n/**\n * Groups all parts of the collapsible.\n *\n * @group Components\n */\n@Directive({\n selector: '[rdxCollapsibleRoot]',\n exportAs: 'rdxCollapsibleRoot',\n providers: [provideCollapsibleRootContext(rootContext)],\n host: {\n '[attr.data-open]': 'open() ? \"\" : undefined',\n '[attr.data-closed]': 'open() ? undefined : \"\"',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined'\n }\n})\nexport class RdxCollapsibleRootDirective {\n private readonly transition = useTransitionStatus((open) => this.onOpenChangeComplete.emit(open));\n\n private readonly generatedPanelId = injectId('rdx-collapsible-panel-');\n private readonly panelIdState = signal<string | undefined>(undefined);\n\n /** Reactive open/close transition phase (`'starting'` | `'ending'` | `undefined`). */\n readonly transitionStatus = this.transition.status;\n\n /** Registers the panel element whose transition duration gates the close completion. */\n readonly registerTransitionElement = this.transition.registerElement;\n\n /**\n * The controlled open state of the collapsible.\n * `true` - expanded, `false` - collapsed.\n *\n * @group Props\n * @defaultValue false\n */\n readonly open = model<boolean>(false);\n\n /**\n * The open state of the collapsible when it is initially rendered.\n * Use when you do not need to control its open state.\n *\n * @group Props\n * @defaultValue false\n */\n readonly defaultOpen = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Whether the component should ignore user interaction.\n *\n * @group Props\n * @defaultValue false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** Stable id linking the trigger's `aria-controls` to the panel. */\n readonly panelId = input<string | undefined>(undefined);\n\n /** Stable id linking the trigger's `aria-controls` to the panel. */\n readonly resolvedPanelId = computed(() => this.panelIdState() ?? this.panelId() ?? this.generatedPanelId);\n\n /** Composition fallbacks (see {@link CollapsibleRootContext}). Default `false`. */\n readonly keepMountedContext = signal(false);\n readonly hiddenUntilFoundContext = signal(false);\n\n /** `true` while the panel must stay rendered: open, or mid exit transition. */\n readonly mounted = computed(() => this.open() || this.transitionStatus() === 'ending');\n\n /**\n * Event handler called when the open state of the collapsible changes.\n *\n * @group Emits\n */\n readonly onOpenChange = output<RdxCollapsibleOpenChangeEvent>();\n\n /**\n * Event handler called after the open/close transition has finished.\n *\n * @group Emits\n */\n readonly onOpenChangeComplete = output<boolean>();\n\n private hasAppliedDefaultOpen = false;\n private previousOpen = this.open();\n\n setPanelIdState(id: string | undefined): void {\n this.panelIdState.set(id);\n }\n\n setOpen(nextOpen: boolean, reason: RdxCollapsibleOpenChangeReason, event: Event, trigger?: HTMLElement): boolean {\n if (nextOpen === this.open()) {\n return true;\n }\n\n const { eventDetails } = createCancelableChangeEventDetails(reason, event, trigger);\n\n this.onOpenChange.emit({ open: nextOpen, eventDetails });\n\n if (eventDetails.isCanceled()) {\n return false;\n }\n\n untracked(() => {\n this.open.set(nextOpen);\n });\n\n return true;\n }\n\n constructor() {\n effect(() => {\n const defaultOpen = this.defaultOpen();\n\n if (!this.hasAppliedDefaultOpen && defaultOpen) {\n this.hasAppliedDefaultOpen = true;\n untracked(() => {\n this.open.set(true);\n // Treat an initially-open collapsible as settled so it doesn't play an\n // enter transition on first render.\n this.previousOpen = true;\n });\n }\n });\n\n effect(() => {\n const open = this.open();\n\n if (open !== this.previousOpen) {\n this.previousOpen = open;\n untracked(() => this.transition.start(open));\n }\n });\n }\n}\n","import {\n afterRenderEffect,\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n Renderer2,\n signal,\n untracked\n} from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { injectCollapsibleRootContext } from './collapsible-root.directive';\n\n/**\n * Coerces a collapsible boolean input that distinguishes \"not set\" (`undefined`) from `false`,\n * so the Panel only overrides the shared context value when the consumer passes the input.\n */\nconst optionalBoolean = (value: BooleanInput | undefined): boolean | undefined =>\n value === undefined ? undefined : booleanAttribute(value);\n\n/**\n * A panel with the collapsible contents.\n */\n@Directive({\n selector: '[rdxCollapsiblePanel]',\n host: {\n '[id]': 'rootContext.panelId()',\n '[attr.data-open]': 'rootContext.open() ? \"\" : undefined',\n '[attr.data-closed]': 'rootContext.open() ? undefined : \"\"',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.data-starting-style]': 'rootContext.transitionStatus() === \"starting\" ? \"\" : undefined',\n '[attr.data-ending-style]': 'rootContext.transitionStatus() === \"ending\" ? \"\" : undefined',\n '[attr.hidden]': 'hidden()',\n '[style.--collapsible-panel-width.px]': 'width()',\n '[style.--collapsible-panel-height.px]': 'height()'\n }\n})\nexport class RdxCollapsiblePanelDirective {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly destroyRef = inject(DestroyRef);\n private readonly marker = this.renderer.createComment('rdx-collapsible-panel');\n\n private parentNode: Node | null = null;\n private isAttached = true;\n\n protected readonly rootContext = injectCollapsibleRootContext();\n\n /**\n * Optional explicit panel id. When set, the trigger's `aria-controls` points to this id.\n *\n * @group Props\n */\n readonly id = input<string | undefined>(undefined, { alias: 'id' });\n\n /**\n * Whether to keep the element in the DOM while the panel is closed.\n * When `true`, the closed panel keeps its element and receives the `hidden` attribute once the\n * close transition finishes.\n *\n * @group Props\n * @defaultValue false\n */\n readonly keepMounted = input<boolean | undefined, BooleanInput | undefined>(undefined, {\n transform: optionalBoolean\n });\n\n /**\n * Allows the browser's built-in page search to find and expand the panel contents.\n * When `true`, the closed panel uses `hidden=\"until-found\"` instead of plain `hidden`.\n *\n * @group Props\n * @defaultValue false\n */\n readonly hiddenUntilFound = input<boolean | undefined, BooleanInput | undefined>(undefined, {\n transform: optionalBoolean\n });\n\n readonly height = signal<number | null>(null);\n readonly width = signal<number | null>(null);\n\n /** Mirrors Base UI's `shouldRender`: hidden panels unmount unless kept for search/measurement. */\n readonly shouldRender = computed(\n () =>\n this.rootContext.keepMounted() ||\n this.rootContext.hiddenUntilFound() ||\n this.rootContext.mounted() ||\n this.rootContext.open()\n );\n\n /**\n * The `hidden` attribute value. The panel is shown while open or while its exit transition runs.\n * A kept-mounted panel remains in the DOM but is still hidden while closed.\n */\n readonly hidden = computed<'' | 'until-found' | undefined>(() => {\n const visible = this.rootContext.open() || this.rootContext.transitionStatus() === 'ending';\n\n if (visible) {\n return undefined;\n }\n\n return this.rootContext.hiddenUntilFound() ? 'until-found' : '';\n });\n\n /**\n * The first measurement (the initial mount) must not re-enable animations, so an element that\n * mounts already open renders at its final size without playing the open animation.\n */\n private isFirstMeasure = true;\n private originalStyles?: { transitionDuration: string; animationName: string };\n\n constructor() {\n const unregister = this.rootContext.registerTransitionElement(this.elementRef.nativeElement);\n this.destroyRef.onDestroy(unregister);\n\n this.insertMarker();\n\n const unlistenBeforeMatch = this.renderer.listen(\n this.elementRef.nativeElement,\n 'beforematch',\n (event: Event) => {\n this.rootContext.setOpen(true, 'none', event);\n }\n );\n\n this.destroyRef.onDestroy(() => {\n unlistenBeforeMatch();\n this.removeMarker();\n });\n\n effect(() => {\n this.rootContext.setPanelIdState(this.id());\n });\n\n this.destroyRef.onDestroy(() => {\n this.rootContext.setPanelIdState(undefined);\n });\n\n effect(() => {\n this.syncRenderedState();\n });\n\n // Forward the Panel inputs into the shared context, but only when the consumer actually\n // sets them — so Accordion's context writes are never clobbered by the Panel defaults.\n effect(() => {\n const keepMounted = this.keepMounted();\n if (keepMounted !== undefined) {\n untracked(() => this.rootContext.keepMounted.set(keepMounted));\n }\n });\n\n effect(() => {\n const hiddenUntilFound = this.hiddenUntilFound();\n if (hiddenUntilFound !== undefined) {\n untracked(() => this.rootContext.hiddenUntilFound.set(hiddenUntilFound));\n }\n });\n\n // `afterRenderEffect` runs after the DOM is committed (but before paint) with the settled\n // `open` state — no `requestAnimationFrame` race — and is a no-op during SSR.\n afterRenderEffect(() => {\n // Re-measure whenever the open state flips; the panel is visible at that point (during\n // an exit it is kept rendered by the `ending` transition phase).\n this.rootContext.open();\n this.updateDimensions();\n });\n }\n\n private insertMarker(): void {\n const host = this.elementRef.nativeElement;\n const parent = this.renderer.parentNode(host) as Node | null;\n\n if (!parent) {\n return;\n }\n\n this.parentNode = parent;\n this.renderer.insertBefore(parent, this.marker, host);\n }\n\n private removeMarker(): void {\n const parent = this.renderer.parentNode(this.marker) as Node | null;\n\n if (parent) {\n this.renderer.removeChild(parent, this.marker);\n }\n }\n\n private syncRenderedState(): void {\n const parent = this.parentNode;\n\n if (!parent) {\n return;\n }\n\n const host = this.elementRef.nativeElement;\n const shouldRender = this.shouldRender();\n\n if (shouldRender && !this.isAttached) {\n this.renderer.insertBefore(parent, host, this.renderer.nextSibling(this.marker));\n this.isAttached = true;\n return;\n }\n\n if (!shouldRender && this.isAttached) {\n this.renderer.removeChild(parent, host);\n this.isAttached = false;\n }\n }\n\n private updateDimensions(): void {\n const node = this.elementRef.nativeElement;\n if (!node) return;\n\n this.originalStyles ??= {\n transitionDuration: node.style.transitionDuration,\n animationName: node.style.animationName\n };\n\n // Block any animation/transition so we can measure the element at its natural size.\n node.style.transitionDuration = '0s';\n node.style.animationName = 'none';\n\n // Let the element take its natural height while measuring, so a `height` bound to the very\n // variable we are computing (the Base UI collapse pattern) does not feed back into itself.\n const previousHeight = node.style.height;\n node.style.height = 'auto';\n\n const rect = node.getBoundingClientRect();\n this.height.set(rect.height);\n this.width.set(rect.width);\n\n node.style.height = previousHeight;\n\n // Re-enable the original animation, unless this is the very first (mount) measurement.\n if (!this.isFirstMeasure) {\n node.style.transitionDuration = this.originalStyles.transitionDuration;\n node.style.animationName = this.originalStyles.animationName;\n }\n\n this.isFirstMeasure = false;\n }\n}\n","import { Directive, ElementRef, inject } from '@angular/core';\nimport { injectCollapsibleRootContext } from './collapsible-root.directive';\n\n/**\n * A button that opens and closes the collapsible panel.\n */\n@Directive({\n selector: '[rdxCollapsibleTrigger]',\n host: {\n '[attr.aria-controls]': 'rootContext.open() ? rootContext.panelId() : undefined',\n '[attr.aria-expanded]': 'rootContext.open()',\n '[attr.data-panel-open]': 'rootContext.open() ? \"\" : undefined',\n '[attr.data-disabled]': 'rootContext.disabled() ? \"\" : undefined',\n '[attr.aria-disabled]': 'rootContext.disabled() ? \"true\" : undefined',\n\n '(click)': 'handleClick($event)'\n }\n})\nexport class RdxCollapsibleTriggerDirective {\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n protected readonly rootContext = injectCollapsibleRootContext();\n\n protected handleClick(event: MouseEvent): void {\n this.rootContext.toggle(event, this.elementRef.nativeElement);\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxCollapsiblePanelDirective } from './src/collapsible-panel.directive';\nimport { RdxCollapsibleRootDirective } from './src/collapsible-root.directive';\nimport { RdxCollapsibleTriggerDirective } from './src/collapsible-trigger.directive';\n\nexport * from './src/collapsible-panel.directive';\nexport * from './src/collapsible-root.directive';\nexport * from './src/collapsible-trigger.directive';\n\nconst _imports = [RdxCollapsiblePanelDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxCollapsibleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAwDO,MAAM,CAAC,4BAA4B,EAAE,6BAA6B,CAAC,GAAG,aAAa,CACtF,wBAAwB,EACxB,wBAAwB;AAG5B,MAAM,WAAW,GAAG,MAA6B;AAC7C,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,2BAA2B,CAAC;IAEpD,OAAO;QACH,OAAO,EAAE,QAAQ,CAAC,eAAe;QACjC,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,gBAAgB,EAAE,QAAQ,CAAC,gBAAgB;QAC3C,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,WAAW,EAAE,QAAQ,CAAC,kBAAkB;QACxC,gBAAgB,EAAE,QAAQ,CAAC,uBAAuB;QAClD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC;QACzF,eAAe,EAAE,CAAC,EAAE,KAAK,QAA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,oBAAoB,EAAA,CAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;ACdD;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@radix-ng/primitives",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Headless, signals-first UI primitives for Angular.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -149,10 +149,7 @@ declare class RdxAccordionRootDirective {
149
149
  readonly loopFocus: InputSignalWithTransform<boolean, BooleanInput>;
150
150
  /**
151
151
  * Whether to keep the content of collapsed items mounted in the DOM.
152
- * When `true`, closed panels keep their element in the DOM instead of
153
- * receiving a `hidden` attribute. Applies to the always-mounted
154
- * `rdxAccordionContent`; the `rdxAccordionContentPresence` variant always
155
- * unmounts.
152
+ * When `true`, closed panels keep their element in the DOM while hidden.
156
153
  *
157
154
  * @defaultValue false
158
155
  * @group Props
@@ -181,16 +178,11 @@ declare class RdxAccordionTriggerDirective {
181
178
  static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionTriggerDirective, "[rdxAccordionTrigger]", never, {}, {}, never, never, true, never>;
182
179
  }
183
180
 
184
- declare class RdxAccordionContentPresenceDirective {
185
- static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionContentPresenceDirective, never>;
186
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAccordionContentPresenceDirective, "ng-template[rdxAccordionContentPresence]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxCollapsiblePanelPresenceDirective; inputs: {}; outputs: {}; }]>;
187
- }
188
-
189
181
  declare class RdxAccordionModule {
190
182
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxAccordionModule, never>;
191
- static ɵmod: i0.ɵɵNgModuleDeclaration<RdxAccordionModule, never, [typeof RdxAccordionContentDirective, typeof RdxAccordionHeaderDirective, typeof RdxAccordionItemDirective, typeof RdxAccordionRootDirective, typeof RdxAccordionTriggerDirective, typeof RdxAccordionContentPresenceDirective], [typeof RdxAccordionContentDirective, typeof RdxAccordionHeaderDirective, typeof RdxAccordionItemDirective, typeof RdxAccordionRootDirective, typeof RdxAccordionTriggerDirective, typeof RdxAccordionContentPresenceDirective]>;
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]>;
192
184
  static ɵinj: i0.ɵɵInjectorDeclaration<RdxAccordionModule>;
193
185
  }
194
186
 
195
- export { RdxAccordionContentDirective, RdxAccordionContentPresenceDirective, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionModule, RdxAccordionRootDirective, RdxAccordionTriggerDirective, injectAccordionItemContext, injectAccordionRootContext, provideAccordionItemContext, provideAccordionRootContext };
187
+ export { RdxAccordionContentDirective, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionModule, RdxAccordionRootDirective, RdxAccordionTriggerDirective, injectAccordionItemContext, injectAccordionRootContext, provideAccordionItemContext, provideAccordionRootContext };
196
188
  export type { AccordionItemContext, AccordionRootContext, RdxAccordionItemState };
@@ -2,19 +2,29 @@ import * as _angular_core from '@angular/core';
2
2
  import { Signal, ModelSignal, WritableSignal } from '@angular/core';
3
3
  import * as _radix_ng_primitives_collapsible from '@radix-ng/primitives/collapsible';
4
4
  import * as _radix_ng_primitives_core from '@radix-ng/primitives/core';
5
- import { BooleanInput, RdxTransitionStatus } from '@radix-ng/primitives/core';
6
- import * as i1 from '@radix-ng/primitives/presence';
5
+ import { BooleanInput, RdxTransitionStatus, RdxCancelableChangeEventDetails } from '@radix-ng/primitives/core';
7
6
 
8
7
  /**
9
8
  * A panel with the collapsible contents.
10
9
  */
11
10
  declare class RdxCollapsiblePanelDirective {
12
11
  private readonly elementRef;
12
+ private readonly renderer;
13
+ private readonly destroyRef;
14
+ private readonly marker;
15
+ private parentNode;
16
+ private isAttached;
13
17
  protected readonly rootContext: _radix_ng_primitives_collapsible.CollapsibleRootContext;
18
+ /**
19
+ * Optional explicit panel id. When set, the trigger's `aria-controls` points to this id.
20
+ *
21
+ * @group Props
22
+ */
23
+ readonly id: _angular_core.InputSignal<string | undefined>;
14
24
  /**
15
25
  * Whether to keep the element in the DOM while the panel is closed.
16
- * When `true`, the closed panel keeps its element (no `hidden` attribute) so the consumer's
17
- * `data-closed` CSS is responsible for visually collapsing it.
26
+ * When `true`, the closed panel keeps its element and receives the `hidden` attribute once the
27
+ * close transition finishes.
18
28
  *
19
29
  * @group Props
20
30
  * @defaultValue false
@@ -30,10 +40,11 @@ declare class RdxCollapsiblePanelDirective {
30
40
  readonly hiddenUntilFound: _angular_core.InputSignalWithTransform<boolean | undefined, BooleanInput>;
31
41
  readonly height: _angular_core.WritableSignal<number | null>;
32
42
  readonly width: _angular_core.WritableSignal<number | null>;
43
+ /** Mirrors Base UI's `shouldRender`: hidden panels unmount unless kept for search/measurement. */
44
+ readonly shouldRender: _angular_core.Signal<boolean>;
33
45
  /**
34
- * The `hidden` attribute value. The panel is shown while open or while its exit transition runs;
35
- * a kept-mounted panel stays visible (the consumer collapses it via CSS); otherwise the closed
36
- * panel is hidden — with `until-found` when find-in-page support is requested.
46
+ * The `hidden` attribute value. The panel is shown while open or while its exit transition runs.
47
+ * A kept-mounted panel remains in the DOM but is still hidden while closed.
37
48
  */
38
49
  readonly hidden: _angular_core.Signal<"" | "until-found" | undefined>;
39
50
  /**
@@ -43,12 +54,21 @@ declare class RdxCollapsiblePanelDirective {
43
54
  private isFirstMeasure;
44
55
  private originalStyles?;
45
56
  constructor();
57
+ private insertMarker;
58
+ private removeMarker;
59
+ private syncRenderedState;
46
60
  private updateDimensions;
47
61
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsiblePanelDirective, never>;
48
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsiblePanelDirective, "[rdxCollapsiblePanel]", never, { "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "hiddenUntilFound": { "alias": "hiddenUntilFound"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
62
+ static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsiblePanelDirective, "[rdxCollapsiblePanel]", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "keepMounted": { "alias": "keepMounted"; "required": false; "isSignal": true; }; "hiddenUntilFound": { "alias": "hiddenUntilFound"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
49
63
  }
50
64
 
51
65
  type RdxCollapsibleState = 'open' | 'closed';
66
+ type RdxCollapsibleOpenChangeReason = 'trigger-press' | 'none';
67
+ type RdxCollapsibleOpenChangeEventDetails = RdxCancelableChangeEventDetails<RdxCollapsibleOpenChangeReason>;
68
+ interface RdxCollapsibleOpenChangeEvent {
69
+ open: boolean;
70
+ eventDetails: RdxCollapsibleOpenChangeEventDetails;
71
+ }
52
72
  interface CollapsibleRootContext {
53
73
  /** Stable id linking the trigger's `aria-controls` to the panel. */
54
74
  panelId: Signal<string>;
@@ -65,7 +85,9 @@ interface CollapsibleRootContext {
65
85
  */
66
86
  keepMounted: WritableSignal<boolean>;
67
87
  hiddenUntilFound: WritableSignal<boolean>;
68
- toggle: () => void;
88
+ toggle: (event: Event, trigger?: HTMLElement) => void;
89
+ setOpen: (open: boolean, reason: RdxCollapsibleOpenChangeReason, event: Event, trigger?: HTMLElement) => boolean;
90
+ setPanelIdState: (id: string | undefined) => void;
69
91
  /** Registers the panel element whose transition duration gates the close completion. */
70
92
  registerTransitionElement: (element: HTMLElement) => () => void;
71
93
  }
@@ -78,6 +100,8 @@ declare const provideCollapsibleRootContext: (useFactory: () => CollapsibleRootC
78
100
  */
79
101
  declare class RdxCollapsibleRootDirective {
80
102
  private readonly transition;
103
+ private readonly generatedPanelId;
104
+ private readonly panelIdState;
81
105
  /** Reactive open/close transition phase (`'starting'` | `'ending'` | `undefined`). */
82
106
  readonly transitionStatus: Signal<RdxTransitionStatus>;
83
107
  /** Registers the panel element whose transition duration gates the close completion. */
@@ -106,7 +130,9 @@ declare class RdxCollapsibleRootDirective {
106
130
  */
107
131
  readonly disabled: _angular_core.InputSignalWithTransform<boolean, BooleanInput>;
108
132
  /** Stable id linking the trigger's `aria-controls` to the panel. */
109
- readonly panelId: _angular_core.InputSignal<string>;
133
+ readonly panelId: _angular_core.InputSignal<string | undefined>;
134
+ /** Stable id linking the trigger's `aria-controls` to the panel. */
135
+ readonly resolvedPanelId: Signal<string>;
110
136
  /** Composition fallbacks (see {@link CollapsibleRootContext}). Default `false`. */
111
137
  readonly keepMountedContext: WritableSignal<boolean>;
112
138
  readonly hiddenUntilFoundContext: WritableSignal<boolean>;
@@ -117,7 +143,7 @@ declare class RdxCollapsibleRootDirective {
117
143
  *
118
144
  * @group Emits
119
145
  */
120
- readonly onOpenChange: _angular_core.OutputEmitterRef<boolean>;
146
+ readonly onOpenChange: _angular_core.OutputEmitterRef<RdxCollapsibleOpenChangeEvent>;
121
147
  /**
122
148
  * Event handler called after the open/close transition has finished.
123
149
  *
@@ -126,6 +152,8 @@ declare class RdxCollapsibleRootDirective {
126
152
  readonly onOpenChangeComplete: _angular_core.OutputEmitterRef<boolean>;
127
153
  private hasAppliedDefaultOpen;
128
154
  private previousOpen;
155
+ setPanelIdState(id: string | undefined): void;
156
+ setOpen(nextOpen: boolean, reason: RdxCollapsibleOpenChangeReason, event: Event, trigger?: HTMLElement): boolean;
129
157
  constructor();
130
158
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsibleRootDirective, never>;
131
159
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsibleRootDirective, "[rdxCollapsibleRoot]", ["rdxCollapsibleRoot"], { "open": { "alias": "open"; "required": false; "isSignal": true; }; "defaultOpen": { "alias": "defaultOpen"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "panelId": { "alias": "panelId"; "required": false; "isSignal": true; }; }, { "open": "openChange"; "onOpenChange": "onOpenChange"; "onOpenChangeComplete": "onOpenChangeComplete"; }, never, never, true, never>;
@@ -135,26 +163,18 @@ declare class RdxCollapsibleRootDirective {
135
163
  * A button that opens and closes the collapsible panel.
136
164
  */
137
165
  declare class RdxCollapsibleTriggerDirective {
166
+ private readonly elementRef;
138
167
  protected readonly rootContext: _radix_ng_primitives_collapsible.CollapsibleRootContext;
168
+ protected handleClick(event: MouseEvent): void;
139
169
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsibleTriggerDirective, never>;
140
170
  static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsibleTriggerDirective, "[rdxCollapsibleTrigger]", never, {}, {}, never, never, true, never>;
141
171
  }
142
172
 
143
- /**
144
- * Structural directive that mounts the collapsible panel contents only while open, unmounting them
145
- * once the exit animation finishes. Opt into this when the closed contents should leave the DOM;
146
- * otherwise apply `rdxCollapsiblePanel` directly (optionally with `keepMounted`).
147
- */
148
- declare class RdxCollapsiblePanelPresenceDirective {
149
- static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsiblePanelPresenceDirective, never>;
150
- static ɵdir: _angular_core.ɵɵDirectiveDeclaration<RdxCollapsiblePanelPresenceDirective, "ng-template[rdxCollapsiblePanelPresence]", never, {}, {}, never, never, true, [{ directive: typeof i1.RdxPresenceDirective; inputs: {}; outputs: {}; }]>;
151
- }
152
-
153
173
  declare class RdxCollapsibleModule {
154
174
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<RdxCollapsibleModule, never>;
155
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxCollapsibleModule, never, [typeof RdxCollapsiblePanelDirective, typeof RdxCollapsibleRootDirective, typeof RdxCollapsibleTriggerDirective, typeof RdxCollapsiblePanelPresenceDirective], [typeof RdxCollapsiblePanelDirective, typeof RdxCollapsibleRootDirective, typeof RdxCollapsibleTriggerDirective, typeof RdxCollapsiblePanelPresenceDirective]>;
175
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<RdxCollapsibleModule, never, [typeof RdxCollapsiblePanelDirective, typeof RdxCollapsibleRootDirective, typeof RdxCollapsibleTriggerDirective], [typeof RdxCollapsiblePanelDirective, typeof RdxCollapsibleRootDirective, typeof RdxCollapsibleTriggerDirective]>;
156
176
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<RdxCollapsibleModule>;
157
177
  }
158
178
 
159
- export { RdxCollapsibleModule, RdxCollapsiblePanelDirective, RdxCollapsiblePanelPresenceDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective, injectCollapsibleRootContext, provideCollapsibleRootContext };
160
- export type { CollapsibleRootContext, RdxCollapsibleState };
179
+ export { RdxCollapsibleModule, RdxCollapsiblePanelDirective, RdxCollapsibleRootDirective, RdxCollapsibleTriggerDirective, injectCollapsibleRootContext, provideCollapsibleRootContext };
180
+ export type { CollapsibleRootContext, RdxCollapsibleOpenChangeEvent, RdxCollapsibleOpenChangeEventDetails, RdxCollapsibleOpenChangeReason, RdxCollapsibleState };