@radix-ng/primitives 0.4.0 → 0.5.0

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 (65) hide show
  1. package/accordion/README.md +3 -0
  2. package/accordion/index.d.ts +7 -0
  3. package/accordion/src/accordion/accordion.directive.d.ts +64 -0
  4. package/accordion/src/accordion/accordion.token.d.ts +4 -0
  5. package/accordion/src/accordion-content/accordion-content.directive.d.ts +44 -0
  6. package/accordion/src/accordion-header/accordion-header.directive.d.ts +6 -0
  7. package/accordion/src/accordion-item/accordion-item.directive.d.ts +42 -0
  8. package/accordion/src/accordion-item/accordion-item.token.d.ts +4 -0
  9. package/accordion/src/accordion-state.directive.d.ts +28 -0
  10. package/accordion/src/accordion-trigger/accordion-trigger.directive.d.ts +23 -0
  11. package/accordion/src/accordion.config.d.ts +25 -0
  12. package/esm2022/accordion/index.mjs +8 -0
  13. package/esm2022/accordion/radix-ng-primitives-accordion.mjs +5 -0
  14. package/esm2022/accordion/src/accordion/accordion.directive.mjs +108 -0
  15. package/esm2022/accordion/src/accordion/accordion.token.mjs +6 -0
  16. package/esm2022/accordion/src/accordion-content/accordion-content.directive.mjs +75 -0
  17. package/esm2022/accordion/src/accordion-header/accordion-header.directive.mjs +17 -0
  18. package/esm2022/accordion/src/accordion-item/accordion-item.directive.mjs +81 -0
  19. package/esm2022/accordion/src/accordion-item/accordion-item.token.mjs +6 -0
  20. package/esm2022/accordion/src/accordion-state.directive.mjs +49 -0
  21. package/esm2022/accordion/src/accordion-trigger/accordion-trigger.directive.mjs +49 -0
  22. package/esm2022/accordion/src/accordion.config.mjs +27 -0
  23. package/esm2022/label/src/label.directive.mjs +17 -3
  24. package/esm2022/roving-focus/src/roving-focus-group.directive.mjs +5 -4
  25. package/esm2022/toggle-group/index.mjs +6 -0
  26. package/esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs +5 -0
  27. package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +79 -0
  28. package/esm2022/toggle-group/src/toggle-group-button.token.mjs +6 -0
  29. package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +159 -0
  30. package/esm2022/toggle-group/src/toggle-group.directive.mjs +157 -0
  31. package/esm2022/toggle-group/src/toggle-group.token.mjs +6 -0
  32. package/fesm2022/radix-ng-primitives-accordion.mjs +394 -0
  33. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -0
  34. package/fesm2022/radix-ng-primitives-label.mjs +16 -2
  35. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  36. package/fesm2022/radix-ng-primitives-roving-focus.mjs +4 -3
  37. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  38. package/fesm2022/radix-ng-primitives-toggle-group.mjs +397 -0
  39. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -0
  40. package/label/src/label.directive.d.ts +6 -1
  41. package/package.json +12 -6
  42. package/roving-focus/src/roving-focus-group.directive.d.ts +1 -1
  43. package/toggle-group/README.md +3 -0
  44. package/toggle-group/index.d.ts +5 -0
  45. package/toggle-group/src/toggle-group-button.directive.d.ts +39 -0
  46. package/toggle-group/src/toggle-group-button.token.d.ts +4 -0
  47. package/toggle-group/src/toggle-group-multi.directive.d.ts +90 -0
  48. package/toggle-group/src/toggle-group.directive.d.ts +90 -0
  49. package/toggle-group/src/toggle-group.token.d.ts +5 -0
  50. package/esm2022/tooltip/index.mjs +0 -5
  51. package/esm2022/tooltip/radix-ng-primitives-tooltip.mjs +0 -5
  52. package/esm2022/tooltip/src/tooltip-arrow.directive.mjs +0 -17
  53. package/esm2022/tooltip/src/tooltip-trigger.directive.mjs +0 -148
  54. package/esm2022/tooltip/src/tooltip-trigger.token.mjs +0 -6
  55. package/esm2022/tooltip/src/tooltip.config.mjs +0 -31
  56. package/esm2022/tooltip/src/tooltip.directive.mjs +0 -46
  57. package/fesm2022/radix-ng-primitives-tooltip.mjs +0 -242
  58. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +0 -1
  59. package/tooltip/README.md +0 -1
  60. package/tooltip/index.d.ts +0 -4
  61. package/tooltip/src/tooltip-arrow.directive.d.ts +0 -6
  62. package/tooltip/src/tooltip-trigger.directive.d.ts +0 -79
  63. package/tooltip/src/tooltip-trigger.token.d.ts +0 -4
  64. package/tooltip/src/tooltip.config.d.ts +0 -46
  65. package/tooltip/src/tooltip.directive.d.ts +0 -17
@@ -0,0 +1,157 @@
1
+ import { booleanAttribute, ContentChildren, Directive, EventEmitter, Input, QueryList } from '@angular/core';
2
+ import { NG_VALUE_ACCESSOR } from '@angular/forms';
3
+ import { injectRovingFocusGroup, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';
4
+ import { RdxToggleGroupButtonToken } from './toggle-group-button.token';
5
+ import { RdxToggleGroupToken } from './toggle-group.token';
6
+ import * as i0 from "@angular/core";
7
+ import * as i1 from "@radix-ng/primitives/roving-focus";
8
+ export class RdxToggleGroupDirective {
9
+ constructor() {
10
+ /**
11
+ * Access the roving focus group
12
+ */
13
+ this.rovingFocusGroup = injectRovingFocusGroup();
14
+ /**
15
+ * The selected toggle button.
16
+ */
17
+ this.value = null;
18
+ /**
19
+ * The orientation of the toggle group.
20
+ * @default 'horizontal'
21
+ */
22
+ this.orientation = 'horizontal';
23
+ /**
24
+ * Whether the toggle group is disabled.
25
+ * @default false
26
+ */
27
+ this.disabled = false;
28
+ /**
29
+ * Whether the toggle group roving focus should wrap.
30
+ * @default true
31
+ */
32
+ this.wrap = true;
33
+ /**
34
+ * Event emitted when the selected toggle button changes.
35
+ */
36
+ this.valueChange = new EventEmitter();
37
+ }
38
+ ngOnInit() {
39
+ // the toggle button group has a default orientation of horizontal
40
+ // whereas the roving focus group has a default orientation of vertical
41
+ // if the toggle button group input is not defined, the orientation will not be set
42
+ // in the roving focus group and the default vertical orientation will be used.
43
+ // we must initially set the orientation of the roving focus group to match the toggle button group orientation
44
+ this.rovingFocusGroup.setOrientation(this.orientation);
45
+ }
46
+ ngOnChanges(changes) {
47
+ if ('disabled' in changes) {
48
+ this.buttons?.forEach((button) => button.updateDisabled());
49
+ }
50
+ }
51
+ ngAfterContentInit() {
52
+ if (this.disabled) {
53
+ this.buttons?.forEach((button) => button.updateDisabled());
54
+ }
55
+ }
56
+ /**
57
+ * Determine if a value is selected.
58
+ * @param value The value to check.
59
+ * @returns Whether the value is selected.
60
+ * @internal
61
+ */
62
+ isSelected(value) {
63
+ return this.value === value;
64
+ }
65
+ /**
66
+ * Toggle a value.
67
+ * @param value The value to toggle.
68
+ * @internal
69
+ */
70
+ toggle(value) {
71
+ if (this.disabled) {
72
+ return;
73
+ }
74
+ this.value = this.value === value ? null : value;
75
+ this.valueChange.emit(this.value);
76
+ this.onChange?.(this.value);
77
+ }
78
+ /**
79
+ * Select a value from Angular forms.
80
+ * @param value The value to select.
81
+ * @internal
82
+ */
83
+ writeValue(value) {
84
+ this.value = value;
85
+ }
86
+ /**
87
+ * Register a callback to be called when the value changes.
88
+ * @param fn The callback to register.
89
+ * @internal
90
+ */
91
+ registerOnChange(fn) {
92
+ this.onChange = fn;
93
+ }
94
+ /**
95
+ * Register a callback to be called when the toggle group is touched.
96
+ * @param fn The callback to register.
97
+ * @internal
98
+ */
99
+ registerOnTouched(fn) {
100
+ this.onTouched = fn;
101
+ }
102
+ /**
103
+ * Set the disabled state of the toggle group.
104
+ * @param isDisabled Whether the toggle group is disabled.
105
+ * @internal
106
+ */
107
+ setDisabledState(isDisabled) {
108
+ this.disabled = isDisabled;
109
+ this.buttons?.forEach((button) => button.updateDisabled());
110
+ }
111
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
112
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxToggleGroupDirective, isStandalone: true, selector: "[rdxToggleGroup]", inputs: { value: ["rdxToggleGroupValue", "value"], orientation: ["rdxToggleGroupOrientation", "orientation"], disabled: ["rdxToggleGroupDisabled", "disabled", booleanAttribute], wrap: ["rdxToggleGroupWrap", "wrap", booleanAttribute], valueChange: ["rdxToggleGroupValueChange", "valueChange"] }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()" }, properties: { "attr.data-orientation": "orientation" } }, providers: [
113
+ { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupDirective },
114
+ { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupDirective, multi: true }
115
+ ], queries: [{ propertyName: "buttons", predicate: RdxToggleGroupButtonToken }], usesOnChanges: true, hostDirectives: [{ directive: i1.RdxRovingFocusGroupDirective, inputs: ["rdxRovingFocusGroupWrap", "wrap", "rdxRovingFocusGroupOrientation", "orientation"] }], ngImport: i0 }); }
116
+ }
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxToggleGroupDirective, decorators: [{
118
+ type: Directive,
119
+ args: [{
120
+ selector: '[rdxToggleGroup]',
121
+ standalone: true,
122
+ hostDirectives: [
123
+ {
124
+ directive: RdxRovingFocusGroupDirective,
125
+ inputs: ['rdxRovingFocusGroupWrap:wrap', 'rdxRovingFocusGroupOrientation:orientation']
126
+ }
127
+ ],
128
+ providers: [
129
+ { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupDirective },
130
+ { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupDirective, multi: true }
131
+ ],
132
+ host: {
133
+ role: 'group',
134
+ '[attr.data-orientation]': 'orientation',
135
+ '(focusout)': 'onTouched?.()'
136
+ }
137
+ }]
138
+ }], propDecorators: { value: [{
139
+ type: Input,
140
+ args: ['rdxToggleGroupValue']
141
+ }], orientation: [{
142
+ type: Input,
143
+ args: ['rdxToggleGroupOrientation']
144
+ }], disabled: [{
145
+ type: Input,
146
+ args: [{ alias: 'rdxToggleGroupDisabled', transform: booleanAttribute }]
147
+ }], wrap: [{
148
+ type: Input,
149
+ args: [{ alias: 'rdxToggleGroupWrap', transform: booleanAttribute }]
150
+ }], valueChange: [{
151
+ type: Input,
152
+ args: ['rdxToggleGroupValueChange']
153
+ }], buttons: [{
154
+ type: ContentChildren,
155
+ args: [RdxToggleGroupButtonToken]
156
+ }] } });
157
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLWdyb3VwLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3ByaW1pdGl2ZXMvdG9nZ2xlLWdyb3VwL3NyYy90b2dnbGUtZ3JvdXAuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFSCxnQkFBZ0IsRUFDaEIsZUFBZSxFQUNmLFNBQVMsRUFDVCxZQUFZLEVBQ1osS0FBSyxFQUdMLFNBQVMsRUFFWixNQUFNLGVBQWUsQ0FBQztBQUN2QixPQUFPLEVBQXdCLGlCQUFpQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFFekUsT0FBTyxFQUNILHNCQUFzQixFQUN0Qiw0QkFBNEIsRUFDL0IsTUFBTSxtQ0FBbUMsQ0FBQztBQUczQyxPQUFPLEVBQUUseUJBQXlCLEVBQUUsTUFBTSw2QkFBNkIsQ0FBQztBQUN4RSxPQUFPLEVBQUUsbUJBQW1CLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQzs7O0FBcUIzRCxNQUFNLE9BQU8sdUJBQXVCO0lBbkJwQztRQXNCSTs7V0FFRztRQUNjLHFCQUFnQixHQUFHLHNCQUFzQixFQUFFLENBQUM7UUFFN0Q7O1dBRUc7UUFDMkIsVUFBSyxHQUFrQixJQUFJLENBQUM7UUFFMUQ7OztXQUdHO1FBQ2lDLGdCQUFXLEdBQThCLFlBQVksQ0FBQztRQUUxRjs7O1dBR0c7UUFDc0UsYUFBUSx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9PiB2b2lkKTogdm9pZCB7XG4gICAgICAgIHRoaXMub25Ub3VjaGVkID0gZm47XG4gICAgfVxuXG4gICAgLyoqXG4gICAgICogU2V0IHRoZSBkaXNhYmxlZCBzdGF0ZSBvZiB0aGUgdG9nZ2xlIGdyb3VwLlxuICAgICAqIEBwYXJhbSBpc0Rpc2FibGVkIFdoZXRoZXIgdGhlIHRvZ2dsZSBncm91cCBpcyBkaXNhYmxlZC5cbiAgICAgKiBAaW50ZXJuYWxcbiAgICAgKi9cbiAgICBzZXREaXNhYmxlZFN0YXRlKGlzRGlzYWJsZWQ6IGJvb2xlYW4pOiB2b2lkIHtcbiAgICAgICAgdGhpcy5kaXNhYmxlZCA9IGlzRGlzYWJsZWQ7XG4gICAgICAgIHRoaXMuYnV0dG9ucz8uZm9yRWFjaCgoYnV0dG9uKSA9PiBidXR0b24udXBkYXRlRGlzYWJsZWQoKSk7XG4gICAgfVxufVxuIl19
@@ -0,0 +1,6 @@
1
+ import { inject, InjectionToken } from '@angular/core';
2
+ export const RdxToggleGroupToken = new InjectionToken('RdxToggleGroupToken');
3
+ export function injectToggleGroup() {
4
+ return inject(RdxToggleGroupToken);
5
+ }
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9nZ2xlLWdyb3VwLnRva2VuLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcHJpbWl0aXZlcy90b2dnbGUtZ3JvdXAvc3JjL3RvZ2dsZS1ncm91cC50b2tlbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLGNBQWMsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUt2RCxNQUFNLENBQUMsTUFBTSxtQkFBbUIsR0FBRyxJQUFJLGNBQWMsQ0FFbkQscUJBQXFCLENBQUMsQ0FBQztBQUV6QixNQUFNLFVBQVUsaUJBQWlCO0lBQzdCLE9BQU8sTUFBTSxDQUFDLG1CQUFtQixDQUFDLENBQUM7QUFDdkMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGluamVjdCwgSW5qZWN0aW9uVG9rZW4gfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHR5cGUgeyBSZHhUb2dnbGVHcm91cE11bHRpRGlyZWN0aXZlIH0gZnJvbSAnLi90b2dnbGUtZ3JvdXAtbXVsdGkuZGlyZWN0aXZlJztcbmltcG9ydCB0eXBlIHsgUmR4VG9nZ2xlR3JvdXBEaXJlY3RpdmUgfSBmcm9tICcuL3RvZ2dsZS1ncm91cC5kaXJlY3RpdmUnO1xuXG5leHBvcnQgY29uc3QgUmR4VG9nZ2xlR3JvdXBUb2tlbiA9IG5ldyBJbmplY3Rpb25Ub2tlbjxcbiAgICBSZHhUb2dnbGVHcm91cERpcmVjdGl2ZSB8IFJkeFRvZ2dsZUdyb3VwTXVsdGlEaXJlY3RpdmVcbj4oJ1JkeFRvZ2dsZUdyb3VwVG9rZW4nKTtcblxuZXhwb3J0IGZ1bmN0aW9uIGluamVjdFRvZ2dsZUdyb3VwKCk6IFJkeFRvZ2dsZUdyb3VwRGlyZWN0aXZlIHwgUmR4VG9nZ2xlR3JvdXBNdWx0aURpcmVjdGl2ZSB7XG4gICAgcmV0dXJuIGluamVjdChSZHhUb2dnbGVHcm91cFRva2VuKTtcbn1cbiJdfQ==
@@ -0,0 +1,394 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, computed, Directive, ElementRef, ChangeDetectorRef, HostBinding, EventEmitter, booleanAttribute, Input, Output, HostListener, signal } from '@angular/core';
3
+ import * as i2 from '@radix-ng/primitives/roving-focus';
4
+ import { RdxRovingFocusItemDirective, injectRovingFocusGroup, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';
5
+
6
+ const RdxAccordionItemToken = new InjectionToken('RdxAccordionItemToken');
7
+ function injectAccordionItem() {
8
+ return inject(RdxAccordionItemToken);
9
+ }
10
+
11
+ const RdxAccordionToken = new InjectionToken('NgpAccordionToken');
12
+ function injectAccordion() {
13
+ return inject(RdxAccordionToken);
14
+ }
15
+
16
+ class RdxAccordionStateDirective {
17
+ constructor() {
18
+ /**
19
+ * Access the accordion the trigger belongs to.
20
+ */
21
+ this.accordion = injectAccordion();
22
+ /**
23
+ * Access the item the trigger belongs to.
24
+ */
25
+ this.item = injectAccordionItem();
26
+ /**
27
+ * Determine the expanded state of the item.
28
+ * @internal
29
+ */
30
+ this.state = computed(() => (this.item.isExpanded() ? 'open' : 'closed'));
31
+ }
32
+ /**
33
+ * Determine the disabled state of the item.
34
+ * @internal
35
+ */
36
+ get isDisabled() {
37
+ return this.item.disabled || this.accordion.disabled;
38
+ }
39
+ /**
40
+ * Determine the orientation of the accordion.
41
+ * @internal
42
+ */
43
+ get orientation() {
44
+ return this.accordion.orientation;
45
+ }
46
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionStateDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
47
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RdxAccordionStateDirective, isStandalone: true, host: { properties: { "attr.data-state": "state()", "attr.data-disabled": "isDisabled", "attr.data-orientation": "orientation" } }, ngImport: i0 }); }
48
+ }
49
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionStateDirective, decorators: [{
50
+ type: Directive,
51
+ args: [{
52
+ standalone: true,
53
+ host: {
54
+ '[attr.data-state]': 'state()',
55
+ '[attr.data-disabled]': 'isDisabled',
56
+ '[attr.data-orientation]': 'orientation'
57
+ }
58
+ }]
59
+ }] });
60
+
61
+ class RdxAccordionContentDirective {
62
+ constructor() {
63
+ /**
64
+ * Access the element ref.
65
+ */
66
+ this.elementRef = inject(ElementRef);
67
+ /**
68
+ * Access the change detector ref.
69
+ */
70
+ this.changeDetectorRef = inject(ChangeDetectorRef);
71
+ /**
72
+ * Access the item the content belongs to.
73
+ */
74
+ this.item = inject(RdxAccordionItemToken);
75
+ /**
76
+ * Derive the id of the content.
77
+ * @internal
78
+ */
79
+ this.id = `${this.item.id}-content`;
80
+ /**
81
+ * Derive the id of the trigger.
82
+ * @internal
83
+ */
84
+ this.labelledby = `${this.item.id}-trigger`;
85
+ /**
86
+ * Define the width of the content as a CSS variable, so it can be used in animations.
87
+ * @internal
88
+ */
89
+ this.width = this.elementRef.nativeElement.scrollWidth;
90
+ /**
91
+ * Define the height of the content as a CSS variable, so it can be used in animations.
92
+ * @internal
93
+ */
94
+ this.height = this.elementRef.nativeElement.scrollHeight;
95
+ }
96
+ ngAfterViewInit() {
97
+ this.updateContentSize();
98
+ }
99
+ /**
100
+ * Update the size of the content.
101
+ */
102
+ updateContentSize() {
103
+ this.width = this.elementRef.nativeElement.scrollWidth;
104
+ this.height = this.elementRef.nativeElement.scrollHeight;
105
+ this.changeDetectorRef.detectChanges();
106
+ }
107
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
108
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RdxAccordionContentDirective, isStandalone: true, selector: "[rdxAccordionContent]", host: { attributes: { "role": "region" }, properties: { "id": "id", "attr.aria-labelledby": "labelledby", "style.display": "!item.isExpanded() ? \"none\": \"\"", "style.--rdx-accordion-content-width.px": "this.width", "style.--rdx-accordion-content-height.px": "this.height" } }, hostDirectives: [{ directive: RdxAccordionStateDirective }], ngImport: i0 }); }
109
+ }
110
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionContentDirective, decorators: [{
111
+ type: Directive,
112
+ args: [{
113
+ selector: '[rdxAccordionContent]',
114
+ standalone: true,
115
+ host: {
116
+ role: 'region',
117
+ '[id]': 'id',
118
+ '[attr.aria-labelledby]': 'labelledby',
119
+ '[style.display]': '!item.isExpanded() ? "none": ""'
120
+ },
121
+ hostDirectives: [RdxAccordionStateDirective]
122
+ }]
123
+ }], propDecorators: { width: [{
124
+ type: HostBinding,
125
+ args: ['style.--rdx-accordion-content-width.px']
126
+ }], height: [{
127
+ type: HostBinding,
128
+ args: ['style.--rdx-accordion-content-height.px']
129
+ }] } });
130
+
131
+ class RdxAccordionHeaderDirective {
132
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionHeaderDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
133
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RdxAccordionHeaderDirective, isStandalone: true, selector: "[rdxAccordionHeader]", hostDirectives: [{ directive: RdxAccordionStateDirective }], ngImport: i0 }); }
134
+ }
135
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionHeaderDirective, decorators: [{
136
+ type: Directive,
137
+ args: [{
138
+ selector: '[rdxAccordionHeader]',
139
+ standalone: true,
140
+ hostDirectives: [RdxAccordionStateDirective]
141
+ }]
142
+ }] });
143
+
144
+ /**
145
+ * A unique id for the item.
146
+ */
147
+ let uniqueId = 0;
148
+ class RdxAccordionItemDirective {
149
+ constructor() {
150
+ /**
151
+ * Access the accordion the item belongs to.
152
+ */
153
+ this.accordion = injectAccordion();
154
+ /**
155
+ * Determines whether the item should be expanded.
156
+ * @default false
157
+ */
158
+ this.expanded = false;
159
+ /**
160
+ * Determines whether the Item should be disabled.
161
+ * @default false
162
+ */
163
+ this.disabled = false;
164
+ /**
165
+ * Event emitted when the Item is expanded.
166
+ */
167
+ this.expandedChange = new EventEmitter();
168
+ /**
169
+ * The unique id of the Item.
170
+ * @internal
171
+ */
172
+ this.id = `rdx-accordion-item-${uniqueId++}`;
173
+ /**
174
+ * Determine if this item is expanded.
175
+ * @internal
176
+ */
177
+ this.isExpanded = computed(() => this.accordion.expanded().includes(this.id));
178
+ }
179
+ /**
180
+ * Toggle the expanded state of the Item.
181
+ */
182
+ toggle() {
183
+ // If the accordion or Item is disabled, do nothing.
184
+ if (this.accordion.disabled || this.disabled) {
185
+ return;
186
+ }
187
+ if (this.isExpanded()) {
188
+ this.accordion.collapse(this.id);
189
+ }
190
+ else {
191
+ this.accordion.expand(this.id);
192
+ }
193
+ this.expandedChange.emit(this.isExpanded());
194
+ }
195
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
196
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxAccordionItemDirective, isStandalone: true, selector: "[rdxAccordionItem]", inputs: { expanded: ["rdxAccordionItemExpanded", "expanded", booleanAttribute], disabled: ["rdxAccordionItemDisabled", "disabled", booleanAttribute] }, outputs: { expandedChange: "rdxAccordionItemExpandedChange" }, providers: [{ provide: RdxAccordionItemToken, useExisting: RdxAccordionItemDirective }], hostDirectives: [{ directive: RdxAccordionStateDirective }, { directive: i2.RdxRovingFocusItemDirective }], ngImport: i0 }); }
197
+ }
198
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionItemDirective, decorators: [{
199
+ type: Directive,
200
+ args: [{
201
+ selector: '[rdxAccordionItem]',
202
+ standalone: true,
203
+ providers: [{ provide: RdxAccordionItemToken, useExisting: RdxAccordionItemDirective }],
204
+ hostDirectives: [RdxAccordionStateDirective, RdxRovingFocusItemDirective]
205
+ }]
206
+ }], propDecorators: { expanded: [{
207
+ type: Input,
208
+ args: [{ alias: 'rdxAccordionItemExpanded', transform: booleanAttribute }]
209
+ }], disabled: [{
210
+ type: Input,
211
+ args: [{ alias: 'rdxAccordionItemDisabled', transform: booleanAttribute }]
212
+ }], expandedChange: [{
213
+ type: Output,
214
+ args: ['rdxAccordionItemExpandedChange']
215
+ }] } });
216
+
217
+ class RdxAccordionTriggerDirective {
218
+ constructor() {
219
+ /**
220
+ * Access the item the trigger belongs to.
221
+ */
222
+ this.item = inject(RdxAccordionItemToken);
223
+ /**
224
+ * Get the id of the item content.
225
+ * @internal
226
+ */
227
+ this.contentId = `${this.item.id}-content`;
228
+ }
229
+ /**
230
+ * Derive the id of the trigger.
231
+ */
232
+ get triggerId() {
233
+ return `${this.item.id}-trigger`;
234
+ }
235
+ /**
236
+ * Toggle the expanded state of the item.
237
+ */
238
+ toggle() {
239
+ this.item.toggle();
240
+ }
241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
242
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.3", type: RdxAccordionTriggerDirective, isStandalone: true, selector: "[rdxAccordionTrigger]", host: { listeners: { "click": "toggle()" }, properties: { "id": "triggerId", "attr.aria-expanded": "item.isExpanded()", "attr.aria-controls": "contentId" } }, hostDirectives: [{ directive: RdxAccordionStateDirective }], ngImport: i0 }); }
243
+ }
244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionTriggerDirective, decorators: [{
245
+ type: Directive,
246
+ args: [{
247
+ selector: '[rdxAccordionTrigger]',
248
+ standalone: true,
249
+ hostDirectives: [RdxAccordionStateDirective],
250
+ host: {
251
+ '[id]': 'triggerId',
252
+ '[attr.aria-expanded]': 'item.isExpanded()',
253
+ '[attr.aria-controls]': 'contentId'
254
+ }
255
+ }]
256
+ }], propDecorators: { toggle: [{
257
+ type: HostListener,
258
+ args: ['click']
259
+ }] } });
260
+
261
+ const RdxAccordionConfigToken = new InjectionToken('RdxAccordionConfiguration');
262
+ const defaultAccordionConfig = {
263
+ multiple: false,
264
+ orientation: 'vertical'
265
+ };
266
+ /**
267
+ * Provide the default accordion configuration
268
+ * @param config The accordion configuration
269
+ * @returns The provider
270
+ */
271
+ function provideAccordionConfig(config) {
272
+ return [
273
+ {
274
+ provide: RdxAccordionConfigToken,
275
+ useValue: { ...defaultAccordionConfig, ...config }
276
+ }
277
+ ];
278
+ }
279
+ /**
280
+ * Inject the accordion configuration
281
+ * @returns The global accordion configuration
282
+ */
283
+ function injectAccordionConfig() {
284
+ return inject(RdxAccordionConfigToken, { optional: true }) ?? defaultAccordionConfig;
285
+ }
286
+
287
+ /**
288
+ * The root accordion directive that all parts should be placed within.
289
+ */
290
+ class RdxAccordionDirective {
291
+ constructor() {
292
+ /**
293
+ * Access the global accordion configuration.
294
+ */
295
+ this.config = injectAccordionConfig();
296
+ /**
297
+ * Access the roving focus group
298
+ */
299
+ this.rovingFocusGroup = injectRovingFocusGroup();
300
+ /**
301
+ * Determines whether multiple items can be open simultaneously.
302
+ * @default false
303
+ */
304
+ this.multiple = this.config.multiple;
305
+ /**
306
+ * The orientation of the accordion.
307
+ * @default 'vertical'
308
+ */
309
+ this.orientation = this.config.orientation;
310
+ /**
311
+ * Determines whether the accordion should be disabled.
312
+ * @default false
313
+ */
314
+ this.disabled = false;
315
+ /**
316
+ * Store the currently expanded item(s).
317
+ * @internal
318
+ */
319
+ this.expanded = signal([]);
320
+ }
321
+ ngOnInit() {
322
+ this.rovingFocusGroup.setOrientation(this.orientation);
323
+ }
324
+ /**
325
+ * Expand an item.
326
+ * @param id The id of the item to expand.
327
+ */
328
+ expand(id) {
329
+ this.expanded.set(this.multiple ? [...this.expanded(), id] : [id]);
330
+ }
331
+ /**
332
+ * Collapse an Item.
333
+ * @param id The id of the Item to collapse.
334
+ */
335
+ collapse(id) {
336
+ this.expanded.set(this.expanded().filter((expandedId) => expandedId !== id));
337
+ }
338
+ /**
339
+ * Toggle an item.
340
+ * @param id The id of the item to toggle.
341
+ */
342
+ toggle(id) {
343
+ if (this.expanded().includes(id)) {
344
+ this.collapse(id);
345
+ }
346
+ else {
347
+ this.expand(id);
348
+ }
349
+ }
350
+ /**
351
+ * Collapse all items.
352
+ */
353
+ collapseAll() {
354
+ this.expanded.set([]);
355
+ }
356
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
357
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "17.3.3", type: RdxAccordionDirective, isStandalone: true, selector: "[rdxAccordion]", inputs: { multiple: ["rdxAccordionMultiple", "multiple", booleanAttribute], orientation: ["rdxAccordionOrientation", "orientation"], disabled: ["rdxAccordionDisabled", "disabled", booleanAttribute] }, host: { listeners: { "focusout": "onTouched?.()" }, properties: { "attr.data-orientation": "this.orientation" } }, providers: [{ provide: RdxAccordionToken, useExisting: RdxAccordionDirective }], hostDirectives: [{ directive: i2.RdxRovingFocusGroupDirective, inputs: ["rdxRovingFocusGroupOrientation", "orientation"] }], ngImport: i0 }); }
358
+ }
359
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.3", ngImport: i0, type: RdxAccordionDirective, decorators: [{
360
+ type: Directive,
361
+ args: [{
362
+ selector: '[rdxAccordion]',
363
+ standalone: true,
364
+ hostDirectives: [
365
+ {
366
+ directive: RdxRovingFocusGroupDirective,
367
+ inputs: ['rdxRovingFocusGroupOrientation:orientation']
368
+ }
369
+ ],
370
+ providers: [{ provide: RdxAccordionToken, useExisting: RdxAccordionDirective }],
371
+ host: {
372
+ '(focusout)': 'onTouched?.()'
373
+ }
374
+ }]
375
+ }], propDecorators: { multiple: [{
376
+ type: Input,
377
+ args: [{ alias: 'rdxAccordionMultiple', transform: booleanAttribute }]
378
+ }], orientation: [{
379
+ type: HostBinding,
380
+ args: ['attr.data-orientation']
381
+ }, {
382
+ type: Input,
383
+ args: [{ alias: 'rdxAccordionOrientation' }]
384
+ }], disabled: [{
385
+ type: Input,
386
+ args: [{ alias: 'rdxAccordionDisabled', transform: booleanAttribute }]
387
+ }] } });
388
+
389
+ /**
390
+ * Generated bundle index. Do not edit.
391
+ */
392
+
393
+ export { RdxAccordionConfigToken, RdxAccordionContentDirective, RdxAccordionDirective, RdxAccordionHeaderDirective, RdxAccordionItemDirective, RdxAccordionStateDirective, RdxAccordionTriggerDirective, injectAccordionConfig, provideAccordionConfig };
394
+ //# sourceMappingURL=radix-ng-primitives-accordion.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radix-ng-primitives-accordion.mjs","sources":["../../../packages/primitives/accordion/src/accordion-item/accordion-item.token.ts","../../../packages/primitives/accordion/src/accordion/accordion.token.ts","../../../packages/primitives/accordion/src/accordion-state.directive.ts","../../../packages/primitives/accordion/src/accordion-content/accordion-content.directive.ts","../../../packages/primitives/accordion/src/accordion-header/accordion-header.directive.ts","../../../packages/primitives/accordion/src/accordion-item/accordion-item.directive.ts","../../../packages/primitives/accordion/src/accordion-trigger/accordion-trigger.directive.ts","../../../packages/primitives/accordion/src/accordion.config.ts","../../../packages/primitives/accordion/src/accordion/accordion.directive.ts","../../../packages/primitives/accordion/radix-ng-primitives-accordion.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\n\nimport type { RdxAccordionItemDirective } from './accordion-item.directive';\n\nexport const RdxAccordionItemToken = new InjectionToken<RdxAccordionItemDirective>(\n 'RdxAccordionItemToken'\n);\n\nexport function injectAccordionItem(): RdxAccordionItemDirective {\n return inject(RdxAccordionItemToken);\n}\n","import { inject, InjectionToken } from '@angular/core';\n\nimport type { RdxAccordionDirective } from './accordion.directive';\n\nexport const RdxAccordionToken = new InjectionToken<RdxAccordionDirective>('NgpAccordionToken');\n\nexport function injectAccordion(): RdxAccordionDirective {\n return inject(RdxAccordionToken);\n}\n","import { computed, Directive } from '@angular/core';\n\nimport { injectAccordionItem } from './accordion-item/accordion-item.token';\nimport { injectAccordion } from './accordion/accordion.token';\n\n@Directive({\n standalone: true,\n host: {\n '[attr.data-state]': 'state()',\n '[attr.data-disabled]': 'isDisabled',\n '[attr.data-orientation]': 'orientation'\n }\n})\nexport class RdxAccordionStateDirective {\n /**\n * Access the accordion the trigger belongs to.\n */\n private readonly accordion = injectAccordion();\n\n /**\n * Access the item the trigger belongs to.\n */\n private readonly item = injectAccordionItem();\n\n /**\n * Determine the expanded state of the item.\n * @internal\n */\n readonly state = computed(() => (this.item.isExpanded() ? 'open' : 'closed'));\n\n /**\n * Determine the disabled state of the item.\n * @internal\n */\n get isDisabled(): boolean {\n return this.item.disabled || this.accordion.disabled;\n }\n\n /**\n * Determine the orientation of the accordion.\n * @internal\n */\n get orientation(): 'horizontal' | 'vertical' {\n return this.accordion.orientation;\n }\n}\n","import {\n AfterViewInit,\n ChangeDetectorRef,\n Directive,\n ElementRef,\n HostBinding,\n inject\n} from '@angular/core';\n\nimport { RdxAccordionItemToken } from '../accordion-item/accordion-item.token';\nimport { RdxAccordionStateDirective } from '../accordion-state.directive';\n\n@Directive({\n selector: '[rdxAccordionContent]',\n standalone: true,\n host: {\n role: 'region',\n '[id]': 'id',\n '[attr.aria-labelledby]': 'labelledby',\n '[style.display]': '!item.isExpanded() ? \"none\": \"\"'\n },\n hostDirectives: [RdxAccordionStateDirective]\n})\nexport class RdxAccordionContentDirective implements AfterViewInit {\n /**\n * Access the element ref.\n */\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n /**\n * Access the change detector ref.\n */\n private readonly changeDetectorRef = inject(ChangeDetectorRef);\n\n /**\n * Access the item the content belongs to.\n */\n protected readonly item = inject(RdxAccordionItemToken);\n\n /**\n * Derive the id of the content.\n * @internal\n */\n readonly id = `${this.item.id}-content`;\n\n /**\n * Derive the id of the trigger.\n * @internal\n */\n readonly labelledby = `${this.item.id}-trigger`;\n\n /**\n * Define the width of the content as a CSS variable, so it can be used in animations.\n * @internal\n */\n @HostBinding('style.--rdx-accordion-content-width.px')\n protected width = this.elementRef.nativeElement.scrollWidth;\n\n /**\n * Define the height of the content as a CSS variable, so it can be used in animations.\n * @internal\n */\n @HostBinding('style.--rdx-accordion-content-height.px')\n protected height = this.elementRef.nativeElement.scrollHeight;\n\n ngAfterViewInit(): void {\n this.updateContentSize();\n }\n\n /**\n * Update the size of the content.\n */\n private updateContentSize(): void {\n this.width = this.elementRef.nativeElement.scrollWidth;\n this.height = this.elementRef.nativeElement.scrollHeight;\n this.changeDetectorRef.detectChanges();\n }\n}\n","import { Directive } from '@angular/core';\n\nimport { RdxAccordionStateDirective } from '../accordion-state.directive';\n\n@Directive({\n selector: '[rdxAccordionHeader]',\n standalone: true,\n hostDirectives: [RdxAccordionStateDirective]\n})\nexport class RdxAccordionHeaderDirective {}\n","import { booleanAttribute, computed, Directive, EventEmitter, Input, Output } from '@angular/core';\n\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\n\nimport { RdxAccordionStateDirective } from '../accordion-state.directive';\nimport { injectAccordion } from '../accordion/accordion.token';\nimport { RdxAccordionItemToken } from './accordion-item.token';\n\n/**\n * A unique id for the item.\n */\nlet uniqueId = 0;\n\n@Directive({\n selector: '[rdxAccordionItem]',\n standalone: true,\n providers: [{ provide: RdxAccordionItemToken, useExisting: RdxAccordionItemDirective }],\n hostDirectives: [RdxAccordionStateDirective, RdxRovingFocusItemDirective]\n})\nexport class RdxAccordionItemDirective {\n /**\n * Access the accordion the item belongs to.\n */\n private readonly accordion = injectAccordion();\n\n /**\n * Determines whether the item should be expanded.\n * @default false\n */\n @Input({ alias: 'rdxAccordionItemExpanded', transform: booleanAttribute }) expanded = false;\n\n /**\n * Determines whether the Item should be disabled.\n * @default false\n */\n @Input({ alias: 'rdxAccordionItemDisabled', transform: booleanAttribute }) disabled = false;\n\n /**\n * Event emitted when the Item is expanded.\n */\n @Output('rdxAccordionItemExpandedChange') readonly expandedChange = new EventEmitter<boolean>();\n\n /**\n * The unique id of the Item.\n * @internal\n */\n readonly id = `rdx-accordion-item-${uniqueId++}`;\n\n /**\n * Determine if this item is expanded.\n * @internal\n */\n readonly isExpanded = computed(() => this.accordion.expanded().includes(this.id));\n\n /**\n * Toggle the expanded state of the Item.\n */\n toggle(): void {\n // If the accordion or Item is disabled, do nothing.\n if (this.accordion.disabled || this.disabled) {\n return;\n }\n\n if (this.isExpanded()) {\n this.accordion.collapse(this.id);\n } else {\n this.accordion.expand(this.id);\n }\n\n this.expandedChange.emit(this.isExpanded());\n }\n}\n","import { Directive, HostListener, inject } from '@angular/core';\n\nimport { RdxAccordionItemToken } from '../accordion-item/accordion-item.token';\nimport { RdxAccordionStateDirective } from '../accordion-state.directive';\n\n@Directive({\n selector: '[rdxAccordionTrigger]',\n standalone: true,\n hostDirectives: [RdxAccordionStateDirective],\n host: {\n '[id]': 'triggerId',\n '[attr.aria-expanded]': 'item.isExpanded()',\n '[attr.aria-controls]': 'contentId'\n }\n})\nexport class RdxAccordionTriggerDirective {\n /**\n * Access the item the trigger belongs to.\n */\n protected readonly item = inject(RdxAccordionItemToken);\n\n /**\n * Derive the id of the trigger.\n */\n protected get triggerId(): string {\n return `${this.item.id}-trigger`;\n }\n\n /**\n * Get the id of the item content.\n * @internal\n */\n protected readonly contentId = `${this.item.id}-content`;\n\n /**\n * Toggle the expanded state of the item.\n */\n @HostListener('click')\n toggle(): void {\n this.item.toggle();\n }\n}\n","import { inject, InjectionToken, Provider } from '@angular/core';\n\nexport const RdxAccordionConfigToken = new InjectionToken<RdxAccordionConfig>(\n 'RdxAccordionConfiguration'\n);\n\nexport interface RdxAccordionConfig {\n /**\n * Determines whether multiple items can be open simultaneously.\n * @default false\n */\n multiple: boolean;\n\n /**\n * The orientation of the accordion.\n * @default 'vertical'\n */\n orientation: 'horizontal' | 'vertical';\n}\n\nconst defaultAccordionConfig: RdxAccordionConfig = {\n multiple: false,\n orientation: 'vertical'\n};\n\n/**\n * Provide the default accordion configuration\n * @param config The accordion configuration\n * @returns The provider\n */\nexport function provideAccordionConfig(config: Partial<RdxAccordionConfig>): Provider[] {\n return [\n {\n provide: RdxAccordionConfigToken,\n useValue: { ...defaultAccordionConfig, ...config }\n }\n ];\n}\n\n/**\n * Inject the accordion configuration\n * @returns The global accordion configuration\n */\nexport function injectAccordionConfig(): RdxAccordionConfig {\n return inject(RdxAccordionConfigToken, { optional: true }) ?? defaultAccordionConfig;\n}\n","import { booleanAttribute, Directive, HostBinding, Input, OnInit, signal } from '@angular/core';\n\nimport {\n injectRovingFocusGroup,\n RdxRovingFocusGroupDirective\n} from '@radix-ng/primitives/roving-focus';\n\nimport { injectAccordionConfig } from '../accordion.config';\nimport { RdxAccordionToken } from './accordion.token';\n\n/**\n * The root accordion directive that all parts should be placed within.\n */\n@Directive({\n selector: '[rdxAccordion]',\n standalone: true,\n hostDirectives: [\n {\n directive: RdxRovingFocusGroupDirective,\n inputs: ['rdxRovingFocusGroupOrientation:orientation']\n }\n ],\n providers: [{ provide: RdxAccordionToken, useExisting: RdxAccordionDirective }],\n host: {\n '(focusout)': 'onTouched?.()'\n }\n})\nexport class RdxAccordionDirective implements OnInit {\n /**\n * Access the global accordion configuration.\n */\n private readonly config = injectAccordionConfig();\n\n /**\n * Access the roving focus group\n */\n private readonly rovingFocusGroup = injectRovingFocusGroup();\n\n /**\n * Determines whether multiple items can be open simultaneously.\n * @default false\n */\n @Input({ alias: 'rdxAccordionMultiple', transform: booleanAttribute }) multiple: boolean =\n this.config.multiple;\n\n /**\n * The orientation of the accordion.\n * @default 'vertical'\n */\n @HostBinding('attr.data-orientation')\n @Input({ alias: 'rdxAccordionOrientation' })\n orientation: 'horizontal' | 'vertical' = this.config.orientation;\n\n /**\n * Determines whether the accordion should be disabled.\n * @default false\n */\n @Input({ alias: 'rdxAccordionDisabled', transform: booleanAttribute }) disabled = false;\n\n /**\n * Store the currently expanded item(s).\n * @internal\n */\n readonly expanded = signal<string[]>([]);\n\n /**\n * The touched callback.\n */\n protected onTouched?: () => void;\n\n ngOnInit(): void {\n this.rovingFocusGroup.setOrientation(this.orientation);\n }\n /**\n * Expand an item.\n * @param id The id of the item to expand.\n */\n expand(id: string): void {\n this.expanded.set(this.multiple ? [...this.expanded(), id] : [id]);\n }\n\n /**\n * Collapse an Item.\n * @param id The id of the Item to collapse.\n */\n collapse(id: string): void {\n this.expanded.set(this.expanded().filter((expandedId) => expandedId !== id));\n }\n\n /**\n * Toggle an item.\n * @param id The id of the item to toggle.\n */\n toggle(id: string): void {\n if (this.expanded().includes(id)) {\n this.collapse(id);\n } else {\n this.expand(id);\n }\n }\n\n /**\n * Collapse all items.\n */\n collapseAll(): void {\n this.expanded.set([]);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.RdxAccordionStateDirective","i1"],"mappings":";;;;;AAIO,MAAM,qBAAqB,GAAG,IAAI,cAAc,CACnD,uBAAuB,CAC1B,CAAC;SAEc,mBAAmB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,qBAAqB,CAAC,CAAC;AACzC;;ACNO,MAAM,iBAAiB,GAAG,IAAI,cAAc,CAAwB,mBAAmB,CAAC,CAAC;SAEhF,eAAe,GAAA;AAC3B,IAAA,OAAO,MAAM,CAAC,iBAAiB,CAAC,CAAC;AACrC;;MCKa,0BAA0B,CAAA;AARvC,IAAA,WAAA,GAAA;AASI;;AAEG;QACc,IAAS,CAAA,SAAA,GAAG,eAAe,EAAE,CAAC;AAE/C;;AAEG;QACc,IAAI,CAAA,IAAA,GAAG,mBAAmB,EAAE,CAAC;AAE9C;;;AAGG;QACM,IAAK,CAAA,KAAA,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,GAAG,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC;AAiBjF,KAAA;AAfG;;;AAGG;AACH,IAAA,IAAI,UAAU,GAA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