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