@radix-ng/primitives 0.28.0 → 0.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/checkbox/src/checkbox.directive.d.ts +11 -0
- package/core/index.d.ts +2 -0
- package/core/src/isNumber.d.ts +1 -0
- package/core/src/nullish.d.ts +1 -0
- package/dialog/src/dialog.config.d.ts +1 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +20 -20
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +22 -22
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +3 -3
- package/fesm2022/radix-ng-primitives-avatar.mjs +16 -16
- package/fesm2022/radix-ng-primitives-checkbox.mjs +28 -17
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +10 -10
- package/fesm2022/radix-ng-primitives-context-menu.mjs +36 -36
- package/fesm2022/radix-ng-primitives-core.mjs +14 -8
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +40 -38
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +35 -35
- package/fesm2022/radix-ng-primitives-hover-card.mjs +30 -33
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-label.mjs +3 -3
- package/fesm2022/radix-ng-primitives-menu.mjs +429 -62
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +87 -139
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +30 -33
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-progress.mjs +68 -90
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +13 -13
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +7 -7
- package/fesm2022/radix-ng-primitives-select.mjs +36 -36
- package/fesm2022/radix-ng-primitives-separator.mjs +4 -4
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +131 -102
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +13 -13
- package/fesm2022/radix-ng-primitives-tabs.mjs +16 -16
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +136 -15
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +6 -6
- package/fesm2022/radix-ng-primitives-toolbar.mjs +155 -0
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-tooltip.mjs +30 -33
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +9 -9
- package/hover-card/src/hover-card-root.directive.d.ts +4 -4
- package/menu/index.d.ts +20 -9
- package/menu/src/menu-content.directive.d.ts +1 -1
- package/menu/src/menu-directive.d.ts +1 -1
- package/menu/src/menu-group.directive.d.ts +1 -1
- package/menu/src/menu-item-checkbox.directive.d.ts +21 -0
- package/menu/src/menu-item-indicator.directive.d.ts +10 -0
- package/menu/src/menu-item-radio.directive.d.ts +20 -0
- package/menu/src/menu-item.directive.d.ts +8 -2
- package/menu/src/menu-label.directive.d.ts +1 -1
- package/menu/src/menu-radio-group.directive.d.ts +6 -0
- package/menu/src/menu-separator.directive.d.ts +1 -2
- package/menu/src/menu-trigger.directive.d.ts +35 -0
- package/menu/src/utils.d.ts +3 -0
- package/menubar/index.d.ts +1 -1
- package/menubar/src/menubar-content.directive.d.ts +2 -2
- package/menubar/src/menubar-item-checkbox.directive.d.ts +2 -10
- package/menubar/src/menubar-item-indicator.directive.d.ts +2 -1
- package/menubar/src/menubar-item-radio.directive.d.ts +2 -10
- package/menubar/src/menubar-item.directive.d.ts +1 -3
- package/menubar/src/menubar-radio-group.directive.d.ts +1 -1
- package/menubar/src/menubar-root.directive.d.ts +3 -4
- package/menubar/src/menubar-separator.directive.d.ts +1 -1
- package/menubar/src/menubar-trigger.directive.d.ts +2 -7
- package/package.json +9 -128
- package/popover/src/popover-root.directive.d.ts +4 -4
- package/progress/src/progress-root.directive.d.ts +19 -33
- package/schematics/collection.json +10 -0
- package/schematics/ng-add/index.d.ts +6 -0
- package/schematics/ng-add/index.js +61 -0
- package/schematics/ng-add/index.js.map +1 -0
- package/schematics/ng-add/package-config.d.ts +18 -0
- package/schematics/ng-add/package-config.js +51 -0
- package/schematics/ng-add/package-config.js.map +1 -0
- package/separator/src/separator.directive.d.ts +1 -1
- package/slider/src/slider-horizontal.component.d.ts +6 -7
- package/slider/src/slider-impl.directive.d.ts +6 -7
- package/slider/src/slider-root.component.d.ts +78 -4
- package/slider/src/slider-vertical.component.d.ts +6 -7
- package/toggle-group/index.d.ts +1 -0
- package/toggle-group/src/toggle-group-item.directive.d.ts +8 -2
- package/toggle-group/src/toggle-group-without-focus.directive.d.ts +69 -0
- package/toggle-group/src/toggle-group.directive.d.ts +12 -1
- package/toggle-group/src/toggle-group.token.d.ts +8 -3
- package/toolbar/README.md +3 -0
- package/toolbar/index.d.ts +19 -0
- package/toolbar/src/toolbar-button.directive.d.ts +11 -0
- package/toolbar/src/toolbar-link.directive.d.ts +7 -0
- package/toolbar/src/toolbar-root.directive.d.ts +8 -0
- package/toolbar/src/toolbar-root.token.d.ts +5 -0
- package/toolbar/src/toolbar-separator.directive.d.ts +6 -0
- package/toolbar/src/toolbar-toggle-group.directive.d.ts +6 -0
- package/toolbar/src/toolbar-toggle-item.directive.d.ts +6 -0
- package/tooltip/src/tooltip-root.directive.d.ts +4 -4
- package/compodoc/documentation.json +0 -39585
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
|
-
import { InjectionToken, inject, input, booleanAttribute, computed, effect, Directive, model, output, signal } from '@angular/core';
|
2
|
+
import { InjectionToken, inject, input, booleanAttribute, computed, effect, Directive, model, output, signal, forwardRef } from '@angular/core';
|
3
3
|
import * as i1 from '@radix-ng/primitives/roving-focus';
|
4
4
|
import { RdxRovingFocusItemDirective, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';
|
5
5
|
import * as i2 from '@radix-ng/primitives/toggle';
|
@@ -16,6 +16,9 @@ function injectToggleGroup() {
|
|
16
16
|
return inject(RdxToggleGroupToken);
|
17
17
|
}
|
18
18
|
|
19
|
+
/**
|
20
|
+
* @group Components
|
21
|
+
*/
|
19
22
|
class RdxToggleGroupItemDirective {
|
20
23
|
constructor() {
|
21
24
|
this.rdxToggleDirective = inject(RdxToggleDirective);
|
@@ -27,11 +30,14 @@ class RdxToggleGroupItemDirective {
|
|
27
30
|
this.rootContext = injectToggleGroup();
|
28
31
|
/**
|
29
32
|
* The value of this toggle button.
|
33
|
+
*
|
34
|
+
* @group Props
|
30
35
|
*/
|
31
36
|
this.value = input.required();
|
32
37
|
/**
|
33
38
|
* Whether this toggle button is disabled.
|
34
|
-
* @
|
39
|
+
* @defaultValue false
|
40
|
+
* @group Props
|
35
41
|
*/
|
36
42
|
this.disabled = input(false, { transform: booleanAttribute });
|
37
43
|
this.isPressed = computed(() => {
|
@@ -55,10 +61,10 @@ class RdxToggleGroupItemDirective {
|
|
55
61
|
}
|
56
62
|
this.rootContext.toggle(this.value());
|
57
63
|
}
|
58
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
59
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
64
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleGroupItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
65
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.4", type: RdxToggleGroupItemDirective, isStandalone: true, selector: "[rdxToggleGroupItem]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggle()" } }, providers: [{ provide: RdxToggleGroupItemToken, useExisting: RdxToggleGroupItemDirective }], exportAs: ["rdxToggleGroupItem"], hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective, inputs: ["focusable", "focusable", "active", "active", "allowShiftKey", "allowShiftKey"] }, { directive: i2.RdxToggleDirective, inputs: ["pressed", "pressed", "disabled", "disabled"] }], ngImport: i0 }); }
|
60
66
|
}
|
61
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
67
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleGroupItemDirective, decorators: [{
|
62
68
|
type: Directive,
|
63
69
|
args: [{
|
64
70
|
selector: '[rdxToggleGroupItem]',
|
@@ -81,22 +87,138 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
81
87
|
}]
|
82
88
|
}], ctorParameters: () => [] });
|
83
89
|
|
90
|
+
let nextId$1 = 0;
|
91
|
+
class RdxToggleGroupWithoutFocusDirective {
|
92
|
+
constructor() {
|
93
|
+
/**
|
94
|
+
* @ignore
|
95
|
+
*/
|
96
|
+
this.id = `rdx-toggle-group-${nextId$1++}`;
|
97
|
+
/**
|
98
|
+
* @group Props
|
99
|
+
*/
|
100
|
+
this.value = model(undefined);
|
101
|
+
/**
|
102
|
+
* @group Props
|
103
|
+
*/
|
104
|
+
this.type = input('single');
|
105
|
+
/**
|
106
|
+
* Whether the toggle group is disabled.
|
107
|
+
* @defaultValue false
|
108
|
+
* @group Props
|
109
|
+
*/
|
110
|
+
this.disabled = input(false, { transform: booleanAttribute });
|
111
|
+
/**
|
112
|
+
* Event emitted when the selected toggle button changes.
|
113
|
+
* @group Emits
|
114
|
+
*/
|
115
|
+
this.onValueChange = output();
|
116
|
+
this.accessorDisabled = signal(false);
|
117
|
+
}
|
118
|
+
/**
|
119
|
+
* Toggle a value.
|
120
|
+
* @param value The value to toggle.
|
121
|
+
* @ignore
|
122
|
+
*/
|
123
|
+
toggle(value) {
|
124
|
+
if (this.disabled()) {
|
125
|
+
return;
|
126
|
+
}
|
127
|
+
if (this.type() === 'single') {
|
128
|
+
this.value.set(value);
|
129
|
+
}
|
130
|
+
else {
|
131
|
+
this.value.set(((currentValue) => currentValue && Array.isArray(currentValue)
|
132
|
+
? currentValue.includes(value)
|
133
|
+
? currentValue.filter((v) => v !== value) // delete
|
134
|
+
: [...currentValue, value] // update
|
135
|
+
: [value])(this.value()));
|
136
|
+
}
|
137
|
+
this.onValueChange.emit(this.value());
|
138
|
+
this.onChange?.(this.value());
|
139
|
+
}
|
140
|
+
/**
|
141
|
+
* Select a value from Angular forms.
|
142
|
+
* @param value The value to select.
|
143
|
+
* @ignore
|
144
|
+
*/
|
145
|
+
writeValue(value) {
|
146
|
+
this.value.set(value);
|
147
|
+
}
|
148
|
+
/**
|
149
|
+
* Register a callback to be called when the value changes.
|
150
|
+
* @param fn The callback to register.
|
151
|
+
* @ignore
|
152
|
+
*/
|
153
|
+
registerOnChange(fn) {
|
154
|
+
this.onChange = fn;
|
155
|
+
}
|
156
|
+
/**
|
157
|
+
* Register a callback to be called when the toggle group is touched.
|
158
|
+
* @param fn The callback to register.
|
159
|
+
* @ignore
|
160
|
+
*/
|
161
|
+
registerOnTouched(fn) {
|
162
|
+
this.onTouched = fn;
|
163
|
+
}
|
164
|
+
/**
|
165
|
+
* Set the disabled state of the toggle group.
|
166
|
+
* @param isDisabled Whether the toggle group is disabled.
|
167
|
+
* @ignore
|
168
|
+
*/
|
169
|
+
setDisabledState(isDisabled) {
|
170
|
+
this.accessorDisabled.set(isDisabled);
|
171
|
+
}
|
172
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleGroupWithoutFocusDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
173
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.4", type: RdxToggleGroupWithoutFocusDirective, isStandalone: true, selector: "[rdxToggleGroupWithoutFocus]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()" } }, providers: [
|
174
|
+
{ provide: RdxToggleGroupToken, useExisting: RdxToggleGroupWithoutFocusDirective },
|
175
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupWithoutFocusDirective, multi: true }
|
176
|
+
], exportAs: ["rdxToggleGroupWithoutFocus"], ngImport: i0 }); }
|
177
|
+
}
|
178
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleGroupWithoutFocusDirective, decorators: [{
|
179
|
+
type: Directive,
|
180
|
+
args: [{
|
181
|
+
selector: '[rdxToggleGroupWithoutFocus]',
|
182
|
+
exportAs: 'rdxToggleGroupWithoutFocus',
|
183
|
+
standalone: true,
|
184
|
+
providers: [
|
185
|
+
{ provide: RdxToggleGroupToken, useExisting: RdxToggleGroupWithoutFocusDirective },
|
186
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupWithoutFocusDirective, multi: true }
|
187
|
+
],
|
188
|
+
host: {
|
189
|
+
role: 'group',
|
190
|
+
'(focusout)': 'onTouched?.()'
|
191
|
+
}
|
192
|
+
}]
|
193
|
+
}] });
|
194
|
+
|
84
195
|
let nextId = 0;
|
196
|
+
/**
|
197
|
+
* @group Components
|
198
|
+
*/
|
85
199
|
class RdxToggleGroupDirective {
|
86
200
|
constructor() {
|
87
201
|
/**
|
88
202
|
* @ignore
|
89
203
|
*/
|
90
204
|
this.id = `rdx-toggle-group-${nextId++}`;
|
205
|
+
/**
|
206
|
+
* @group Props
|
207
|
+
*/
|
91
208
|
this.value = model(undefined);
|
209
|
+
/**
|
210
|
+
* @group Props
|
211
|
+
*/
|
92
212
|
this.type = input('single');
|
93
213
|
/**
|
94
214
|
* Whether the toggle group is disabled.
|
95
|
-
* @
|
215
|
+
* @defaultValue false
|
216
|
+
* @group Props
|
96
217
|
*/
|
97
218
|
this.disabled = input(false, { transform: booleanAttribute });
|
98
219
|
/**
|
99
220
|
* Event emitted when the selected toggle button changes.
|
221
|
+
* @group Emits
|
100
222
|
*/
|
101
223
|
this.onValueChange = output();
|
102
224
|
this.accessorDisabled = signal(false);
|
@@ -155,21 +277,20 @@ class RdxToggleGroupDirective {
|
|
155
277
|
setDisabledState(isDisabled) {
|
156
278
|
this.accessorDisabled.set(isDisabled);
|
157
279
|
}
|
158
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
159
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
160
|
-
{ provide: RdxToggleGroupToken, useExisting: RdxToggleGroupDirective },
|
161
|
-
{ provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupDirective, multi: true }
|
280
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
281
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.4", type: RdxToggleGroupDirective, isStandalone: true, selector: "[rdxToggleGroup]", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", onValueChange: "onValueChange" }, host: { attributes: { "role": "group" }, listeners: { "focusout": "onTouched?.()" } }, providers: [
|
282
|
+
{ provide: RdxToggleGroupToken, useExisting: forwardRef(() => RdxToggleGroupDirective) },
|
283
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => RdxToggleGroupDirective), multi: true }
|
162
284
|
], exportAs: ["rdxToggleGroup"], hostDirectives: [{ directive: i1.RdxRovingFocusGroupDirective, inputs: ["dir", "dir", "orientation", "orientation", "loop", "loop"] }], ngImport: i0 }); }
|
163
285
|
}
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
286
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleGroupDirective, decorators: [{
|
165
287
|
type: Directive,
|
166
288
|
args: [{
|
167
289
|
selector: '[rdxToggleGroup]',
|
168
290
|
exportAs: 'rdxToggleGroup',
|
169
|
-
standalone: true,
|
170
291
|
providers: [
|
171
|
-
{ provide: RdxToggleGroupToken, useExisting: RdxToggleGroupDirective },
|
172
|
-
{ provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupDirective, multi: true }
|
292
|
+
{ provide: RdxToggleGroupToken, useExisting: forwardRef(() => RdxToggleGroupDirective) },
|
293
|
+
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => RdxToggleGroupDirective), multi: true }
|
173
294
|
],
|
174
295
|
hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],
|
175
296
|
host: {
|
@@ -183,5 +304,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.5", ngImpor
|
|
183
304
|
* Generated bundle index. Do not edit.
|
184
305
|
*/
|
185
306
|
|
186
|
-
export { RdxToggleGroupDirective, RdxToggleGroupItemDirective, RdxToggleGroupItemToken, RdxToggleGroupToken, injectToggleGroup, injectToggleGroupItem };
|
307
|
+
export { RdxToggleGroupDirective, RdxToggleGroupItemDirective, RdxToggleGroupItemToken, RdxToggleGroupToken, RdxToggleGroupWithoutFocusDirective, injectToggleGroup, injectToggleGroupItem };
|
187
308
|
//# sourceMappingURL=radix-ng-primitives-toggle-group.mjs.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"radix-ng-primitives-toggle-group.mjs","sources":["../../../packages/primitives/toggle-group/src/toggle-group-item.token.ts","../../../packages/primitives/toggle-group/src/toggle-group.token.ts","../../../packages/primitives/toggle-group/src/toggle-group-item.directive.ts","../../../packages/primitives/toggle-group/src/toggle-group.directive.ts","../../../packages/primitives/toggle-group/radix-ng-primitives-toggle-group.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\nimport type { RdxToggleGroupItemDirective } from './toggle-group-item.directive';\n\nexport const RdxToggleGroupItemToken = new InjectionToken<RdxToggleGroupItemDirective>('RdxToggleGroupItemToken');\n\nexport function injectToggleGroupItem(): RdxToggleGroupItemDirective {\n return inject(RdxToggleGroupItemToken);\n}\n","import { inject, InjectionToken } from '@angular/core';\nimport type { RdxToggleGroupDirective } from './toggle-group.directive';\n\nexport const RdxToggleGroupToken = new InjectionToken<RdxToggleGroupDirective>('RdxToggleGroupToken');\n\nexport function injectToggleGroup(): RdxToggleGroupDirective {\n return inject(RdxToggleGroupToken);\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, effect, inject, input } from '@angular/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { RdxToggleDirective } from '@radix-ng/primitives/toggle';\nimport { RdxToggleGroupItemToken } from './toggle-group-item.token';\nimport { injectToggleGroup } from './toggle-group.token';\n\n@Directive({\n selector: '[rdxToggleGroupItem]',\n exportAs: 'rdxToggleGroupItem',\n standalone: true,\n providers: [{ provide: RdxToggleGroupItemToken, useExisting: RdxToggleGroupItemDirective }],\n hostDirectives: [\n {\n directive: RdxRovingFocusItemDirective,\n inputs: ['focusable', 'active', 'allowShiftKey']\n },\n {\n directive: RdxToggleDirective,\n inputs: ['pressed', 'disabled']\n }\n ],\n host: {\n '(click)': 'toggle()'\n }\n})\nexport class RdxToggleGroupItemDirective {\n private readonly rdxToggleDirective = inject(RdxToggleDirective);\n\n private readonly rdxRovingFocusItemDirective = inject(RdxRovingFocusItemDirective);\n\n /**\n * Access the toggle group.\n * @ignore\n */\n protected readonly rootContext = injectToggleGroup();\n\n /**\n * The value of this toggle button.\n */\n readonly value = input.required<string>();\n\n /**\n * Whether this toggle button is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n private readonly isPressed = computed(() => {\n return this.rootContext.type() === 'single'\n ? this.rootContext.value() === this.value()\n : this.rootContext.value()?.includes(this.value());\n });\n\n private readonly isDisabled = computed(() => this.rootContext.disabled() || this.disabled());\n\n constructor() {\n effect(() => {\n this.rdxToggleDirective.pressed.set(!!this.isPressed());\n this.rdxToggleDirective.disabledModel.set(this.isDisabled());\n\n this.rdxRovingFocusItemDirective.active = !!this.isPressed();\n });\n }\n\n /**\n * @ignore\n */\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n this.rootContext.toggle(this.value());\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, model, output, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RdxToggleGroupToken } from './toggle-group.token';\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxToggleGroup]',\n exportAs: 'rdxToggleGroup',\n standalone: true,\n providers: [\n { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupDirective, multi: true }\n ],\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n host: {\n role: 'group',\n\n '(focusout)': 'onTouched?.()'\n }\n})\nexport class RdxToggleGroupDirective implements ControlValueAccessor {\n /**\n * @ignore\n */\n readonly id: string = `rdx-toggle-group-${nextId++}`;\n\n readonly value = model<string | string[] | undefined>(undefined);\n\n readonly type = input<'single' | 'multiple'>('single');\n\n /**\n * Whether the toggle group is disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event emitted when the selected toggle button changes.\n */\n readonly onValueChange = output<string[] | string | undefined>();\n\n /**\n * The value change callback.\n */\n private onChange?: (value: string | string[] | undefined) => void;\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n */\n protected onTouched?: () => void;\n\n /**\n * Toggle a value.\n * @param value The value to toggle.\n * @ignore\n */\n toggle(value: string): void {\n if (this.disabled()) {\n return;\n }\n\n if (this.type() === 'single') {\n this.value.set(value);\n } else {\n this.value.set(\n ((currentValue) =>\n currentValue && Array.isArray(currentValue)\n ? currentValue.includes(value)\n ? currentValue.filter((v) => v !== value) // delete\n : [...currentValue, value] // update\n : [value])(this.value())\n );\n }\n\n this.onValueChange.emit(this.value());\n this.onChange?.(this.value());\n }\n\n /**\n * Select a value from Angular forms.\n * @param value The value to select.\n * @ignore\n */\n writeValue(value: string): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback to be called when the value changes.\n * @param fn The callback to register.\n * @ignore\n */\n registerOnChange(fn: (value: string | string[] | undefined) => void): void {\n this.onChange = fn;\n }\n\n /**\n * Register a callback to be called when the toggle group is touched.\n * @param fn The callback to register.\n * @ignore\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n private readonly accessorDisabled = signal(false);\n /**\n * Set the disabled state of the toggle group.\n * @param isDisabled Whether the toggle group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.accessorDisabled.set(isDisabled);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAGa,uBAAuB,GAAG,IAAI,cAAc,CAA8B,yBAAyB;SAEhG,qBAAqB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,uBAAuB,CAAC;AAC1C;;MCJa,mBAAmB,GAAG,IAAI,cAAc,CAA0B,qBAAqB;SAEpF,iBAAiB,GAAA;AAC7B,IAAA,OAAO,MAAM,CAAC,mBAAmB,CAAC;AACtC;;MCmBa,2BAA2B,CAAA;AA8BpC,IAAA,WAAA,GAAA;AA7BiB,QAAA,IAAA,CAAA,kBAAkB,GAAG,MAAM,CAAC,kBAAkB,CAAC;AAE/C,QAAA,IAAA,CAAA,2BAA2B,GAAG,MAAM,CAAC,2BAA2B,CAAC;AAElF;;;AAGG;QACgB,IAAW,CAAA,WAAA,GAAG,iBAAiB,EAAE;AAEpD;;AAEG;AACM,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAC,QAAQ,EAAU;AAEzC;;;AAGG;QACM,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAwB,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAEvE,QAAA,IAAA,CAAA,SAAS,GAAG,QAAQ,CAAC,MAAK;AACvC,YAAA,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,KAAK;kBAC7B,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,KAAK,IAAI,CAAC,KAAK;AACzC,kBAAE,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,EAAE,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;AAC1D,SAAC,CAAC;AAEe,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,WAAW,CAAC,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AAiB,EAAE,WAAW,EAAE,uBAAuB,EAAE,KAAK,EAAE,IAAI;AAClF,SAAA,EAAA,QAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,4BAAA,EAAA,MAAA,EAAA,CAAA,KAAA,EAAA,KAAA,EAAA,aAAA,EAAA,aAAA,EAAA,MAAA,EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAQQ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAfnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,SAAS,EAAE;AACP,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,yBAAyB,EAAE;wBACtE,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,yBAAyB,EAAE,KAAK,EAAE,IAAI;AAClF,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,CAAC;AACrG,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AAEb,wBAAA,YAAY,EAAE;AACjB;AACJ,iBAAA;;;ACtBD;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"radix-ng-primitives-toggle-group.mjs","sources":["../../../packages/primitives/toggle-group/src/toggle-group-item.token.ts","../../../packages/primitives/toggle-group/src/toggle-group.token.ts","../../../packages/primitives/toggle-group/src/toggle-group-item.directive.ts","../../../packages/primitives/toggle-group/src/toggle-group-without-focus.directive.ts","../../../packages/primitives/toggle-group/src/toggle-group.directive.ts","../../../packages/primitives/toggle-group/radix-ng-primitives-toggle-group.ts"],"sourcesContent":["import { inject, InjectionToken } from '@angular/core';\nimport type { RdxToggleGroupItemDirective } from './toggle-group-item.directive';\n\nexport const RdxToggleGroupItemToken = new InjectionToken<RdxToggleGroupItemDirective>('RdxToggleGroupItemToken');\n\nexport function injectToggleGroupItem(): RdxToggleGroupItemDirective {\n return inject(RdxToggleGroupItemToken);\n}\n","import { inject, InjectionToken } from '@angular/core';\n\nexport interface IRdxToggleGroup {\n toggle(value: string): void;\n\n disabled: any;\n value: any;\n type: any;\n}\n\nexport const RdxToggleGroupToken = new InjectionToken<IRdxToggleGroup>('RdxToggleGroupToken');\n\nexport function injectToggleGroup(): IRdxToggleGroup {\n return inject(RdxToggleGroupToken);\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, effect, inject, input } from '@angular/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\nimport { RdxToggleDirective } from '@radix-ng/primitives/toggle';\nimport { RdxToggleGroupItemToken } from './toggle-group-item.token';\nimport { injectToggleGroup } from './toggle-group.token';\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxToggleGroupItem]',\n exportAs: 'rdxToggleGroupItem',\n standalone: true,\n providers: [{ provide: RdxToggleGroupItemToken, useExisting: RdxToggleGroupItemDirective }],\n hostDirectives: [\n {\n directive: RdxRovingFocusItemDirective,\n inputs: ['focusable', 'active', 'allowShiftKey']\n },\n {\n directive: RdxToggleDirective,\n inputs: ['pressed', 'disabled']\n }\n ],\n host: {\n '(click)': 'toggle()'\n }\n})\nexport class RdxToggleGroupItemDirective {\n private readonly rdxToggleDirective = inject(RdxToggleDirective);\n\n private readonly rdxRovingFocusItemDirective = inject(RdxRovingFocusItemDirective);\n\n /**\n * Access the toggle group.\n * @ignore\n */\n protected readonly rootContext = injectToggleGroup();\n\n /**\n * The value of this toggle button.\n *\n * @group Props\n */\n readonly value = input.required<string>();\n\n /**\n * Whether this toggle button is disabled.\n * @defaultValue false\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n private readonly isPressed = computed(() => {\n return this.rootContext.type() === 'single'\n ? this.rootContext.value() === this.value()\n : this.rootContext.value()?.includes(this.value());\n });\n\n private readonly isDisabled = computed(() => this.rootContext.disabled() || this.disabled());\n\n constructor() {\n effect(() => {\n this.rdxToggleDirective.pressed.set(!!this.isPressed());\n this.rdxToggleDirective.disabledModel.set(this.isDisabled());\n\n this.rdxRovingFocusItemDirective.active = !!this.isPressed();\n });\n }\n\n /**\n * @ignore\n */\n toggle(): void {\n if (this.disabled()) {\n return;\n }\n\n this.rootContext.toggle(this.value());\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input, model, output, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RdxToggleGroupToken } from './toggle-group.token';\n\nlet nextId = 0;\n\n@Directive({\n selector: '[rdxToggleGroupWithoutFocus]',\n exportAs: 'rdxToggleGroupWithoutFocus',\n standalone: true,\n providers: [\n { provide: RdxToggleGroupToken, useExisting: RdxToggleGroupWithoutFocusDirective },\n { provide: NG_VALUE_ACCESSOR, useExisting: RdxToggleGroupWithoutFocusDirective, multi: true }\n ],\n host: {\n role: 'group',\n '(focusout)': 'onTouched?.()'\n }\n})\nexport class RdxToggleGroupWithoutFocusDirective implements ControlValueAccessor {\n /**\n * @ignore\n */\n readonly id: string = `rdx-toggle-group-${nextId++}`;\n\n /**\n * @group Props\n */\n readonly value = model<string | string[] | undefined>(undefined);\n\n /**\n * @group Props\n */\n readonly type = input<'single' | 'multiple'>('single');\n\n /**\n * Whether the toggle group is disabled.\n * @defaultValue false\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event emitted when the selected toggle button changes.\n * @group Emits\n */\n readonly onValueChange = output<string[] | string | undefined>();\n\n /**\n * The value change callback.\n */\n private onChange?: (value: string | string[] | undefined) => void;\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n */\n protected onTouched?: () => void;\n\n /**\n * Toggle a value.\n * @param value The value to toggle.\n * @ignore\n */\n toggle(value: string): void {\n if (this.disabled()) {\n return;\n }\n\n if (this.type() === 'single') {\n this.value.set(value);\n } else {\n this.value.set(\n ((currentValue) =>\n currentValue && Array.isArray(currentValue)\n ? currentValue.includes(value)\n ? currentValue.filter((v) => v !== value) // delete\n : [...currentValue, value] // update\n : [value])(this.value())\n );\n }\n\n this.onValueChange.emit(this.value());\n this.onChange?.(this.value());\n }\n\n /**\n * Select a value from Angular forms.\n * @param value The value to select.\n * @ignore\n */\n writeValue(value: string): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback to be called when the value changes.\n * @param fn The callback to register.\n * @ignore\n */\n registerOnChange(fn: (value: string | string[] | undefined) => void): void {\n this.onChange = fn;\n }\n\n /**\n * Register a callback to be called when the toggle group is touched.\n * @param fn The callback to register.\n * @ignore\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n private readonly accessorDisabled = signal(false);\n\n /**\n * Set the disabled state of the toggle group.\n * @param isDisabled Whether the toggle group is disabled.\n * @ignore\n */\n setDisabledState(isDisabled: boolean): void {\n this.accessorDisabled.set(isDisabled);\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, forwardRef, input, model, output, signal } from '@angular/core';\nimport { ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { RdxToggleGroupToken } from './toggle-group.token';\n\nlet nextId = 0;\n\n/**\n * @group Components\n */\n@Directive({\n selector: '[rdxToggleGroup]',\n exportAs: 'rdxToggleGroup',\n providers: [\n { provide: RdxToggleGroupToken, useExisting: forwardRef(() => RdxToggleGroupDirective) },\n { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => RdxToggleGroupDirective), multi: true }\n ],\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n host: {\n role: 'group',\n\n '(focusout)': 'onTouched?.()'\n }\n})\nexport class RdxToggleGroupDirective implements ControlValueAccessor {\n /**\n * @ignore\n */\n readonly id: string = `rdx-toggle-group-${nextId++}`;\n\n /**\n * @group Props\n */\n readonly value = model<string | string[] | undefined>(undefined);\n\n /**\n * @group Props\n */\n readonly type = input<'single' | 'multiple'>('single');\n\n /**\n * Whether the toggle group is disabled.\n * @defaultValue false\n * @group Props\n */\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /**\n * Event emitted when the selected toggle button changes.\n * @group Emits\n */\n readonly onValueChange = output<string[] | string | undefined>();\n\n /**\n * The value change callback.\n */\n private onChange?: (value: string | string[] | undefined) => void;\n\n /**\n * onTouch function registered via registerOnTouch (ControlValueAccessor).\n */\n protected onTouched?: () => void;\n\n /**\n * Toggle a value.\n * @param value The value to toggle.\n * @ignore\n */\n toggle(value: string): void {\n if (this.disabled()) {\n return;\n }\n\n if (this.type() === 'single') {\n this.value.set(value);\n } else {\n this.value.set(\n ((currentValue) =>\n currentValue && Array.isArray(currentValue)\n ? currentValue.includes(value)\n ? currentValue.filter((v) => v !== value) // delete\n : [...currentValue, value] // update\n : [value])(this.value())\n );\n }\n\n this.onValueChange.emit(this.value());\n this.onChange?.(this.value());\n }\n\n /**\n * Select a value from Angular forms.\n * @param value The value to select.\n * @ignore\n */\n writeValue(value: string): void {\n this.value.set(value);\n }\n\n /**\n * Register a callback to be called when the value changes.\n * @param fn The callback to register.\n * @ignore\n */\n registerOnChange(fn: (value: string | string[] | undefined) => void): void {\n this.onChange = fn;\n }\n\n /**\n * Register a callback to be called when the toggle group is touched.\n * @param fn The callback to register.\n * @ignore\n */\n registerOnTouched(fn: () => void): void {\n this.onTouched = fn;\n }\n\n private readonly accessorDisabled = signal(false);\n /**\n * Set the disabled state of the toggle group.\n * @param isDisabled Whether the toggle group is disabled.\n * @ignore\n */\n setDisabledState(is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EAAA,MAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAQQ,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAdnC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,SAAS,EAAE;AACP,wBAAA,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,UAAU,CAAC,MAA6B,uBAAA,CAAC,EAAE;AACxF,wBAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,UAAU,CAAC,6BAA6B,CAAC,EAAE,KAAK,EAAE,IAAI;AACpG,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,EAAE,SAAS,EAAE,4BAA4B,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,aAAa,EAAE,MAAM,CAAC,EAAE,CAAC;AACrG,oBAAA,IAAI,EAAE;AACF,wBAAA,IAAI,EAAE,OAAO;AAEb,wBAAA,YAAY,EAAE;AACjB;AACJ,iBAAA;;;ACxBD;;AAEG;;;;"}
|
@@ -5,10 +5,10 @@ import { RdxVisuallyHiddenInputDirective } from '@radix-ng/primitives/visually-h
|
|
5
5
|
import { NG_VALUE_ACCESSOR } from '@angular/forms';
|
6
6
|
|
7
7
|
class RdxToggleVisuallyHiddenInputDirective {
|
8
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
9
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.
|
8
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleVisuallyHiddenInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
9
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: RdxToggleVisuallyHiddenInputDirective, isStandalone: true, selector: "input[rdxToggleVisuallyHiddenInput]", host: { attributes: { "type": "checkbox" } }, exportAs: ["rdxToggleVisuallyHiddenInput"], hostDirectives: [{ directive: i1.RdxVisuallyHiddenInputDirective, inputs: ["name", "name", "required", "required", "value", "value", "disabled", "disabled"] }], ngImport: i0 }); }
|
10
10
|
}
|
11
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
11
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleVisuallyHiddenInputDirective, decorators: [{
|
12
12
|
type: Directive,
|
13
13
|
args: [{
|
14
14
|
selector: 'input[rdxToggleVisuallyHiddenInput]',
|
@@ -100,10 +100,10 @@ class RdxToggleDirective {
|
|
100
100
|
setDisabledState(isDisabled) {
|
101
101
|
this.accessorDisabled.set(isDisabled);
|
102
102
|
}
|
103
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.
|
104
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.
|
103
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
104
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.4", type: RdxToggleDirective, isStandalone: true, selector: "[rdxToggle]", inputs: { defaultPressed: { classPropertyName: "defaultPressed", publicName: "defaultPressed", isSignal: true, isRequired: false, transformFunction: null }, pressed: { classPropertyName: "pressed", publicName: "pressed", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, disabledModel: { classPropertyName: "disabledModel", publicName: "disabledModel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { pressed: "pressedChange", disabledModel: "disabledModelChange", onPressedChange: "onPressedChange" }, host: { listeners: { "click": "togglePressed()" }, properties: { "attr.aria-pressed": "pressed()", "attr.data-state": "dataState()", "attr.data-disabled": "disabledState() ? \"\" : undefined", "disabled": "disabledState()" } }, providers: [TOGGLE_VALUE_ACCESSOR], exportAs: ["rdxToggle"], ngImport: i0 }); }
|
105
105
|
}
|
106
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.
|
106
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToggleDirective, decorators: [{
|
107
107
|
type: Directive,
|
108
108
|
args: [{
|
109
109
|
selector: '[rdxToggle]',
|
@@ -0,0 +1,155 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { inject, input, booleanAttribute, signal, effect, Directive, InjectionToken, NgModule } from '@angular/core';
|
3
|
+
import * as i1 from '@radix-ng/primitives/roving-focus';
|
4
|
+
import { RdxRovingFocusItemDirective, RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';
|
5
|
+
import * as i1$1 from '@radix-ng/primitives/separator';
|
6
|
+
import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
|
7
|
+
import * as i1$2 from '@radix-ng/primitives/toggle-group';
|
8
|
+
import { RdxToggleGroupWithoutFocusDirective, RdxToggleGroupItemDirective } from '@radix-ng/primitives/toggle-group';
|
9
|
+
|
10
|
+
class RdxToolbarButtonDirective {
|
11
|
+
constructor() {
|
12
|
+
this.rdxRovingFocusItemDirective = inject(RdxRovingFocusItemDirective);
|
13
|
+
this.disabled = input(false, { transform: booleanAttribute });
|
14
|
+
this.isDisabled = signal(this.disabled());
|
15
|
+
this.#disableChanges = effect(() => {
|
16
|
+
this.rdxRovingFocusItemDirective.focusable = !this.isDisabled();
|
17
|
+
});
|
18
|
+
}
|
19
|
+
#disableChanges;
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
21
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.4", type: RdxToolbarButtonDirective, isStandalone: true, selector: "[rdxToolbarButton]", inputs: { disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective, inputs: ["focusable", "focusable"] }], ngImport: i0 }); }
|
22
|
+
}
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarButtonDirective, decorators: [{
|
24
|
+
type: Directive,
|
25
|
+
args: [{
|
26
|
+
selector: '[rdxToolbarButton]',
|
27
|
+
hostDirectives: [{ directive: RdxRovingFocusItemDirective, inputs: ['focusable'] }]
|
28
|
+
}]
|
29
|
+
}] });
|
30
|
+
|
31
|
+
class RdxToolbarLinkDirective {
|
32
|
+
onKeyDown($event) {
|
33
|
+
if ($event.key === ' ')
|
34
|
+
$event.currentTarget?.click();
|
35
|
+
}
|
36
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarLinkDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
37
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: RdxToolbarLinkDirective, isStandalone: true, selector: "[rdxToolbarLink]", host: { listeners: { "keydown": "onKeyDown($event)" } }, hostDirectives: [{ directive: i1.RdxRovingFocusItemDirective, inputs: ["focusable", "focusable"] }], ngImport: i0 }); }
|
38
|
+
}
|
39
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarLinkDirective, decorators: [{
|
40
|
+
type: Directive,
|
41
|
+
args: [{
|
42
|
+
selector: '[rdxToolbarLink]',
|
43
|
+
hostDirectives: [{ directive: RdxRovingFocusItemDirective, inputs: ['focusable'] }],
|
44
|
+
host: {
|
45
|
+
'(keydown)': 'onKeyDown($event)'
|
46
|
+
}
|
47
|
+
}]
|
48
|
+
}] });
|
49
|
+
|
50
|
+
const RDX_TOOLBAR_ROOT_TOKEN = new InjectionToken('RdxToolbarRootDirective');
|
51
|
+
function injectRootContext() {
|
52
|
+
return inject(RDX_TOOLBAR_ROOT_TOKEN);
|
53
|
+
}
|
54
|
+
function provideRootContext() {
|
55
|
+
return {
|
56
|
+
provide: RDX_TOOLBAR_ROOT_TOKEN,
|
57
|
+
useExisting: RdxToolbarRootDirective
|
58
|
+
};
|
59
|
+
}
|
60
|
+
|
61
|
+
class RdxToolbarRootDirective {
|
62
|
+
constructor() {
|
63
|
+
this.orientation = input('horizontal');
|
64
|
+
this.dir = input('ltr');
|
65
|
+
}
|
66
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
67
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.4", type: RdxToolbarRootDirective, isStandalone: true, selector: "[rdxToolbarRoot]", inputs: { orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "toolbar" }, properties: { "attr.aria-orientation": "orientation()" } }, providers: [provideRootContext()], hostDirectives: [{ directive: i1.RdxRovingFocusGroupDirective, inputs: ["dir", "dir", "orientation", "orientation", "loop", "loop"] }], ngImport: i0 }); }
|
68
|
+
}
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarRootDirective, decorators: [{
|
70
|
+
type: Directive,
|
71
|
+
args: [{
|
72
|
+
selector: '[rdxToolbarRoot]',
|
73
|
+
hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],
|
74
|
+
providers: [provideRootContext()],
|
75
|
+
host: {
|
76
|
+
role: 'toolbar',
|
77
|
+
'[attr.aria-orientation]': 'orientation()'
|
78
|
+
}
|
79
|
+
}]
|
80
|
+
}] });
|
81
|
+
|
82
|
+
class RdxToolbarSeparatorDirective {
|
83
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
84
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: RdxToolbarSeparatorDirective, isStandalone: true, selector: "[rdxToolbarSeparator]", hostDirectives: [{ directive: i1$1.RdxSeparatorRootDirective, inputs: ["orientation", "orientation", "decorative", "decorative"] }], ngImport: i0 }); }
|
85
|
+
}
|
86
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarSeparatorDirective, decorators: [{
|
87
|
+
type: Directive,
|
88
|
+
args: [{
|
89
|
+
selector: '[rdxToolbarSeparator]',
|
90
|
+
hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation', 'decorative'] }]
|
91
|
+
}]
|
92
|
+
}] });
|
93
|
+
|
94
|
+
// TODO: set rovingFocus - false
|
95
|
+
class RdxToolbarToggleGroupDirective {
|
96
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarToggleGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
97
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: RdxToolbarToggleGroupDirective, isStandalone: true, selector: "[rdxToolbarToggleGroup]", hostDirectives: [{ directive: i1$2.RdxToggleGroupWithoutFocusDirective, inputs: ["value", "value", "type", "type", "disabled", "disabled"] }], ngImport: i0 }); }
|
98
|
+
}
|
99
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarToggleGroupDirective, decorators: [{
|
100
|
+
type: Directive,
|
101
|
+
args: [{
|
102
|
+
selector: '[rdxToolbarToggleGroup]',
|
103
|
+
hostDirectives: [{ directive: RdxToggleGroupWithoutFocusDirective, inputs: ['value', 'type', 'disabled'] }]
|
104
|
+
}]
|
105
|
+
}] });
|
106
|
+
|
107
|
+
class RdxToolbarToggleItemDirective {
|
108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarToggleItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
109
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.4", type: RdxToolbarToggleItemDirective, isStandalone: true, selector: "[rdxToolbarToggleItem]", hostDirectives: [{ directive: i1$2.RdxToggleGroupItemDirective, inputs: ["value", "value", "disabled", "disabled"] }], ngImport: i0 }); }
|
110
|
+
}
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarToggleItemDirective, decorators: [{
|
112
|
+
type: Directive,
|
113
|
+
args: [{
|
114
|
+
selector: '[rdxToolbarToggleItem]',
|
115
|
+
hostDirectives: [{ directive: RdxToggleGroupItemDirective, inputs: ['value', 'disabled'] }]
|
116
|
+
}]
|
117
|
+
}] });
|
118
|
+
|
119
|
+
const _imports = [
|
120
|
+
RdxToolbarRootDirective,
|
121
|
+
RdxToolbarButtonDirective,
|
122
|
+
RdxToolbarLinkDirective,
|
123
|
+
RdxToolbarToggleGroupDirective,
|
124
|
+
RdxToolbarToggleItemDirective,
|
125
|
+
RdxToolbarSeparatorDirective
|
126
|
+
];
|
127
|
+
class RdxToolbarModule {
|
128
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
129
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarModule, imports: [RdxToolbarRootDirective,
|
130
|
+
RdxToolbarButtonDirective,
|
131
|
+
RdxToolbarLinkDirective,
|
132
|
+
RdxToolbarToggleGroupDirective,
|
133
|
+
RdxToolbarToggleItemDirective,
|
134
|
+
RdxToolbarSeparatorDirective], exports: [RdxToolbarRootDirective,
|
135
|
+
RdxToolbarButtonDirective,
|
136
|
+
RdxToolbarLinkDirective,
|
137
|
+
RdxToolbarToggleGroupDirective,
|
138
|
+
RdxToolbarToggleItemDirective,
|
139
|
+
RdxToolbarSeparatorDirective] }); }
|
140
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarModule }); }
|
141
|
+
}
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.4", ngImport: i0, type: RdxToolbarModule, decorators: [{
|
143
|
+
type: NgModule,
|
144
|
+
args: [{
|
145
|
+
imports: [..._imports],
|
146
|
+
exports: [..._imports]
|
147
|
+
}]
|
148
|
+
}] });
|
149
|
+
|
150
|
+
/**
|
151
|
+
* Generated bundle index. Do not edit.
|
152
|
+
*/
|
153
|
+
|
154
|
+
export { RDX_TOOLBAR_ROOT_TOKEN, RdxToolbarButtonDirective, RdxToolbarLinkDirective, RdxToolbarModule, RdxToolbarRootDirective, RdxToolbarSeparatorDirective, RdxToolbarToggleGroupDirective, RdxToolbarToggleItemDirective, injectRootContext, provideRootContext };
|
155
|
+
//# sourceMappingURL=radix-ng-primitives-toolbar.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-toolbar.mjs","sources":["../../../packages/primitives/toolbar/src/toolbar-button.directive.ts","../../../packages/primitives/toolbar/src/toolbar-link.directive.ts","../../../packages/primitives/toolbar/src/toolbar-root.token.ts","../../../packages/primitives/toolbar/src/toolbar-root.directive.ts","../../../packages/primitives/toolbar/src/toolbar-separator.directive.ts","../../../packages/primitives/toolbar/src/toolbar-toggle-group.directive.ts","../../../packages/primitives/toolbar/src/toolbar-toggle-item.directive.ts","../../../packages/primitives/toolbar/index.ts","../../../packages/primitives/toolbar/radix-ng-primitives-toolbar.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, effect, inject, input, signal } from '@angular/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\n\n@Directive({\n selector: '[rdxToolbarButton]',\n hostDirectives: [{ directive: RdxRovingFocusItemDirective, inputs: ['focusable'] }]\n})\nexport class RdxToolbarButtonDirective {\n private readonly rdxRovingFocusItemDirective = inject(RdxRovingFocusItemDirective);\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n private readonly isDisabled = signal(this.disabled());\n\n #disableChanges = effect(() => {\n this.rdxRovingFocusItemDirective.focusable = !this.isDisabled();\n });\n}\n","import { Directive } from '@angular/core';\nimport { RdxRovingFocusItemDirective } from '@radix-ng/primitives/roving-focus';\n\n@Directive({\n selector: '[rdxToolbarLink]',\n hostDirectives: [{ directive: RdxRovingFocusItemDirective, inputs: ['focusable'] }],\n host: {\n '(keydown)': 'onKeyDown($event)'\n }\n})\nexport class RdxToolbarLinkDirective {\n onKeyDown($event: KeyboardEvent) {\n if ($event.key === ' ') ($event.currentTarget as HTMLElement)?.click();\n }\n}\n","import { inject, InjectionToken, Provider } from '@angular/core';\nimport { RdxToolbarRootDirective } from './toolbar-root.directive';\n\nexport const RDX_TOOLBAR_ROOT_TOKEN = new InjectionToken<RdxToolbarRootDirective>('RdxToolbarRootDirective');\n\nexport function injectRootContext(): RdxToolbarRootDirective {\n return inject(RDX_TOOLBAR_ROOT_TOKEN);\n}\n\nexport function provideRootContext(): Provider {\n return {\n provide: RDX_TOOLBAR_ROOT_TOKEN,\n useExisting: RdxToolbarRootDirective\n };\n}\n","import { Directive, input } from '@angular/core';\nimport { RdxRovingFocusGroupDirective } from '@radix-ng/primitives/roving-focus';\nimport { provideRootContext } from './toolbar-root.token';\n\n@Directive({\n selector: '[rdxToolbarRoot]',\n hostDirectives: [{ directive: RdxRovingFocusGroupDirective, inputs: ['dir', 'orientation', 'loop'] }],\n providers: [provideRootContext()],\n host: {\n role: 'toolbar',\n '[attr.aria-orientation]': 'orientation()'\n }\n})\nexport class RdxToolbarRootDirective {\n readonly orientation = input<'horizontal' | 'vertical'>('horizontal');\n readonly dir = input<'ltr' | 'rtl'>('ltr');\n}\n","import { Directive } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\n\n@Directive({\n selector: '[rdxToolbarSeparator]',\n hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation', 'decorative'] }]\n})\nexport class RdxToolbarSeparatorDirective {}\n","import { Directive } from '@angular/core';\nimport { RdxToggleGroupWithoutFocusDirective } from '@radix-ng/primitives/toggle-group';\n\n// TODO: set rovingFocus - false\n@Directive({\n selector: '[rdxToolbarToggleGroup]',\n hostDirectives: [{ directive: RdxToggleGroupWithoutFocusDirective, inputs: ['value', 'type', 'disabled'] }]\n})\nexport class RdxToolbarToggleGroupDirective {}\n","import { Directive } from '@angular/core';\nimport { RdxToggleGroupItemDirective } from '@radix-ng/primitives/toggle-group';\n\n@Directive({\n selector: '[rdxToolbarToggleItem]',\n hostDirectives: [{ directive: RdxToggleGroupItemDirective, inputs: ['value', 'disabled'] }]\n})\nexport class RdxToolbarToggleItemDirective {}\n","import { NgModule } from '@angular/core';\nimport { RdxToolbarButtonDirective } from './src/toolbar-button.directive';\nimport { RdxToolbarLinkDirective } from './src/toolbar-link.directive';\nimport { RdxToolbarRootDirective } from './src/toolbar-root.directive';\nimport { RdxToolbarSeparatorDirective } from './src/toolbar-separator.directive';\nimport { RdxToolbarToggleGroupDirective } from './src/toolbar-toggle-group.directive';\nimport { RdxToolbarToggleItemDirective } from './src/toolbar-toggle-item.directive';\n\nexport * from './src/toolbar-button.directive';\nexport * from './src/toolbar-link.directive';\nexport * from './src/toolbar-root.directive';\nexport * from './src/toolbar-root.token';\nexport * from './src/toolbar-separator.directive';\nexport * from './src/toolbar-toggle-group.directive';\nexport * from './src/toolbar-toggle-item.directive';\n\nconst _imports = [\n RdxToolbarRootDirective,\n RdxToolbarButtonDirective,\n RdxToolbarLinkDirective,\n RdxToolbarToggleGroupDirective,\n RdxToolbarToggleItemDirective,\n RdxToolbarSeparatorDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxToolbarModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;MAQa,yBAAyB,CAAA;AAJtC,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,2BAA2B,GAAG,MAAM,CAAC,2BAA2B,CAAC;QAEzE,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAwB,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;QAEvE,IAAU,CAAA,UAAA,GAAG,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;AAErD,QAAA,IAAA,CAAA,eAAe,GAAG,MAAM,CAAC,MAAK;YAC1B,IAAI,CAAC,2BAA2B,CAAC,SAAS,GAAG,CAAC,IAAI,CAAC,UAAU,EAAE;AACnE,SAAC,CAAC;AACL;AAHG,IAAA,eAAe;8GAPN,yBAAyB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAzB,yBAAyB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA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