@radix-ng/primitives 1.0.0-beta.4 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/composite/README.md +3 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +12 -36
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +33 -18
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-composite.mjs +515 -0
- package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-core.mjs +7 -0
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +54 -12
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +442 -2
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-editable.mjs +12 -7
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +294 -8
- package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +9 -0
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +71 -20
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +68 -36
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +281 -88
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +7 -2
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +117 -35
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +73 -65
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +77 -36
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +40 -8
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-scroll-area.mjs +56 -25
- package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +62 -37
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +259 -28
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +11 -7
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +10 -5
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +64 -30
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +69 -19
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +37 -13
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +50 -24
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +180 -35
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/navigation-menu/README.md +5 -2
- package/package.json +5 -1
- package/types/radix-ng-primitives-accordion.d.ts +9 -13
- package/types/radix-ng-primitives-checkbox.d.ts +27 -15
- package/types/radix-ng-primitives-composite.d.ts +152 -0
- package/types/radix-ng-primitives-core.d.ts +2 -0
- package/types/radix-ng-primitives-dialog.d.ts +13 -2
- package/types/radix-ng-primitives-drawer.d.ts +40 -2
- package/types/radix-ng-primitives-editable.d.ts +11 -5
- package/types/radix-ng-primitives-floating-focus-manager.d.ts +113 -16
- package/types/radix-ng-primitives-menu.d.ts +13 -5
- package/types/radix-ng-primitives-menubar.d.ts +10 -5
- package/types/radix-ng-primitives-navigation-menu.d.ts +65 -33
- package/types/radix-ng-primitives-number-field.d.ts +8 -3
- package/types/radix-ng-primitives-popover.d.ts +26 -10
- package/types/radix-ng-primitives-popper.d.ts +1 -0
- package/types/radix-ng-primitives-radio.d.ts +22 -13
- package/types/radix-ng-primitives-roving-focus.d.ts +15 -1
- package/types/radix-ng-primitives-scroll-area.d.ts +4 -1
- package/types/radix-ng-primitives-select.d.ts +16 -20
- package/types/radix-ng-primitives-slider.d.ts +60 -9
- package/types/radix-ng-primitives-stepper.d.ts +11 -4
- package/types/radix-ng-primitives-switch.d.ts +10 -4
- package/types/radix-ng-primitives-tabs.d.ts +20 -11
- package/types/radix-ng-primitives-toggle-group.d.ts +34 -17
- package/types/radix-ng-primitives-toggle.d.ts +14 -7
- package/types/radix-ng-primitives-toolbar.d.ts +22 -14
- package/types/radix-ng-primitives-tooltip.d.ts +38 -14
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, model, input, booleanAttribute, output, signal, computed, effect, Directive,
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
2
|
+
import { InjectionToken, inject, ElementRef, model, input, booleanAttribute, output, signal, computed, effect, Directive, Renderer2, DestroyRef } from '@angular/core';
|
|
3
|
+
import * as i1 from '@radix-ng/primitives/composite';
|
|
4
|
+
import { RdxCompositeRoot, RdxCompositeItem } from '@radix-ng/primitives/composite';
|
|
5
|
+
import { createCancelableChangeEventDetails, provideValueAccessor, provideToken } from '@radix-ng/primitives/core';
|
|
6
6
|
import * as i1$1 from '@radix-ng/primitives/visually-hidden';
|
|
7
7
|
import { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';
|
|
8
8
|
|
|
@@ -10,6 +10,8 @@ const RDX_RADIO_GROUP = new InjectionToken('RdxRadioGroup');
|
|
|
10
10
|
|
|
11
11
|
class RdxRadioGroupDirective {
|
|
12
12
|
constructor() {
|
|
13
|
+
this.elementRef = inject(ElementRef);
|
|
14
|
+
this.compositeRoot = inject(RdxCompositeRoot, { self: true });
|
|
13
15
|
this.value = model(null, ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
14
16
|
this.defaultValue = input(...(ngDevMode ? [undefined, { debugName: "defaultValue" }] : /* istanbul ignore next */ []));
|
|
15
17
|
this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
|
|
@@ -17,7 +19,6 @@ class RdxRadioGroupDirective {
|
|
|
17
19
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
18
20
|
this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
19
21
|
this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
20
|
-
this.orientation = input(...(ngDevMode ? [undefined, { debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
21
22
|
/**
|
|
22
23
|
* Event handler called when the value changes.
|
|
23
24
|
*/
|
|
@@ -25,6 +26,17 @@ class RdxRadioGroupDirective {
|
|
|
25
26
|
this.disable = signal(this.disabled(), ...(ngDevMode ? [{ debugName: "disable" }] : /* istanbul ignore next */ []));
|
|
26
27
|
this.disabledState = computed(() => this.disable() || this.disabled(), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
27
28
|
this.arrowNavigation = signal(false, ...(ngDevMode ? [{ debugName: "arrowNavigation" }] : /* istanbul ignore next */ []));
|
|
29
|
+
this.itemMetadata = computed(() => Array.from(this.compositeRoot.itemMap().values()).filter(isRadioItemMetadata), ...(ngDevMode ? [{ debugName: "itemMetadata" }] : /* istanbul ignore next */ []));
|
|
30
|
+
this.disabledIndices = computed(() => this.itemMetadata()
|
|
31
|
+
.filter((metadata) => metadata.disabled)
|
|
32
|
+
.map((metadata) => metadata.index), ...(ngDevMode ? [{ debugName: "disabledIndices" }] : /* istanbul ignore next */ []));
|
|
33
|
+
this.activeIndex = computed(() => {
|
|
34
|
+
const value = this.value();
|
|
35
|
+
if (value === null) {
|
|
36
|
+
return -1;
|
|
37
|
+
}
|
|
38
|
+
return this.itemMetadata().find((metadata) => metadata.value === value)?.index ?? -1;
|
|
39
|
+
}, ...(ngDevMode ? [{ debugName: "activeIndex" }] : /* istanbul ignore next */ []));
|
|
28
40
|
/**
|
|
29
41
|
* The callback function to call when the value of the radio group changes.
|
|
30
42
|
*/
|
|
@@ -43,20 +55,43 @@ class RdxRadioGroupDirective {
|
|
|
43
55
|
this.value.set(this.defaultValue());
|
|
44
56
|
}
|
|
45
57
|
});
|
|
58
|
+
effect(() => {
|
|
59
|
+
this.compositeRoot.setEnableHomeAndEndKeys(false);
|
|
60
|
+
this.compositeRoot.setModifierKeys(['Shift']);
|
|
61
|
+
});
|
|
62
|
+
effect(() => {
|
|
63
|
+
this.compositeRoot.setDisabledIndices(this.disabledIndices());
|
|
64
|
+
});
|
|
65
|
+
effect(() => {
|
|
66
|
+
const activeIndex = this.activeIndex();
|
|
67
|
+
if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
const activeElement = this.elementRef.nativeElement.ownerDocument.activeElement;
|
|
71
|
+
if (activeElement && this.elementRef.nativeElement.contains(activeElement)) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
this.compositeRoot.setHighlightedIndex(activeIndex);
|
|
75
|
+
});
|
|
46
76
|
}
|
|
47
77
|
/**
|
|
48
78
|
* Select a radio item.
|
|
49
79
|
* @param value The value of the radio item to select.
|
|
50
80
|
* @ignore
|
|
51
81
|
*/
|
|
52
|
-
select(value) {
|
|
82
|
+
select(value, event, reason = 'none') {
|
|
53
83
|
if (this.disabledState() || this.readonly() || this.value() === value) {
|
|
54
84
|
return;
|
|
55
85
|
}
|
|
56
|
-
this.value.set(value);
|
|
57
86
|
if (value !== null) {
|
|
58
|
-
|
|
87
|
+
const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;
|
|
88
|
+
const { eventDetails } = createCancelableChangeEventDetails(reason, event ?? new Event('radio.value-change'), trigger);
|
|
89
|
+
this.onValueChange.emit({ value, eventDetails });
|
|
90
|
+
if (eventDetails.isCanceled()) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
59
93
|
}
|
|
94
|
+
this.value.set(value);
|
|
60
95
|
this.onChange?.(value);
|
|
61
96
|
this.onTouched();
|
|
62
97
|
}
|
|
@@ -99,10 +134,10 @@ class RdxRadioGroupDirective {
|
|
|
99
134
|
return;
|
|
100
135
|
}
|
|
101
136
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
102
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", 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 }
|
|
137
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioGroupDirective, isStandalone: true, selector: "[rdxRadioRoot]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, form: { classPropertyName: "form", publicName: "form", 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 } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "radiogroup" }, listeners: { "keydown": "onKeydown()" }, properties: { "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-disabled": "disabledState() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined" } }, providers: [
|
|
103
138
|
provideValueAccessor(RdxRadioGroupDirective),
|
|
104
139
|
{ provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }
|
|
105
|
-
], exportAs: ["rdxRadioRoot"], hostDirectives: [{ directive: i1.
|
|
140
|
+
], exportAs: ["rdxRadioRoot"], hostDirectives: [{ directive: i1.RdxCompositeRoot }], ngImport: i0 }); }
|
|
106
141
|
}
|
|
107
142
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioGroupDirective, decorators: [{
|
|
108
143
|
type: Directive,
|
|
@@ -113,18 +148,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
113
148
|
provideValueAccessor(RdxRadioGroupDirective),
|
|
114
149
|
{ provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }
|
|
115
150
|
],
|
|
116
|
-
hostDirectives: [
|
|
151
|
+
hostDirectives: [RdxCompositeRoot],
|
|
117
152
|
host: {
|
|
118
153
|
role: 'radiogroup',
|
|
119
|
-
'[attr.aria-orientation]': 'orientation()',
|
|
120
154
|
'[attr.aria-required]': 'required() ? "true" : undefined',
|
|
155
|
+
'[attr.aria-disabled]': 'disabledState() ? "true" : undefined',
|
|
156
|
+
'[attr.aria-readonly]': 'readonly() ? "true" : undefined',
|
|
121
157
|
'[attr.data-disabled]': 'disabledState() ? "" : undefined',
|
|
122
158
|
'[attr.data-readonly]': 'readonly() ? "" : undefined',
|
|
123
159
|
'[attr.data-required]': 'required() ? "" : undefined',
|
|
124
160
|
'(keydown)': 'onKeydown()'
|
|
125
161
|
}
|
|
126
162
|
}]
|
|
127
|
-
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", 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 }] }],
|
|
163
|
+
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], form: [{ type: i0.Input, args: [{ isSignal: true, alias: "form", 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 }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
|
|
164
|
+
function isRadioItemMetadata(metadata) {
|
|
165
|
+
return typeof metadata['disabled'] === 'boolean' && typeof metadata['value'] === 'string';
|
|
166
|
+
}
|
|
128
167
|
|
|
129
168
|
const RdxRadioItemToken = new InjectionToken('RadioItemToken');
|
|
130
169
|
function injectRadioItem() {
|
|
@@ -135,7 +174,7 @@ class RdxRadioItemDirective {
|
|
|
135
174
|
this.radioGroup = inject(RDX_RADIO_GROUP);
|
|
136
175
|
this.elementRef = inject(ElementRef);
|
|
137
176
|
this.renderer = inject(Renderer2);
|
|
138
|
-
this.
|
|
177
|
+
this.compositeItem = inject(RdxCompositeItem, { self: true });
|
|
139
178
|
this.destroyRef = inject(DestroyRef);
|
|
140
179
|
this.inputElement = this.renderer.createElement('input');
|
|
141
180
|
this.value = input.required(...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
@@ -144,16 +183,16 @@ class RdxRadioItemDirective {
|
|
|
144
183
|
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
145
184
|
this.readonly = input(false, { ...(ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
146
185
|
this.nativeButton = input(false, { ...(ngDevMode ? { debugName: "nativeButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
147
|
-
this.nativeButtonState = computed(() => this.nativeButton()
|
|
186
|
+
this.nativeButtonState = computed(() => this.nativeButton(), ...(ngDevMode ? [{ debugName: "nativeButtonState" }] : /* istanbul ignore next */ []));
|
|
148
187
|
this.disabledState = computed(() => this.radioGroup.disabledState() || this.disabled(), ...(ngDevMode ? [{ debugName: "disabledState" }] : /* istanbul ignore next */ []));
|
|
149
188
|
this.readonlyState = computed(() => this.radioGroup.readonly() || this.readonly(), ...(ngDevMode ? [{ debugName: "readonlyState" }] : /* istanbul ignore next */ []));
|
|
150
189
|
this.requiredState = computed(() => this.radioGroup.required() || this.required(), ...(ngDevMode ? [{ debugName: "requiredState" }] : /* istanbul ignore next */ []));
|
|
151
190
|
this.checkedState = computed(() => this.radioGroup.value() === this.value(), ...(ngDevMode ? [{ debugName: "checkedState" }] : /* istanbul ignore next */ []));
|
|
152
191
|
this.ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'];
|
|
153
192
|
this.createHiddenInput();
|
|
154
|
-
const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', () => {
|
|
193
|
+
const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', (event) => {
|
|
155
194
|
if (this.inputElement.checked) {
|
|
156
|
-
this.radioGroup.select(this.value());
|
|
195
|
+
this.radioGroup.select(this.value(), event);
|
|
157
196
|
}
|
|
158
197
|
});
|
|
159
198
|
this.destroyRef.onDestroy(() => {
|
|
@@ -164,22 +203,28 @@ class RdxRadioItemDirective {
|
|
|
164
203
|
}
|
|
165
204
|
});
|
|
166
205
|
effect(() => {
|
|
167
|
-
this.
|
|
168
|
-
|
|
206
|
+
this.compositeItem.setMetadata({
|
|
207
|
+
disabled: this.disabledState(),
|
|
208
|
+
value: this.value()
|
|
209
|
+
});
|
|
169
210
|
this.syncHiddenInput();
|
|
170
211
|
});
|
|
171
212
|
}
|
|
172
213
|
/** @ignore */
|
|
173
|
-
onClick() {
|
|
214
|
+
onClick(event) {
|
|
174
215
|
if (!this.disabledState() && !this.readonlyState()) {
|
|
175
|
-
this.radioGroup.select(this.value());
|
|
216
|
+
this.radioGroup.select(this.value(), event);
|
|
176
217
|
}
|
|
177
218
|
}
|
|
178
219
|
/** @ignore */
|
|
179
220
|
onKeyDown(event) {
|
|
180
221
|
const keyEvent = event;
|
|
181
|
-
if (keyEvent.key === ' '
|
|
182
|
-
this.onClick();
|
|
222
|
+
if (keyEvent.key === ' ') {
|
|
223
|
+
this.onClick(keyEvent);
|
|
224
|
+
return;
|
|
225
|
+
}
|
|
226
|
+
if (keyEvent.key === 'Enter') {
|
|
227
|
+
keyEvent.preventDefault();
|
|
183
228
|
return;
|
|
184
229
|
}
|
|
185
230
|
if (this.isAllowedArrowKey(keyEvent.key)) {
|
|
@@ -191,10 +236,10 @@ class RdxRadioItemDirective {
|
|
|
191
236
|
this.radioGroup.setArrowNavigation(false);
|
|
192
237
|
}
|
|
193
238
|
/** @ignore */
|
|
194
|
-
onFocus() {
|
|
239
|
+
onFocus(event) {
|
|
195
240
|
queueMicrotask(() => {
|
|
196
241
|
if (this.radioGroup.isArrowNavigation()) {
|
|
197
|
-
this.radioGroup.select(this.value());
|
|
242
|
+
this.radioGroup.select(this.value(), event);
|
|
198
243
|
this.radioGroup.setArrowNavigation(false);
|
|
199
244
|
}
|
|
200
245
|
});
|
|
@@ -203,11 +248,7 @@ class RdxRadioItemDirective {
|
|
|
203
248
|
if (!this.ARROW_KEYS.includes(key)) {
|
|
204
249
|
return false;
|
|
205
250
|
}
|
|
206
|
-
|
|
207
|
-
if (orientation === 'vertical') {
|
|
208
|
-
return key === 'ArrowUp' || key === 'ArrowDown';
|
|
209
|
-
}
|
|
210
|
-
return key === 'ArrowLeft' || key === 'ArrowRight';
|
|
251
|
+
return true;
|
|
211
252
|
}
|
|
212
253
|
createHiddenInput() {
|
|
213
254
|
const host = this.elementRef.nativeElement;
|
|
@@ -261,7 +302,7 @@ class RdxRadioItemDirective {
|
|
|
261
302
|
}
|
|
262
303
|
}
|
|
263
304
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
264
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", 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 }, nativeButton: { classPropertyName: "nativeButton", publicName: "nativeButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radio" }, listeners: { "click": "onClick()", "keydown": "onKeyDown($event)", "keyup": "onKeyUp()", "focus": "onFocus()" }, properties: { "attr.type": "nativeButtonState() ? \"button\" : undefined", "attr.aria-checked": "checkedState()", "attr.aria-readonly": "readonlyState() ? \"true\" : undefined", "attr.aria-required": "requiredState() ? \"true\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "!checkedState() ? \"\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonlyState() ? \"\" : undefined", "attr.data-required": "requiredState() ? \"\" : undefined", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "attr.disabled": "nativeButtonState() && disabledState() ? \"\" : undefined" } }, providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)], exportAs: ["rdxRadioItem"], hostDirectives: [{ directive: i1.
|
|
305
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxRadioItemDirective, isStandalone: true, selector: "[rdxRadioItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", 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 }, nativeButton: { classPropertyName: "nativeButton", publicName: "nativeButton", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "radio" }, listeners: { "click": "onClick($event)", "keydown": "onKeyDown($event)", "keyup": "onKeyUp()", "focus": "onFocus($event)" }, properties: { "attr.type": "nativeButtonState() ? \"button\" : undefined", "attr.aria-checked": "checkedState()", "attr.aria-disabled": "disabledState() ? \"true\" : undefined", "attr.aria-readonly": "readonlyState() ? \"true\" : undefined", "attr.aria-required": "requiredState() ? \"true\" : undefined", "attr.data-composite-item-active": "checkedState() ? \"\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "!checkedState() ? \"\" : undefined", "attr.data-disabled": "disabledState() ? \"\" : undefined", "attr.data-readonly": "readonlyState() ? \"\" : undefined", "attr.data-required": "requiredState() ? \"\" : undefined", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "attr.disabled": "nativeButtonState() && disabledState() ? \"\" : undefined" } }, providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)], exportAs: ["rdxRadioItem"], hostDirectives: [{ directive: i1.RdxCompositeItem }], ngImport: i0 }); }
|
|
265
306
|
}
|
|
266
307
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxRadioItemDirective, decorators: [{
|
|
267
308
|
type: Directive,
|
|
@@ -269,15 +310,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
269
310
|
selector: '[rdxRadioItem]',
|
|
270
311
|
exportAs: 'rdxRadioItem',
|
|
271
312
|
providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)],
|
|
272
|
-
hostDirectives: [
|
|
273
|
-
{ directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }
|
|
274
|
-
],
|
|
313
|
+
hostDirectives: [RdxCompositeItem],
|
|
275
314
|
host: {
|
|
276
315
|
'[attr.type]': 'nativeButtonState() ? "button" : undefined',
|
|
277
316
|
role: 'radio',
|
|
278
317
|
'[attr.aria-checked]': 'checkedState()',
|
|
318
|
+
'[attr.aria-disabled]': 'disabledState() ? "true" : undefined',
|
|
279
319
|
'[attr.aria-readonly]': 'readonlyState() ? "true" : undefined',
|
|
280
320
|
'[attr.aria-required]': 'requiredState() ? "true" : undefined',
|
|
321
|
+
'[attr.data-composite-item-active]': 'checkedState() ? "" : undefined',
|
|
281
322
|
'[attr.data-checked]': 'checkedState() ? "" : undefined',
|
|
282
323
|
'[attr.data-unchecked]': '!checkedState() ? "" : undefined',
|
|
283
324
|
'[attr.data-disabled]': 'disabledState() ? "" : undefined',
|
|
@@ -285,10 +326,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
|
|
|
285
326
|
'[attr.data-required]': 'requiredState() ? "" : undefined',
|
|
286
327
|
'[attr.data-state]': 'checkedState() ? "checked" : "unchecked"',
|
|
287
328
|
'[attr.disabled]': 'nativeButtonState() && disabledState() ? "" : undefined',
|
|
288
|
-
'(click)': 'onClick()',
|
|
329
|
+
'(click)': 'onClick($event)',
|
|
289
330
|
'(keydown)': 'onKeyDown($event)',
|
|
290
331
|
'(keyup)': 'onKeyUp()',
|
|
291
|
-
'(focus)': 'onFocus()'
|
|
332
|
+
'(focus)': 'onFocus($event)'
|
|
292
333
|
}
|
|
293
334
|
}]
|
|
294
335
|
}], ctorParameters: () => [], propDecorators: { value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: true }] }], id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], nativeButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "nativeButton", required: false }] }] } });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-tokens.ts","../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { InjectionToken, InputSignal, InputSignalWithTransform, ModelSignal, Signal } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\nimport { Orientation } from '@radix-ng/primitives/roving-focus';\n\nexport interface RadioGroupProps {\n value: ModelSignal<string | null>;\n defaultValue: InputSignal<string | undefined>;\n name: InputSignal<string | undefined>;\n form: InputSignal<string | undefined>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n readonly: InputSignalWithTransform<boolean, BooleanInput>;\n required: InputSignalWithTransform<boolean, BooleanInput>;\n orientation: InputSignal<Orientation | undefined>;\n disabledState: Signal<boolean>;\n}\n\nexport interface RadioGroupDirective extends RadioGroupProps {\n select(value: string | null): void;\n\n onTouched(): void;\n\n setArrowNavigation(value: boolean): void;\n\n isArrowNavigation(): boolean;\n}\n\nexport const RDX_RADIO_GROUP = new InjectionToken<RadioGroupDirective>('RdxRadioGroup');\n","import { booleanAttribute, computed, Directive, effect, input, model, output, signal } from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { BooleanInput, provideValueAccessor, RdxFormValueControl } from '@radix-ng/primitives/core';\nimport { Orientation, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n providers: [\n provideValueAccessor(RdxRadioGroupDirective),\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }\n ],\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n host: {\n role: 'radiogroup',\n '[attr.aria-orientation]': 'orientation()',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '(keydown)': 'onKeydown()'\n }\n})\nexport class RdxRadioGroupDirective\n implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor, RdxFormValueControl<string | null>\n{\n readonly value = model<string | null>(null);\n\n readonly defaultValue = input<string>();\n\n readonly name = input<string>();\n\n readonly form = input<string>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly orientation = input<Orientation>();\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<string>();\n\n private readonly disable = signal<boolean>(this.disabled());\n readonly disabledState = computed(() => this.disable() || this.disabled());\n private readonly arrowNavigation = signal(false);\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string | null) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n effect(() => {\n if (this.value() === null && this.defaultValue() !== undefined) {\n this.value.set(this.defaultValue()!);\n }\n });\n }\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string | null): void {\n if (this.disabledState() || this.readonly() || this.value() === value) {\n return;\n }\n\n this.value.set(value);\n if (value !== null) {\n this.onValueChange.emit(value);\n }\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\n */\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @ignore\n */\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n setArrowNavigation(value: boolean): void {\n this.arrowNavigation.set(value);\n }\n\n isArrowNavigation(): boolean {\n return this.arrowNavigation();\n }\n\n protected onKeydown(): void {\n if (this.disabledState()) return;\n }\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n input,\n Renderer2\n} from '@angular/core';\nimport { BooleanInput, provideToken } from '@radix-ng/primitives/core';\nimport { Orientation, RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)],\n hostDirectives: [\n { directive: RdxRovingFocusItemDirective, inputs: ['tabStopId: id', 'focusable', 'active', 'allowShiftKey'] }\n ],\n\n host: {\n '[attr.type]': 'nativeButtonState() ? \"button\" : undefined',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-readonly]': 'readonlyState() ? \"true\" : undefined',\n '[attr.aria-required]': 'requiredState() ? \"true\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'requiredState() ? \"\" : undefined',\n '[attr.data-state]': 'checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.disabled]': 'nativeButtonState() && disabledState() ? \"\" : undefined',\n '(click)': 'onClick()',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus()'\n }\n})\nexport class RdxRadioItemDirective {\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly rovingFocusItem = inject(RdxRovingFocusItemDirective);\n private readonly destroyRef = inject(DestroyRef);\n private readonly inputElement = this.renderer.createElement('input') as HTMLInputElement;\n private previousCheckedState: boolean | undefined;\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButton = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButtonState = computed(\n () => this.nativeButton() || this.elementRef.nativeElement.tagName === 'BUTTON'\n );\n\n readonly disabledState = computed(() => this.radioGroup.disabledState() || this.disabled());\n\n readonly readonlyState = computed(() => this.radioGroup.readonly() || this.readonly());\n\n readonly requiredState = computed(() => this.radioGroup.required() || this.required());\n\n readonly checkedState = computed(() => this.radioGroup.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'] as const;\n\n constructor() {\n this.createHiddenInput();\n const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', () => {\n if (this.inputElement.checked) {\n this.radioGroup.select(this.value());\n }\n });\n\n this.destroyRef.onDestroy(() => {\n unlistenInputChange();\n const parent = this.inputElement.parentNode;\n\n if (parent) {\n this.renderer.removeChild(parent, this.inputElement);\n }\n });\n\n effect(() => {\n this.rovingFocusItem.setActive(this.checkedState());\n this.rovingFocusItem.setFocusable(!this.disabledState());\n this.syncHiddenInput();\n });\n }\n\n /** @ignore */\n onClick() {\n if (!this.disabledState() && !this.readonlyState()) {\n this.radioGroup.select(this.value());\n }\n }\n\n /** @ignore */\n onKeyDown(event: Event): void {\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === ' ' || keyEvent.key === 'Enter') {\n this.onClick();\n return;\n }\n\n if (this.isAllowedArrowKey(keyEvent.key)) {\n this.radioGroup.setArrowNavigation(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.radioGroup.setArrowNavigation(false);\n }\n\n /** @ignore */\n onFocus() {\n queueMicrotask(() => {\n if (this.radioGroup.isArrowNavigation()) {\n this.radioGroup.select(this.value());\n this.radioGroup.setArrowNavigation(false);\n }\n });\n }\n\n private isAllowedArrowKey(key: string): boolean {\n if (!(this.ARROW_KEYS as readonly string[]).includes(key)) {\n return false;\n }\n\n const orientation = this.radioGroup.orientation() ?? ('horizontal' satisfies Orientation);\n\n if (orientation === 'vertical') {\n return key === 'ArrowUp' || key === 'ArrowDown';\n }\n\n return key === 'ArrowLeft' || key === 'ArrowRight';\n }\n\n private createHiddenInput(): void {\n const host = this.elementRef.nativeElement;\n const parent = host.parentNode;\n\n this.renderer.setAttribute(this.inputElement, 'type', 'radio');\n this.renderer.setAttribute(this.inputElement, 'tabindex', '-1');\n this.renderer.setAttribute(this.inputElement, 'aria-hidden', 'true');\n this.renderer.setStyle(this.inputElement, 'position', 'absolute');\n this.renderer.setStyle(this.inputElement, 'pointer-events', 'none');\n this.renderer.setStyle(this.inputElement, 'opacity', '0');\n this.renderer.setStyle(this.inputElement, 'margin', '0');\n this.renderer.setStyle(this.inputElement, 'inset', '0');\n this.renderer.setStyle(this.inputElement, 'transform', 'translateX(-100%)');\n\n if (parent) {\n this.renderer.insertBefore(parent, this.inputElement, host.nextSibling);\n }\n }\n\n private syncHiddenInput(): void {\n const checked = this.checkedState();\n\n this.inputElement.name = this.radioGroup.name() ?? '';\n this.inputElement.value = this.value();\n this.inputElement.checked = checked;\n this.inputElement.required = this.requiredState();\n this.inputElement.disabled = this.disabledState();\n\n this.setOptionalAttribute('name', this.radioGroup.name());\n this.setOptionalAttribute('form', this.radioGroup.form());\n this.setBooleanAttribute('checked', checked);\n this.setBooleanAttribute('required', this.requiredState());\n this.setBooleanAttribute('disabled', this.disabledState());\n this.renderer.setAttribute(this.inputElement, 'value', this.value());\n\n if (this.previousCheckedState === false && checked) {\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true }));\n this.inputElement.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n this.previousCheckedState = checked;\n }\n\n private setOptionalAttribute(name: string, value: string | undefined): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, value);\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n\n private setBooleanAttribute(name: string, value: boolean): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, '');\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RDX_RADIO_GROUP, RadioGroupDirective } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n host: {\n '[attr.data-checked]': 'radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-state]': 'radioItem.checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'radioItem.readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'radioItem.requiredState() ? \"\" : undefined',\n '[hidden]': '!radioItem.checkedState()',\n '[style.pointer-events]': '\"none\"'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly radioGroup: RadioGroupDirective = inject(RDX_RADIO_GROUP);\n protected readonly radioItem: RdxRadioItemDirective = inject(RdxRadioItemDirective);\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';\nimport { injectRadioItem } from './radio-item.directive';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: 'input[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],\n host: {\n type: 'radio',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'name()',\n '[attr.form]': 'form()',\n '[attr.required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'disabled() ? \"\" : undefined',\n '[attr.checked]': 'checked() ? \"\" : undefined',\n '[checked]': 'checked()',\n '[attr.value]': 'value()',\n '[style]': `{\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n inset: 0,\n transform: 'translateX(-100%)',\n }`\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly radioItem = injectRadioItem();\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly name = computed(() => this.radioGroup.name());\n readonly form = computed(() => this.radioGroup.form());\n readonly value = computed(() => this.radioItem.value() || undefined);\n readonly checked = computed(() => this.radioItem.checkedState());\n readonly required = computed(() => this.radioItem.requiredState());\n readonly disabled = computed(() => this.radioItem.disabledState());\n\n constructor() {\n let isInitial = true;\n\n effect(() => {\n const checked = this.checked();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n if (checked) {\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;AA0BO,MAAM,eAAe,GAAG,IAAI,cAAc,CAAsB,eAAe,CAAC;;MCF1E,sBAAsB,CAAA;AA2C/B,IAAA,WAAA,GAAA;AAxCS,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAgB,IAAI,4EAAC;QAElC,IAAA,CAAA,YAAY,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,cAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;QAE9B,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;QAEtB,IAAA,CAAA,IAAI,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAU;QAEtB,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAE/E,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAE/E,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,gFAAI,SAAS,EAAE,gBAAgB,EAAA,CAAG;QAE/E,IAAA,CAAA,WAAW,GAAG,KAAK,CAAA,IAAA,SAAA,GAAA,CAAA,SAAA,EAAA,EAAA,SAAA,EAAA,aAAA,EAAA,CAAA,8BAAA,EAAA,CAAA,CAAe;AAE3C;;AAEG;QACM,IAAA,CAAA,aAAa,GAAG,MAAM,EAAU;QAExB,IAAA,CAAA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S;AACzB,wBAAA,SAAS,EAAE,CAAA;;;;;;;AAOT,SAAA;AACL;AACJ,iBAAA;;;AC7BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-radio.mjs","sources":["../../../packages/primitives/radio/src/radio-tokens.ts","../../../packages/primitives/radio/src/radio-root.directive.ts","../../../packages/primitives/radio/src/radio-item.directive.ts","../../../packages/primitives/radio/src/radio-indicator.directive.ts","../../../packages/primitives/radio/src/radio-item-input.directive.ts","../../../packages/primitives/radio/radix-ng-primitives-radio.ts"],"sourcesContent":["import { InjectionToken, InputSignal, InputSignalWithTransform, ModelSignal, Signal } from '@angular/core';\nimport { BooleanInput } from '@radix-ng/primitives/core';\n\nexport type RdxRadioValueChangeReason = 'none';\n\nexport interface RadioGroupProps {\n value: ModelSignal<string | null>;\n defaultValue: InputSignal<string | undefined>;\n name: InputSignal<string | undefined>;\n form: InputSignal<string | undefined>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n readonly: InputSignalWithTransform<boolean, BooleanInput>;\n required: InputSignalWithTransform<boolean, BooleanInput>;\n disabledState: Signal<boolean>;\n}\n\nexport interface RadioGroupDirective extends RadioGroupProps {\n select(value: string | null, event?: Event, reason?: RdxRadioValueChangeReason): void;\n\n onTouched(): void;\n\n setArrowNavigation(value: boolean): void;\n\n isArrowNavigation(): boolean;\n}\n\nexport const RDX_RADIO_GROUP = new InjectionToken<RadioGroupDirective>('RdxRadioGroup');\n","import {\n booleanAttribute,\n computed,\n Directive,\n effect,\n ElementRef,\n inject,\n input,\n model,\n output,\n signal\n} from '@angular/core';\nimport { ControlValueAccessor } from '@angular/forms';\nimport { RdxCompositeMetadata, RdxCompositeRoot } from '@radix-ng/primitives/composite';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n provideValueAccessor,\n RdxCancelableChangeEventDetails,\n RdxFormValueControl\n} from '@radix-ng/primitives/core';\nimport { RadioGroupDirective, RadioGroupProps, RDX_RADIO_GROUP, RdxRadioValueChangeReason } from './radio-tokens';\n\nexport type { RdxRadioValueChangeReason } from './radio-tokens';\n\nexport type RdxRadioValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxRadioValueChangeReason>;\n\nexport interface RdxRadioValueChangeEvent {\n value: string;\n eventDetails: RdxRadioValueChangeEventDetails;\n}\n\n@Directive({\n selector: '[rdxRadioRoot]',\n exportAs: 'rdxRadioRoot',\n providers: [\n provideValueAccessor(RdxRadioGroupDirective),\n { provide: RDX_RADIO_GROUP, useExisting: RdxRadioGroupDirective }\n ],\n hostDirectives: [RdxCompositeRoot],\n host: {\n role: 'radiogroup',\n '[attr.aria-required]': 'required() ? \"true\" : undefined',\n '[attr.aria-disabled]': 'disabledState() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonly() ? \"true\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonly() ? \"\" : undefined',\n '[attr.data-required]': 'required() ? \"\" : undefined',\n '(keydown)': 'onKeydown()'\n }\n})\nexport class RdxRadioGroupDirective\n implements RadioGroupProps, RadioGroupDirective, ControlValueAccessor, RdxFormValueControl<string | null>\n{\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly compositeRoot = inject(RdxCompositeRoot, { self: true });\n\n readonly value = model<string | null>(null);\n\n readonly defaultValue = input<string>();\n\n readonly name = input<string>();\n\n readonly form = input<string>();\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event handler called when the value changes.\n */\n readonly onValueChange = output<RdxRadioValueChangeEvent>();\n\n private readonly disable = signal<boolean>(this.disabled());\n readonly disabledState = computed(() => this.disable() || this.disabled());\n private readonly arrowNavigation = signal(false);\n private readonly itemMetadata = computed(() =>\n Array.from(this.compositeRoot.itemMap().values()).filter(isRadioItemMetadata)\n );\n private readonly disabledIndices = computed(() =>\n this.itemMetadata()\n .filter((metadata) => metadata.disabled)\n .map((metadata) => metadata.index)\n );\n private readonly activeIndex = computed(() => {\n const value = this.value();\n if (value === null) {\n return -1;\n }\n\n return this.itemMetadata().find((metadata) => metadata.value === value)?.index ?? -1;\n });\n\n /**\n * The callback function to call when the value of the radio group changes.\n */\n private onChange: (value: string | null) => void = () => {\n /* Empty */\n };\n\n /**\n * The callback function to call when the radio group is touched.\n * @ignore\n */\n onTouched: () => void = () => {\n /* Empty */\n };\n\n constructor() {\n effect(() => {\n if (this.value() === null && this.defaultValue() !== undefined) {\n this.value.set(this.defaultValue()!);\n }\n });\n\n effect(() => {\n this.compositeRoot.setEnableHomeAndEndKeys(false);\n this.compositeRoot.setModifierKeys(['Shift']);\n });\n\n effect(() => {\n this.compositeRoot.setDisabledIndices(this.disabledIndices());\n });\n\n effect(() => {\n const activeIndex = this.activeIndex();\n\n if (activeIndex === -1 || this.disabledIndices().includes(activeIndex)) {\n return;\n }\n\n const activeElement = this.elementRef.nativeElement.ownerDocument.activeElement;\n if (activeElement && this.elementRef.nativeElement.contains(activeElement)) {\n return;\n }\n\n this.compositeRoot.setHighlightedIndex(activeIndex);\n });\n }\n\n /**\n * Select a radio item.\n * @param value The value of the radio item to select.\n * @ignore\n */\n select(value: string | null, event?: Event, reason: RdxRadioValueChangeReason = 'none'): void {\n if (this.disabledState() || this.readonly() || this.value() === value) {\n return;\n }\n\n if (value !== null) {\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n reason,\n event ?? new Event('radio.value-change'),\n trigger\n );\n this.onValueChange.emit({ value, eventDetails });\n if (eventDetails.isCanceled()) {\n return;\n }\n }\n\n this.value.set(value);\n this.onChange?.(value);\n this.onTouched();\n }\n\n /**\n * Update the value of the radio group.\n * @param value The new value of the radio group.\n * @ignore\n */\n writeValue(value: string | null): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback function to call when the value of the radio group changes.\n * @param fn The callback function to call when the value of the radio group changes.\n * @ignore\n */\n registerOnChange(fn: (value: string | null) => void): void {\n this.onChange = fn;\n }\n\n /** @ignore */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n /**\n * Set the disabled state of the radio group.\n * @param isDisabled Whether the radio group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.disable.set(isDisabled);\n }\n\n setArrowNavigation(value: boolean): void {\n this.arrowNavigation.set(value);\n }\n\n isArrowNavigation(): boolean {\n return this.arrowNavigation();\n }\n\n protected onKeydown(): void {\n if (this.disabledState()) return;\n }\n}\n\ninterface RdxRadioItemMetadata {\n [key: string]: unknown;\n disabled: boolean;\n value: string;\n}\n\nfunction isRadioItemMetadata(metadata: RdxCompositeMetadata): metadata is RdxCompositeMetadata<RdxRadioItemMetadata> {\n return typeof metadata['disabled'] === 'boolean' && typeof metadata['value'] === 'string';\n}\n","import {\n booleanAttribute,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n InjectionToken,\n input,\n Renderer2\n} from '@angular/core';\nimport { RdxCompositeItem } from '@radix-ng/primitives/composite';\nimport { BooleanInput, provideToken } from '@radix-ng/primitives/core';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\nexport const RdxRadioItemToken = new InjectionToken<RdxRadioItemDirective>('RadioItemToken');\n\nexport function injectRadioItem(): RdxRadioItemDirective {\n return inject(RdxRadioItemToken);\n}\n\n@Directive({\n selector: '[rdxRadioItem]',\n exportAs: 'rdxRadioItem',\n providers: [provideToken(RdxRadioItemToken, RdxRadioItemDirective)],\n hostDirectives: [RdxCompositeItem],\n\n host: {\n '[attr.type]': 'nativeButtonState() ? \"button\" : undefined',\n role: 'radio',\n '[attr.aria-checked]': 'checkedState()',\n '[attr.aria-disabled]': 'disabledState() ? \"true\" : undefined',\n '[attr.aria-readonly]': 'readonlyState() ? \"true\" : undefined',\n '[attr.aria-required]': 'requiredState() ? \"true\" : undefined',\n '[attr.data-composite-item-active]': 'checkedState() ? \"\" : undefined',\n '[attr.data-checked]': 'checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!checkedState() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'requiredState() ? \"\" : undefined',\n '[attr.data-state]': 'checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.disabled]': 'nativeButtonState() && disabledState() ? \"\" : undefined',\n '(click)': 'onClick($event)',\n '(keydown)': 'onKeyDown($event)',\n '(keyup)': 'onKeyUp()',\n '(focus)': 'onFocus($event)'\n }\n})\nexport class RdxRadioItemDirective {\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly renderer = inject(Renderer2);\n private readonly compositeItem = inject(RdxCompositeItem, { self: true });\n private readonly destroyRef = inject(DestroyRef);\n private readonly inputElement = this.renderer.createElement('input') as HTMLInputElement;\n private previousCheckedState: boolean | undefined;\n\n readonly value = input.required<string>();\n\n readonly id = input<string>();\n\n readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly readonly = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButton = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n readonly nativeButtonState = computed(() => this.nativeButton());\n\n readonly disabledState = computed(() => this.radioGroup.disabledState() || this.disabled());\n\n readonly readonlyState = computed(() => this.radioGroup.readonly() || this.readonly());\n\n readonly requiredState = computed(() => this.radioGroup.required() || this.required());\n\n readonly checkedState = computed(() => this.radioGroup.value() === this.value());\n\n private readonly ARROW_KEYS = ['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'] as const;\n\n constructor() {\n this.createHiddenInput();\n const unlistenInputChange = this.renderer.listen(this.inputElement, 'change', (event: Event) => {\n if (this.inputElement.checked) {\n this.radioGroup.select(this.value(), event);\n }\n });\n\n this.destroyRef.onDestroy(() => {\n unlistenInputChange();\n const parent = this.inputElement.parentNode;\n\n if (parent) {\n this.renderer.removeChild(parent, this.inputElement);\n }\n });\n\n effect(() => {\n this.compositeItem.setMetadata({\n disabled: this.disabledState(),\n value: this.value()\n });\n this.syncHiddenInput();\n });\n }\n\n /** @ignore */\n onClick(event?: Event) {\n if (!this.disabledState() && !this.readonlyState()) {\n this.radioGroup.select(this.value(), event);\n }\n }\n\n /** @ignore */\n onKeyDown(event: Event): void {\n const keyEvent = event as KeyboardEvent;\n if (keyEvent.key === ' ') {\n this.onClick(keyEvent);\n return;\n }\n\n if (keyEvent.key === 'Enter') {\n keyEvent.preventDefault();\n return;\n }\n\n if (this.isAllowedArrowKey(keyEvent.key)) {\n this.radioGroup.setArrowNavigation(true);\n }\n }\n\n /** @ignore */\n onKeyUp() {\n this.radioGroup.setArrowNavigation(false);\n }\n\n /** @ignore */\n onFocus(event?: FocusEvent) {\n queueMicrotask(() => {\n if (this.radioGroup.isArrowNavigation()) {\n this.radioGroup.select(this.value(), event);\n this.radioGroup.setArrowNavigation(false);\n }\n });\n }\n\n private isAllowedArrowKey(key: string): boolean {\n if (!(this.ARROW_KEYS as readonly string[]).includes(key)) {\n return false;\n }\n\n return true;\n }\n\n private createHiddenInput(): void {\n const host = this.elementRef.nativeElement;\n const parent = host.parentNode;\n\n this.renderer.setAttribute(this.inputElement, 'type', 'radio');\n this.renderer.setAttribute(this.inputElement, 'tabindex', '-1');\n this.renderer.setAttribute(this.inputElement, 'aria-hidden', 'true');\n this.renderer.setStyle(this.inputElement, 'position', 'absolute');\n this.renderer.setStyle(this.inputElement, 'pointer-events', 'none');\n this.renderer.setStyle(this.inputElement, 'opacity', '0');\n this.renderer.setStyle(this.inputElement, 'margin', '0');\n this.renderer.setStyle(this.inputElement, 'inset', '0');\n this.renderer.setStyle(this.inputElement, 'transform', 'translateX(-100%)');\n\n if (parent) {\n this.renderer.insertBefore(parent, this.inputElement, host.nextSibling);\n }\n }\n\n private syncHiddenInput(): void {\n const checked = this.checkedState();\n\n this.inputElement.name = this.radioGroup.name() ?? '';\n this.inputElement.value = this.value();\n this.inputElement.checked = checked;\n this.inputElement.required = this.requiredState();\n this.inputElement.disabled = this.disabledState();\n\n this.setOptionalAttribute('name', this.radioGroup.name());\n this.setOptionalAttribute('form', this.radioGroup.form());\n this.setBooleanAttribute('checked', checked);\n this.setBooleanAttribute('required', this.requiredState());\n this.setBooleanAttribute('disabled', this.disabledState());\n this.renderer.setAttribute(this.inputElement, 'value', this.value());\n\n if (this.previousCheckedState === false && checked) {\n this.inputElement.dispatchEvent(new Event('input', { bubbles: true }));\n this.inputElement.dispatchEvent(new Event('change', { bubbles: true }));\n }\n\n this.previousCheckedState = checked;\n }\n\n private setOptionalAttribute(name: string, value: string | undefined): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, value);\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n\n private setBooleanAttribute(name: string, value: boolean): void {\n if (value) {\n this.renderer.setAttribute(this.inputElement, name, '');\n } else {\n this.renderer.removeAttribute(this.inputElement, name);\n }\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxRadioItemDirective } from './radio-item.directive';\nimport { RDX_RADIO_GROUP, RadioGroupDirective } from './radio-tokens';\n\n@Directive({\n selector: '[rdxRadioIndicator]',\n exportAs: 'rdxRadioIndicator',\n host: {\n '[attr.data-checked]': 'radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-unchecked]': '!radioItem.checkedState() ? \"\" : undefined',\n '[attr.data-state]': 'radioItem.checkedState() ? \"checked\" : \"unchecked\"',\n '[attr.data-disabled]': 'radioItem.disabledState() ? \"\" : undefined',\n '[attr.data-readonly]': 'radioItem.readonlyState() ? \"\" : undefined',\n '[attr.data-required]': 'radioItem.requiredState() ? \"\" : undefined',\n '[hidden]': '!radioItem.checkedState()',\n '[style.pointer-events]': '\"none\"'\n }\n})\nexport class RdxRadioIndicatorDirective {\n protected readonly radioGroup: RadioGroupDirective = inject(RDX_RADIO_GROUP);\n protected readonly radioItem: RdxRadioItemDirective = inject(RdxRadioItemDirective);\n}\n","import { computed, Directive, effect, ElementRef, inject } from '@angular/core';\nimport { RdxVisuallyHiddenDirective } from '@radix-ng/primitives/visually-hidden';\nimport { injectRadioItem } from './radio-item.directive';\nimport { RDX_RADIO_GROUP } from './radio-tokens';\n\n@Directive({\n selector: 'input[rdxRadioItemInput]',\n exportAs: 'rdxRadioItemInput',\n hostDirectives: [{ directive: RdxVisuallyHiddenDirective, inputs: ['feature'] }],\n host: {\n type: 'radio',\n tabindex: '-1',\n 'aria-hidden': 'true',\n '[attr.name]': 'name()',\n '[attr.form]': 'form()',\n '[attr.required]': 'required() ? \"\" : undefined',\n '[attr.disabled]': 'disabled() ? \"\" : undefined',\n '[attr.checked]': 'checked() ? \"\" : undefined',\n '[checked]': 'checked()',\n '[attr.value]': 'value()',\n '[style]': `{\n position: 'absolute',\n pointerEvents: 'none',\n opacity: 0,\n margin: 0,\n inset: 0,\n transform: 'translateX(-100%)',\n }`\n }\n})\nexport class RdxRadioItemInputDirective {\n private readonly radioItem = injectRadioItem();\n private readonly radioGroup = inject(RDX_RADIO_GROUP);\n private readonly input = inject<ElementRef<HTMLInputElement>>(ElementRef).nativeElement;\n\n readonly name = computed(() => this.radioGroup.name());\n readonly form = computed(() => this.radioGroup.form());\n readonly value = computed(() => this.radioItem.value() || undefined);\n readonly checked = computed(() => this.radioItem.checkedState());\n readonly required = computed(() => this.radioItem.requiredState());\n readonly disabled = computed(() => this.radioItem.disabledState());\n\n constructor() {\n let isInitial = true;\n\n effect(() => {\n const checked = this.checked();\n\n if (isInitial) {\n isInitial = false;\n return;\n }\n\n if (checked) {\n this.input.dispatchEvent(new Event('input', { bubbles: true }));\n this.input.dispatchEvent(new Event('change', { bubbles: true }));\n }\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './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