@radix-ng/primitives 0.30.0 → 0.32.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/config/index.d.ts +2 -0
- package/config/src/config.d.ts +21 -0
- package/config/src/config.provider.d.ts +10 -0
- package/core/index.d.ts +3 -2
- package/core/src/kbd-constants.d.ts +40 -0
- package/dropdown-menu/src/dropdown-menu-label.directive.d.ts +2 -1
- package/dropdown-menu/src/dropdown-menu-separator.directive.d.ts +2 -2
- package/fesm2022/radix-ng-primitives-accordion.mjs +19 -19
- 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 +16 -16
- package/fesm2022/radix-ng-primitives-collapsible.mjs +9 -9
- package/fesm2022/radix-ng-primitives-config.mjs +54 -0
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-context-menu.mjs +34 -34
- package/fesm2022/radix-ng-primitives-core.mjs +50 -9
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +25 -25
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +38 -43
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +28 -28
- package/fesm2022/radix-ng-primitives-label.mjs +7 -10
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +37 -37
- package/fesm2022/radix-ng-primitives-menubar.mjs +31 -31
- package/fesm2022/radix-ng-primitives-pagination.mjs +327 -0
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-popover.mjs +28 -28
- package/fesm2022/radix-ng-primitives-progress.mjs +10 -10
- package/fesm2022/radix-ng-primitives-radio.mjs +12 -12
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +6 -6
- package/fesm2022/radix-ng-primitives-select.mjs +34 -34
- package/fesm2022/radix-ng-primitives-separator.mjs +21 -9
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +31 -31
- package/fesm2022/radix-ng-primitives-stepper.mjs +473 -0
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -0
- 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 +9 -9
- package/fesm2022/radix-ng-primitives-toggle.mjs +6 -6
- package/fesm2022/radix-ng-primitives-toolbar.mjs +22 -22
- package/fesm2022/radix-ng-primitives-tooltip.mjs +28 -28
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +9 -9
- package/hover-card/src/hover-card-root.directive.d.ts +4 -4
- package/label/src/label.directive.d.ts +4 -7
- package/package.json +1 -1
- package/pagination/README.md +1 -0
- package/pagination/index.d.ts +23 -0
- package/pagination/src/pagination-context.token.d.ts +11 -0
- package/pagination/src/pagination-ellipsis.directive.d.ts +5 -0
- package/pagination/src/pagination-first.directive.d.ts +8 -0
- package/pagination/src/pagination-last.directive.d.ts +8 -0
- package/pagination/src/pagination-list-item.directive.d.ts +10 -0
- package/pagination/src/pagination-list.directive.d.ts +12 -0
- package/pagination/src/pagination-next.directive.d.ts +8 -0
- package/pagination/src/pagination-prev.directive.d.ts +8 -0
- package/pagination/src/pagination-root.directive.d.ts +18 -0
- package/pagination/src/utils.d.ts +9 -0
- package/popover/src/popover-root.directive.d.ts +4 -4
- package/separator/src/separator.directive.d.ts +4 -1
- package/stepper/README.md +1 -0
- package/stepper/index.d.ts +22 -0
- package/stepper/src/stepper-description.directive.d.ts +6 -0
- package/stepper/src/stepper-indicator.directive.d.ts +6 -0
- package/stepper/src/stepper-item-context.token.d.ts +13 -0
- package/stepper/src/stepper-item.directive.d.ts +21 -0
- package/stepper/src/stepper-root-context.token.d.ts +12 -0
- package/stepper/src/stepper-root.directive.d.ts +32 -0
- package/stepper/src/stepper-separator.directive.d.ts +10 -0
- package/stepper/src/stepper-title.directive.d.ts +6 -0
- package/stepper/src/stepper-trigger.directive.d.ts +14 -0
- package/stepper/src/types.d.ts +1 -0
- package/stepper/src/utils/getActiveElement.d.ts +1 -0
- package/stepper/src/utils/useArrowNavigation.d.ts +65 -0
- package/tooltip/src/tooltip-root.directive.d.ts +4 -4
- /package/core/src/{nullish.d.ts → is-nullish.d.ts} +0 -0
- /package/core/src/{isNumber.d.ts → is-number.d.ts} +0 -0
@@ -0,0 +1,473 @@
|
|
1
|
+
import * as i0 from '@angular/core';
|
2
|
+
import { InjectionToken, inject, Directive, input, numberAttribute, booleanAttribute, computed, forwardRef, model, signal, effect, ElementRef, NgModule } from '@angular/core';
|
3
|
+
import * as kbd from '@radix-ng/primitives/core';
|
4
|
+
import { _IdGenerator } from '@radix-ng/primitives/core';
|
5
|
+
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
6
|
+
import * as i1 from '@radix-ng/primitives/separator';
|
7
|
+
import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
|
8
|
+
|
9
|
+
const STEPPER_ITEM_CONTEXT = new InjectionToken('StepperItemContext');
|
10
|
+
function injectStepperItemContext() {
|
11
|
+
return inject(STEPPER_ITEM_CONTEXT);
|
12
|
+
}
|
13
|
+
|
14
|
+
class RdxStepperDescriptionDirective {
|
15
|
+
constructor() {
|
16
|
+
this.itemContext = injectStepperItemContext();
|
17
|
+
}
|
18
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
19
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.6", type: RdxStepperDescriptionDirective, isStandalone: true, selector: "[rdxStepperDescription]", host: { properties: { "attr.id": "itemContext.descriptionId" } }, ngImport: i0 }); }
|
20
|
+
}
|
21
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperDescriptionDirective, decorators: [{
|
22
|
+
type: Directive,
|
23
|
+
args: [{
|
24
|
+
selector: '[rdxStepperDescription]',
|
25
|
+
host: {
|
26
|
+
'[attr.id]': 'itemContext.descriptionId'
|
27
|
+
}
|
28
|
+
}]
|
29
|
+
}] });
|
30
|
+
|
31
|
+
class RdxStepperIndicatorDirective {
|
32
|
+
constructor() {
|
33
|
+
this.itemContext = injectStepperItemContext();
|
34
|
+
}
|
35
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
36
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.6", type: RdxStepperIndicatorDirective, isStandalone: true, selector: "[rdxStepperIndicator]", exportAs: ["rdxStepperIndicator"], ngImport: i0 }); }
|
37
|
+
}
|
38
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperIndicatorDirective, decorators: [{
|
39
|
+
type: Directive,
|
40
|
+
args: [{
|
41
|
+
selector: '[rdxStepperIndicator]',
|
42
|
+
exportAs: 'rdxStepperIndicator'
|
43
|
+
}]
|
44
|
+
}] });
|
45
|
+
|
46
|
+
const STEPPER_ROOT_CONTEXT = new InjectionToken('StepperRootContext');
|
47
|
+
function injectStepperRootContext() {
|
48
|
+
return inject(STEPPER_ROOT_CONTEXT);
|
49
|
+
}
|
50
|
+
|
51
|
+
class RdxStepperItemDirective {
|
52
|
+
constructor() {
|
53
|
+
this.rootContext = injectStepperRootContext();
|
54
|
+
/** @ignore */
|
55
|
+
this.titleId = inject(_IdGenerator).getId('rdx-stepper-item-title');
|
56
|
+
/** @ignore */
|
57
|
+
this.descriptionId = inject(_IdGenerator).getId('rdx-stepper-item-description');
|
58
|
+
this.step = input(NaN, { transform: numberAttribute });
|
59
|
+
this.disabled = input(false, { transform: booleanAttribute });
|
60
|
+
/** @ignore */
|
61
|
+
this.completed = input(false, { transform: booleanAttribute });
|
62
|
+
/** @ignore */
|
63
|
+
this.itemState = computed(() => {
|
64
|
+
if (this.completed())
|
65
|
+
return 'completed';
|
66
|
+
if (this.rootContext.value() === this.step())
|
67
|
+
return 'active';
|
68
|
+
const step = this.step() ?? 1;
|
69
|
+
if (this.rootContext.value() > step) {
|
70
|
+
return 'completed';
|
71
|
+
}
|
72
|
+
return 'inactive';
|
73
|
+
});
|
74
|
+
/** @ignore */
|
75
|
+
this.isFocusable = computed(() => {
|
76
|
+
if (this.disabled())
|
77
|
+
return false;
|
78
|
+
const step = this.step() ?? 1;
|
79
|
+
if (this.rootContext.linear()) {
|
80
|
+
return step <= this.rootContext.value() || step === this.rootContext.value() + 1;
|
81
|
+
}
|
82
|
+
return true;
|
83
|
+
});
|
84
|
+
}
|
85
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
86
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.6", type: RdxStepperItemDirective, isStandalone: true, selector: "[rdxStepperItem]", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, completed: { classPropertyName: "completed", publicName: "completed", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "attr.aria-current": "itemState() === \"active\" ? true : undefined", "attr.data-state": "itemState()", "attr.disabled": "disabled() || !isFocusable() ? \"\" : undefined", "attr.data-disabled": "disabled() || !isFocusable() ? \"\" : undefined", "attr.data-orientation": "rootContext.orientation()" } }, providers: [
|
87
|
+
{
|
88
|
+
provide: STEPPER_ITEM_CONTEXT,
|
89
|
+
useExisting: forwardRef(() => RdxStepperItemDirective)
|
90
|
+
}
|
91
|
+
], ngImport: i0 }); }
|
92
|
+
}
|
93
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperItemDirective, decorators: [{
|
94
|
+
type: Directive,
|
95
|
+
args: [{
|
96
|
+
selector: '[rdxStepperItem]',
|
97
|
+
providers: [
|
98
|
+
{
|
99
|
+
provide: STEPPER_ITEM_CONTEXT,
|
100
|
+
useExisting: forwardRef(() => RdxStepperItemDirective)
|
101
|
+
}
|
102
|
+
],
|
103
|
+
host: {
|
104
|
+
'[attr.aria-current]': 'itemState() === "active" ? true : undefined',
|
105
|
+
'[attr.data-state]': 'itemState()',
|
106
|
+
'[attr.disabled]': 'disabled() || !isFocusable() ? "" : undefined',
|
107
|
+
'[attr.data-disabled]': 'disabled() || !isFocusable() ? "" : undefined',
|
108
|
+
'[attr.data-orientation]': 'rootContext.orientation()'
|
109
|
+
}
|
110
|
+
}]
|
111
|
+
}] });
|
112
|
+
|
113
|
+
class RdxStepperRootDirective {
|
114
|
+
constructor() {
|
115
|
+
this.liveAnnouncer = inject(LiveAnnouncer);
|
116
|
+
this.defaultValue = input(undefined, { transform: numberAttribute });
|
117
|
+
this.value = model(this.defaultValue());
|
118
|
+
this.linear = input(true, { transform: booleanAttribute });
|
119
|
+
this.dir = input('ltr');
|
120
|
+
this.orientation = input('horizontal');
|
121
|
+
/** @ignore */
|
122
|
+
this.totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()));
|
123
|
+
/** @ignore */
|
124
|
+
this.isFirstStep = computed(() => this.value() === 1);
|
125
|
+
/** @ignore */
|
126
|
+
this.isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length);
|
127
|
+
/** @ignore */
|
128
|
+
this.totalSteps = computed(() => this.totalStepperItems().length);
|
129
|
+
/** @ignore */
|
130
|
+
this.isNextDisabled = computed(() => {
|
131
|
+
const item = this.nextStepperItem();
|
132
|
+
return item ? item.hasAttribute('disabled') : true;
|
133
|
+
});
|
134
|
+
/** @ignore */
|
135
|
+
this.isPrevDisabled = computed(() => {
|
136
|
+
const item = this.prevStepperItem();
|
137
|
+
return item ? item.hasAttribute('disabled') : true;
|
138
|
+
});
|
139
|
+
/** @ignore */
|
140
|
+
this.totalStepperItems = signal([]);
|
141
|
+
this.nextStepperItem = signal(null);
|
142
|
+
this.prevStepperItem = signal(null);
|
143
|
+
effect(() => {
|
144
|
+
const items = this.totalStepperItemsArray();
|
145
|
+
const currentValue = this.value();
|
146
|
+
if (currentValue) {
|
147
|
+
if (items.length && currentValue < items.length) {
|
148
|
+
this.nextStepperItem.set(items[currentValue]);
|
149
|
+
}
|
150
|
+
else {
|
151
|
+
this.nextStepperItem.set(null);
|
152
|
+
}
|
153
|
+
if (items.length && currentValue > 1) {
|
154
|
+
this.prevStepperItem.set(items[currentValue - 2]);
|
155
|
+
}
|
156
|
+
else {
|
157
|
+
this.prevStepperItem.set(null);
|
158
|
+
}
|
159
|
+
this.liveAnnouncer.announce(`Step ${currentValue} of ${items.length}`);
|
160
|
+
}
|
161
|
+
});
|
162
|
+
}
|
163
|
+
goToStep(step) {
|
164
|
+
if (step > this.totalSteps()) {
|
165
|
+
return;
|
166
|
+
}
|
167
|
+
if (step < 1) {
|
168
|
+
return;
|
169
|
+
}
|
170
|
+
if (this.totalStepperItems().length &&
|
171
|
+
!!this.totalStepperItemsArray()[step] &&
|
172
|
+
this.totalStepperItemsArray()[step].hasAttribute('disabled')) {
|
173
|
+
return;
|
174
|
+
}
|
175
|
+
if (this.linear()) {
|
176
|
+
const currentValue = this.value() ?? 1;
|
177
|
+
if (step > currentValue + 1) {
|
178
|
+
return;
|
179
|
+
}
|
180
|
+
}
|
181
|
+
this.value.set(step);
|
182
|
+
}
|
183
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
184
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.6", type: RdxStepperRootDirective, isStandalone: true, selector: "[rdxStepperRoot]", inputs: { defaultValue: { classPropertyName: "defaultValue", publicName: "defaultValue", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, linear: { classPropertyName: "linear", publicName: "linear", isSignal: true, isRequired: false, transformFunction: null }, dir: { classPropertyName: "dir", publicName: "dir", isSignal: true, isRequired: false, transformFunction: null }, orientation: { classPropertyName: "orientation", publicName: "orientation", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "\"progress\"", "attr.data-linear": "linear() ? \"\" : undefined", "attr.data-orientation": "orientation()" } }, providers: [
|
185
|
+
{
|
186
|
+
provide: STEPPER_ROOT_CONTEXT,
|
187
|
+
useExisting: forwardRef(() => RdxStepperRootDirective)
|
188
|
+
}
|
189
|
+
], exportAs: ["rdxStepperRoot"], ngImport: i0 }); }
|
190
|
+
}
|
191
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperRootDirective, decorators: [{
|
192
|
+
type: Directive,
|
193
|
+
args: [{
|
194
|
+
selector: '[rdxStepperRoot]',
|
195
|
+
exportAs: 'rdxStepperRoot',
|
196
|
+
providers: [
|
197
|
+
{
|
198
|
+
provide: STEPPER_ROOT_CONTEXT,
|
199
|
+
useExisting: forwardRef(() => RdxStepperRootDirective)
|
200
|
+
}
|
201
|
+
],
|
202
|
+
host: {
|
203
|
+
role: 'group',
|
204
|
+
'[attr.aria-label]': '"progress"',
|
205
|
+
'[attr.data-linear]': 'linear() ? "" : undefined',
|
206
|
+
'[attr.data-orientation]': 'orientation()'
|
207
|
+
}
|
208
|
+
}]
|
209
|
+
}], ctorParameters: () => [] });
|
210
|
+
|
211
|
+
class RdxStepperSeparatorDirective {
|
212
|
+
constructor() {
|
213
|
+
this.rootContext = injectStepperRootContext();
|
214
|
+
this.itemContext = injectStepperItemContext();
|
215
|
+
this.rdxSeparator = inject(RdxSeparatorRootDirective, { host: true });
|
216
|
+
effect(() => {
|
217
|
+
this.rdxSeparator.updateDecorative(true);
|
218
|
+
this.rdxSeparator.updateOrientation(this.rootContext.orientation());
|
219
|
+
});
|
220
|
+
}
|
221
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
222
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.6", type: RdxStepperSeparatorDirective, isStandalone: true, selector: "[rdxStepperSeparator]", host: { properties: { "attr.data-state": "itemContext.itemState()" } }, hostDirectives: [{ directive: i1.RdxSeparatorRootDirective, inputs: ["orientation", "orientation", "decorative", "decorative"] }], ngImport: i0 }); }
|
223
|
+
}
|
224
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperSeparatorDirective, decorators: [{
|
225
|
+
type: Directive,
|
226
|
+
args: [{
|
227
|
+
selector: '[rdxStepperSeparator]',
|
228
|
+
hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation', 'decorative'] }],
|
229
|
+
host: {
|
230
|
+
'[attr.data-state]': 'itemContext.itemState()'
|
231
|
+
}
|
232
|
+
}]
|
233
|
+
}], ctorParameters: () => [] });
|
234
|
+
|
235
|
+
class RdxStepperTitleDirective {
|
236
|
+
constructor() {
|
237
|
+
this.itemContext = injectStepperItemContext();
|
238
|
+
}
|
239
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
240
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.6", type: RdxStepperTitleDirective, isStandalone: true, selector: "[rdxStepperTitle]", host: { properties: { "attr.id": "itemContext.titleId" } }, ngImport: i0 }); }
|
241
|
+
}
|
242
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperTitleDirective, decorators: [{
|
243
|
+
type: Directive,
|
244
|
+
args: [{
|
245
|
+
selector: '[rdxStepperTitle]',
|
246
|
+
host: {
|
247
|
+
'[attr.id]': 'itemContext.titleId'
|
248
|
+
}
|
249
|
+
}]
|
250
|
+
}] });
|
251
|
+
|
252
|
+
function getActiveElement() {
|
253
|
+
let activeElement = document.activeElement;
|
254
|
+
if (activeElement == null) {
|
255
|
+
return null;
|
256
|
+
}
|
257
|
+
while (activeElement != null &&
|
258
|
+
activeElement.shadowRoot != null &&
|
259
|
+
activeElement.shadowRoot.activeElement != null) {
|
260
|
+
activeElement = activeElement.shadowRoot.activeElement;
|
261
|
+
}
|
262
|
+
return activeElement;
|
263
|
+
}
|
264
|
+
|
265
|
+
// made by https://reka-ui.com/
|
266
|
+
const ignoredElement = ['INPUT', 'TEXTAREA'];
|
267
|
+
/**
|
268
|
+
* Allow arrow navigation for every html element with data-reka-collection-item tag
|
269
|
+
*
|
270
|
+
* @param e Keyboard event
|
271
|
+
* @param currentElement Event initiator element or any element that wants to handle the navigation
|
272
|
+
* @param parentElement Parent element where contains all the collection items, this will collect every item to be used when nav
|
273
|
+
* @param options further options
|
274
|
+
* @returns the navigated html element or null if none
|
275
|
+
*/
|
276
|
+
function useArrowNavigation(e, currentElement, parentElement, options = {}) {
|
277
|
+
if (!currentElement || (options.enableIgnoredElement && ignoredElement.includes(currentElement.nodeName)))
|
278
|
+
return null;
|
279
|
+
const { arrowKeyOptions = 'both', attributeName = '[data-reka-collection-item]', itemsArray = [], loop = true, dir = 'ltr', preventScroll = true, focus = false } = options;
|
280
|
+
const [right, left, up, down, home, end] = [
|
281
|
+
e.key === 'ArrowRight',
|
282
|
+
e.key === 'ArrowLeft',
|
283
|
+
e.key === 'ArrowUp',
|
284
|
+
e.key === 'ArrowDown',
|
285
|
+
e.key === 'Home',
|
286
|
+
e.key === 'End'
|
287
|
+
];
|
288
|
+
const goingVertical = up || down;
|
289
|
+
const goingHorizontal = right || left;
|
290
|
+
if (!home &&
|
291
|
+
!end &&
|
292
|
+
((!goingVertical && !goingHorizontal) ||
|
293
|
+
(arrowKeyOptions === 'vertical' && goingHorizontal) ||
|
294
|
+
(arrowKeyOptions === 'horizontal' && goingVertical))) {
|
295
|
+
return null;
|
296
|
+
}
|
297
|
+
const allCollectionItems = parentElement
|
298
|
+
? Array.from(parentElement.querySelectorAll(attributeName))
|
299
|
+
: itemsArray;
|
300
|
+
if (!allCollectionItems.length)
|
301
|
+
return null;
|
302
|
+
if (preventScroll)
|
303
|
+
e.preventDefault();
|
304
|
+
let item = null;
|
305
|
+
if (goingHorizontal || goingVertical) {
|
306
|
+
const goForward = goingVertical ? down : dir === 'ltr' ? right : left;
|
307
|
+
item = findNextFocusableElement(allCollectionItems, currentElement, {
|
308
|
+
goForward,
|
309
|
+
loop
|
310
|
+
});
|
311
|
+
}
|
312
|
+
else if (home) {
|
313
|
+
item = allCollectionItems.at(0) || null;
|
314
|
+
}
|
315
|
+
else if (end) {
|
316
|
+
item = allCollectionItems.at(-1) || null;
|
317
|
+
}
|
318
|
+
if (focus)
|
319
|
+
item?.focus();
|
320
|
+
return item;
|
321
|
+
}
|
322
|
+
/**
|
323
|
+
* Recursive function to find the next focusable element to avoid disabled elements
|
324
|
+
*
|
325
|
+
* @param elements Elements to navigate
|
326
|
+
* @param currentElement Current active element
|
327
|
+
* @param options
|
328
|
+
* @returns next focusable element
|
329
|
+
*/
|
330
|
+
function findNextFocusableElement(elements, currentElement, options, iterations = elements.length) {
|
331
|
+
if (--iterations === 0)
|
332
|
+
return null;
|
333
|
+
const index = elements.indexOf(currentElement);
|
334
|
+
const newIndex = options.goForward ? index + 1 : index - 1;
|
335
|
+
if (!options.loop && (newIndex < 0 || newIndex >= elements.length))
|
336
|
+
return null;
|
337
|
+
const adjustedNewIndex = (newIndex + elements.length) % elements.length;
|
338
|
+
const candidate = elements[adjustedNewIndex];
|
339
|
+
if (!candidate)
|
340
|
+
return null;
|
341
|
+
const isDisabled = candidate.hasAttribute('disabled') && candidate.getAttribute('disabled') !== 'false';
|
342
|
+
if (isDisabled) {
|
343
|
+
return findNextFocusableElement(elements, candidate, options, iterations);
|
344
|
+
}
|
345
|
+
return candidate;
|
346
|
+
}
|
347
|
+
|
348
|
+
// as button
|
349
|
+
class RdxStepperTriggerDirective {
|
350
|
+
constructor() {
|
351
|
+
this.rootContext = injectStepperRootContext();
|
352
|
+
this.itemContext = injectStepperItemContext();
|
353
|
+
this.elementRef = inject(ElementRef);
|
354
|
+
this.stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()));
|
355
|
+
}
|
356
|
+
ngOnInit() {
|
357
|
+
const current = this.rootContext.totalStepperItems();
|
358
|
+
this.rootContext.totalStepperItems.set([...current, this.elementRef.nativeElement]);
|
359
|
+
}
|
360
|
+
ngOnDestroy() {
|
361
|
+
const current = this.rootContext.totalStepperItems();
|
362
|
+
const updated = current.filter((el) => el !== this.elementRef.nativeElement);
|
363
|
+
this.rootContext.totalStepperItems.set(updated);
|
364
|
+
}
|
365
|
+
handleMouseDown(event) {
|
366
|
+
if (this.itemContext.disabled()) {
|
367
|
+
return;
|
368
|
+
}
|
369
|
+
// handler only left mouse click
|
370
|
+
if (event.button !== 0) {
|
371
|
+
return;
|
372
|
+
}
|
373
|
+
if (this.rootContext.linear()) {
|
374
|
+
if (this.itemContext.step() <= this.rootContext.value() ||
|
375
|
+
this.itemContext.step() === this.rootContext.value() + 1) {
|
376
|
+
if (!event.ctrlKey) {
|
377
|
+
this.rootContext.value.set(this.itemContext.step());
|
378
|
+
return;
|
379
|
+
}
|
380
|
+
}
|
381
|
+
}
|
382
|
+
else {
|
383
|
+
if (!event.ctrlKey) {
|
384
|
+
this.rootContext.value.set(this.itemContext.step());
|
385
|
+
return;
|
386
|
+
}
|
387
|
+
}
|
388
|
+
// prevent focus to avoid accidental activation
|
389
|
+
event.preventDefault();
|
390
|
+
}
|
391
|
+
handleKeyDown(event) {
|
392
|
+
event.preventDefault();
|
393
|
+
if (this.itemContext.disabled()) {
|
394
|
+
return;
|
395
|
+
}
|
396
|
+
if ((event.key === kbd.ENTER || event.key === kbd.SPACE) && !event.ctrlKey && !event.shiftKey)
|
397
|
+
this.rootContext.value.set(this.itemContext.step());
|
398
|
+
if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(event.key)) {
|
399
|
+
useArrowNavigation(event, getActiveElement(), undefined, {
|
400
|
+
itemsArray: this.stepperItems(),
|
401
|
+
focus: true,
|
402
|
+
loop: false,
|
403
|
+
arrowKeyOptions: this.rootContext.orientation(),
|
404
|
+
dir: this.rootContext.dir()
|
405
|
+
});
|
406
|
+
}
|
407
|
+
}
|
408
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
409
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.6", type: RdxStepperTriggerDirective, isStandalone: true, selector: "button[rdxStepperTrigger]", host: { listeners: { "mousedown": "handleMouseDown($event)", "keydown.Enter": "handleKeyDown($event)", "keydown.Space": "handleKeyDown($event)", "keydown.ArrowLeft": "handleKeyDown($event)", "keydown.ArrowRight": "handleKeyDown($event)", "keydown.ArrowUp": "handleKeyDown($event)", "keydown.ArrowDown": "handleKeyDown($event)" }, properties: { "attr.tabindex": "itemContext.isFocusable() ? 0 : -1", "attr.aria-describedby": "itemContext.descriptionId", "attr.aria-labelledby": "itemContext.titleId", "attr.data-state": "itemContext.itemState()", "attr.data-orientation": "rootContext.orientation()", "attr.disabled": "itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined", "attr.data-disabled": "itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined" } }, ngImport: i0 }); }
|
410
|
+
}
|
411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperTriggerDirective, decorators: [{
|
412
|
+
type: Directive,
|
413
|
+
args: [{
|
414
|
+
selector: 'button[rdxStepperTrigger]',
|
415
|
+
host: {
|
416
|
+
'[attr.tabindex]': 'itemContext.isFocusable() ? 0 : -1',
|
417
|
+
'[attr.aria-describedby]': 'itemContext.descriptionId',
|
418
|
+
'[attr.aria-labelledby]': 'itemContext.titleId',
|
419
|
+
'[attr.data-state]': 'itemContext.itemState()',
|
420
|
+
'[attr.data-orientation]': 'rootContext.orientation()',
|
421
|
+
'[attr.disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? "" : undefined',
|
422
|
+
'[attr.data-disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? "" : undefined',
|
423
|
+
'(mousedown)': 'handleMouseDown($event)',
|
424
|
+
'(keydown.Enter)': 'handleKeyDown($event)',
|
425
|
+
'(keydown.Space)': 'handleKeyDown($event)',
|
426
|
+
'(keydown.ArrowLeft)': 'handleKeyDown($event)',
|
427
|
+
'(keydown.ArrowRight)': 'handleKeyDown($event)',
|
428
|
+
'(keydown.ArrowUp)': 'handleKeyDown($event)',
|
429
|
+
'(keydown.ArrowDown)': 'handleKeyDown($event)'
|
430
|
+
}
|
431
|
+
}]
|
432
|
+
}] });
|
433
|
+
|
434
|
+
const _imports = [
|
435
|
+
RdxStepperDescriptionDirective,
|
436
|
+
RdxStepperTitleDirective,
|
437
|
+
RdxStepperSeparatorDirective,
|
438
|
+
RdxStepperItemDirective,
|
439
|
+
RdxStepperIndicatorDirective,
|
440
|
+
RdxStepperRootDirective,
|
441
|
+
RdxStepperTriggerDirective
|
442
|
+
];
|
443
|
+
class RdxStepperModule {
|
444
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
445
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperModule, imports: [RdxStepperDescriptionDirective,
|
446
|
+
RdxStepperTitleDirective,
|
447
|
+
RdxStepperSeparatorDirective,
|
448
|
+
RdxStepperItemDirective,
|
449
|
+
RdxStepperIndicatorDirective,
|
450
|
+
RdxStepperRootDirective,
|
451
|
+
RdxStepperTriggerDirective], exports: [RdxStepperDescriptionDirective,
|
452
|
+
RdxStepperTitleDirective,
|
453
|
+
RdxStepperSeparatorDirective,
|
454
|
+
RdxStepperItemDirective,
|
455
|
+
RdxStepperIndicatorDirective,
|
456
|
+
RdxStepperRootDirective,
|
457
|
+
RdxStepperTriggerDirective] }); }
|
458
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperModule }); }
|
459
|
+
}
|
460
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxStepperModule, decorators: [{
|
461
|
+
type: NgModule,
|
462
|
+
args: [{
|
463
|
+
imports: [..._imports],
|
464
|
+
exports: [..._imports]
|
465
|
+
}]
|
466
|
+
}] });
|
467
|
+
|
468
|
+
/**
|
469
|
+
* Generated bundle index. Do not edit.
|
470
|
+
*/
|
471
|
+
|
472
|
+
export { RdxStepperDescriptionDirective, RdxStepperIndicatorDirective, RdxStepperItemDirective, RdxStepperModule, RdxStepperRootDirective, RdxStepperSeparatorDirective, RdxStepperTitleDirective, RdxStepperTriggerDirective, STEPPER_ROOT_CONTEXT, injectStepperRootContext };
|
473
|
+
//# sourceMappingURL=radix-ng-primitives-stepper.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"radix-ng-primitives-stepper.mjs","sources":["../../../packages/primitives/stepper/src/stepper-item-context.token.ts","../../../packages/primitives/stepper/src/stepper-description.directive.ts","../../../packages/primitives/stepper/src/stepper-indicator.directive.ts","../../../packages/primitives/stepper/src/stepper-root-context.token.ts","../../../packages/primitives/stepper/src/stepper-item.directive.ts","../../../packages/primitives/stepper/src/stepper-root.directive.ts","../../../packages/primitives/stepper/src/stepper-separator.directive.ts","../../../packages/primitives/stepper/src/stepper-title.directive.ts","../../../packages/primitives/stepper/src/utils/getActiveElement.ts","../../../packages/primitives/stepper/src/utils/useArrowNavigation.ts","../../../packages/primitives/stepper/src/stepper-trigger.directive.ts","../../../packages/primitives/stepper/index.ts","../../../packages/primitives/stepper/radix-ng-primitives-stepper.ts"],"sourcesContent":["import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { inject, InjectionToken, InputSignalWithTransform, Signal } from '@angular/core';\nimport { StepperState } from './types';\n\nexport interface StepperItemContext {\n titleId: string;\n descriptionId: string;\n step: InputSignalWithTransform<number, NumberInput>;\n disabled: InputSignalWithTransform<boolean, BooleanInput>;\n isFocusable: Signal<boolean>;\n itemState: Signal<StepperState>;\n}\n\nexport const STEPPER_ITEM_CONTEXT = new InjectionToken<StepperItemContext>('StepperItemContext');\n\nexport function injectStepperItemContext(): StepperItemContext {\n return inject(STEPPER_ITEM_CONTEXT);\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperDescription]',\n host: {\n '[attr.id]': 'itemContext.descriptionId'\n }\n})\nexport class RdxStepperDescriptionDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperIndicator]',\n exportAs: 'rdxStepperIndicator'\n})\nexport class RdxStepperIndicatorDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","import { Direction } from '@angular/cdk/bidi';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport {\n inject,\n InjectionToken,\n InputSignal,\n InputSignalWithTransform,\n ModelSignal,\n WritableSignal\n} from '@angular/core';\n\nexport interface StepperRootContext {\n value: ModelSignal<number | undefined>;\n orientation: InputSignal<'vertical' | 'horizontal'>;\n dir: InputSignal<Direction>;\n linear: InputSignalWithTransform<boolean, BooleanInput>;\n totalStepperItems: WritableSignal<HTMLElement[]>;\n}\n\nexport const STEPPER_ROOT_CONTEXT = new InjectionToken<StepperRootContext>('StepperRootContext');\n\nexport function injectStepperRootContext(): StepperRootContext {\n return inject(STEPPER_ROOT_CONTEXT);\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, forwardRef, inject, input, numberAttribute } from '@angular/core';\nimport { _IdGenerator } from '@radix-ng/primitives/core';\nimport { STEPPER_ITEM_CONTEXT, StepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\nimport { StepperState } from './types';\n\n@Directive({\n selector: '[rdxStepperItem]',\n providers: [\n {\n provide: STEPPER_ITEM_CONTEXT,\n useExisting: forwardRef(() => RdxStepperItemDirective)\n }\n ],\n host: {\n '[attr.aria-current]': 'itemState() === \"active\" ? true : undefined',\n\n '[attr.data-state]': 'itemState()',\n '[attr.disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'disabled() || !isFocusable() ? \"\" : undefined',\n '[attr.data-orientation]': 'rootContext.orientation()'\n }\n})\nexport class RdxStepperItemDirective implements StepperItemContext {\n protected readonly rootContext = injectStepperRootContext();\n\n /** @ignore */\n readonly titleId = inject(_IdGenerator).getId('rdx-stepper-item-title');\n\n /** @ignore */\n readonly descriptionId = inject(_IdGenerator).getId('rdx-stepper-item-description');\n\n readonly step = input<number, NumberInput>(NaN, { transform: numberAttribute });\n\n readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly completed = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n /** @ignore */\n readonly itemState = computed<StepperState>(() => {\n if (this.completed()) return 'completed';\n if (this.rootContext.value() === this.step()) return 'active';\n\n const step = this.step() ?? 1;\n if (this.rootContext.value()! > step) {\n return 'completed';\n }\n\n return 'inactive';\n });\n\n /** @ignore */\n readonly isFocusable = computed(() => {\n if (this.disabled()) return false;\n\n const step = this.step() ?? 1;\n if (this.rootContext.linear()) {\n return step <= this.rootContext.value()! || step === this.rootContext.value()! + 1;\n }\n\n return true;\n });\n}\n","import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { Direction } from '@angular/cdk/bidi';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n signal\n} from '@angular/core';\nimport { STEPPER_ROOT_CONTEXT, StepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperRoot]',\n exportAs: 'rdxStepperRoot',\n providers: [\n {\n provide: STEPPER_ROOT_CONTEXT,\n useExisting: forwardRef(() => RdxStepperRootDirective)\n }\n ],\n host: {\n role: 'group',\n '[attr.aria-label]': '\"progress\"',\n '[attr.data-linear]': 'linear() ? \"\" : undefined',\n '[attr.data-orientation]': 'orientation()'\n }\n})\nexport class RdxStepperRootDirective implements StepperRootContext {\n private readonly liveAnnouncer = inject(LiveAnnouncer);\n\n readonly defaultValue = input<number, NumberInput>(undefined, { transform: numberAttribute });\n\n readonly value = model<number | undefined>(this.defaultValue());\n\n readonly linear = input<boolean, BooleanInput>(true, { transform: booleanAttribute });\n\n readonly dir = input<Direction>('ltr');\n\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** @ignore */\n readonly totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()));\n\n /** @ignore */\n readonly isFirstStep = computed(() => this.value() === 1);\n\n /** @ignore */\n readonly isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length);\n\n /** @ignore */\n readonly totalSteps = computed(() => this.totalStepperItems().length);\n\n /** @ignore */\n readonly isNextDisabled = computed<boolean>(() => {\n const item = this.nextStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly isPrevDisabled = computed<boolean>(() => {\n const item = this.prevStepperItem();\n return item ? item.hasAttribute('disabled') : true;\n });\n\n /** @ignore */\n readonly totalStepperItems = signal<HTMLElement[]>([]);\n\n private readonly nextStepperItem = signal<HTMLElement | null>(null);\n private readonly prevStepperItem = signal<HTMLElement | null>(null);\n\n constructor() {\n effect(() => {\n const items = this.totalStepperItemsArray();\n const currentValue = this.value();\n\n if (currentValue) {\n if (items.length && currentValue < items.length) {\n this.nextStepperItem.set(items[currentValue]);\n } else {\n this.nextStepperItem.set(null);\n }\n\n if (items.length && currentValue > 1) {\n this.prevStepperItem.set(items[currentValue - 2]);\n } else {\n this.prevStepperItem.set(null);\n }\n\n this.liveAnnouncer.announce(`Step ${currentValue} of ${items.length}`);\n }\n });\n }\n\n goToStep(step: number) {\n if (step > this.totalSteps()) {\n return;\n }\n\n if (step < 1) {\n return;\n }\n\n if (\n this.totalStepperItems().length &&\n !!this.totalStepperItemsArray()[step] &&\n this.totalStepperItemsArray()[step].hasAttribute('disabled')\n ) {\n return;\n }\n\n if (this.linear()) {\n const currentValue = this.value() ?? 1;\n if (step > currentValue + 1) {\n return;\n }\n }\n this.value.set(step);\n }\n}\n","import { Directive, effect, inject } from '@angular/core';\nimport { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\n\n@Directive({\n selector: '[rdxStepperSeparator]',\n hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation', 'decorative'] }],\n host: {\n '[attr.data-state]': 'itemContext.itemState()'\n }\n})\nexport class RdxStepperSeparatorDirective {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly rdxSeparator = inject(RdxSeparatorRootDirective, { host: true });\n\n constructor() {\n effect(() => {\n this.rdxSeparator.updateDecorative(true);\n this.rdxSeparator.updateOrientation(this.rootContext.orientation());\n });\n }\n}\n","import { Directive } from '@angular/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\n\n@Directive({\n selector: '[rdxStepperTitle]',\n host: {\n '[attr.id]': 'itemContext.titleId'\n }\n})\nexport class RdxStepperTitleDirective {\n readonly itemContext = injectStepperItemContext();\n}\n","export function getActiveElement(): Element | null {\n let activeElement = document.activeElement;\n if (activeElement == null) {\n return null;\n }\n\n while (\n activeElement != null &&\n activeElement.shadowRoot != null &&\n activeElement.shadowRoot.activeElement != null\n ) {\n activeElement = activeElement.shadowRoot.activeElement;\n }\n\n return activeElement;\n}\n","// made by https://reka-ui.com/\n\nimport { Direction } from '@angular/cdk/bidi';\n\ntype ArrowKeyOptions = 'horizontal' | 'vertical' | 'both';\n\ninterface ArrowNavigationOptions {\n /**\n * The arrow key options to allow navigation\n *\n * @defaultValue \"both\"\n */\n arrowKeyOptions?: ArrowKeyOptions;\n\n /**\n * The attribute name to find the collection items in the parent element.\n *\n * @defaultValue \"data-reka-collection-item\"\n */\n attributeName?: string;\n\n /**\n * The parent element where contains all the collection items, this will collect every item to be used when nav\n * It will be ignored if attributeName is provided\n *\n * @defaultValue []\n */\n itemsArray?: HTMLElement[];\n\n /**\n * Allow loop navigation. If false, it will stop at the first and last element\n *\n * @defaultValue true\n */\n loop?: boolean;\n\n /**\n * The orientation of the collection\n *\n * @defaultValue \"ltr\"\n */\n dir?: Direction;\n\n /**\n * Prevent the scroll when navigating. This happens when the direction of the\n * key matches the scroll direction of any ancestor scrollable elements.\n *\n * @defaultValue true\n */\n preventScroll?: boolean;\n\n /**\n * By default all currentElement would trigger navigation. If `true`, currentElement nodeName in the ignore list will return null\n *\n * @defaultValue false\n */\n enableIgnoredElement?: boolean;\n\n /**\n * Focus the element after navigation\n *\n * @defaultValue false\n */\n focus?: boolean;\n}\n\nconst ignoredElement = ['INPUT', 'TEXTAREA'];\n\n/**\n * Allow arrow navigation for every html element with data-reka-collection-item tag\n *\n * @param e Keyboard event\n * @param currentElement Event initiator element or any element that wants to handle the navigation\n * @param parentElement Parent element where contains all the collection items, this will collect every item to be used when nav\n * @param options further options\n * @returns the navigated html element or null if none\n */\nexport function useArrowNavigation(\n e: KeyboardEvent,\n currentElement: HTMLElement,\n parentElement: HTMLElement | undefined,\n options: ArrowNavigationOptions = {}\n): HTMLElement | null {\n if (!currentElement || (options.enableIgnoredElement && ignoredElement.includes(currentElement.nodeName)))\n return null;\n\n const {\n arrowKeyOptions = 'both',\n attributeName = '[data-reka-collection-item]',\n itemsArray = [],\n loop = true,\n dir = 'ltr',\n preventScroll = true,\n focus = false\n } = options;\n\n const [right, left, up, down, home, end] = [\n e.key === 'ArrowRight',\n e.key === 'ArrowLeft',\n e.key === 'ArrowUp',\n e.key === 'ArrowDown',\n e.key === 'Home',\n e.key === 'End'\n ];\n const goingVertical = up || down;\n const goingHorizontal = right || left;\n if (\n !home &&\n !end &&\n ((!goingVertical && !goingHorizontal) ||\n (arrowKeyOptions === 'vertical' && goingHorizontal) ||\n (arrowKeyOptions === 'horizontal' && goingVertical))\n ) {\n return null;\n }\n\n const allCollectionItems: HTMLElement[] = parentElement\n ? Array.from(parentElement.querySelectorAll(attributeName))\n : itemsArray;\n\n if (!allCollectionItems.length) return null;\n\n if (preventScroll) e.preventDefault();\n\n let item: HTMLElement | null = null;\n\n if (goingHorizontal || goingVertical) {\n const goForward = goingVertical ? down : dir === 'ltr' ? right : left;\n item = findNextFocusableElement(allCollectionItems, currentElement, {\n goForward,\n loop\n });\n } else if (home) {\n item = allCollectionItems.at(0) || null;\n } else if (end) {\n item = allCollectionItems.at(-1) || null;\n }\n\n if (focus) item?.focus();\n\n return item;\n}\n\ninterface FindNextFocusableElementOptions {\n /**\n * Whether to search forwards or backwards.\n */\n goForward: boolean;\n /**\n * Whether to allow looping the search. If false, it will stop at the first/last element.\n *\n * @default true\n */\n loop?: boolean;\n}\n\n/**\n * Recursive function to find the next focusable element to avoid disabled elements\n *\n * @param elements Elements to navigate\n * @param currentElement Current active element\n * @param options\n * @returns next focusable element\n */\nfunction findNextFocusableElement(\n elements: HTMLElement[],\n currentElement: HTMLElement,\n options: FindNextFocusableElementOptions,\n iterations = elements.length\n): HTMLElement | null {\n if (--iterations === 0) return null;\n\n const index = elements.indexOf(currentElement);\n const newIndex = options.goForward ? index + 1 : index - 1;\n\n if (!options.loop && (newIndex < 0 || newIndex >= elements.length)) return null;\n\n const adjustedNewIndex = (newIndex + elements.length) % elements.length;\n const candidate = elements[adjustedNewIndex];\n if (!candidate) return null;\n\n const isDisabled = candidate.hasAttribute('disabled') && candidate.getAttribute('disabled') !== 'false';\n if (isDisabled) {\n return findNextFocusableElement(elements, candidate, options, iterations);\n }\n return candidate;\n}\n","import { computed, Directive, ElementRef, inject, OnDestroy, OnInit } from '@angular/core';\nimport * as kbd from '@radix-ng/primitives/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { useArrowNavigation } from './utils/useArrowNavigation';\n\n// as button\n@Directive({\n selector: 'button[rdxStepperTrigger]',\n host: {\n '[attr.tabindex]': 'itemContext.isFocusable() ? 0 : -1',\n '[attr.aria-describedby]': 'itemContext.descriptionId',\n '[attr.aria-labelledby]': 'itemContext.titleId',\n\n '[attr.data-state]': 'itemContext.itemState()',\n '[attr.data-orientation]': 'rootContext.orientation()',\n '[attr.disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n '[attr.data-disabled]': 'itemContext.disabled() || !itemContext.isFocusable() ? \"\" : undefined',\n\n '(mousedown)': 'handleMouseDown($event)',\n\n '(keydown.Enter)': 'handleKeyDown($event)',\n '(keydown.Space)': 'handleKeyDown($event)',\n '(keydown.ArrowLeft)': 'handleKeyDown($event)',\n '(keydown.ArrowRight)': 'handleKeyDown($event)',\n '(keydown.ArrowUp)': 'handleKeyDown($event)',\n '(keydown.ArrowDown)': 'handleKeyDown($event)'\n }\n})\nexport class RdxStepperTriggerDirective implements OnInit, OnDestroy {\n protected readonly rootContext = injectStepperRootContext();\n protected readonly itemContext = injectStepperItemContext();\n\n private readonly elementRef = inject(ElementRef);\n\n readonly stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()));\n\n ngOnInit() {\n const current = this.rootContext.totalStepperItems();\n this.rootContext.totalStepperItems.set([...current, this.elementRef.nativeElement]);\n }\n\n ngOnDestroy() {\n const current = this.rootContext.totalStepperItems();\n const updated = current.filter((el: HTMLElement) => el !== this.elementRef.nativeElement);\n\n this.rootContext.totalStepperItems.set(updated);\n }\n\n handleMouseDown(event: MouseEvent) {\n if (this.itemContext.disabled()) {\n return;\n }\n\n // handler only left mouse click\n if (event.button !== 0) {\n return;\n }\n\n if (this.rootContext.linear()) {\n if (\n this.itemContext.step() <= this.rootContext.value()! ||\n this.itemContext.step() === this.rootContext.value()! + 1\n ) {\n if (!event.ctrlKey) {\n this.rootContext.value.set(this.itemContext.step());\n return;\n }\n }\n } else {\n if (!event.ctrlKey) {\n this.rootContext.value.set(this.itemContext.step());\n return;\n }\n }\n\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n\n handleKeyDown(event: KeyboardEvent) {\n event.preventDefault();\n\n if (this.itemContext.disabled()) {\n return;\n }\n\n if ((event.key === kbd.ENTER || event.key === kbd.SPACE) && !event.ctrlKey && !event.shiftKey)\n this.rootContext.value.set(this.itemContext.step());\n\n if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(event.key)) {\n useArrowNavigation(event, getActiveElement() as HTMLElement, undefined, {\n itemsArray: this.stepperItems() as HTMLElement[],\n focus: true,\n loop: false,\n arrowKeyOptions: this.rootContext.orientation(),\n dir: this.rootContext.dir()\n });\n }\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxStepperDescriptionDirective } from './src/stepper-description.directive';\nimport { RdxStepperIndicatorDirective } from './src/stepper-indicator.directive';\nimport { RdxStepperItemDirective } from './src/stepper-item.directive';\nimport { RdxStepperRootDirective } from './src/stepper-root.directive';\nimport { RdxStepperSeparatorDirective } from './src/stepper-separator.directive';\nimport { RdxStepperTitleDirective } from './src/stepper-title.directive';\nimport { RdxStepperTriggerDirective } from './src/stepper-trigger.directive';\n\nexport * from './src/stepper-description.directive';\nexport * from './src/stepper-indicator.directive';\nexport * from './src/stepper-item.directive';\nexport * from './src/stepper-root-context.token';\nexport * from './src/stepper-root.directive';\nexport * from './src/stepper-separator.directive';\nexport * from './src/stepper-title.directive';\nexport * from './src/stepper-trigger.directive';\nexport * from './src/types';\n\nconst _imports = [\n RdxStepperDescriptionDirective,\n RdxStepperTitleDirective,\n RdxStepperSeparatorDirective,\n RdxStepperItemDirective,\n RdxStepperIndicatorDirective,\n RdxStepperRootDirective,\n RdxStepperTriggerDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxStepperModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAaO,MAAM,oBAAoB,GAAG,IAAI,cAAc,CAAqB,oBAAoB,CAAC;SAEhF,wBAAwB,GAAA;AACpC,IAAA,OAAO,MAAM,CAAC,oBAAoB,CAAC;AACvC;;MCRa,8BAA8B,CAAA;AAN3C,IAAA,WAAA,GAAA;QAOa,IAAW,CAAA,WAAA,GAAG,wBAAwB,EAAE;AACpD;8GAFY,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CA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5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ,CAAC;AACtB,oBAAA,OAAO,EAAE,CAAC,GAAG,QAAQ;AACxB,iBAAA;;;AChCD;;AAEG;;;;"}
|
@@ -118,13 +118,13 @@ class RdxSwitchRootDirective {
|
|
118
118
|
setDisabledState(isDisabled) {
|
119
119
|
this.accessorDisabled.set(isDisabled);
|
120
120
|
}
|
121
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
122
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.
|
121
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
122
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.1.6", type: RdxSwitchRootDirective, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, inputId: { classPropertyName: "inputId", publicName: "inputId", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "type": "button" }, listeners: { "click": "toggle()" }, properties: { "id": "elementId()", "attr.aria-checked": "checkedState()", "attr.aria-required": "required()", "attr.data-state": "checkedState() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "disabledState() ? \"true\" : null", "attr.disabled": "disabledState() ? disabledState() : null" } }, providers: [
|
123
123
|
{ provide: RdxSwitchToken, useExisting: RdxSwitchRootDirective },
|
124
124
|
SWITCH_VALUE_ACCESSOR
|
125
125
|
], exportAs: ["rdxSwitchRoot"], ngImport: i0 }); }
|
126
126
|
}
|
127
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
127
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchRootDirective, decorators: [{
|
128
128
|
type: Directive,
|
129
129
|
args: [{
|
130
130
|
selector: 'button[rdxSwitchRoot]',
|
@@ -158,10 +158,10 @@ class RdxSwitchInputDirective {
|
|
158
158
|
onBlur() {
|
159
159
|
this.switchRoot.onTouched?.();
|
160
160
|
}
|
161
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
162
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.
|
161
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
162
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.6", type: RdxSwitchInputDirective, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "role": "switch", "tabindex": "-1" }, listeners: { "blur": "onBlur()" }, properties: { "attr.id": "switchRoot.inputId()", "attr.defaultChecked": "switchRoot.checkedState()", "attr.aria-checked": "switchRoot.checkedState()", "attr.aria-hidden": "true", "attr.aria-label": "switchRoot.ariaLabel()", "attr.aria-labelledby": "switchRoot.ariaLabelledBy()", "attr.aria-required": "switchRoot.required()", "attr.data-state": "switchRoot.checkedState() ? \"checked\" : \"unchecked\"", "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.disabled": "switchRoot.disabledState() ? switchRoot.disabledState() : null", "attr.value": "switchRoot.checkedState() ? \"on\" : \"off\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointerEvents: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
|
163
163
|
}
|
164
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
164
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchInputDirective, decorators: [{
|
165
165
|
type: Directive,
|
166
166
|
args: [{
|
167
167
|
selector: 'input[rdxSwitchInput]',
|
@@ -195,10 +195,10 @@ class RdxSwitchThumbDirective {
|
|
195
195
|
constructor() {
|
196
196
|
this.switchRoot = injectSwitch();
|
197
197
|
}
|
198
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
199
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.
|
198
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchThumbDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
199
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.1.6", type: RdxSwitchThumbDirective, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-disabled": "switchRoot.disabledState() ? \"true\" : null", "attr.data-state": "switchRoot.checkedState() ? \"checked\" : \"unchecked\"" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
|
200
200
|
}
|
201
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
201
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchThumbDirective, decorators: [{
|
202
202
|
type: Directive,
|
203
203
|
args: [{
|
204
204
|
selector: 'span[rdxSwitchThumb]',
|
@@ -217,15 +217,15 @@ const switchImports = [
|
|
217
217
|
RdxSwitchThumbDirective
|
218
218
|
];
|
219
219
|
class RdxSwitchModule {
|
220
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.
|
221
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.
|
220
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
221
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRootDirective,
|
222
222
|
RdxSwitchInputDirective,
|
223
223
|
RdxSwitchThumbDirective], exports: [RdxSwitchRootDirective,
|
224
224
|
RdxSwitchInputDirective,
|
225
225
|
RdxSwitchThumbDirective] }); }
|
226
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.
|
226
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchModule }); }
|
227
227
|
}
|
228
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.
|
228
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.6", ngImport: i0, type: RdxSwitchModule, decorators: [{
|
229
229
|
type: NgModule,
|
230
230
|
args: [{
|
231
231
|
imports: [...switchImports],
|