@radix-ng/primitives 0.51.0 → 1.0.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  5. package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
  6. package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
  9. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-button.mjs +123 -0
  11. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
  12. package/fesm2022/radix-ng-primitives-calendar.mjs +95 -83
  13. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  14. package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
  15. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  16. package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
  17. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  18. package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
  19. package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
  22. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-core.mjs +845 -744
  24. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-cropper.mjs +288 -308
  26. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  27. package/fesm2022/radix-ng-primitives-date-field.mjs +104 -58
  28. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  29. package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
  30. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  31. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
  32. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-drawer.mjs +960 -0
  34. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
  35. package/fesm2022/radix-ng-primitives-editable.mjs +304 -23
  36. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  37. package/fesm2022/radix-ng-primitives-field.mjs +363 -0
  38. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
  39. package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
  40. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
  41. package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
  42. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  43. package/fesm2022/radix-ng-primitives-input.mjs +172 -0
  44. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
  45. package/fesm2022/radix-ng-primitives-label.mjs +6 -6
  46. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-menu.mjs +1907 -363
  48. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
  50. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  51. package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
  52. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
  53. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
  54. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  55. package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
  56. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  57. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
  59. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-popper.mjs +111 -44
  61. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
  63. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
  65. package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
  67. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
  68. package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
  69. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
  71. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
  73. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-scroll-area.mjs +923 -0
  75. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -0
  76. package/fesm2022/radix-ng-primitives-select.mjs +791 -509
  77. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  78. package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
  79. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
  81. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
  83. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
  85. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  86. package/fesm2022/radix-ng-primitives-tabs.mjs +390 -108
  87. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
  89. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  90. package/fesm2022/radix-ng-primitives-toast.mjs +839 -0
  91. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -0
  92. package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
  93. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  94. package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
  95. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  96. package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
  97. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  98. package/fesm2022/radix-ng-primitives-tooltip.mjs +699 -1072
  99. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  100. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
  101. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  102. package/meter/README.md +3 -0
  103. package/navigation-menu/README.md +2 -1
  104. package/package.json +39 -18
  105. package/portal/README.md +2 -0
  106. package/preview-card/README.md +3 -0
  107. package/schematics/collection.json +1 -0
  108. package/schematics/ng-add/index.d.ts +3 -2
  109. package/schematics/ng-add/index.js +62 -31
  110. package/schematics/ng-add/index.js.map +1 -1
  111. package/schematics/ng-add/package-config.d.ts +4 -2
  112. package/schematics/ng-add/package-config.js +10 -2
  113. package/schematics/ng-add/package-config.js.map +1 -1
  114. package/schematics/ng-add/schema.d.ts +3 -0
  115. package/schematics/ng-add/schema.js +3 -0
  116. package/schematics/ng-add/schema.js.map +1 -0
  117. package/schematics/ng-add/schema.json +14 -0
  118. package/select/README.md +2 -0
  119. package/types/radix-ng-primitives-accordion.d.ts +51 -16
  120. package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
  121. package/types/radix-ng-primitives-arrow.d.ts +1 -1
  122. package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
  123. package/types/radix-ng-primitives-avatar.d.ts +7 -11
  124. package/types/radix-ng-primitives-button.d.ts +73 -0
  125. package/types/radix-ng-primitives-calendar.d.ts +39 -20
  126. package/types/radix-ng-primitives-checkbox.d.ts +204 -35
  127. package/types/radix-ng-primitives-collapsible.d.ts +114 -40
  128. package/types/radix-ng-primitives-collection.d.ts +38 -34
  129. package/types/radix-ng-primitives-config.d.ts +1 -1
  130. package/types/radix-ng-primitives-context-menu.d.ts +61 -116
  131. package/types/radix-ng-primitives-core.d.ts +345 -235
  132. package/types/radix-ng-primitives-cropper.d.ts +89 -56
  133. package/types/radix-ng-primitives-date-field.d.ts +49 -28
  134. package/types/radix-ng-primitives-dialog.d.ts +283 -165
  135. package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
  136. package/types/radix-ng-primitives-drawer.d.ts +426 -0
  137. package/types/radix-ng-primitives-editable.d.ts +91 -14
  138. package/types/radix-ng-primitives-field.d.ts +374 -0
  139. package/types/radix-ng-primitives-fieldset.d.ts +49 -0
  140. package/types/radix-ng-primitives-focus-scope.d.ts +15 -6
  141. package/types/radix-ng-primitives-input.d.ts +87 -0
  142. package/types/radix-ng-primitives-label.d.ts +0 -1
  143. package/types/radix-ng-primitives-menu.d.ts +584 -99
  144. package/types/radix-ng-primitives-menubar.d.ts +61 -50
  145. package/types/radix-ng-primitives-meter.d.ts +194 -0
  146. package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
  147. package/types/radix-ng-primitives-number-field.d.ts +405 -145
  148. package/types/radix-ng-primitives-pagination.d.ts +2 -2
  149. package/types/radix-ng-primitives-popover.d.ts +366 -351
  150. package/types/radix-ng-primitives-popper.d.ts +68 -11
  151. package/types/radix-ng-primitives-portal.d.ts +14 -6
  152. package/types/radix-ng-primitives-presence.d.ts +28 -76
  153. package/types/radix-ng-primitives-preview-card.d.ts +359 -0
  154. package/types/radix-ng-primitives-progress.d.ts +175 -48
  155. package/types/radix-ng-primitives-radio.d.ts +55 -25
  156. package/types/radix-ng-primitives-roving-focus.d.ts +33 -23
  157. package/types/radix-ng-primitives-scroll-area.d.ts +253 -0
  158. package/types/radix-ng-primitives-select.d.ts +475 -177
  159. package/types/radix-ng-primitives-separator.d.ts +7 -32
  160. package/types/radix-ng-primitives-slider.d.ts +315 -201
  161. package/types/radix-ng-primitives-stepper.d.ts +5 -7
  162. package/types/radix-ng-primitives-switch.d.ts +86 -71
  163. package/types/radix-ng-primitives-tabs.d.ts +213 -79
  164. package/types/radix-ng-primitives-time-field.d.ts +42 -27
  165. package/types/radix-ng-primitives-toast.d.ts +378 -0
  166. package/types/radix-ng-primitives-toggle-group.d.ts +86 -164
  167. package/types/radix-ng-primitives-toggle.d.ts +43 -53
  168. package/types/radix-ng-primitives-toolbar.d.ts +164 -38
  169. package/types/radix-ng-primitives-tooltip.d.ts +348 -384
  170. package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
  171. package/dropdown-menu/README.md +0 -1
  172. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
  173. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  174. package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
  175. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
  176. package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
  177. package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
  178. package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
  179. package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
  180. package/hover-card/README.md +0 -3
  181. package/select2/README.md +0 -3
  182. package/tooltip2/README.md +0 -3
  183. package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
  184. package/types/radix-ng-primitives-hover-card.d.ts +0 -471
  185. package/types/radix-ng-primitives-select2.d.ts +0 -511
  186. package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
@@ -1,19 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, inject, ElementRef, input, booleanAttribute, model, output, computed, effect, NgModule } from '@angular/core';
2
+ import { Directive, inject, ElementRef, input, booleanAttribute, model, output, computed, effect, signal, NgModule } from '@angular/core';
3
3
  import * as i1 from '@radix-ng/primitives/collapsible';
4
- import { RdxCollapsibleContentPresenceDirective, injectCollapsibleRootContext, RdxCollapsibleRootDirective, RdxCollapsibleContentDirective, RdxCollapsibleTriggerDirective } from '@radix-ng/primitives/collapsible';
5
- import { createContext, useArrowNavigation } from '@radix-ng/primitives/core';
6
- import { _IdGenerator } from '@angular/cdk/a11y';
4
+ import { RdxCollapsiblePanelPresenceDirective, injectCollapsibleRootContext, RdxCollapsibleRootDirective, RdxCollapsiblePanelDirective } from '@radix-ng/primitives/collapsible';
5
+ import { createContext, injectId, useArrowNavigation } from '@radix-ng/primitives/core';
7
6
 
8
7
  class RdxAccordionContentPresenceDirective {
9
8
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentPresenceDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
10
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionContentPresenceDirective, isStandalone: true, selector: "ng-template[rdxAccordionContentPresence]", hostDirectives: [{ directive: i1.RdxCollapsibleContentPresenceDirective }], ngImport: i0 }); }
9
+ 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 }); }
11
10
  }
12
11
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentPresenceDirective, decorators: [{
13
12
  type: Directive,
14
13
  args: [{
15
14
  selector: 'ng-template[rdxAccordionContentPresence]',
16
- hostDirectives: [RdxCollapsibleContentPresenceDirective]
15
+ hostDirectives: [RdxCollapsiblePanelPresenceDirective]
17
16
  }]
18
17
  }] });
19
18
 
@@ -28,6 +27,8 @@ const rootContext = () => {
28
27
  elementRef: instance.elementRef,
29
28
  value: instance.value,
30
29
  isSingle: instance.isSingle,
30
+ loopFocus: instance.loopFocus,
31
+ keepMounted: instance.keepMounted,
31
32
  changeModelValue: instance.changeModelValue
32
33
  };
33
34
  };
@@ -37,7 +38,7 @@ const rootContext = () => {
37
38
  class RdxAccordionRootDirective {
38
39
  constructor() {
39
40
  this.elementRef = inject(ElementRef);
40
- this.id = input(inject(_IdGenerator).getId('rdx-accordion-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
41
+ this.id = input(injectId('rdx-accordion-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
41
42
  /**
42
43
  * The reading direction of the accordion when applicable. If omitted, assumes LTR (left-to-right) reading mode.
43
44
  *
@@ -85,13 +86,39 @@ class RdxAccordionRootDirective {
85
86
  */
86
87
  this.type = input('single', ...(ngDevMode ? [{ debugName: "type" }] : /* istanbul ignore next */ []));
87
88
  /**
88
- * Event handler called when the expanded state of an item changes and type is "multiple".
89
+ * Allow multiple panels to be open simultaneously.
90
+ * Takes precedence over `type` when `true`.
91
+ *
92
+ * @defaultValue false
93
+ * @group Props
94
+ */
95
+ this.multiple = input(false, { ...(ngDevMode ? { debugName: "multiple" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
96
+ /**
97
+ * Whether keyboard focus wraps from the last item to the first and vice versa.
98
+ *
99
+ * @defaultValue true
100
+ * @group Props
101
+ */
102
+ this.loopFocus = input(true, { ...(ngDevMode ? { debugName: "loopFocus" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
103
+ /**
104
+ * Whether to keep the content of collapsed items mounted in the DOM.
105
+ * When `true`, closed panels keep their element in the DOM instead of
106
+ * receiving a `hidden` attribute. Applies to the always-mounted
107
+ * `rdxAccordionContent`; the `rdxAccordionContentPresence` variant always
108
+ * unmounts.
109
+ *
110
+ * @defaultValue false
111
+ * @group Props
112
+ */
113
+ this.keepMounted = input(false, { ...(ngDevMode ? { debugName: "keepMounted" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
114
+ /**
115
+ * Event handler called when the expanded state of an item changes.
89
116
  * @group Emits
90
117
  */
91
118
  this.onValueChange = output();
92
- this.isSingle = computed(() => this.type() === 'single', ...(ngDevMode ? [{ debugName: "isSingle" }] : /* istanbul ignore next */ []));
119
+ this.isSingle = computed(() => !this.multiple() && this.type() !== 'multiple', ...(ngDevMode ? [{ debugName: "isSingle" }] : /* istanbul ignore next */ []));
93
120
  this.changeModelValue = (newValue) => {
94
- if (this.type() === 'single') {
121
+ if (this.isSingle()) {
95
122
  this.value.set(this.isEqual(newValue, this.value()) ? undefined : newValue);
96
123
  }
97
124
  else {
@@ -114,6 +141,7 @@ class RdxAccordionRootDirective {
114
141
  }
115
142
  this.value.set(modelValueArray);
116
143
  }
144
+ this.onValueChange.emit(this.value());
117
145
  };
118
146
  effect(() => {
119
147
  if (this.defaultValue() !== undefined) {
@@ -128,7 +156,7 @@ class RdxAccordionRootDirective {
128
156
  return JSON.stringify(a) === JSON.stringify(b);
129
157
  }
130
158
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
131
- 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 }, dir: { classPropertyName: "dir", publicName: "dir", 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 } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { properties: { "attr.data-orientation": "orientation()" } }, providers: [provideAccordionRootContext(rootContext)], exportAs: ["rdxAccordionRoot"], ngImport: i0 }); }
159
+ 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 }, dir: { classPropertyName: "dir", publicName: "dir", 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"], ngImport: i0 }); }
132
160
  }
133
161
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionRootDirective, decorators: [{
134
162
  type: Directive,
@@ -137,10 +165,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
137
165
  exportAs: 'rdxAccordionRoot',
138
166
  providers: [provideAccordionRootContext(rootContext)],
139
167
  host: {
140
- '[attr.data-orientation]': 'orientation()'
168
+ '[attr.data-orientation]': 'orientation()',
169
+ '[attr.data-disabled]': 'disabled() ? "" : undefined'
141
170
  }
142
171
  }]
143
- }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
172
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], collapsible: [{ type: i0.Input, args: [{ isSignal: true, alias: "collapsible", required: false }] }], type: [{ type: i0.Input, args: [{ isSignal: true, alias: "type", required: false }] }], multiple: [{ type: i0.Input, args: [{ isSignal: true, alias: "multiple", required: false }] }], loopFocus: [{ type: i0.Input, args: [{ isSignal: true, alias: "loopFocus", required: false }] }], keepMounted: [{ type: i0.Input, args: [{ isSignal: true, alias: "keepMounted", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
144
173
 
145
174
  const [injectAccordionItemContext, provideAccordionItemContext] = createContext('AccordionItemContext');
146
175
  const itemContext = () => {
@@ -150,10 +179,11 @@ const itemContext = () => {
150
179
  dataState: instance.dataState,
151
180
  disabled: instance.disabled,
152
181
  dataDisabled: instance.isDisabled,
153
- triggerId: '',
182
+ triggerId: instance.triggerId,
154
183
  currentElement: instance.elementRef,
155
184
  value: computed(() => instance.value()),
156
- updateOpen: instance.updateOpen
185
+ updateOpen: instance.updateOpen,
186
+ index: instance.index
157
187
  };
158
188
  };
159
189
  /**
@@ -175,19 +205,48 @@ class RdxAccordionItemDirective {
175
205
  * @group Props
176
206
  */
177
207
  this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
208
+ /**
209
+ * Event handler called when the panel open state changes.
210
+ * @group Emits
211
+ */
212
+ this.onOpenChange = output();
178
213
  this.isDisabled = computed(() => {
179
214
  return this.rootContext.disabled() || this.disabled();
180
215
  }, ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
181
- this.open = computed(() => this.rootContext.isSingle()
182
- ? this.value() === this.rootContext.value()
183
- : Array.isArray(this.rootContext.value()) && this.rootContext.value().includes(this.value()), ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
216
+ this.open = computed(() => {
217
+ const rootValue = this.rootContext.value();
218
+ return this.rootContext.isSingle()
219
+ ? this.value() === rootValue
220
+ : Array.isArray(rootValue) && rootValue.includes(this.value());
221
+ }, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
184
222
  this.dataState = computed(() => (this.open() ? 'open' : 'closed'), ...(ngDevMode ? [{ debugName: "dataState" }] : /* istanbul ignore next */ []));
223
+ /** Set by the trigger; links the content's `aria-labelledby` to the trigger `id`. */
224
+ this.triggerId = signal('', ...(ngDevMode ? [{ debugName: "triggerId" }] : /* istanbul ignore next */ []));
225
+ this.index = computed(() => {
226
+ const allItems = Array.from(this.rootContext.elementRef.nativeElement.querySelectorAll('[rdxAccordionItem]'));
227
+ return allItems.indexOf(this.elementRef.nativeElement);
228
+ }, ...(ngDevMode ? [{ debugName: "index" }] : /* istanbul ignore next */ []));
185
229
  this.updateOpen = () => {
186
230
  this.collapsibleContext.open.set(this.open());
187
231
  };
232
+ // Collapsed accordion panels stay findable by the browser's in-page search; opening one
233
+ // via find-in-page expands the item. (The standalone Collapsible defaults to plain `hidden`.)
234
+ this.collapsibleContext.hiddenUntilFound.set(true);
188
235
  effect(() => {
189
236
  this.updateOpen();
190
237
  });
238
+ effect(() => {
239
+ this.collapsibleContext.keepMounted.set(this.rootContext.keepMounted());
240
+ });
241
+ let initialized = false;
242
+ effect(() => {
243
+ const isOpen = this.open();
244
+ if (!initialized) {
245
+ initialized = true;
246
+ return;
247
+ }
248
+ this.onOpenChange.emit(isOpen);
249
+ });
191
250
  }
192
251
  handleArrowKey(event) {
193
252
  const keyEvent = event;
@@ -199,11 +258,12 @@ class RdxAccordionItemDirective {
199
258
  useArrowNavigation(keyEvent, this.elementRef.nativeElement.querySelector('[data-rdx-collection-item]'), this.rootContext.elementRef.nativeElement, {
200
259
  arrowKeyOptions: this.rootContext.orientation(),
201
260
  dir: this.rootContext.direction(),
261
+ loop: this.rootContext.loopFocus(),
202
262
  focus: true
203
263
  });
204
264
  }
205
265
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
206
- 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 } }, host: { listeners: { "keydown.arrowDown": "handleArrowKey($event)", "keydown.arrowUp": "handleArrowKey($event)", "keydown.arrowLeft": "handleArrowKey($event)", "keydown.arrowRight": "handleArrowKey($event)", "keydown.home": "handleArrowKey($event)", "keydown.end": "handleArrowKey($event)" }, properties: { "attr.data-orientation": "rootContext.orientation()", "attr.data-disabled": "disabled() ? \"\" : undefined", "attr.data-state": "dataState()" } }, providers: [provideAccordionItemContext(itemContext)], exportAs: ["rdxAccordionItem"], hostDirectives: [{ directive: i1.RdxCollapsibleRootDirective, inputs: ["disabled", "disabled", "open", "open"] }], ngImport: i0 }); }
266
+ 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: { listeners: { "keydown.arrowDown": "handleArrowKey($event)", "keydown.arrowUp": "handleArrowKey($event)", "keydown.arrowLeft": "handleArrowKey($event)", "keydown.arrowRight": "handleArrowKey($event)", "keydown.home": "handleArrowKey($event)", "keydown.end": "handleArrowKey($event)" }, 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"] }], ngImport: i0 }); }
207
267
  }
208
268
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionItemDirective, decorators: [{
209
269
  type: Directive,
@@ -219,8 +279,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
219
279
  ],
220
280
  host: {
221
281
  '[attr.data-orientation]': 'rootContext.orientation()',
222
- '[attr.data-disabled]': 'disabled() ? "" : undefined',
282
+ '[attr.data-disabled]': 'isDisabled() ? "" : undefined',
223
283
  '[attr.data-state]': 'dataState()',
284
+ '[attr.data-index]': 'index()',
224
285
  '(keydown.arrowDown)': 'handleArrowKey($event)',
225
286
  '(keydown.arrowUp)': 'handleArrowKey($event)',
226
287
  '(keydown.arrowLeft)': 'handleArrowKey($event)',
@@ -229,7 +290,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
229
290
  '(keydown.end)': 'handleArrowKey($event)'
230
291
  }
231
292
  }]
232
- }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }] } });
293
+ }], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], onOpenChange: [{ type: i0.Output, args: ["onOpenChange"] }] } });
233
294
 
234
295
  class RdxAccordionContentDirective {
235
296
  constructor() {
@@ -237,22 +298,23 @@ class RdxAccordionContentDirective {
237
298
  this.itemContext = injectAccordionItemContext();
238
299
  }
239
300
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
240
- 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()", "attr.data-orientation": "rootContext.orientation()", "style": "{\n '--radix-accordion-content-height': 'var(--radix-collapsible-content-height)',\n '--radix-accordion-content-width': 'var(--radix-collapsible-content-width)',\n }" } }, hostDirectives: [{ directive: i1.RdxCollapsibleContentDirective }], ngImport: i0 }); }
301
+ 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 }); }
241
302
  }
242
303
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionContentDirective, decorators: [{
243
304
  type: Directive,
244
305
  args: [{
245
306
  selector: '[rdxAccordionContent]',
246
- hostDirectives: [RdxCollapsibleContentDirective],
307
+ hostDirectives: [RdxCollapsiblePanelDirective],
247
308
  host: {
248
309
  role: 'region',
249
- '[attr.aria-labelledby]': 'itemContext.triggerId',
310
+ '[attr.aria-labelledby]': 'itemContext.triggerId()',
250
311
  '[attr.data-state]': 'itemContext.dataState()',
251
- '[attr.data-disabled]': 'itemContext.dataDisabled()',
312
+ '[attr.data-disabled]': 'itemContext.dataDisabled() ? "" : undefined',
252
313
  '[attr.data-orientation]': 'rootContext.orientation()',
314
+ '[attr.data-index]': 'itemContext.index()',
253
315
  '[style]': `{
254
- '--radix-accordion-content-height': 'var(--radix-collapsible-content-height)',
255
- '--radix-accordion-content-width': 'var(--radix-collapsible-content-width)',
316
+ '--radix-accordion-content-height': 'var(--collapsible-panel-height)',
317
+ '--radix-accordion-content-width': 'var(--collapsible-panel-width)',
256
318
  }`
257
319
  }
258
320
  }]
@@ -264,7 +326,7 @@ class RdxAccordionHeaderDirective {
264
326
  this.itemContext = injectAccordionItemContext();
265
327
  }
266
328
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
267
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionHeaderDirective, isStandalone: true, selector: "[rdxAccordionHeader]", host: { properties: { "attr.data-state": "itemContext.dataState()", "attr.data-disabled": "itemContext.dataDisabled()", "attr.data-orientation": "rootContext.orientation()" } }, ngImport: i0 }); }
329
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionHeaderDirective, isStandalone: true, selector: "[rdxAccordionHeader]", host: { properties: { "attr.data-state": "itemContext.dataState()", "attr.data-disabled": "itemContext.dataDisabled() ? \"\" : undefined", "attr.data-orientation": "rootContext.orientation()", "attr.data-index": "itemContext.index()" } }, ngImport: i0 }); }
268
330
  }
269
331
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionHeaderDirective, decorators: [{
270
332
  type: Directive,
@@ -272,8 +334,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
272
334
  selector: '[rdxAccordionHeader]',
273
335
  host: {
274
336
  '[attr.data-state]': 'itemContext.dataState()',
275
- '[attr.data-disabled]': 'itemContext.dataDisabled()',
276
- '[attr.data-orientation]': 'rootContext.orientation()'
337
+ '[attr.data-disabled]': 'itemContext.dataDisabled() ? "" : undefined',
338
+ '[attr.data-orientation]': 'rootContext.orientation()',
339
+ '[attr.data-index]': 'itemContext.index()'
277
340
  }
278
341
  }]
279
342
  }] });
@@ -282,31 +345,35 @@ class RdxAccordionTriggerDirective {
282
345
  constructor() {
283
346
  this.rootContext = injectAccordionRootContext();
284
347
  this.itemContext = injectAccordionItemContext();
285
- this.itemContext.triggerId = inject(_IdGenerator).getId('rdx-accordion-trigger-');
348
+ this.itemContext.triggerId.set(injectId('rdx-accordion-trigger-'));
286
349
  }
287
350
  changeItem() {
288
- const triggerDisabled = this.rootContext.isSingle() && this.itemContext.open() && !this.rootContext.collapsible();
289
- if (this.itemContext.disabled() || triggerDisabled) {
290
- this.itemContext.updateOpen();
351
+ // In single mode an open item stays open (unless `collapsible`), so a click on it is a no-op.
352
+ const lockedOpen = this.rootContext.isSingle() && this.itemContext.open() && !this.rootContext.collapsible();
353
+ // `dataDisabled` is the effective disabled state (accordion-root OR item level).
354
+ if (this.itemContext.dataDisabled() || lockedOpen) {
291
355
  return;
292
356
  }
293
357
  this.rootContext.changeModelValue(this.itemContext.value());
294
358
  }
295
359
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
296
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionTriggerDirective, isStandalone: true, selector: "[rdxAccordionTrigger]", host: { listeners: { "click": "changeItem()" }, properties: { "id": "itemContext.triggerId", "attr.data-rdx-collection-item": "\"\"", "attr.role": "\"button\"", "attr.aria-disabled": "itemContext.open() && !rootContext.collapsible() ? \"true\" : undefined", "attr.data-orientation": "rootContext.orientation()", "attr.disabled": "itemContext.disabled() ? \"\" : undefined" } }, hostDirectives: [{ directive: i1.RdxCollapsibleTriggerDirective }], ngImport: i0 }); }
360
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAccordionTriggerDirective, isStandalone: true, selector: "[rdxAccordionTrigger]", host: { listeners: { "click": "changeItem()" }, properties: { "id": "itemContext.triggerId()", "attr.data-rdx-collection-item": "\"\"", "attr.role": "\"button\"", "attr.aria-expanded": "itemContext.open()", "attr.aria-disabled": "itemContext.open() && !rootContext.collapsible() ? \"true\" : undefined", "attr.data-orientation": "rootContext.orientation()", "attr.data-state": "itemContext.dataState()", "attr.disabled": "itemContext.dataDisabled() ? \"\" : undefined", "attr.data-panel-open": "itemContext.open() ? \"\" : undefined", "attr.data-index": "itemContext.index()" } }, ngImport: i0 }); }
297
361
  }
298
362
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAccordionTriggerDirective, decorators: [{
299
363
  type: Directive,
300
364
  args: [{
301
365
  selector: '[rdxAccordionTrigger]',
302
- hostDirectives: [RdxCollapsibleTriggerDirective],
303
366
  host: {
304
- '[id]': 'itemContext.triggerId',
367
+ '[id]': 'itemContext.triggerId()',
305
368
  '[attr.data-rdx-collection-item]': '""',
306
369
  '[attr.role]': '"button"',
370
+ '[attr.aria-expanded]': 'itemContext.open()',
307
371
  '[attr.aria-disabled]': 'itemContext.open() && !rootContext.collapsible() ? "true" : undefined',
308
372
  '[attr.data-orientation]': 'rootContext.orientation()',
309
- '[attr.disabled]': 'itemContext.disabled() ? "" : undefined',
373
+ '[attr.data-state]': 'itemContext.dataState()',
374
+ '[attr.disabled]': 'itemContext.dataDisabled() ? "" : undefined',
375
+ '[attr.data-panel-open]': 'itemContext.open() ? "" : undefined',
376
+ '[attr.data-index]': 'itemContext.index()',
310
377
  '(click)': 'changeItem()'
311
378
  }
312
379
  }]
@@ -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 { RdxCollapsibleContentPresenceDirective } from '@radix-ng/primitives/collapsible';\n\n@Directive({\n selector: 'ng-template[rdxAccordionContentPresence]',\n hostDirectives: [RdxCollapsibleContentPresenceDirective]\n})\nexport class RdxAccordionContentPresenceDirective {}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { Direction } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n InputSignal,\n InputSignalWithTransform,\n model,\n ModelSignal,\n output,\n Signal\n} from '@angular/core';\nimport { createContext, DataOrientation } from '@radix-ng/primitives/core';\n\ntype AcceptableValue = string | Record<string, any> | null;\n\nexport type AccordionRootContext = {\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n direction: InputSignal<Direction>;\n orientation: InputSignal<DataOrientation>;\n value: ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;\n collapsible: Signal<boolean>;\n isSingle: Signal<boolean>;\n elementRef: ElementRef<HTMLElement>;\n changeModelValue: (value: string) => void;\n};\n\nexport const [injectAccordionRootContext, provideAccordionRootContext] =\n createContext<AccordionRootContext>('AccordionRootContext');\n\nconst rootContext = (): AccordionRootContext => {\n const instance = inject(RdxAccordionRootDirective);\n\n return {\n disabled: instance.disabled,\n direction: instance.dir,\n collapsible: instance.collapsible,\n orientation: instance.orientation,\n elementRef: instance.elementRef,\n value: instance.value,\n isSingle: instance.isSingle,\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 host: {\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxAccordionRootDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly id = input<string>(inject(_IdGenerator).getId('rdx-accordion-'));\n\n /**\n * The reading direction of the accordion when applicable. If omitted, assumes LTR (left-to-right) reading mode.\n *\n * @group Props\n */\n readonly dir = input<Direction>('ltr');\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 * @defaultValue 'vertical'\n * @group Props\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 * Event handler called when the expanded state of an item changes and type is \"multiple\".\n * @group Emits\n */\n readonly onValueChange = output();\n\n readonly isSingle = computed(() => this.type() === 'single');\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.type() === 'single') {\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\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 { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, effect, ElementRef, inject, input, Signal } from '@angular/core';\nimport { injectCollapsibleRootContext, RdxCollapsibleRootDirective } from '@radix-ng/primitives/collapsible';\nimport { createContext, useArrowNavigation } 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: string;\n dataState: Signal<RdxAccordionItemState>;\n dataDisabled: Signal<boolean>;\n currentElement: ElementRef<HTMLElement>;\n value: Signal<string | undefined>;\n updateOpen: () => void;\n};\n\nexport const [injectAccordionItemContext, provideAccordionItemContext] =\n createContext<AccordionItemContext>('AccordionItemContext');\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: '',\n currentElement: instance.elementRef,\n value: computed(() => instance.value()),\n updateOpen: instance.updateOpen\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 ],\n host: {\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined',\n '[attr.data-state]': 'dataState()',\n\n '(keydown.arrowDown)': 'handleArrowKey($event)',\n '(keydown.arrowUp)': 'handleArrowKey($event)',\n '(keydown.arrowLeft)': 'handleArrowKey($event)',\n '(keydown.arrowRight)': 'handleArrowKey($event)',\n '(keydown.home)': 'handleArrowKey($event)',\n '(keydown.end)': 'handleArrowKey($event)'\n }\n})\nexport class RdxAccordionItemDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private readonly collapsibleContext = injectCollapsibleRootContext()!;\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 readonly isDisabled = computed(() => {\n return this.rootContext.disabled() || this.disabled();\n });\n\n readonly open = computed(() =>\n this.rootContext.isSingle()\n ? this.value() === this.rootContext.value()\n : Array.isArray(this.rootContext.value()) && this.rootContext.value()!.includes(this.value()!)\n );\n\n readonly dataState = computed((): RdxAccordionItemState => (this.open() ? 'open' : 'closed'));\n\n constructor() {\n effect(() => {\n this.updateOpen();\n });\n }\n\n updateOpen = () => {\n this.collapsibleContext.open.set(this.open());\n };\n\n handleArrowKey(event: Event) {\n const keyEvent = event as KeyboardEvent;\n const target = event.target as HTMLElement;\n const allCollectionItems: HTMLElement[] = Array.from(\n this.rootContext.elementRef.nativeElement?.querySelectorAll('[data-rdx-collection-item]') ?? []\n );\n\n const collectionItemIndex = allCollectionItems.findIndex((item) => item === target);\n if (collectionItemIndex === -1) return;\n\n useArrowNavigation(\n keyEvent,\n this.elementRef.nativeElement.querySelector('[data-rdx-collection-item]')!,\n this.rootContext.elementRef.nativeElement!,\n {\n arrowKeyOptions: this.rootContext.orientation(),\n dir: this.rootContext.direction(),\n focus: true\n }\n );\n }\n}\n","import { Directive } from '@angular/core';\nimport { RdxCollapsibleContentDirective } 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: [RdxCollapsibleContentDirective],\n host: {\n role: 'region',\n '[attr.aria-labelledby]': 'itemContext.triggerId',\n '[attr.data-state]': 'itemContext.dataState()',\n '[attr.data-disabled]': 'itemContext.dataDisabled()',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[style]': `{\n '--radix-accordion-content-height': 'var(--radix-collapsible-content-height)',\n '--radix-accordion-content-width': 'var(--radix-collapsible-content-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()',\n '[attr.data-orientation]': 'rootContext.orientation()'\n }\n})\nexport class RdxAccordionHeaderDirective {\n protected readonly rootContext = injectAccordionRootContext()!;\n protected readonly itemContext = injectAccordionItemContext()!;\n}\n","import { _IdGenerator } from '@angular/cdk/a11y';\nimport { Directive, inject } from '@angular/core';\nimport { RdxCollapsibleTriggerDirective } from '@radix-ng/primitives/collapsible';\nimport { injectAccordionItemContext } from './accordion-item.directive';\nimport { injectAccordionRootContext } from './accordion-root.directive';\n\n@Directive({\n selector: '[rdxAccordionTrigger]',\n hostDirectives: [RdxCollapsibleTriggerDirective],\n host: {\n '[id]': 'itemContext.triggerId',\n '[attr.data-rdx-collection-item]': '\"\"',\n '[attr.role]': '\"button\"',\n '[attr.aria-disabled]': 'itemContext.open() && !rootContext.collapsible() ? \"true\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.disabled]': 'itemContext.disabled() ? \"\" : undefined',\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 = inject(_IdGenerator).getId('rdx-accordion-trigger-');\n }\n\n changeItem() {\n const triggerDisabled =\n this.rootContext.isSingle() && this.itemContext.open() && !this.rootContext.collapsible();\n\n if (this.itemContext.disabled() || triggerDisabled) {\n this.itemContext.updateOpen();\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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B;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-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 ElementRef,\n inject,\n input,\n InputSignal,\n InputSignalWithTransform,\n model,\n ModelSignal,\n output,\n Signal\n} from '@angular/core';\nimport {\n AcceptableValue,\n BooleanInput,\n createContext,\n DataOrientation,\n Direction,\n injectId\n} from '@radix-ng/primitives/core';\n\nexport type AccordionRootContext = {\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n direction: InputSignal<Direction>;\n orientation: InputSignal<DataOrientation>;\n value: ModelSignal<AcceptableValue | AcceptableValue[] | undefined>;\n collapsible: Signal<boolean>;\n isSingle: Signal<boolean>;\n loopFocus: InputSignalWithTransform<boolean, BooleanInput>;\n keepMounted: InputSignalWithTransform<boolean, BooleanInput>;\n elementRef: ElementRef<HTMLElement>;\n changeModelValue: (value: string) => void;\n};\n\nexport const [injectAccordionRootContext, provideAccordionRootContext] =\n createContext<AccordionRootContext>('AccordionRootContext');\n\nconst rootContext = (): AccordionRootContext => {\n const instance = inject(RdxAccordionRootDirective);\n\n return {\n disabled: instance.disabled,\n direction: instance.dir,\n collapsible: instance.collapsible,\n orientation: instance.orientation,\n elementRef: instance.elementRef,\n value: instance.value,\n isSingle: instance.isSingle,\n loopFocus: instance.loopFocus,\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 host: {\n '[attr.data-orientation]': 'orientation()',\n '[attr.data-disabled]': 'disabled() ? \"\" : undefined'\n }\n})\nexport class RdxAccordionRootDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n readonly id = input<string>(injectId('rdx-accordion-'));\n\n /**\n * The reading direction of the accordion when applicable. If omitted, assumes LTR (left-to-right) reading mode.\n *\n * @group Props\n */\n readonly dir = input<Direction>('ltr');\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 * @defaultValue 'vertical'\n * @group Props\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 * Whether keyboard focus wraps from the last item to the first and vice versa.\n *\n * @defaultValue true\n * @group Props\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 { BooleanInput, createContext, useArrowNavigation } 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] =\n createContext<AccordionItemContext>('AccordionItemContext');\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 ],\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 '(keydown.arrowDown)': 'handleArrowKey($event)',\n '(keydown.arrowUp)': 'handleArrowKey($event)',\n '(keydown.arrowLeft)': 'handleArrowKey($event)',\n '(keydown.arrowRight)': 'handleArrowKey($event)',\n '(keydown.home)': 'handleArrowKey($event)',\n '(keydown.end)': 'handleArrowKey($event)'\n }\n})\nexport class RdxAccordionItemDirective {\n readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n private readonly collapsibleContext = injectCollapsibleRootContext();\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 = computed(() => {\n const allItems = Array.from(this.rootContext.elementRef.nativeElement.querySelectorAll('[rdxAccordionItem]'));\n return allItems.indexOf(this.elementRef.nativeElement);\n });\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 handleArrowKey(event: Event) {\n const keyEvent = event as KeyboardEvent;\n const target = event.target as HTMLElement;\n const allCollectionItems: HTMLElement[] = Array.from(\n this.rootContext.elementRef.nativeElement?.querySelectorAll('[data-rdx-collection-item]') ?? []\n );\n\n const collectionItemIndex = allCollectionItems.findIndex((item) => item === target);\n if (collectionItemIndex === -1) return;\n\n useArrowNavigation(\n keyEvent,\n this.elementRef.nativeElement.querySelector('[data-rdx-collection-item]')!,\n this.rootContext.elementRef.nativeElement,\n {\n arrowKeyOptions: this.rootContext.orientation(),\n dir: this.rootContext.direction(),\n loop: this.rootContext.loopFocus(),\n focus: true\n }\n );\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":[],"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,EAAA,EAAA,CAAA,CAAA;;2FAApC,oCAAoC,EAAA,UAAA,EAAA,CAAA;kBAJhD,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,0CAA0C;oBACpD,cAAc,EAAE,CAAC,oCAAoC;AACxD,iBAAA;;;AC+BM,MAAM,CAAC,0BAA0B,EAAE,2BAA2B,CAAC,GAClE,aAAa,CAAuB,sBAAsB;AAE9D,MAAM,WAAW,GAAG,MAA2B;AAC3C,IAAA,MAAM,QAAQ,GAAG,MAAM,CAAC,yBAAyB,CAAC;IAElD,OAAO;QACH,QAAQ,EAAE,QAAQ,CAAC,QAAQ;QAC3B,SAAS,EAAE,QAAQ,CAAC,GAAG;QACvB,WAAW,E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