@radix-ng/primitives 0.50.0 → 1.0.0-beta.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/collection/README.md +1 -0
- package/fesm2022/radix-ng-primitives-accordion.mjs +134 -66
- package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs +224 -132
- package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-arrow.mjs +26 -10
- package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +6 -6
- package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-avatar.mjs +68 -75
- package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-button.mjs +123 -0
- package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-calendar.mjs +104 -103
- package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-checkbox.mjs +414 -80
- package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collapsible.mjs +193 -92
- package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-collection.mjs +72 -0
- package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-config.mjs +5 -5
- package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-context-menu.mjs +143 -427
- package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-core.mjs +757 -757
- package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-cropper.mjs +55 -53
- package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-date-field.mjs +93 -86
- package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dialog.mjs +658 -330
- package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +98 -76
- package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-drawer.mjs +1059 -0
- package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-editable.mjs +20 -20
- package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-field.mjs +363 -0
- package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
- package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
- package/fesm2022/radix-ng-primitives-focus-guards.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-focus-scope.mjs +29 -14
- package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-input.mjs +172 -0
- package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-label.mjs +11 -11
- package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menu.mjs +1484 -353
- package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
- package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
- package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1060 -1553
- package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -366
- package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-pagination.mjs +51 -51
- package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popover.mjs +980 -995
- package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-popper.mjs +137 -82
- package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-portal.mjs +40 -16
- package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
- package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
- package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
- package/fesm2022/radix-ng-primitives-progress.mjs +231 -92
- package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-radio.mjs +211 -70
- package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-roving-focus.mjs +127 -77
- package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-select.mjs +791 -511
- package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-separator.mjs +16 -45
- package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-slider.mjs +976 -720
- package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-stepper.mjs +69 -71
- package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-switch.mjs +128 -124
- package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tabs.mjs +388 -115
- package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-time-field.mjs +111 -117
- package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle-group.mjs +122 -248
- package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toggle.mjs +99 -62
- package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-toolbar.mjs +307 -94
- package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-tooltip.mjs +690 -1079
- package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs +46 -87
- package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
- package/fesm2022/radix-ng-primitives.mjs.map +1 -1
- package/meter/README.md +3 -0
- package/navigation-menu/README.md +2 -1
- package/package.json +85 -63
- package/portal/README.md +2 -0
- package/preview-card/README.md +3 -0
- package/schematics/collection.json +1 -0
- package/schematics/ng-add/index.d.ts +3 -2
- package/schematics/ng-add/index.js +62 -31
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/package-config.d.ts +4 -2
- package/schematics/ng-add/package-config.js +10 -2
- package/schematics/ng-add/package-config.js.map +1 -1
- package/schematics/ng-add/schema.d.ts +3 -0
- package/schematics/ng-add/schema.js +3 -0
- package/schematics/ng-add/schema.js.map +1 -0
- package/schematics/ng-add/schema.json +14 -0
- package/select/README.md +2 -0
- package/{accordion/index.d.ts → types/radix-ng-primitives-accordion.d.ts} +102 -67
- package/types/radix-ng-primitives-alert-dialog.d.ts +114 -0
- package/{arrow/index.d.ts → types/radix-ng-primitives-arrow.d.ts} +1 -1
- package/{aspect-ratio/index.d.ts → types/radix-ng-primitives-aspect-ratio.d.ts} +1 -1
- package/{avatar/index.d.ts → types/radix-ng-primitives-avatar.d.ts} +7 -11
- package/types/radix-ng-primitives-button.d.ts +73 -0
- package/{calendar/index.d.ts → types/radix-ng-primitives-calendar.d.ts} +2 -3
- package/types/radix-ng-primitives-checkbox.d.ts +337 -0
- package/types/radix-ng-primitives-collapsible.d.ts +159 -0
- package/types/radix-ng-primitives-collection.d.ts +44 -0
- package/{config/index.d.ts → types/radix-ng-primitives-config.d.ts} +1 -1
- package/types/radix-ng-primitives-context-menu.d.ts +73 -0
- package/{core/index.d.ts → types/radix-ng-primitives-core.d.ts} +311 -236
- package/{cropper/index.d.ts → types/radix-ng-primitives-cropper.d.ts} +6 -5
- package/{date-field/index.d.ts → types/radix-ng-primitives-date-field.d.ts} +42 -27
- package/types/radix-ng-primitives-dialog.d.ts +323 -0
- package/{dismissable-layer/index.d.ts → types/radix-ng-primitives-dismissable-layer.d.ts} +15 -7
- package/types/radix-ng-primitives-drawer.d.ts +448 -0
- package/{editable/index.d.ts → types/radix-ng-primitives-editable.d.ts} +1 -1
- package/types/radix-ng-primitives-field.d.ts +373 -0
- package/types/radix-ng-primitives-fieldset.d.ts +48 -0
- package/{focus-scope/index.d.ts → types/radix-ng-primitives-focus-scope.d.ts} +13 -5
- package/types/radix-ng-primitives-input.d.ts +87 -0
- package/{label/index.d.ts → types/radix-ng-primitives-label.d.ts} +0 -1
- package/types/radix-ng-primitives-menu.d.ts +612 -0
- package/types/radix-ng-primitives-menubar.d.ts +66 -0
- package/types/radix-ng-primitives-meter.d.ts +193 -0
- package/types/radix-ng-primitives-navigation-menu.d.ts +488 -0
- package/types/radix-ng-primitives-number-field.d.ts +464 -0
- package/{pagination/index.d.ts → types/radix-ng-primitives-pagination.d.ts} +2 -2
- package/types/radix-ng-primitives-popover.d.ts +416 -0
- package/{popper/index.d.ts → types/radix-ng-primitives-popper.d.ts} +50 -9
- package/types/radix-ng-primitives-portal.d.ts +30 -0
- package/types/radix-ng-primitives-presence.d.ts +55 -0
- package/types/radix-ng-primitives-preview-card.d.ts +359 -0
- package/types/radix-ng-primitives-progress.d.ts +206 -0
- package/{radio/index.d.ts → types/radix-ng-primitives-radio.d.ts} +56 -26
- package/{roving-focus/index.d.ts → types/radix-ng-primitives-roving-focus.d.ts} +38 -27
- package/types/radix-ng-primitives-select.d.ts +512 -0
- package/types/radix-ng-primitives-separator.d.ts +38 -0
- package/types/radix-ng-primitives-slider.d.ts +377 -0
- package/{stepper/index.d.ts → types/radix-ng-primitives-stepper.d.ts} +21 -22
- package/types/radix-ng-primitives-switch.d.ts +121 -0
- package/types/radix-ng-primitives-tabs.d.ts +247 -0
- package/{time-field/index.d.ts → types/radix-ng-primitives-time-field.d.ts} +46 -31
- package/types/radix-ng-primitives-toggle-group.d.ts +116 -0
- package/types/radix-ng-primitives-toggle.d.ts +65 -0
- package/types/radix-ng-primitives-toolbar.d.ts +180 -0
- package/types/radix-ng-primitives-tooltip.d.ts +395 -0
- package/{visually-hidden/index.d.ts → types/radix-ng-primitives-visually-hidden.d.ts} +19 -19
- package/alert-dialog/index.d.ts +0 -57
- package/checkbox/index.d.ts +0 -164
- package/collapsible/index.d.ts +0 -85
- package/context-menu/index.d.ts +0 -129
- package/dialog/index.d.ts +0 -205
- package/dropdown-menu/README.md +0 -1
- package/dropdown-menu/index.d.ts +0 -171
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -583
- package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1246
- package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
- package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -740
- package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
- package/hover-card/README.md +0 -3
- package/hover-card/index.d.ts +0 -472
- package/menu/index.d.ts +0 -139
- package/menubar/index.d.ts +0 -56
- package/navigation-menu/index.d.ts +0 -405
- package/number-field/index.d.ts +0 -203
- package/popover/index.d.ts +0 -403
- package/portal/index.d.ts +0 -22
- package/presence/index.d.ts +0 -103
- package/progress/index.d.ts +0 -79
- package/select/index.d.ts +0 -214
- package/separator/index.d.ts +0 -63
- package/slider/index.d.ts +0 -263
- package/switch/index.d.ts +0 -105
- package/tabs/index.d.ts +0 -112
- package/toggle/index.d.ts +0 -75
- package/toggle-group/index.d.ts +0 -194
- package/toolbar/index.d.ts +0 -55
- package/tooltip/index.d.ts +0 -433
- package/tooltip2/README.md +0 -3
- package/tooltip2/index.d.ts +0 -325
- /package/{focus-guards/index.d.ts → types/radix-ng-primitives-focus-guards.d.ts} +0 -0
- /package/{index.d.ts → types/radix-ng-primitives.d.ts} +0 -0
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, Directive, input, numberAttribute, booleanAttribute, computed, forwardRef, model, output, signal, effect, ElementRef, NgModule } from '@angular/core';
|
|
2
|
+
import { InjectionToken, inject, Directive, input, numberAttribute, booleanAttribute, computed, forwardRef, model, output, signal, effect, ElementRef, DestroyRef, NgModule } from '@angular/core';
|
|
3
3
|
import * as kbd from '@radix-ng/primitives/core';
|
|
4
|
-
import {
|
|
5
|
-
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
4
|
+
import { injectId, RdxLiveAnnouncer, useArrowNavigation, getActiveElement } from '@radix-ng/primitives/core';
|
|
6
5
|
import * as i1 from '@radix-ng/primitives/separator';
|
|
7
6
|
import { RdxSeparatorRootDirective } from '@radix-ng/primitives/separator';
|
|
8
7
|
|
|
@@ -15,10 +14,10 @@ class RdxStepperDescriptionDirective {
|
|
|
15
14
|
constructor() {
|
|
16
15
|
this.itemContext = injectStepperItemContext();
|
|
17
16
|
}
|
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
19
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
17
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
18
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxStepperDescriptionDirective, isStandalone: true, selector: "[rdxStepperDescription]", host: { properties: { "attr.id": "itemContext.descriptionId" } }, ngImport: i0 }); }
|
|
20
19
|
}
|
|
21
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperDescriptionDirective, decorators: [{
|
|
22
21
|
type: Directive,
|
|
23
22
|
args: [{
|
|
24
23
|
selector: '[rdxStepperDescription]',
|
|
@@ -32,10 +31,10 @@ class RdxStepperIndicatorDirective {
|
|
|
32
31
|
constructor() {
|
|
33
32
|
this.itemContext = injectStepperItemContext();
|
|
34
33
|
}
|
|
35
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
36
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
34
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
35
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxStepperIndicatorDirective, isStandalone: true, selector: "[rdxStepperIndicator]", exportAs: ["rdxStepperIndicator"], ngImport: i0 }); }
|
|
37
36
|
}
|
|
38
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
37
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperIndicatorDirective, decorators: [{
|
|
39
38
|
type: Directive,
|
|
40
39
|
args: [{
|
|
41
40
|
selector: '[rdxStepperIndicator]',
|
|
@@ -52,13 +51,13 @@ class RdxStepperItemDirective {
|
|
|
52
51
|
constructor() {
|
|
53
52
|
this.rootContext = injectStepperRootContext();
|
|
54
53
|
/** @ignore */
|
|
55
|
-
this.titleId =
|
|
54
|
+
this.titleId = injectId('rdx-stepper-item-title');
|
|
56
55
|
/** @ignore */
|
|
57
|
-
this.descriptionId =
|
|
58
|
-
this.step = input(NaN, ...(ngDevMode ?
|
|
59
|
-
this.disabled = input(false, ...(ngDevMode ?
|
|
56
|
+
this.descriptionId = injectId('rdx-stepper-item-description');
|
|
57
|
+
this.step = input(NaN, { ...(ngDevMode ? { debugName: "step" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
58
|
+
this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
60
59
|
/** @ignore */
|
|
61
|
-
this.completed = input(false, ...(ngDevMode ?
|
|
60
|
+
this.completed = input(false, { ...(ngDevMode ? { debugName: "completed" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
62
61
|
/** @ignore */
|
|
63
62
|
this.itemState = computed(() => {
|
|
64
63
|
if (this.completed())
|
|
@@ -70,7 +69,7 @@ class RdxStepperItemDirective {
|
|
|
70
69
|
return 'completed';
|
|
71
70
|
}
|
|
72
71
|
return 'inactive';
|
|
73
|
-
}, ...(ngDevMode ? [{ debugName: "itemState" }] : []));
|
|
72
|
+
}, ...(ngDevMode ? [{ debugName: "itemState" }] : /* istanbul ignore next */ []));
|
|
74
73
|
/** @ignore */
|
|
75
74
|
this.isFocusable = computed(() => {
|
|
76
75
|
if (this.disabled())
|
|
@@ -80,17 +79,17 @@ class RdxStepperItemDirective {
|
|
|
80
79
|
return step <= this.rootContext.value() || step === this.rootContext.value() + 1;
|
|
81
80
|
}
|
|
82
81
|
return true;
|
|
83
|
-
}, ...(ngDevMode ? [{ debugName: "isFocusable" }] : []));
|
|
82
|
+
}, ...(ngDevMode ? [{ debugName: "isFocusable" }] : /* istanbul ignore next */ []));
|
|
84
83
|
}
|
|
85
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
86
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
84
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
85
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", 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
86
|
{
|
|
88
87
|
provide: STEPPER_ITEM_CONTEXT,
|
|
89
88
|
useExisting: forwardRef(() => RdxStepperItemDirective)
|
|
90
89
|
}
|
|
91
90
|
], ngImport: i0 }); }
|
|
92
91
|
}
|
|
93
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
92
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperItemDirective, decorators: [{
|
|
94
93
|
type: Directive,
|
|
95
94
|
args: [{
|
|
96
95
|
selector: '[rdxStepperItem]',
|
|
@@ -108,39 +107,39 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
108
107
|
'[attr.data-orientation]': 'rootContext.orientation()'
|
|
109
108
|
}
|
|
110
109
|
}]
|
|
111
|
-
}] });
|
|
110
|
+
}], propDecorators: { step: [{ type: i0.Input, args: [{ isSignal: true, alias: "step", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], completed: [{ type: i0.Input, args: [{ isSignal: true, alias: "completed", required: false }] }] } });
|
|
112
111
|
|
|
113
112
|
class RdxStepperRootDirective {
|
|
114
113
|
constructor() {
|
|
115
|
-
this.liveAnnouncer = inject(
|
|
116
|
-
this.defaultValue = input(undefined, ...(ngDevMode ?
|
|
117
|
-
this.value = model(this.defaultValue(), ...(ngDevMode ? [{ debugName: "value" }] : []));
|
|
118
|
-
this.linear = input(true, ...(ngDevMode ?
|
|
119
|
-
this.dir = input('ltr', ...(ngDevMode ? [{ debugName: "dir" }] : []));
|
|
120
|
-
this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : []));
|
|
114
|
+
this.liveAnnouncer = inject(RdxLiveAnnouncer);
|
|
115
|
+
this.defaultValue = input(undefined, { ...(ngDevMode ? { debugName: "defaultValue" } : /* istanbul ignore next */ {}), transform: numberAttribute });
|
|
116
|
+
this.value = model(this.defaultValue(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
|
|
117
|
+
this.linear = input(true, { ...(ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
|
|
118
|
+
this.dir = input('ltr', ...(ngDevMode ? [{ debugName: "dir" }] : /* istanbul ignore next */ []));
|
|
119
|
+
this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
|
|
121
120
|
/** @ignore */
|
|
122
|
-
this.totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()), ...(ngDevMode ? [{ debugName: "totalStepperItemsArray" }] : []));
|
|
121
|
+
this.totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()), ...(ngDevMode ? [{ debugName: "totalStepperItemsArray" }] : /* istanbul ignore next */ []));
|
|
123
122
|
this.onValueChange = output();
|
|
124
123
|
/** @ignore */
|
|
125
|
-
this.isFirstStep = computed(() => this.value() === 1, ...(ngDevMode ? [{ debugName: "isFirstStep" }] : []));
|
|
124
|
+
this.isFirstStep = computed(() => this.value() === 1, ...(ngDevMode ? [{ debugName: "isFirstStep" }] : /* istanbul ignore next */ []));
|
|
126
125
|
/** @ignore */
|
|
127
|
-
this.isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length, ...(ngDevMode ? [{ debugName: "isLastStep" }] : []));
|
|
126
|
+
this.isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length, ...(ngDevMode ? [{ debugName: "isLastStep" }] : /* istanbul ignore next */ []));
|
|
128
127
|
/** @ignore */
|
|
129
|
-
this.totalSteps = computed(() => this.totalStepperItems().length, ...(ngDevMode ? [{ debugName: "totalSteps" }] : []));
|
|
128
|
+
this.totalSteps = computed(() => this.totalStepperItems().length, ...(ngDevMode ? [{ debugName: "totalSteps" }] : /* istanbul ignore next */ []));
|
|
130
129
|
/** @ignore */
|
|
131
130
|
this.isNextDisabled = computed(() => {
|
|
132
131
|
const item = this.nextStepperItem();
|
|
133
132
|
return item ? item.hasAttribute('disabled') : true;
|
|
134
|
-
}, ...(ngDevMode ? [{ debugName: "isNextDisabled" }] : []));
|
|
133
|
+
}, ...(ngDevMode ? [{ debugName: "isNextDisabled" }] : /* istanbul ignore next */ []));
|
|
135
134
|
/** @ignore */
|
|
136
135
|
this.isPrevDisabled = computed(() => {
|
|
137
136
|
const item = this.prevStepperItem();
|
|
138
137
|
return item ? item.hasAttribute('disabled') : true;
|
|
139
|
-
}, ...(ngDevMode ? [{ debugName: "isPrevDisabled" }] : []));
|
|
138
|
+
}, ...(ngDevMode ? [{ debugName: "isPrevDisabled" }] : /* istanbul ignore next */ []));
|
|
140
139
|
/** @ignore */
|
|
141
|
-
this.totalStepperItems = signal([], ...(ngDevMode ? [{ debugName: "totalStepperItems" }] : []));
|
|
142
|
-
this.nextStepperItem = signal(null, ...(ngDevMode ? [{ debugName: "nextStepperItem" }] : []));
|
|
143
|
-
this.prevStepperItem = signal(null, ...(ngDevMode ? [{ debugName: "prevStepperItem" }] : []));
|
|
140
|
+
this.totalStepperItems = signal([], ...(ngDevMode ? [{ debugName: "totalStepperItems" }] : /* istanbul ignore next */ []));
|
|
141
|
+
this.nextStepperItem = signal(null, ...(ngDevMode ? [{ debugName: "nextStepperItem" }] : /* istanbul ignore next */ []));
|
|
142
|
+
this.prevStepperItem = signal(null, ...(ngDevMode ? [{ debugName: "prevStepperItem" }] : /* istanbul ignore next */ []));
|
|
144
143
|
effect(() => {
|
|
145
144
|
const items = this.totalStepperItemsArray();
|
|
146
145
|
const currentValue = this.value();
|
|
@@ -183,15 +182,15 @@ class RdxStepperRootDirective {
|
|
|
183
182
|
this.value.set(step);
|
|
184
183
|
this.onValueChange.emit(step);
|
|
185
184
|
}
|
|
186
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
187
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "
|
|
185
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
186
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", 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", onValueChange: "onValueChange" }, host: { attributes: { "role": "group" }, properties: { "attr.aria-label": "\"progress\"", "attr.data-linear": "linear() ? \"\" : undefined", "attr.data-orientation": "orientation()" } }, providers: [
|
|
188
187
|
{
|
|
189
188
|
provide: STEPPER_ROOT_CONTEXT,
|
|
190
189
|
useExisting: forwardRef(() => RdxStepperRootDirective)
|
|
191
190
|
}
|
|
192
191
|
], exportAs: ["rdxStepperRoot"], ngImport: i0 }); }
|
|
193
192
|
}
|
|
194
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperRootDirective, decorators: [{
|
|
195
194
|
type: Directive,
|
|
196
195
|
args: [{
|
|
197
196
|
selector: '[rdxStepperRoot]',
|
|
@@ -209,7 +208,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
209
208
|
'[attr.data-orientation]': 'orientation()'
|
|
210
209
|
}
|
|
211
210
|
}]
|
|
212
|
-
}], ctorParameters: () => [] });
|
|
211
|
+
}], ctorParameters: () => [], propDecorators: { defaultValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultValue", required: false }] }], value: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }, { type: i0.Output, args: ["valueChange"] }], linear: [{ type: i0.Input, args: [{ isSignal: true, alias: "linear", required: false }] }], dir: [{ type: i0.Input, args: [{ isSignal: true, alias: "dir", required: false }] }], orientation: [{ type: i0.Input, args: [{ isSignal: true, alias: "orientation", required: false }] }], onValueChange: [{ type: i0.Output, args: ["onValueChange"] }] } });
|
|
213
212
|
|
|
214
213
|
class RdxStepperSeparatorDirective {
|
|
215
214
|
constructor() {
|
|
@@ -217,18 +216,17 @@ class RdxStepperSeparatorDirective {
|
|
|
217
216
|
this.itemContext = injectStepperItemContext();
|
|
218
217
|
this.rdxSeparator = inject(RdxSeparatorRootDirective, { host: true });
|
|
219
218
|
effect(() => {
|
|
220
|
-
this.rdxSeparator.updateDecorative(true);
|
|
221
219
|
this.rdxSeparator.updateOrientation(this.rootContext.orientation());
|
|
222
220
|
});
|
|
223
221
|
}
|
|
224
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
225
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
222
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
223
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxStepperSeparatorDirective, isStandalone: true, selector: "[rdxStepperSeparator]", host: { properties: { "attr.data-state": "itemContext.itemState()" } }, hostDirectives: [{ directive: i1.RdxSeparatorRootDirective, inputs: ["orientation", "orientation"] }], ngImport: i0 }); }
|
|
226
224
|
}
|
|
227
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
225
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperSeparatorDirective, decorators: [{
|
|
228
226
|
type: Directive,
|
|
229
227
|
args: [{
|
|
230
228
|
selector: '[rdxStepperSeparator]',
|
|
231
|
-
hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation'
|
|
229
|
+
hostDirectives: [{ directive: RdxSeparatorRootDirective, inputs: ['orientation'] }],
|
|
232
230
|
host: {
|
|
233
231
|
'[attr.data-state]': 'itemContext.itemState()'
|
|
234
232
|
}
|
|
@@ -239,10 +237,10 @@ class RdxStepperTitleDirective {
|
|
|
239
237
|
constructor() {
|
|
240
238
|
this.itemContext = injectStepperItemContext();
|
|
241
239
|
}
|
|
242
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
243
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
241
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxStepperTitleDirective, isStandalone: true, selector: "[rdxStepperTitle]", host: { properties: { "attr.id": "itemContext.titleId" } }, ngImport: i0 }); }
|
|
244
242
|
}
|
|
245
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperTitleDirective, decorators: [{
|
|
246
244
|
type: Directive,
|
|
247
245
|
args: [{
|
|
248
246
|
selector: '[rdxStepperTitle]',
|
|
@@ -258,36 +256,35 @@ class RdxStepperTriggerDirective {
|
|
|
258
256
|
this.rootContext = injectStepperRootContext();
|
|
259
257
|
this.itemContext = injectStepperItemContext();
|
|
260
258
|
this.elementRef = inject(ElementRef);
|
|
261
|
-
this.stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()), ...(ngDevMode ? [{ debugName: "stepperItems" }] : []));
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
const updated = current.filter((el) => el !== this.elementRef.nativeElement);
|
|
270
|
-
this.rootContext.totalStepperItems.set(updated);
|
|
259
|
+
this.stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()), ...(ngDevMode ? [{ debugName: "stepperItems" }] : /* istanbul ignore next */ []));
|
|
260
|
+
// Register/deregister this trigger's host element with the root, in DOM order.
|
|
261
|
+
const element = this.elementRef.nativeElement;
|
|
262
|
+
this.rootContext.totalStepperItems.set([...this.rootContext.totalStepperItems(), element]);
|
|
263
|
+
inject(DestroyRef).onDestroy(() => {
|
|
264
|
+
const updated = this.rootContext.totalStepperItems().filter((el) => el !== element);
|
|
265
|
+
this.rootContext.totalStepperItems.set(updated);
|
|
266
|
+
});
|
|
271
267
|
}
|
|
272
268
|
handleMouseDown(event) {
|
|
269
|
+
const mouseEvent = event;
|
|
273
270
|
if (this.itemContext.disabled()) {
|
|
274
271
|
return;
|
|
275
272
|
}
|
|
276
273
|
// handler only left mouse click
|
|
277
|
-
if (
|
|
274
|
+
if (mouseEvent.button !== 0) {
|
|
278
275
|
return;
|
|
279
276
|
}
|
|
280
277
|
if (this.rootContext.linear()) {
|
|
281
278
|
if (this.itemContext.step() <= this.rootContext.value() ||
|
|
282
279
|
this.itemContext.step() === this.rootContext.value() + 1) {
|
|
283
|
-
if (!
|
|
280
|
+
if (!mouseEvent.ctrlKey) {
|
|
284
281
|
this.rootContext.value.set(this.itemContext.step());
|
|
285
282
|
return;
|
|
286
283
|
}
|
|
287
284
|
}
|
|
288
285
|
}
|
|
289
286
|
else {
|
|
290
|
-
if (!
|
|
287
|
+
if (!mouseEvent.ctrlKey) {
|
|
291
288
|
this.rootContext.value.set(this.itemContext.step());
|
|
292
289
|
return;
|
|
293
290
|
}
|
|
@@ -296,14 +293,15 @@ class RdxStepperTriggerDirective {
|
|
|
296
293
|
event.preventDefault();
|
|
297
294
|
}
|
|
298
295
|
handleKeyDown(event) {
|
|
296
|
+
const keyEvent = event;
|
|
299
297
|
event.preventDefault();
|
|
300
298
|
if (this.itemContext.disabled()) {
|
|
301
299
|
return;
|
|
302
300
|
}
|
|
303
|
-
if ((
|
|
301
|
+
if ((keyEvent.key === kbd.ENTER || keyEvent.key === kbd.SPACE) && !keyEvent.ctrlKey && !keyEvent.shiftKey)
|
|
304
302
|
this.rootContext.value.set(this.itemContext.step());
|
|
305
|
-
if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(
|
|
306
|
-
useArrowNavigation(
|
|
303
|
+
if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(keyEvent.key)) {
|
|
304
|
+
useArrowNavigation(keyEvent, getActiveElement(), undefined, {
|
|
307
305
|
itemsArray: this.stepperItems(),
|
|
308
306
|
focus: true,
|
|
309
307
|
loop: false,
|
|
@@ -312,10 +310,10 @@ class RdxStepperTriggerDirective {
|
|
|
312
310
|
});
|
|
313
311
|
}
|
|
314
312
|
}
|
|
315
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
316
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
313
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
314
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", 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 }); }
|
|
317
315
|
}
|
|
318
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
316
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperTriggerDirective, decorators: [{
|
|
319
317
|
type: Directive,
|
|
320
318
|
args: [{
|
|
321
319
|
selector: 'button[rdxStepperTrigger]',
|
|
@@ -336,7 +334,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.3", ngImpor
|
|
|
336
334
|
'(keydown.ArrowDown)': 'handleKeyDown($event)'
|
|
337
335
|
}
|
|
338
336
|
}]
|
|
339
|
-
}] });
|
|
337
|
+
}], ctorParameters: () => [] });
|
|
340
338
|
|
|
341
339
|
const _imports = [
|
|
342
340
|
RdxStepperDescriptionDirective,
|
|
@@ -348,8 +346,8 @@ const _imports = [
|
|
|
348
346
|
RdxStepperTriggerDirective
|
|
349
347
|
];
|
|
350
348
|
class RdxStepperModule {
|
|
351
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
352
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
349
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
350
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperModule, imports: [RdxStepperDescriptionDirective,
|
|
353
351
|
RdxStepperTitleDirective,
|
|
354
352
|
RdxStepperSeparatorDirective,
|
|
355
353
|
RdxStepperItemDirective,
|
|
@@ -362,9 +360,9 @@ class RdxStepperModule {
|
|
|
362
360
|
RdxStepperIndicatorDirective,
|
|
363
361
|
RdxStepperRootDirective,
|
|
364
362
|
RdxStepperTriggerDirective] }); }
|
|
365
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
363
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperModule }); }
|
|
366
364
|
}
|
|
367
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
365
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperModule, decorators: [{
|
|
368
366
|
type: NgModule,
|
|
369
367
|
args: [{
|
|
370
368
|
imports: [..._imports],
|