@radix-ng/primitives 1.0.4 → 1.0.6

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.
Files changed (126) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +35 -27
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +34 -34
  4. package/fesm2022/radix-ng-primitives-arrow.mjs +3 -3
  5. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs +5 -4
  6. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-autocomplete.mjs +175 -125
  8. package/fesm2022/radix-ng-primitives-autocomplete.mjs.map +1 -1
  9. package/fesm2022/radix-ng-primitives-avatar.mjs +25 -19
  10. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  11. package/fesm2022/radix-ng-primitives-button.mjs +11 -7
  12. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -1
  13. package/fesm2022/radix-ng-primitives-calendar.mjs +140 -90
  14. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  15. package/fesm2022/radix-ng-primitives-checkbox.mjs +61 -40
  16. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  17. package/fesm2022/radix-ng-primitives-collapsible.mjs +35 -24
  18. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-combobox.mjs +278 -177
  20. package/fesm2022/radix-ng-primitives-combobox.mjs.map +1 -1
  21. package/fesm2022/radix-ng-primitives-composite.mjs +76 -35
  22. package/fesm2022/radix-ng-primitives-composite.mjs.map +1 -1
  23. package/fesm2022/radix-ng-primitives-config.mjs +7 -5
  24. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  25. package/fesm2022/radix-ng-primitives-context-menu.mjs +48 -22
  26. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  27. package/fesm2022/radix-ng-primitives-core.mjs +44 -28
  28. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  29. package/fesm2022/radix-ng-primitives-cropper.mjs +73 -45
  30. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  31. package/fesm2022/radix-ng-primitives-date-field.mjs +70 -40
  32. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  33. package/fesm2022/radix-ng-primitives-dialog.mjs +93 -67
  34. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  35. package/fesm2022/radix-ng-primitives-direction-provider.mjs +5 -4
  36. package/fesm2022/radix-ng-primitives-direction-provider.mjs.map +1 -1
  37. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +20 -16
  38. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  39. package/fesm2022/radix-ng-primitives-drawer.mjs +107 -81
  40. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -1
  41. package/fesm2022/radix-ng-primitives-editable.mjs +53 -39
  42. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  43. package/fesm2022/radix-ng-primitives-field.mjs +69 -42
  44. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -1
  45. package/fesm2022/radix-ng-primitives-fieldset.mjs +8 -7
  46. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs +77 -40
  48. package/fesm2022/radix-ng-primitives-floating-focus-manager.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-focus-guards.mjs +3 -3
  50. package/fesm2022/radix-ng-primitives-focus-scope.mjs +7 -5
  51. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  52. package/fesm2022/radix-ng-primitives-form.mjs +25 -16
  53. package/fesm2022/radix-ng-primitives-form.mjs.map +1 -1
  54. package/fesm2022/radix-ng-primitives-input.mjs +41 -22
  55. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -1
  56. package/fesm2022/radix-ng-primitives-label.mjs +7 -5
  57. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-menu.mjs +274 -154
  59. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-menubar.mjs +35 -17
  61. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-meter.mjs +41 -30
  63. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +220 -183
  65. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  66. package/fesm2022/radix-ng-primitives-number-field.mjs +87 -59
  67. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  68. package/fesm2022/radix-ng-primitives-pagination.mjs +48 -38
  69. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-popover.mjs +150 -107
  71. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-popper.mjs +79 -47
  73. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-portal.mjs +20 -13
  75. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  76. package/fesm2022/radix-ng-primitives-presence.mjs +3 -3
  77. package/fesm2022/radix-ng-primitives-preview-card.mjs +119 -74
  78. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -1
  79. package/fesm2022/radix-ng-primitives-progress.mjs +43 -31
  80. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  81. package/fesm2022/radix-ng-primitives-radio.mjs +177 -168
  82. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  83. package/fesm2022/radix-ng-primitives-scroll-area.mjs +54 -38
  84. package/fesm2022/radix-ng-primitives-scroll-area.mjs.map +1 -1
  85. package/fesm2022/radix-ng-primitives-select.mjs +595 -102
  86. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  87. package/fesm2022/radix-ng-primitives-separator.mjs +7 -5
  88. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  89. package/fesm2022/radix-ng-primitives-slider.mjs +101 -63
  90. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  91. package/fesm2022/radix-ng-primitives-stepper.mjs +53 -39
  92. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  93. package/fesm2022/radix-ng-primitives-switch.mjs +44 -25
  94. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  95. package/fesm2022/radix-ng-primitives-tabs.mjs +72 -47
  96. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  97. package/fesm2022/radix-ng-primitives-time-field.mjs +72 -41
  98. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  99. package/fesm2022/radix-ng-primitives-toast.mjs +75 -56
  100. package/fesm2022/radix-ng-primitives-toast.mjs.map +1 -1
  101. package/fesm2022/radix-ng-primitives-toggle-group.mjs +29 -19
  102. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  103. package/fesm2022/radix-ng-primitives-toggle.mjs +16 -11
  104. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  105. package/fesm2022/radix-ng-primitives-toolbar.mjs +38 -30
  106. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  107. package/fesm2022/radix-ng-primitives-tooltip.mjs +118 -63
  108. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  109. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +31 -20
  110. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  111. package/package.json +2 -2
  112. package/types/radix-ng-primitives-autocomplete.d.ts +3 -1
  113. package/types/radix-ng-primitives-combobox.d.ts +28 -9
  114. package/types/radix-ng-primitives-composite.d.ts +2 -0
  115. package/types/radix-ng-primitives-context-menu.d.ts +2 -0
  116. package/types/radix-ng-primitives-dialog.d.ts +6 -3
  117. package/types/radix-ng-primitives-floating-focus-manager.d.ts +11 -0
  118. package/types/radix-ng-primitives-menu.d.ts +47 -15
  119. package/types/radix-ng-primitives-menubar.d.ts +6 -1
  120. package/types/radix-ng-primitives-navigation-menu.d.ts +8 -6
  121. package/types/radix-ng-primitives-popover.d.ts +12 -4
  122. package/types/radix-ng-primitives-preview-card.d.ts +18 -5
  123. package/types/radix-ng-primitives-radio.d.ts +100 -65
  124. package/types/radix-ng-primitives-select.d.ts +186 -391
  125. package/types/radix-ng-primitives-switch.d.ts +3 -2
  126. package/types/radix-ng-primitives-tooltip.d.ts +17 -3
@@ -15,10 +15,10 @@ class RdxStepperDescriptionDirective {
15
15
  constructor() {
16
16
  this.itemContext = injectStepperItemContext();
17
17
  }
18
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
19
- 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 }); }
18
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
19
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxStepperDescriptionDirective, isStandalone: true, selector: "[rdxStepperDescription]", host: { properties: { "attr.id": "itemContext.descriptionId" } }, ngImport: i0 }); }
20
20
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperDescriptionDirective, decorators: [{
21
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperDescriptionDirective, decorators: [{
22
22
  type: Directive,
23
23
  args: [{
24
24
  selector: '[rdxStepperDescription]',
@@ -32,10 +32,10 @@ class RdxStepperIndicatorDirective {
32
32
  constructor() {
33
33
  this.itemContext = injectStepperItemContext();
34
34
  }
35
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
36
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxStepperIndicatorDirective, isStandalone: true, selector: "[rdxStepperIndicator]", exportAs: ["rdxStepperIndicator"], ngImport: i0 }); }
35
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperIndicatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
36
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxStepperIndicatorDirective, isStandalone: true, selector: "[rdxStepperIndicator]", exportAs: ["rdxStepperIndicator"], ngImport: i0 }); }
37
37
  }
38
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperIndicatorDirective, decorators: [{
38
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperIndicatorDirective, decorators: [{
39
39
  type: Directive,
40
40
  args: [{
41
41
  selector: '[rdxStepperIndicator]',
@@ -70,7 +70,8 @@ class RdxStepperItemDirective {
70
70
  return 'completed';
71
71
  }
72
72
  return 'inactive';
73
- }, ...(ngDevMode ? [{ debugName: "itemState" }] : /* istanbul ignore next */ []));
73
+ }, /* @ts-ignore */
74
+ ...(ngDevMode ? [{ debugName: "itemState" }] : /* istanbul ignore next */ []));
74
75
  /** @ignore */
75
76
  this.isFocusable = computed(() => {
76
77
  if (this.disabled())
@@ -80,17 +81,18 @@ class RdxStepperItemDirective {
80
81
  return step <= this.rootContext.value() || step === this.rootContext.value() + 1;
81
82
  }
82
83
  return true;
83
- }, ...(ngDevMode ? [{ debugName: "isFocusable" }] : /* istanbul ignore next */ []));
84
+ }, /* @ts-ignore */
85
+ ...(ngDevMode ? [{ debugName: "isFocusable" }] : /* istanbul ignore next */ []));
84
86
  }
85
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
86
- 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
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
88
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", 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
89
  {
88
90
  provide: STEPPER_ITEM_CONTEXT,
89
91
  useExisting: forwardRef(() => RdxStepperItemDirective)
90
92
  }
91
93
  ], ngImport: i0 }); }
92
94
  }
93
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperItemDirective, decorators: [{
95
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperItemDirective, decorators: [{
94
96
  type: Directive,
95
97
  args: [{
96
98
  selector: '[rdxStepperItem]',
@@ -114,34 +116,45 @@ class RdxStepperRootDirective {
114
116
  constructor() {
115
117
  this.liveAnnouncer = inject(RdxLiveAnnouncer);
116
118
  this.defaultValue = input(undefined, { ...(ngDevMode ? { debugName: "defaultValue" } : /* istanbul ignore next */ {}), transform: numberAttribute });
117
- this.value = model(this.defaultValue(), ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
119
+ this.value = model(this.defaultValue(), /* @ts-ignore */
120
+ ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
118
121
  this.linear = input(true, { ...(ngDevMode ? { debugName: "linear" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
119
122
  this.dirInput = input(undefined, { ...(ngDevMode ? { debugName: "dirInput" } : /* istanbul ignore next */ {}), alias: 'dir' });
120
123
  this.dir = injectDirection(this.dirInput);
121
- this.orientation = input('horizontal', ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
124
+ this.orientation = input('horizontal', /* @ts-ignore */
125
+ ...(ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []));
122
126
  /** @ignore */
123
- this.totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()), ...(ngDevMode ? [{ debugName: "totalStepperItemsArray" }] : /* istanbul ignore next */ []));
127
+ this.totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()), /* @ts-ignore */
128
+ ...(ngDevMode ? [{ debugName: "totalStepperItemsArray" }] : /* istanbul ignore next */ []));
124
129
  this.onValueChange = output();
125
130
  /** @ignore */
126
- this.isFirstStep = computed(() => this.value() === 1, ...(ngDevMode ? [{ debugName: "isFirstStep" }] : /* istanbul ignore next */ []));
131
+ this.isFirstStep = computed(() => this.value() === 1, /* @ts-ignore */
132
+ ...(ngDevMode ? [{ debugName: "isFirstStep" }] : /* istanbul ignore next */ []));
127
133
  /** @ignore */
128
- this.isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length, ...(ngDevMode ? [{ debugName: "isLastStep" }] : /* istanbul ignore next */ []));
134
+ this.isLastStep = computed(() => this.value() === this.totalStepperItemsArray().length, /* @ts-ignore */
135
+ ...(ngDevMode ? [{ debugName: "isLastStep" }] : /* istanbul ignore next */ []));
129
136
  /** @ignore */
130
- this.totalSteps = computed(() => this.totalStepperItems().length, ...(ngDevMode ? [{ debugName: "totalSteps" }] : /* istanbul ignore next */ []));
137
+ this.totalSteps = computed(() => this.totalStepperItems().length, /* @ts-ignore */
138
+ ...(ngDevMode ? [{ debugName: "totalSteps" }] : /* istanbul ignore next */ []));
131
139
  /** @ignore */
132
140
  this.isNextDisabled = computed(() => {
133
141
  const item = this.nextStepperItem();
134
142
  return item ? item.hasAttribute('disabled') : true;
135
- }, ...(ngDevMode ? [{ debugName: "isNextDisabled" }] : /* istanbul ignore next */ []));
143
+ }, /* @ts-ignore */
144
+ ...(ngDevMode ? [{ debugName: "isNextDisabled" }] : /* istanbul ignore next */ []));
136
145
  /** @ignore */
137
146
  this.isPrevDisabled = computed(() => {
138
147
  const item = this.prevStepperItem();
139
148
  return item ? item.hasAttribute('disabled') : true;
140
- }, ...(ngDevMode ? [{ debugName: "isPrevDisabled" }] : /* istanbul ignore next */ []));
149
+ }, /* @ts-ignore */
150
+ ...(ngDevMode ? [{ debugName: "isPrevDisabled" }] : /* istanbul ignore next */ []));
141
151
  /** @ignore */
142
- this.totalStepperItems = signal([], ...(ngDevMode ? [{ debugName: "totalStepperItems" }] : /* istanbul ignore next */ []));
143
- this.nextStepperItem = signal(null, ...(ngDevMode ? [{ debugName: "nextStepperItem" }] : /* istanbul ignore next */ []));
144
- this.prevStepperItem = signal(null, ...(ngDevMode ? [{ debugName: "prevStepperItem" }] : /* istanbul ignore next */ []));
152
+ this.totalStepperItems = signal([], /* @ts-ignore */
153
+ ...(ngDevMode ? [{ debugName: "totalStepperItems" }] : /* istanbul ignore next */ []));
154
+ this.nextStepperItem = signal(null, /* @ts-ignore */
155
+ ...(ngDevMode ? [{ debugName: "nextStepperItem" }] : /* istanbul ignore next */ []));
156
+ this.prevStepperItem = signal(null, /* @ts-ignore */
157
+ ...(ngDevMode ? [{ debugName: "prevStepperItem" }] : /* istanbul ignore next */ []));
145
158
  effect(() => {
146
159
  const items = this.totalStepperItemsArray();
147
160
  const currentValue = this.value();
@@ -188,15 +201,15 @@ class RdxStepperRootDirective {
188
201
  }
189
202
  this.value.set(step);
190
203
  }
191
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
192
- 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 }, dirInput: { classPropertyName: "dirInput", 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: [
204
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
205
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", 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 }, dirInput: { classPropertyName: "dirInput", 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: [
193
206
  {
194
207
  provide: STEPPER_ROOT_CONTEXT,
195
208
  useExisting: forwardRef(() => RdxStepperRootDirective)
196
209
  }
197
210
  ], exportAs: ["rdxStepperRoot"], ngImport: i0 }); }
198
211
  }
199
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperRootDirective, decorators: [{
212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperRootDirective, decorators: [{
200
213
  type: Directive,
201
214
  args: [{
202
215
  selector: '[rdxStepperRoot]',
@@ -225,10 +238,10 @@ class RdxStepperSeparatorDirective {
225
238
  this.rdxSeparator.updateOrientation(this.rootContext.orientation());
226
239
  });
227
240
  }
228
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
229
- 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 }); }
241
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperSeparatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
242
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxStepperSeparatorDirective, isStandalone: true, selector: "[rdxStepperSeparator]", host: { properties: { "attr.data-state": "itemContext.itemState()" } }, hostDirectives: [{ directive: i1.RdxSeparatorRootDirective, inputs: ["orientation", "orientation"] }], ngImport: i0 }); }
230
243
  }
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperSeparatorDirective, decorators: [{
244
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperSeparatorDirective, decorators: [{
232
245
  type: Directive,
233
246
  args: [{
234
247
  selector: '[rdxStepperSeparator]',
@@ -243,10 +256,10 @@ class RdxStepperTitleDirective {
243
256
  constructor() {
244
257
  this.itemContext = injectStepperItemContext();
245
258
  }
246
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
247
- 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 }); }
259
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
260
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxStepperTitleDirective, isStandalone: true, selector: "[rdxStepperTitle]", host: { properties: { "attr.id": "itemContext.titleId" } }, ngImport: i0 }); }
248
261
  }
249
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperTitleDirective, decorators: [{
262
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperTitleDirective, decorators: [{
250
263
  type: Directive,
251
264
  args: [{
252
265
  selector: '[rdxStepperTitle]',
@@ -262,7 +275,8 @@ class RdxStepperTriggerDirective {
262
275
  this.rootContext = injectStepperRootContext();
263
276
  this.itemContext = injectStepperItemContext();
264
277
  this.elementRef = inject(ElementRef);
265
- this.stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()), ...(ngDevMode ? [{ debugName: "stepperItems" }] : /* istanbul ignore next */ []));
278
+ this.stepperItems = computed(() => Array.from(this.rootContext.totalStepperItems()), /* @ts-ignore */
279
+ ...(ngDevMode ? [{ debugName: "stepperItems" }] : /* istanbul ignore next */ []));
266
280
  // Register/deregister this trigger's host element with the root, in DOM order.
267
281
  const element = this.elementRef.nativeElement;
268
282
  this.rootContext.totalStepperItems.set([...this.rootContext.totalStepperItems(), element]);
@@ -316,10 +330,10 @@ class RdxStepperTriggerDirective {
316
330
  });
317
331
  }
318
332
  }
319
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
320
- 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 }); }
333
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
334
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", 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 }); }
321
335
  }
322
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperTriggerDirective, decorators: [{
336
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperTriggerDirective, decorators: [{
323
337
  type: Directive,
324
338
  args: [{
325
339
  selector: 'button[rdxStepperTrigger]',
@@ -352,8 +366,8 @@ const _imports = [
352
366
  RdxStepperTriggerDirective
353
367
  ];
354
368
  class RdxStepperModule {
355
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
356
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperModule, imports: [RdxStepperDescriptionDirective,
369
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
370
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperModule, imports: [RdxStepperDescriptionDirective,
357
371
  RdxStepperTitleDirective,
358
372
  RdxStepperSeparatorDirective,
359
373
  RdxStepperItemDirective,
@@ -366,9 +380,9 @@ class RdxStepperModule {
366
380
  RdxStepperIndicatorDirective,
367
381
  RdxStepperRootDirective,
368
382
  RdxStepperTriggerDirective] }); }
369
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperModule }); }
383
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperModule }); }
370
384
  }
371
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxStepperModule, decorators: [{
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxStepperModule, decorators: [{
372
386
  type: NgModule,
373
387
  args: [{
374
388
  imports: [..._imports],
@@ -1 +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/stepper-trigger.directive.ts","../../../packages/primitives/stepper/index.ts","../../../packages/primitives/stepper/radix-ng-primitives-stepper.ts"],"sourcesContent":["import { inject, InjectionToken, InputSignalWithTransform, Signal } from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/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 {\n inject,\n InjectionToken,\n InputSignal,\n InputSignalWithTransform,\n ModelSignal,\n Signal,\n WritableSignal\n} from '@angular/core';\nimport { BooleanInput, Direction } from '@radix-ng/primitives/core';\n\nexport interface StepperRootContext {\n value: ModelSignal<number | undefined>;\n orientation: InputSignal<'vertical' | 'horizontal'>;\n dir: Signal<Direction>;\n linear: InputSignalWithTransform<boolean, BooleanInput>;\n totalStepperItems: WritableSignal<HTMLElement[]>;\n goToStep(step: number, event?: Event, reason?: string): void;\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 { booleanAttribute, computed, Directive, forwardRef, input, numberAttribute } from '@angular/core';\nimport { BooleanInput, injectId, NumberInput } 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 = injectId('rdx-stepper-item-title');\n\n /** @ignore */\n readonly descriptionId = injectId('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 {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal\n} from '@angular/core';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n Direction,\n NumberInput,\n RdxCancelableChangeEventDetails,\n RdxLiveAnnouncer\n} from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { STEPPER_ROOT_CONTEXT, StepperRootContext } from './stepper-root-context.token';\n\nexport type RdxStepperValueChangeReason = 'trigger-press' | 'keyboard' | 'none';\nexport type RdxStepperValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxStepperValueChangeReason>;\n\nexport interface RdxStepperValueChangeEvent {\n value: number;\n eventDetails: RdxStepperValueChangeEventDetails;\n}\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(RdxLiveAnnouncer);\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 dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** @ignore */\n readonly totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()));\n\n readonly onValueChange = output<RdxStepperValueChangeEvent>();\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, event?: Event, reason: RdxStepperValueChangeReason = event ? 'trigger-press' : 'none') {\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\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n reason,\n event ?? new Event('stepper.value-change'),\n trigger\n );\n this.onValueChange.emit({ value: step, eventDetails });\n if (eventDetails.isCanceled()) {\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'] }],\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.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","import { computed, DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport * as kbd from '@radix-ng/primitives/core';\nimport { getActiveElement, useArrowNavigation } from '@radix-ng/primitives/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\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 {\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 constructor() {\n // Register/deregister this trigger's host element with the root, in DOM order.\n const element = this.elementRef.nativeElement;\n this.rootContext.totalStepperItems.set([...this.rootContext.totalStepperItems(), element]);\n\n inject(DestroyRef).onDestroy(() => {\n const updated = this.rootContext.totalStepperItems().filter((el: HTMLElement) => el !== element);\n\n this.rootContext.totalStepperItems.set(updated);\n });\n }\n\n handleMouseDown(event: Event) {\n const mouseEvent = event as MouseEvent;\n if (this.itemContext.disabled()) {\n return;\n }\n\n // handler only left mouse click\n if (mouseEvent.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 (!mouseEvent.ctrlKey) {\n this.rootContext.goToStep(this.itemContext.step(), event, 'trigger-press');\n return;\n }\n }\n } else {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.goToStep(this.itemContext.step(), event, 'trigger-press');\n return;\n }\n }\n\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n\n handleKeyDown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n event.preventDefault();\n\n if (this.itemContext.disabled()) {\n return;\n }\n\n if ((keyEvent.key === kbd.ENTER || keyEvent.key === kbd.SPACE) && !keyEvent.ctrlKey && !keyEvent.shiftKey)\n this.rootContext.goToStep(this.itemContext.step(), event, 'keyboard');\n\n if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(keyEvent.key)) {\n useArrowNavigation(keyEvent, getActiveElement() as HTMLElement, undefined, {\n itemsArray: this.stepperItems(),\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,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AACpD,IAAA;8GAFY,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA9B,8BAA8B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,2BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAN1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,IAAI,EAAE;AACF,wBAAA,WAAW,EAAE;AAChB;AACJ,iBAAA;;;MCDY,4BAA4B,CAAA;AAJzC,IAAA,WAAA,GAAA;QAKa,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AACpD,IAAA;8GAFY,4BAA4B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA5B,4BAA4B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,uBAAA,EAAA,QAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA5B,4BAA4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AAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAbzB,8BAA8B;YAC9B,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,4BAA4B;YAC5B,uBAAuB;AACvB,YAAA,0BAA0B,aAN1B,8BAA8B;YAC9B,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,4BAA4B;YAC5B,uBAAuB;YACvB,0BAA0B,CAAA,EAAA,CAAA,CAAA;+GAOjB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,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;;;;"}
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/stepper-trigger.directive.ts","../../../packages/primitives/stepper/index.ts","../../../packages/primitives/stepper/radix-ng-primitives-stepper.ts"],"sourcesContent":["import { inject, InjectionToken, InputSignalWithTransform, Signal } from '@angular/core';\nimport { BooleanInput, NumberInput } from '@radix-ng/primitives/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 {\n inject,\n InjectionToken,\n InputSignal,\n InputSignalWithTransform,\n ModelSignal,\n Signal,\n WritableSignal\n} from '@angular/core';\nimport { BooleanInput, Direction } from '@radix-ng/primitives/core';\n\nexport interface StepperRootContext {\n value: ModelSignal<number | undefined>;\n orientation: InputSignal<'vertical' | 'horizontal'>;\n dir: Signal<Direction>;\n linear: InputSignalWithTransform<boolean, BooleanInput>;\n totalStepperItems: WritableSignal<HTMLElement[]>;\n goToStep(step: number, event?: Event, reason?: string): void;\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 { booleanAttribute, computed, Directive, forwardRef, input, numberAttribute } from '@angular/core';\nimport { BooleanInput, injectId, NumberInput } 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 = injectId('rdx-stepper-item-title');\n\n /** @ignore */\n readonly descriptionId = injectId('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 {\n booleanAttribute,\n computed,\n Directive,\n effect,\n forwardRef,\n inject,\n input,\n model,\n numberAttribute,\n output,\n signal\n} from '@angular/core';\nimport {\n BooleanInput,\n createCancelableChangeEventDetails,\n Direction,\n NumberInput,\n RdxCancelableChangeEventDetails,\n RdxLiveAnnouncer\n} from '@radix-ng/primitives/core';\nimport { injectDirection } from '@radix-ng/primitives/direction-provider';\nimport { STEPPER_ROOT_CONTEXT, StepperRootContext } from './stepper-root-context.token';\n\nexport type RdxStepperValueChangeReason = 'trigger-press' | 'keyboard' | 'none';\nexport type RdxStepperValueChangeEventDetails = RdxCancelableChangeEventDetails<RdxStepperValueChangeReason>;\n\nexport interface RdxStepperValueChangeEvent {\n value: number;\n eventDetails: RdxStepperValueChangeEventDetails;\n}\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(RdxLiveAnnouncer);\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 dirInput = input<Direction | undefined>(undefined, { alias: 'dir' });\n readonly dir = injectDirection(this.dirInput);\n\n readonly orientation = input<'vertical' | 'horizontal'>('horizontal');\n\n /** @ignore */\n readonly totalStepperItemsArray = computed(() => Array.from(this.totalStepperItems()));\n\n readonly onValueChange = output<RdxStepperValueChangeEvent>();\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, event?: Event, reason: RdxStepperValueChangeReason = event ? 'trigger-press' : 'none') {\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\n const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;\n const { eventDetails } = createCancelableChangeEventDetails(\n reason,\n event ?? new Event('stepper.value-change'),\n trigger\n );\n this.onValueChange.emit({ value: step, eventDetails });\n if (eventDetails.isCanceled()) {\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'] }],\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.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","import { computed, DestroyRef, Directive, ElementRef, inject } from '@angular/core';\nimport * as kbd from '@radix-ng/primitives/core';\nimport { getActiveElement, useArrowNavigation } from '@radix-ng/primitives/core';\nimport { injectStepperItemContext } from './stepper-item-context.token';\nimport { injectStepperRootContext } from './stepper-root-context.token';\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 {\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 constructor() {\n // Register/deregister this trigger's host element with the root, in DOM order.\n const element = this.elementRef.nativeElement;\n this.rootContext.totalStepperItems.set([...this.rootContext.totalStepperItems(), element]);\n\n inject(DestroyRef).onDestroy(() => {\n const updated = this.rootContext.totalStepperItems().filter((el: HTMLElement) => el !== element);\n\n this.rootContext.totalStepperItems.set(updated);\n });\n }\n\n handleMouseDown(event: Event) {\n const mouseEvent = event as MouseEvent;\n if (this.itemContext.disabled()) {\n return;\n }\n\n // handler only left mouse click\n if (mouseEvent.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 (!mouseEvent.ctrlKey) {\n this.rootContext.goToStep(this.itemContext.step(), event, 'trigger-press');\n return;\n }\n }\n } else {\n if (!mouseEvent.ctrlKey) {\n this.rootContext.goToStep(this.itemContext.step(), event, 'trigger-press');\n return;\n }\n }\n\n // prevent focus to avoid accidental activation\n event.preventDefault();\n }\n\n handleKeyDown(event: Event) {\n const keyEvent = event as KeyboardEvent;\n event.preventDefault();\n\n if (this.itemContext.disabled()) {\n return;\n }\n\n if ((keyEvent.key === kbd.ENTER || keyEvent.key === kbd.SPACE) && !keyEvent.ctrlKey && !keyEvent.shiftKey)\n this.rootContext.goToStep(this.itemContext.step(), event, 'keyboard');\n\n if ([kbd.ARROW_LEFT, kbd.ARROW_RIGHT, kbd.ARROW_UP, kbd.ARROW_DOWN].includes(keyEvent.key)) {\n useArrowNavigation(keyEvent, getActiveElement() as HTMLElement, undefined, {\n itemsArray: this.stepperItems(),\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,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AACpD,IAAA;8GAFY,8BAA8B,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAA9B,8BAA8B,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,yBAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,SAAA,EAAA,2BAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAA9B,8BAA8B,EAAA,UAAA,EAAA,CAAA;kBAN1C,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,yBAAyB;AACnC,oBAAA,IAAI,EAAE;AACF,wBAAA,WAAW,EAAE;AAChB;AACJ,iBAAA;;;MCDY,4BAA4B,CAAA;AAJzC,IAAA,WAAA,GAAA;QAKa,IAAA,CAAA,WAAW,GAAG,wBAAwB,EAAE;AACpD,IAAA;8GAFY,4BAA4B,EAA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B,uBAAuB;IACvB;CACH;MAMY,gBAAgB,CAAA;8GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAbzB,8BAA8B;YAC9B,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,4BAA4B;YAC5B,uBAAuB;AACvB,YAAA,0BAA0B,aAN1B,8BAA8B;YAC9B,wBAAwB;YACxB,4BAA4B;YAC5B,uBAAuB;YACvB,4BAA4B;YAC5B,uBAAuB;YACvB,0BAA0B,CAAA,EAAA,CAAA,CAAA;+GAOjB,gBAAgB,EAAA,CAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,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;;;;"}
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Directive, inject, computed, input, booleanAttribute, model, output, NgModule } from '@angular/core';
2
+ import { Directive, inject, computed, input, booleanAttribute, model, output, effect, NgModule } from '@angular/core';
3
3
  import * as i1 from '@radix-ng/primitives/core';
4
4
  import { createContext, injectControlValueAccessor, injectId, createCancelableChangeEventDetails, RdxControlValueAccessor } from '@radix-ng/primitives/core';
5
5
 
@@ -14,10 +14,10 @@ class RdxSwitchInput {
14
14
  constructor() {
15
15
  this.rootContext = injectSwitchContext();
16
16
  }
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxSwitchInput, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "tabindex": "-1", "aria-hidden": "true" }, listeners: { "blur": "rootContext.markAsTouched()" }, properties: { "attr.name": "rootContext.name()", "attr.value": "rootContext.value()", "checked": "rootContext.checked()", "disabled": "rootContext.disabled()", "attr.required": "rootContext.required() ? \"\" : undefined", "attr.aria-label": "rootContext.ariaLabel()", "attr.aria-labelledby": "rootContext.ariaLabelledBy()", "attr.data-checked": "rootContext.checked() ? \"\" : undefined", "attr.data-unchecked": "rootContext.checked() ? undefined : \"\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointer-events: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
17
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
18
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxSwitchInput, isStandalone: true, selector: "input[rdxSwitchInput]", host: { attributes: { "type": "checkbox", "tabindex": "-1", "aria-hidden": "true" }, listeners: { "blur": "rootContext.markAsTouched()" }, properties: { "attr.name": "rootContext.name()", "attr.value": "rootContext.value()", "checked": "rootContext.checked()", "disabled": "rootContext.disabled()", "attr.required": "rootContext.required() ? \"\" : undefined", "attr.aria-label": "rootContext.ariaLabel()", "attr.aria-labelledby": "rootContext.ariaLabelledBy()", "attr.data-checked": "rootContext.checked() ? \"\" : undefined", "attr.data-unchecked": "rootContext.checked() ? undefined : \"\"" }, styleAttribute: "transform: translateX(-100%); position: absolute; overflow: hidden; pointer-events: none; opacity: 0; margin: 0;" }, exportAs: ["rdxSwitchInput"], ngImport: i0 }); }
19
19
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchInput, decorators: [{
20
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchInput, decorators: [{
21
21
  type: Directive,
22
22
  args: [{
23
23
  selector: 'input[rdxSwitchInput]',
@@ -65,17 +65,19 @@ class RdxSwitchRoot {
65
65
  constructor() {
66
66
  /** @ignore */
67
67
  this.cva = injectControlValueAccessor();
68
- this.id = input(injectId('rdx-switch-'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
68
+ this.id = input(injectId('rdx-switch-'), /* @ts-ignore */
69
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
69
70
  /**
70
71
  * The state of the switch when it is initially rendered. Use when you do not need to control its state.
71
72
  *
72
73
  * @default false
73
74
  */
74
- this.defaultChecked = input(false, { ...(ngDevMode ? { debugName: "defaultChecked" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
75
+ this.defaultChecked = input(undefined, { ...(ngDevMode ? { debugName: "defaultChecked" } : /* istanbul ignore next */ {}), transform: (value) => (value === undefined ? undefined : booleanAttribute(value)) });
75
76
  /**
76
77
  * The controlled checked state. Use with `(onCheckedChange)` or two-way `[(checked)]`.
77
78
  */
78
- this.checked = model(this.defaultChecked(), ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
79
+ this.checked = model(false, /* @ts-ignore */
80
+ ...(ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []));
79
81
  /**
80
82
  * When `true`, prevents the user from interacting with the switch.
81
83
  *
@@ -95,7 +97,8 @@ class RdxSwitchRoot {
95
97
  */
96
98
  this.required = input(false, { ...(ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
97
99
  /** Name of the hidden form input rendered by `[rdxSwitchInput]`. */
98
- this.name = input(...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
100
+ this.name = input(/* @ts-ignore */
101
+ ...(ngDevMode ? [undefined, { debugName: "name" }] : /* istanbul ignore next */ []));
99
102
  /**
100
103
  * Value submitted with the form when the switch is on.
101
104
  *
@@ -112,9 +115,23 @@ class RdxSwitchRoot {
112
115
  /** Event handler called when the checked state of the switch changes. */
113
116
  this.onCheckedChange = output();
114
117
  /** @ignore */
115
- this.checkedState = computed(() => !!this.cva.value(), ...(ngDevMode ? [{ debugName: "checkedState" }] : /* istanbul ignore next */ []));
118
+ this.checkedState = computed(() => !!this.cva.value(), /* @ts-ignore */
119
+ ...(ngDevMode ? [{ debugName: "checkedState" }] : /* istanbul ignore next */ []));
116
120
  /** @ignore */
117
- this.isDisabled = computed(() => !!this.cva.disabled(), ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
121
+ this.isDisabled = computed(() => !!this.cva.disabled(), /* @ts-ignore */
122
+ ...(ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []));
123
+ // Apply the uncontrolled `defaultChecked` once. `input()` values are not bound at field-init,
124
+ // so the on state must be seeded here — into both the `checked` model and the CVA value, which
125
+ // is the source of truth for `checkedState`/`aria-checked`/`data-checked`.
126
+ let hasAppliedDefault = false;
127
+ effect(() => {
128
+ const defaultChecked = this.defaultChecked();
129
+ if (!hasAppliedDefault && defaultChecked !== undefined) {
130
+ hasAppliedDefault = true;
131
+ this.checked.set(defaultChecked);
132
+ this.cva.setValue(defaultChecked);
133
+ }
134
+ });
118
135
  }
119
136
  /** @ignore Toggles the checked state unless disabled or read-only. */
120
137
  toggle(event) {
@@ -123,7 +140,7 @@ class RdxSwitchRoot {
123
140
  }
124
141
  const next = !this.cva.value();
125
142
  const trigger = event?.currentTarget instanceof HTMLElement ? event.currentTarget : undefined;
126
- const { eventDetails } = createCancelableChangeEventDetails(event ? 'trigger-press' : 'none', event ?? new Event('switch.checked-change'), trigger);
143
+ const { eventDetails } = createCancelableChangeEventDetails('none', event ?? new Event('switch.checked-change'), trigger);
127
144
  this.onCheckedChange.emit({ checked: next, eventDetails });
128
145
  if (eventDetails.isCanceled()) {
129
146
  return;
@@ -131,10 +148,10 @@ class RdxSwitchRoot {
131
148
  this.checked.set(next);
132
149
  this.cva.setValue(next);
133
150
  }
134
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
135
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.9", type: RdxSwitchRoot, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, submitValue: { classPropertyName: "submitValue", publicName: "value", 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 } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle($event)", "blur": "cva.markAsTouched()", "keydown.enter": "$event.preventDefault()" }, properties: { "id": "id()", "attr.aria-checked": "checkedState()", "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "checkedState() ? undefined : \"\"", "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined", "attr.disabled": "isDisabled() ? \"\" : undefined" } }, providers: [provideSwitchContext(context)], exportAs: ["rdxSwitchRoot"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
151
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
152
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.2", type: RdxSwitchRoot, isStandalone: true, selector: "button[rdxSwitchRoot]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, defaultChecked: { classPropertyName: "defaultChecked", publicName: "defaultChecked", isSignal: true, isRequired: false, transformFunction: null }, checked: { classPropertyName: "checked", publicName: "checked", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, readonly: { classPropertyName: "readonly", publicName: "readonly", isSignal: true, isRequired: false, transformFunction: null }, required: { classPropertyName: "required", publicName: "required", isSignal: true, isRequired: false, transformFunction: null }, name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: false, transformFunction: null }, submitValue: { classPropertyName: "submitValue", publicName: "value", 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 } }, outputs: { checked: "checkedChange", onCheckedChange: "onCheckedChange" }, host: { attributes: { "role": "switch", "type": "button" }, listeners: { "click": "toggle($event)", "blur": "cva.markAsTouched()" }, properties: { "id": "id()", "attr.aria-checked": "checkedState()", "attr.aria-required": "required() ? \"true\" : undefined", "attr.aria-readonly": "readonly() ? \"true\" : undefined", "attr.data-checked": "checkedState() ? \"\" : undefined", "attr.data-unchecked": "checkedState() ? undefined : \"\"", "attr.data-disabled": "isDisabled() ? \"\" : undefined", "attr.data-readonly": "readonly() ? \"\" : undefined", "attr.data-required": "required() ? \"\" : undefined", "attr.disabled": "isDisabled() ? \"\" : undefined" } }, providers: [provideSwitchContext(context)], exportAs: ["rdxSwitchRoot"], hostDirectives: [{ directive: i1.RdxControlValueAccessor, inputs: ["value", "checked", "disabled", "disabled"] }], ngImport: i0 }); }
136
153
  }
137
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchRoot, decorators: [{
154
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchRoot, decorators: [{
138
155
  type: Directive,
139
156
  args: [{
140
157
  selector: 'button[rdxSwitchRoot]',
@@ -158,13 +175,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
158
175
  '[attr.data-disabled]': 'isDisabled() ? "" : undefined',
159
176
  '[attr.data-readonly]': 'readonly() ? "" : undefined',
160
177
  '[attr.data-required]': 'required() ? "" : undefined',
178
+ // Native `<button rdxSwitchRoot>` → native `disabled` (Base UI's `nativeButton: true` path in
179
+ // `useFocusableWhenDisabled`). The hidden `[rdxSwitchInput]` is also disabled for form exclusion.
161
180
  '[attr.disabled]': 'isDisabled() ? "" : undefined',
162
181
  '(click)': 'toggle($event)',
163
- '(blur)': 'cva.markAsTouched()',
164
- '(keydown.enter)': '$event.preventDefault()'
182
+ '(blur)': 'cva.markAsTouched()'
165
183
  }
166
184
  }]
167
- }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], defaultChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultChecked", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], submitValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], onCheckedChange: [{ type: i0.Output, args: ["onCheckedChange"] }] } });
185
+ }], ctorParameters: () => [], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], defaultChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "defaultChecked", required: false }] }], checked: [{ type: i0.Input, args: [{ isSignal: true, alias: "checked", required: false }] }, { type: i0.Output, args: ["checkedChange"] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], readonly: [{ type: i0.Input, args: [{ isSignal: true, alias: "readonly", required: false }] }], required: [{ type: i0.Input, args: [{ isSignal: true, alias: "required", required: false }] }], name: [{ type: i0.Input, args: [{ isSignal: true, alias: "name", required: false }] }], submitValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "value", required: false }] }], ariaLabelledBy: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-labelledby", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "aria-label", required: false }] }], onCheckedChange: [{ type: i0.Output, args: ["onCheckedChange"] }] } });
168
186
 
169
187
  /**
170
188
  * The moving part of the switch that indicates whether it is on or off.
@@ -175,10 +193,10 @@ class RdxSwitchThumb {
175
193
  constructor() {
176
194
  this.rootContext = injectSwitchContext();
177
195
  }
178
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
179
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxSwitchThumb, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-checked": "rootContext.checked() ? \"\" : undefined", "attr.data-unchecked": "rootContext.checked() ? undefined : \"\"", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.data-readonly": "rootContext.readonly() ? \"\" : undefined" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
196
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchThumb, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
197
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.2", type: RdxSwitchThumb, isStandalone: true, selector: "span[rdxSwitchThumb]", host: { properties: { "attr.data-checked": "rootContext.checked() ? \"\" : undefined", "attr.data-unchecked": "rootContext.checked() ? undefined : \"\"", "attr.data-disabled": "rootContext.disabled() ? \"\" : undefined", "attr.data-readonly": "rootContext.readonly() ? \"\" : undefined", "attr.data-required": "rootContext.required() ? \"\" : undefined" } }, exportAs: ["rdxSwitchThumb"], ngImport: i0 }); }
180
198
  }
181
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchThumb, decorators: [{
199
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchThumb, decorators: [{
182
200
  type: Directive,
183
201
  args: [{
184
202
  selector: 'span[rdxSwitchThumb]',
@@ -187,18 +205,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
187
205
  '[attr.data-checked]': 'rootContext.checked() ? "" : undefined',
188
206
  '[attr.data-unchecked]': 'rootContext.checked() ? undefined : ""',
189
207
  '[attr.data-disabled]': 'rootContext.disabled() ? "" : undefined',
190
- '[attr.data-readonly]': 'rootContext.readonly() ? "" : undefined'
208
+ '[attr.data-readonly]': 'rootContext.readonly() ? "" : undefined',
209
+ '[attr.data-required]': 'rootContext.required() ? "" : undefined'
191
210
  }
192
211
  }]
193
212
  }] });
194
213
 
195
214
  const switchImports = [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb];
196
215
  class RdxSwitchModule {
197
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
198
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb], exports: [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb] }); }
199
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule }); }
216
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
217
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchModule, imports: [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb], exports: [RdxSwitchRoot, RdxSwitchInput, RdxSwitchThumb] }); }
218
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchModule }); }
200
219
  }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxSwitchModule, decorators: [{
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.2", ngImport: i0, type: RdxSwitchModule, decorators: [{
202
221
  type: NgModule,
203
222
  args: [{
204
223
  imports: [...switchImports],