@radix-ng/primitives 0.51.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.
Files changed (178) hide show
  1. package/fesm2022/radix-ng-primitives-accordion.mjs +105 -38
  2. package/fesm2022/radix-ng-primitives-accordion.mjs.map +1 -1
  3. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +221 -129
  4. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -1
  5. package/fesm2022/radix-ng-primitives-arrow.mjs +20 -4
  6. package/fesm2022/radix-ng-primitives-arrow.mjs.map +1 -1
  7. package/fesm2022/radix-ng-primitives-aspect-ratio.mjs.map +1 -1
  8. package/fesm2022/radix-ng-primitives-avatar.mjs +54 -61
  9. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  10. package/fesm2022/radix-ng-primitives-button.mjs +123 -0
  11. package/fesm2022/radix-ng-primitives-button.mjs.map +1 -0
  12. package/fesm2022/radix-ng-primitives-calendar.mjs.map +1 -1
  13. package/fesm2022/radix-ng-primitives-checkbox.mjs +378 -54
  14. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  15. package/fesm2022/radix-ng-primitives-collapsible.mjs +182 -81
  16. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -1
  17. package/fesm2022/radix-ng-primitives-collection.mjs +40 -57
  18. package/fesm2022/radix-ng-primitives-collection.mjs.map +1 -1
  19. package/fesm2022/radix-ng-primitives-config.mjs.map +1 -1
  20. package/fesm2022/radix-ng-primitives-context-menu.mjs +140 -424
  21. package/fesm2022/radix-ng-primitives-context-menu.mjs.map +1 -1
  22. package/fesm2022/radix-ng-primitives-core.mjs +735 -744
  23. package/fesm2022/radix-ng-primitives-core.mjs.map +1 -1
  24. package/fesm2022/radix-ng-primitives-cropper.mjs +1 -0
  25. package/fesm2022/radix-ng-primitives-cropper.mjs.map +1 -1
  26. package/fesm2022/radix-ng-primitives-date-field.mjs +51 -45
  27. package/fesm2022/radix-ng-primitives-date-field.mjs.map +1 -1
  28. package/fesm2022/radix-ng-primitives-dialog.mjs +655 -327
  29. package/fesm2022/radix-ng-primitives-dialog.mjs.map +1 -1
  30. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs +70 -46
  31. package/fesm2022/radix-ng-primitives-dismissable-layer.mjs.map +1 -1
  32. package/fesm2022/radix-ng-primitives-drawer.mjs +1059 -0
  33. package/fesm2022/radix-ng-primitives-drawer.mjs.map +1 -0
  34. package/fesm2022/radix-ng-primitives-editable.mjs.map +1 -1
  35. package/fesm2022/radix-ng-primitives-field.mjs +363 -0
  36. package/fesm2022/radix-ng-primitives-field.mjs.map +1 -0
  37. package/fesm2022/radix-ng-primitives-fieldset.mjs +79 -0
  38. package/fesm2022/radix-ng-primitives-fieldset.mjs.map +1 -0
  39. package/fesm2022/radix-ng-primitives-focus-scope.mjs +23 -8
  40. package/fesm2022/radix-ng-primitives-focus-scope.mjs.map +1 -1
  41. package/fesm2022/radix-ng-primitives-input.mjs +172 -0
  42. package/fesm2022/radix-ng-primitives-input.mjs.map +1 -0
  43. package/fesm2022/radix-ng-primitives-label.mjs +6 -6
  44. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  45. package/fesm2022/radix-ng-primitives-menu.mjs +1480 -344
  46. package/fesm2022/radix-ng-primitives-menu.mjs.map +1 -1
  47. package/fesm2022/radix-ng-primitives-menubar.mjs +290 -162
  48. package/fesm2022/radix-ng-primitives-menubar.mjs.map +1 -1
  49. package/fesm2022/radix-ng-primitives-meter.mjs +271 -0
  50. package/fesm2022/radix-ng-primitives-meter.mjs.map +1 -0
  51. package/fesm2022/radix-ng-primitives-navigation-menu.mjs +1052 -1553
  52. package/fesm2022/radix-ng-primitives-navigation-menu.mjs.map +1 -1
  53. package/fesm2022/radix-ng-primitives-number-field.mjs +1102 -367
  54. package/fesm2022/radix-ng-primitives-number-field.mjs.map +1 -1
  55. package/fesm2022/radix-ng-primitives-pagination.mjs.map +1 -1
  56. package/fesm2022/radix-ng-primitives-popover.mjs +978 -989
  57. package/fesm2022/radix-ng-primitives-popover.mjs.map +1 -1
  58. package/fesm2022/radix-ng-primitives-popper.mjs +91 -41
  59. package/fesm2022/radix-ng-primitives-popper.mjs.map +1 -1
  60. package/fesm2022/radix-ng-primitives-portal.mjs +34 -10
  61. package/fesm2022/radix-ng-primitives-portal.mjs.map +1 -1
  62. package/fesm2022/radix-ng-primitives-presence.mjs +134 -246
  63. package/fesm2022/radix-ng-primitives-presence.mjs.map +1 -1
  64. package/fesm2022/radix-ng-primitives-preview-card.mjs +997 -0
  65. package/fesm2022/radix-ng-primitives-preview-card.mjs.map +1 -0
  66. package/fesm2022/radix-ng-primitives-progress.mjs +223 -84
  67. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  68. package/fesm2022/radix-ng-primitives-radio.mjs +191 -51
  69. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  70. package/fesm2022/radix-ng-primitives-roving-focus.mjs +96 -50
  71. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  72. package/fesm2022/radix-ng-primitives-select.mjs +791 -509
  73. package/fesm2022/radix-ng-primitives-select.mjs.map +1 -1
  74. package/fesm2022/radix-ng-primitives-separator.mjs +12 -35
  75. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  76. package/fesm2022/radix-ng-primitives-slider.mjs +969 -717
  77. package/fesm2022/radix-ng-primitives-slider.mjs.map +1 -1
  78. package/fesm2022/radix-ng-primitives-stepper.mjs +15 -19
  79. package/fesm2022/radix-ng-primitives-stepper.mjs.map +1 -1
  80. package/fesm2022/radix-ng-primitives-switch.mjs +125 -113
  81. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  82. package/fesm2022/radix-ng-primitives-tabs.mjs +381 -108
  83. package/fesm2022/radix-ng-primitives-tabs.mjs.map +1 -1
  84. package/fesm2022/radix-ng-primitives-time-field.mjs +55 -46
  85. package/fesm2022/radix-ng-primitives-time-field.mjs.map +1 -1
  86. package/fesm2022/radix-ng-primitives-toggle-group.mjs +121 -247
  87. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -1
  88. package/fesm2022/radix-ng-primitives-toggle.mjs +98 -61
  89. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  90. package/fesm2022/radix-ng-primitives-toolbar.mjs +303 -92
  91. package/fesm2022/radix-ng-primitives-toolbar.mjs.map +1 -1
  92. package/fesm2022/radix-ng-primitives-tooltip.mjs +690 -1071
  93. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +1 -1
  94. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +25 -66
  95. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +1 -1
  96. package/meter/README.md +3 -0
  97. package/navigation-menu/README.md +2 -1
  98. package/package.json +31 -18
  99. package/portal/README.md +2 -0
  100. package/preview-card/README.md +3 -0
  101. package/schematics/collection.json +1 -0
  102. package/schematics/ng-add/index.d.ts +3 -2
  103. package/schematics/ng-add/index.js +62 -31
  104. package/schematics/ng-add/index.js.map +1 -1
  105. package/schematics/ng-add/package-config.d.ts +4 -2
  106. package/schematics/ng-add/package-config.js +10 -2
  107. package/schematics/ng-add/package-config.js.map +1 -1
  108. package/schematics/ng-add/schema.d.ts +3 -0
  109. package/schematics/ng-add/schema.js +3 -0
  110. package/schematics/ng-add/schema.js.map +1 -0
  111. package/schematics/ng-add/schema.json +14 -0
  112. package/select/README.md +2 -0
  113. package/types/radix-ng-primitives-accordion.d.ts +48 -14
  114. package/types/radix-ng-primitives-alert-dialog.d.ts +95 -38
  115. package/types/radix-ng-primitives-arrow.d.ts +1 -1
  116. package/types/radix-ng-primitives-aspect-ratio.d.ts +1 -1
  117. package/types/radix-ng-primitives-avatar.d.ts +7 -11
  118. package/types/radix-ng-primitives-button.d.ts +73 -0
  119. package/types/radix-ng-primitives-calendar.d.ts +1 -2
  120. package/types/radix-ng-primitives-checkbox.d.ts +201 -32
  121. package/types/radix-ng-primitives-collapsible.d.ts +112 -39
  122. package/types/radix-ng-primitives-collection.d.ts +38 -34
  123. package/types/radix-ng-primitives-config.d.ts +1 -1
  124. package/types/radix-ng-primitives-context-menu.d.ts +60 -116
  125. package/types/radix-ng-primitives-core.d.ts +307 -236
  126. package/types/radix-ng-primitives-cropper.d.ts +2 -2
  127. package/types/radix-ng-primitives-date-field.d.ts +38 -23
  128. package/types/radix-ng-primitives-dialog.d.ts +282 -165
  129. package/types/radix-ng-primitives-dismissable-layer.d.ts +15 -7
  130. package/types/radix-ng-primitives-drawer.d.ts +448 -0
  131. package/types/radix-ng-primitives-editable.d.ts +1 -1
  132. package/types/radix-ng-primitives-field.d.ts +373 -0
  133. package/types/radix-ng-primitives-fieldset.d.ts +48 -0
  134. package/types/radix-ng-primitives-focus-scope.d.ts +13 -5
  135. package/types/radix-ng-primitives-input.d.ts +87 -0
  136. package/types/radix-ng-primitives-label.d.ts +0 -1
  137. package/types/radix-ng-primitives-menu.d.ts +572 -99
  138. package/types/radix-ng-primitives-menubar.d.ts +60 -50
  139. package/types/radix-ng-primitives-meter.d.ts +193 -0
  140. package/types/radix-ng-primitives-navigation-menu.d.ts +422 -340
  141. package/types/radix-ng-primitives-number-field.d.ts +405 -145
  142. package/types/radix-ng-primitives-pagination.d.ts +2 -2
  143. package/types/radix-ng-primitives-popover.d.ts +365 -351
  144. package/types/radix-ng-primitives-popper.d.ts +49 -9
  145. package/types/radix-ng-primitives-portal.d.ts +14 -6
  146. package/types/radix-ng-primitives-presence.d.ts +28 -76
  147. package/types/radix-ng-primitives-preview-card.d.ts +359 -0
  148. package/types/radix-ng-primitives-progress.d.ts +174 -48
  149. package/types/radix-ng-primitives-radio.d.ts +55 -25
  150. package/types/radix-ng-primitives-roving-focus.d.ts +30 -21
  151. package/types/radix-ng-primitives-select.d.ts +475 -177
  152. package/types/radix-ng-primitives-separator.d.ts +7 -32
  153. package/types/radix-ng-primitives-slider.d.ts +315 -201
  154. package/types/radix-ng-primitives-stepper.d.ts +5 -7
  155. package/types/radix-ng-primitives-switch.d.ts +86 -71
  156. package/types/radix-ng-primitives-tabs.d.ts +213 -79
  157. package/types/radix-ng-primitives-time-field.d.ts +42 -27
  158. package/types/radix-ng-primitives-toggle-group.d.ts +85 -164
  159. package/types/radix-ng-primitives-toggle.d.ts +43 -53
  160. package/types/radix-ng-primitives-toolbar.d.ts +163 -38
  161. package/types/radix-ng-primitives-tooltip.d.ts +347 -384
  162. package/types/radix-ng-primitives-visually-hidden.d.ts +19 -19
  163. package/dropdown-menu/README.md +0 -1
  164. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs +0 -581
  165. package/fesm2022/radix-ng-primitives-dropdown-menu.mjs.map +0 -1
  166. package/fesm2022/radix-ng-primitives-hover-card.mjs +0 -1238
  167. package/fesm2022/radix-ng-primitives-hover-card.mjs.map +0 -1
  168. package/fesm2022/radix-ng-primitives-select2.mjs +0 -897
  169. package/fesm2022/radix-ng-primitives-select2.mjs.map +0 -1
  170. package/fesm2022/radix-ng-primitives-tooltip2.mjs +0 -735
  171. package/fesm2022/radix-ng-primitives-tooltip2.mjs.map +0 -1
  172. package/hover-card/README.md +0 -3
  173. package/select2/README.md +0 -3
  174. package/tooltip2/README.md +0 -3
  175. package/types/radix-ng-primitives-dropdown-menu.d.ts +0 -171
  176. package/types/radix-ng-primitives-hover-card.d.ts +0 -471
  177. package/types/radix-ng-primitives-select2.d.ts +0 -511
  178. package/types/radix-ng-primitives-tooltip2.d.ts +0 -325
@@ -1,181 +1,273 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, Injectable, Directive, Renderer2, ElementRef, Input, ViewContainerRef, NgModule } from '@angular/core';
3
- import { Overlay } from '@angular/cdk/overlay';
4
- import { TemplatePortal } from '@angular/cdk/portal';
5
- import * as i1 from '@angular/cdk/a11y';
6
- import { CdkTrapFocus } from '@angular/cdk/a11y';
2
+ import { Directive, inject, NgModule } from '@angular/core';
3
+ import * as i1 from '@radix-ng/primitives/dialog';
4
+ import { RdxDialogBackdrop, RdxDialogClose, RdxDialogDescription, RdxDialogPopup, RdxDialogPortal, RdxDialogPortalPresence, RdxDialogRoot, provideRdxDialogVariant, RdxDialogTitle, RdxDialogTrigger, RdxDialogViewport, RdxDialogHandle, createRdxDialogHandle } from '@radix-ng/primitives/dialog';
7
5
 
8
- class RdxAlertDialogService {
9
- constructor() {
10
- this.overlay = inject(Overlay);
11
- }
12
- setDialogContent(viewContainerRef, template) {
13
- this.dialogContent = { viewContainerRef, template };
14
- }
15
- open() {
16
- if (!this.dialogContent) {
17
- throw new Error('Dialog content is not set');
18
- }
19
- this.overlayRef = this.overlay.create({
20
- hasBackdrop: true,
21
- backdropClass: 'cdk-overlay-dark-backdrop',
22
- positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically()
23
- });
24
- const templatePortal = new TemplatePortal(this.dialogContent.template, this.dialogContent.viewContainerRef);
25
- this.overlayRef.attach(templatePortal);
26
- this.overlayRef.keydownEvents().subscribe((event) => {
27
- if (event.key === 'Escape' || event.code === 'Escape') {
28
- this.close();
29
- }
30
- });
31
- this.overlayRef.backdropClick().subscribe(() => this.close());
32
- }
33
- close() {
34
- if (this.overlayRef) {
35
- this.overlayRef.dispose();
36
- this.overlayRef = null;
37
- }
38
- }
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
40
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogService, providedIn: 'root' }); }
6
+ /**
7
+ * An overlay displayed beneath the alert dialog popup.
8
+ */
9
+ class RdxAlertDialogBackdrop {
10
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogBackdrop, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
11
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogBackdrop, isStandalone: true, selector: "[rdxAlertDialogBackdrop]", exportAs: ["rdxAlertDialogBackdrop"], hostDirectives: [{ directive: i1.RdxDialogBackdrop }], ngImport: i0 }); }
41
12
  }
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogService, decorators: [{
43
- type: Injectable,
13
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogBackdrop, decorators: [{
14
+ type: Directive,
44
15
  args: [{
45
- providedIn: 'root'
16
+ selector: '[rdxAlertDialogBackdrop]',
17
+ exportAs: 'rdxAlertDialogBackdrop',
18
+ hostDirectives: [RdxDialogBackdrop]
46
19
  }]
47
20
  }] });
48
21
 
49
- class RdxAlertDialogCancelDirective {
50
- constructor() {
51
- this.alertDialogService = inject(RdxAlertDialogService);
52
- }
53
- onClick() {
54
- this.alertDialogService.close();
55
- }
56
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogCancelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
57
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogCancelDirective, isStandalone: true, selector: "[rdxAlertDialogCancel]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
22
+ /**
23
+ * A button that closes the alert dialog.
24
+ */
25
+ class RdxAlertDialogClose {
26
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
27
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogClose, isStandalone: true, selector: "button[rdxAlertDialogClose]", exportAs: ["rdxAlertDialogClose"], hostDirectives: [{ directive: i1.RdxDialogClose }], ngImport: i0 }); }
58
28
  }
59
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogCancelDirective, decorators: [{
29
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogClose, decorators: [{
60
30
  type: Directive,
61
31
  args: [{
62
- selector: '[rdxAlertDialogCancel]',
63
- standalone: true,
64
- host: {
65
- '(click)': 'onClick()'
66
- }
32
+ selector: 'button[rdxAlertDialogClose]',
33
+ exportAs: 'rdxAlertDialogClose',
34
+ hostDirectives: [RdxDialogClose]
67
35
  }]
68
36
  }] });
69
37
 
70
- class RdxAlertDialogContentDirective {
71
- constructor() {
72
- this.renderer = inject(Renderer2);
73
- this.elementRef = inject(ElementRef);
74
- }
75
- set maxWidth(value) {
76
- this.renderer.setStyle(this.elementRef.nativeElement, 'maxWidth', value);
77
- }
78
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
79
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogContentDirective, isStandalone: true, selector: "[rdxAlertDialogContent]", inputs: { maxWidth: "maxWidth" }, host: { properties: { "attr.data-state": "\"open\"", "attr.cdkTrapFocusAutoCapture": "true" } }, hostDirectives: [{ directive: i1.CdkTrapFocus }], ngImport: i0 }); }
38
+ /**
39
+ * An accessible description for the alert dialog.
40
+ */
41
+ class RdxAlertDialogDescription {
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
43
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogDescription, isStandalone: true, selector: "[rdxAlertDialogDescription]", exportAs: ["rdxAlertDialogDescription"], hostDirectives: [{ directive: i1.RdxDialogDescription }], ngImport: i0 }); }
80
44
  }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogContentDirective, decorators: [{
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogDescription, decorators: [{
82
46
  type: Directive,
83
47
  args: [{
84
- selector: '[rdxAlertDialogContent]',
85
- standalone: true,
48
+ selector: '[rdxAlertDialogDescription]',
49
+ exportAs: 'rdxAlertDialogDescription',
50
+ hostDirectives: [RdxDialogDescription]
51
+ }]
52
+ }] });
53
+
54
+ /**
55
+ * A container for the alert dialog contents. Wraps the dialog popup, which reads alert semantics
56
+ * (role, modal, dismissal) from the alert root's variant.
57
+ */
58
+ class RdxAlertDialogPopup {
59
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogPopup, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
60
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogPopup, isStandalone: true, selector: "[rdxAlertDialogPopup]", exportAs: ["rdxAlertDialogPopup"], hostDirectives: [{ directive: i1.RdxDialogPopup, outputs: ["escapeKeyDown", "escapeKeyDown", "pointerDownOutside", "pointerDownOutside", "focusOutside", "focusOutside", "interactOutside", "interactOutside", "openAutoFocus", "openAutoFocus", "closeAutoFocus", "closeAutoFocus"] }], ngImport: i0 }); }
61
+ }
62
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogPopup, decorators: [{
63
+ type: Directive,
64
+ args: [{
65
+ selector: '[rdxAlertDialogPopup]',
66
+ exportAs: 'rdxAlertDialogPopup',
86
67
  hostDirectives: [
87
68
  {
88
- directive: CdkTrapFocus
69
+ directive: RdxDialogPopup,
70
+ outputs: [
71
+ 'escapeKeyDown',
72
+ 'pointerDownOutside',
73
+ 'focusOutside',
74
+ 'interactOutside',
75
+ 'openAutoFocus',
76
+ 'closeAutoFocus'
77
+ ]
89
78
  }
90
- ],
91
- host: {
92
- '[attr.data-state]': '"open"',
93
- '[attr.cdkTrapFocusAutoCapture]': 'true'
94
- }
79
+ ]
95
80
  }]
96
- }], propDecorators: { maxWidth: [{
97
- type: Input
98
- }] } });
81
+ }] });
82
+
83
+ /**
84
+ * Moves the alert dialog to a different part of the DOM. Defaults to `document.body`.
85
+ */
86
+ class RdxAlertDialogPortal {
87
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogPortal, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
88
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogPortal, isStandalone: true, selector: "[rdxAlertDialogPortal]", exportAs: ["rdxAlertDialogPortal"], hostDirectives: [{ directive: i1.RdxDialogPortal, inputs: ["container", "container"] }], ngImport: i0 }); }
89
+ }
90
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogPortal, decorators: [{
91
+ type: Directive,
92
+ args: [{
93
+ selector: '[rdxAlertDialogPortal]',
94
+ exportAs: 'rdxAlertDialogPortal',
95
+ hostDirectives: [
96
+ {
97
+ directive: RdxDialogPortal,
98
+ inputs: ['container']
99
+ }
100
+ ]
101
+ }]
102
+ }] });
99
103
 
100
- class RdxAlertDialogRootDirective {
104
+ /**
105
+ * Mounts the portal while the alert dialog is open and waits for CSS exit keyframes before unmounting.
106
+ */
107
+ class RdxAlertDialogPortalPresence {
108
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogPortalPresence, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
109
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogPortalPresence, isStandalone: true, selector: "ng-template[rdxAlertDialogPortalPresence]", hostDirectives: [{ directive: i1.RdxDialogPortalPresence }], ngImport: i0 }); }
110
+ }
111
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogPortalPresence, decorators: [{
112
+ type: Directive,
113
+ args: [{
114
+ selector: 'ng-template[rdxAlertDialogPortalPresence]',
115
+ hostDirectives: [RdxDialogPortalPresence]
116
+ }]
117
+ }] });
118
+
119
+ /**
120
+ * Groups all parts of the alert dialog.
121
+ *
122
+ * Composes the Dialog primitive and forces alert-dialog semantics: it is always modal, never
123
+ * dismisses on outside pointer / focus-out interactions (Escape still closes), and renders its
124
+ * popup with `role="alertdialog"`. Assemble it from the `rdxAlertDialog*` parts (Popup, Backdrop,
125
+ * Title, Description, Close, Portal, Viewport), which are thin wrappers around the dialog parts.
126
+ */
127
+ class RdxAlertDialogRoot {
101
128
  constructor() {
102
- this.viewContainerRef = inject(ViewContainerRef);
103
- this.alertDialogService = inject(RdxAlertDialogService);
129
+ this.dialog = inject(RdxDialogRoot);
130
+ /** Whether the alert dialog is open (read-only mirror of the composed dialog state). */
131
+ this.open = this.dialog.open;
132
+ /** The active trigger's id. */
133
+ this.triggerId = this.dialog.triggerId;
134
+ /** Payload of the active trigger. */
135
+ this.payload = this.dialog.payload;
104
136
  }
105
- set content(template) {
106
- this.alertDialogService.setDialogContent(this.viewContainerRef, template);
107
- }
108
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
109
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogRootDirective, isStandalone: true, selector: "[rdxAlertDialogRoot]", inputs: { content: "content" }, ngImport: i0 }); }
137
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogRoot, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
138
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogRoot, isStandalone: true, selector: "[rdxAlertDialogRoot]", providers: [
139
+ provideRdxDialogVariant({
140
+ role: 'alertdialog',
141
+ forceModal: true,
142
+ forcePointerDismissalDisabled: true
143
+ })
144
+ ], exportAs: ["rdxAlertDialogRoot"], hostDirectives: [{ directive: i1.RdxDialogRoot, inputs: ["open", "open", "defaultOpen", "defaultOpen", "triggerId", "triggerId", "defaultTriggerId", "defaultTriggerId", "handle", "handle"], outputs: ["openChange", "openChange", "triggerIdChange", "triggerIdChange", "onOpenChange", "onOpenChange", "onOpenChangeComplete", "onOpenChangeComplete"] }], ngImport: i0 }); }
110
145
  }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogRootDirective, decorators: [{
146
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogRoot, decorators: [{
112
147
  type: Directive,
113
148
  args: [{
114
149
  selector: '[rdxAlertDialogRoot]',
115
- standalone: true
150
+ exportAs: 'rdxAlertDialogRoot',
151
+ hostDirectives: [
152
+ {
153
+ directive: RdxDialogRoot,
154
+ inputs: ['open', 'defaultOpen', 'triggerId', 'defaultTriggerId', 'handle'],
155
+ outputs: ['openChange', 'triggerIdChange', 'onOpenChange', 'onOpenChangeComplete']
156
+ }
157
+ ],
158
+ providers: [
159
+ provideRdxDialogVariant({
160
+ role: 'alertdialog',
161
+ forceModal: true,
162
+ forcePointerDismissalDisabled: true
163
+ })
164
+ ]
116
165
  }]
117
- }], propDecorators: { content: [{
118
- type: Input
119
- }] } });
166
+ }] });
120
167
 
121
- class RdxAlertDialogTitleDirective {
122
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
123
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogTitleDirective, isStandalone: true, selector: "[rdxAlertDialogTitle]", ngImport: i0 }); }
168
+ /**
169
+ * An accessible title for the alert dialog.
170
+ */
171
+ class RdxAlertDialogTitle {
172
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
173
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogTitle, isStandalone: true, selector: "[rdxAlertDialogTitle]", exportAs: ["rdxAlertDialogTitle"], hostDirectives: [{ directive: i1.RdxDialogTitle }], ngImport: i0 }); }
124
174
  }
125
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogTitleDirective, decorators: [{
175
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogTitle, decorators: [{
126
176
  type: Directive,
127
177
  args: [{
128
178
  selector: '[rdxAlertDialogTitle]',
129
- standalone: true
179
+ exportAs: 'rdxAlertDialogTitle',
180
+ hostDirectives: [RdxDialogTitle]
130
181
  }]
131
182
  }] });
132
183
 
133
- class RdxAlertDialogTriggerDirective {
134
- constructor() {
135
- this.alertDialogService = inject(RdxAlertDialogService);
136
- }
137
- handleClick() {
138
- this.alertDialogService.open();
139
- }
140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
141
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogTriggerDirective, isStandalone: true, selector: "[rdxAlertDialogTrigger]", host: { listeners: { "click": "handleClick()" } }, ngImport: i0 }); }
184
+ /**
185
+ * A button that opens the alert dialog. Behaves exactly like the dialog trigger.
186
+ */
187
+ class RdxAlertDialogTrigger {
188
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
189
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogTrigger, isStandalone: true, selector: "button[rdxAlertDialogTrigger]", exportAs: ["rdxAlertDialogTrigger"], hostDirectives: [{ directive: i1.RdxDialogTrigger, inputs: ["handle", "handle", "payload", "payload", "id", "id", "disabled", "disabled"] }], ngImport: i0 }); }
142
190
  }
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogTriggerDirective, decorators: [{
191
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogTrigger, decorators: [{
144
192
  type: Directive,
145
193
  args: [{
146
- selector: '[rdxAlertDialogTrigger]',
147
- standalone: true,
148
- host: {
149
- '(click)': 'handleClick()'
150
- }
194
+ selector: 'button[rdxAlertDialogTrigger]',
195
+ exportAs: 'rdxAlertDialogTrigger',
196
+ hostDirectives: [
197
+ {
198
+ directive: RdxDialogTrigger,
199
+ inputs: ['handle', 'payload', 'id', 'disabled']
200
+ }
201
+ ]
151
202
  }]
152
203
  }] });
153
204
 
154
- const _imports = [
155
- RdxAlertDialogRootDirective,
156
- RdxAlertDialogContentDirective,
157
- RdxAlertDialogCancelDirective,
158
- RdxAlertDialogTriggerDirective,
159
- RdxAlertDialogTitleDirective
205
+ /**
206
+ * A scrollable positioning container for the alert dialog popup.
207
+ */
208
+ class RdxAlertDialogViewport {
209
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogViewport, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
210
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.9", type: RdxAlertDialogViewport, isStandalone: true, selector: "[rdxAlertDialogViewport]", exportAs: ["rdxAlertDialogViewport"], hostDirectives: [{ directive: i1.RdxDialogViewport }], ngImport: i0 }); }
211
+ }
212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogViewport, decorators: [{
213
+ type: Directive,
214
+ args: [{
215
+ selector: '[rdxAlertDialogViewport]',
216
+ exportAs: 'rdxAlertDialogViewport',
217
+ hostDirectives: [RdxDialogViewport]
218
+ }]
219
+ }] });
220
+
221
+ /**
222
+ * Connects an alert dialog root with trigger elements rendered elsewhere in the DOM.
223
+ *
224
+ * Alert dialogs reuse the dialog handle implementation unchanged.
225
+ */
226
+ const RdxAlertDialogHandle = RdxDialogHandle;
227
+ function createRdxAlertDialogHandle() {
228
+ return createRdxDialogHandle();
229
+ }
230
+
231
+ const alertDialogImports = [
232
+ RdxAlertDialogRoot,
233
+ RdxAlertDialogTrigger,
234
+ RdxAlertDialogPortalPresence,
235
+ RdxAlertDialogPortal,
236
+ RdxAlertDialogBackdrop,
237
+ RdxAlertDialogViewport,
238
+ RdxAlertDialogPopup,
239
+ RdxAlertDialogTitle,
240
+ RdxAlertDialogDescription,
241
+ RdxAlertDialogClose
160
242
  ];
161
243
  class RdxAlertDialogModule {
162
244
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
163
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogModule, imports: [RdxAlertDialogRootDirective,
164
- RdxAlertDialogContentDirective,
165
- RdxAlertDialogCancelDirective,
166
- RdxAlertDialogTriggerDirective,
167
- RdxAlertDialogTitleDirective], exports: [RdxAlertDialogRootDirective,
168
- RdxAlertDialogContentDirective,
169
- RdxAlertDialogCancelDirective,
170
- RdxAlertDialogTriggerDirective,
171
- RdxAlertDialogTitleDirective] }); }
245
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogModule, imports: [RdxAlertDialogRoot,
246
+ RdxAlertDialogTrigger,
247
+ RdxAlertDialogPortalPresence,
248
+ RdxAlertDialogPortal,
249
+ RdxAlertDialogBackdrop,
250
+ RdxAlertDialogViewport,
251
+ RdxAlertDialogPopup,
252
+ RdxAlertDialogTitle,
253
+ RdxAlertDialogDescription,
254
+ RdxAlertDialogClose], exports: [RdxAlertDialogRoot,
255
+ RdxAlertDialogTrigger,
256
+ RdxAlertDialogPortalPresence,
257
+ RdxAlertDialogPortal,
258
+ RdxAlertDialogBackdrop,
259
+ RdxAlertDialogViewport,
260
+ RdxAlertDialogPopup,
261
+ RdxAlertDialogTitle,
262
+ RdxAlertDialogDescription,
263
+ RdxAlertDialogClose] }); }
172
264
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogModule }); }
173
265
  }
174
266
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImport: i0, type: RdxAlertDialogModule, decorators: [{
175
267
  type: NgModule,
176
268
  args: [{
177
- imports: [..._imports],
178
- exports: [..._imports]
269
+ imports: [...alertDialogImports],
270
+ exports: [...alertDialogImports]
179
271
  }]
180
272
  }] });
181
273
 
@@ -183,5 +275,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
183
275
  * Generated bundle index. Do not edit.
184
276
  */
185
277
 
186
- export { RdxAlertDialogCancelDirective, RdxAlertDialogContentDirective, RdxAlertDialogModule, RdxAlertDialogRootDirective, RdxAlertDialogService, RdxAlertDialogTitleDirective, RdxAlertDialogTriggerDirective };
278
+ export { RdxAlertDialogBackdrop, RdxAlertDialogClose, RdxAlertDialogDescription, RdxAlertDialogHandle, RdxAlertDialogModule, RdxAlertDialogPopup, RdxAlertDialogPortal, RdxAlertDialogPortalPresence, RdxAlertDialogRoot, RdxAlertDialogTitle, RdxAlertDialogTrigger, RdxAlertDialogViewport, alertDialogImports, createRdxAlertDialogHandle };
187
279
  //# sourceMappingURL=radix-ng-primitives-alert-dialog.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-alert-dialog.mjs","sources":["../../../packages/primitives/alert-dialog/src/alert-dialog.service.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-cancel.directive.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-content.directive.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-root.directive.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-title.directive.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-trigger.directive.ts","../../../packages/primitives/alert-dialog/index.ts","../../../packages/primitives/alert-dialog/radix-ng-primitives-alert-dialog.ts"],"sourcesContent":["import { Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { TemplatePortal } from '@angular/cdk/portal';\nimport { inject, Injectable, TemplateRef, ViewContainerRef } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class RdxAlertDialogService {\n private overlayRef: OverlayRef | null | undefined;\n private readonly overlay = inject(Overlay);\n\n private dialogContent:\n | {\n viewContainerRef: ViewContainerRef;\n template: TemplateRef<any>;\n }\n | undefined;\n\n setDialogContent(viewContainerRef: ViewContainerRef, template: TemplateRef<any>) {\n this.dialogContent = { viewContainerRef, template };\n }\n\n open() {\n if (!this.dialogContent) {\n throw new Error('Dialog content is not set');\n }\n\n this.overlayRef = this.overlay.create({\n hasBackdrop: true,\n backdropClass: 'cdk-overlay-dark-backdrop',\n positionStrategy: this.overlay.position().global().centerHorizontally().centerVertically()\n });\n\n const templatePortal = new TemplatePortal(this.dialogContent.template, this.dialogContent.viewContainerRef);\n this.overlayRef.attach(templatePortal);\n\n this.overlayRef.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape' || event.code === 'Escape') {\n this.close();\n }\n });\n this.overlayRef.backdropClick().subscribe(() => this.close());\n }\n\n close() {\n if (this.overlayRef) {\n this.overlayRef.dispose();\n this.overlayRef = null;\n }\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { RdxAlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogCancel]',\n standalone: true,\n host: {\n '(click)': 'onClick()'\n }\n})\nexport class RdxAlertDialogCancelDirective {\n private readonly alertDialogService = inject(RdxAlertDialogService);\n\n onClick() {\n this.alertDialogService.close();\n }\n}\n","import { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { Directive, ElementRef, inject, Input, Renderer2 } from '@angular/core';\n\n@Directive({\n selector: '[rdxAlertDialogContent]',\n standalone: true,\n hostDirectives: [\n {\n directive: CdkTrapFocus\n }\n ],\n host: {\n '[attr.data-state]': '\"open\"',\n '[attr.cdkTrapFocusAutoCapture]': 'true'\n }\n})\nexport class RdxAlertDialogContentDirective {\n private readonly renderer = inject(Renderer2);\n private readonly elementRef = inject(ElementRef);\n\n @Input() set maxWidth(value: string) {\n this.renderer.setStyle(this.elementRef.nativeElement, 'maxWidth', value);\n }\n}\n","import { Directive, inject, Input, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { RdxAlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogRoot]',\n standalone: true\n})\nexport class RdxAlertDialogRootDirective {\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly alertDialogService = inject(RdxAlertDialogService);\n\n @Input() set content(template: TemplateRef<any>) {\n this.alertDialogService.setDialogContent(this.viewContainerRef, template);\n }\n}\n","import { Directive } from '@angular/core';\n\n@Directive({\n selector: '[rdxAlertDialogTitle]',\n standalone: true\n})\nexport class RdxAlertDialogTitleDirective {}\n","import { Directive, inject } from '@angular/core';\nimport { RdxAlertDialogService } from './alert-dialog.service';\n\n@Directive({\n selector: '[rdxAlertDialogTrigger]',\n standalone: true,\n host: {\n '(click)': 'handleClick()'\n }\n})\nexport class RdxAlertDialogTriggerDirective {\n private readonly alertDialogService = inject(RdxAlertDialogService);\n\n handleClick() {\n this.alertDialogService.open();\n }\n}\n","import { NgModule } from '@angular/core';\nimport { RdxAlertDialogCancelDirective } from './src/alert-dialog-cancel.directive';\nimport { RdxAlertDialogContentDirective } from './src/alert-dialog-content.directive';\nimport { RdxAlertDialogRootDirective } from './src/alert-dialog-root.directive';\nimport { RdxAlertDialogTitleDirective } from './src/alert-dialog-title.directive';\nimport { RdxAlertDialogTriggerDirective } from './src/alert-dialog-trigger.directive';\n\nexport * from './src/alert-dialog-cancel.directive';\nexport * from './src/alert-dialog-content.directive';\nexport * from './src/alert-dialog-root.directive';\nexport * from './src/alert-dialog-title.directive';\nexport * from './src/alert-dialog-trigger.directive';\n\nexport * from './src/alert-dialog.service';\n\nconst _imports = [\n RdxAlertDialogRootDirective,\n RdxAlertDialogContentDirective,\n RdxAlertDialogCancelDirective,\n RdxAlertDialogTriggerDirective,\n RdxAlertDialogTitleDirective\n];\n\n@NgModule({\n imports: [..._imports],\n exports: [..._imports]\n})\nexport class RdxAlertDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;MAOa,qBAAqB,CAAA;AAHlC,IAAA,WAAA,GAAA;AAKqB,QAAA,IAAA,CAAA,OAA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AC1BD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-alert-dialog.mjs","sources":["../../../packages/primitives/alert-dialog/src/alert-dialog-backdrop.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-close.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-description.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-popup.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-portal.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-portal-presence.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-root.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-title.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-trigger.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-viewport.ts","../../../packages/primitives/alert-dialog/src/alert-dialog-handle.ts","../../../packages/primitives/alert-dialog/index.ts","../../../packages/primitives/alert-dialog/radix-ng-primitives-alert-dialog.ts"],"sourcesContent":["import { Directive } from '@angular/core';\nimport { RdxDialogBackdrop } from '@radix-ng/primitives/dialog';\n\n/**\n * An overlay displayed beneath the alert dialog popup.\n */\n@Directive({\n selector: '[rdxAlertDialogBackdrop]',\n exportAs: 'rdxAlertDialogBackdrop',\n hostDirectives: [RdxDialogBackdrop]\n})\nexport class RdxAlertDialogBackdrop {}\n","import { Directive } from '@angular/core';\nimport { RdxDialogClose } from '@radix-ng/primitives/dialog';\n\n/**\n * A button that closes the alert dialog.\n */\n@Directive({\n selector: 'button[rdxAlertDialogClose]',\n exportAs: 'rdxAlertDialogClose',\n hostDirectives: [RdxDialogClose]\n})\nexport class RdxAlertDialogClose {}\n","import { Directive } from '@angular/core';\nimport { RdxDialogDescription } from '@radix-ng/primitives/dialog';\n\n/**\n * An accessible description for the alert dialog.\n */\n@Directive({\n selector: '[rdxAlertDialogDescription]',\n exportAs: 'rdxAlertDialogDescription',\n hostDirectives: [RdxDialogDescription]\n})\nexport class RdxAlertDialogDescription {}\n","import { Directive } from '@angular/core';\nimport { RdxDialogPopup } from '@radix-ng/primitives/dialog';\n\n/**\n * A container for the alert dialog contents. Wraps the dialog popup, which reads alert semantics\n * (role, modal, dismissal) from the alert root's variant.\n */\n@Directive({\n selector: '[rdxAlertDialogPopup]',\n exportAs: 'rdxAlertDialogPopup',\n hostDirectives: [\n {\n directive: RdxDialogPopup,\n outputs: [\n 'escapeKeyDown',\n 'pointerDownOutside',\n 'focusOutside',\n 'interactOutside',\n 'openAutoFocus',\n 'closeAutoFocus'\n ]\n }\n ]\n})\nexport class RdxAlertDialogPopup {}\n","import { Directive } from '@angular/core';\nimport { RdxDialogPortal } from '@radix-ng/primitives/dialog';\n\n/**\n * Moves the alert dialog to a different part of the DOM. Defaults to `document.body`.\n */\n@Directive({\n selector: '[rdxAlertDialogPortal]',\n exportAs: 'rdxAlertDialogPortal',\n hostDirectives: [\n {\n directive: RdxDialogPortal,\n inputs: ['container']\n }\n ]\n})\nexport class RdxAlertDialogPortal {}\n","import { Directive } from '@angular/core';\nimport { RdxDialogPortalPresence } from '@radix-ng/primitives/dialog';\n\n/**\n * Mounts the portal while the alert dialog is open and waits for CSS exit keyframes before unmounting.\n */\n@Directive({\n selector: 'ng-template[rdxAlertDialogPortalPresence]',\n hostDirectives: [RdxDialogPortalPresence]\n})\nexport class RdxAlertDialogPortalPresence {}\n","import { Directive, inject } from '@angular/core';\nimport { provideRdxDialogVariant, RdxDialogRoot } from '@radix-ng/primitives/dialog';\n\n/**\n * Groups all parts of the alert dialog.\n *\n * Composes the Dialog primitive and forces alert-dialog semantics: it is always modal, never\n * dismisses on outside pointer / focus-out interactions (Escape still closes), and renders its\n * popup with `role=\"alertdialog\"`. Assemble it from the `rdxAlertDialog*` parts (Popup, Backdrop,\n * Title, Description, Close, Portal, Viewport), which are thin wrappers around the dialog parts.\n */\n@Directive({\n selector: '[rdxAlertDialogRoot]',\n exportAs: 'rdxAlertDialogRoot',\n hostDirectives: [\n {\n directive: RdxDialogRoot,\n inputs: ['open', 'defaultOpen', 'triggerId', 'defaultTriggerId', 'handle'],\n outputs: ['openChange', 'triggerIdChange', 'onOpenChange', 'onOpenChangeComplete']\n }\n ],\n providers: [\n provideRdxDialogVariant({\n role: 'alertdialog',\n forceModal: true,\n forcePointerDismissalDisabled: true\n })\n ]\n})\nexport class RdxAlertDialogRoot {\n private readonly dialog = inject(RdxDialogRoot);\n\n /** Whether the alert dialog is open (read-only mirror of the composed dialog state). */\n readonly open = this.dialog.open;\n /** The active trigger's id. */\n readonly triggerId = this.dialog.triggerId;\n /** Payload of the active trigger. */\n readonly payload = this.dialog.payload;\n}\n","import { Directive } from '@angular/core';\nimport { RdxDialogTitle } from '@radix-ng/primitives/dialog';\n\n/**\n * An accessible title for the alert dialog.\n */\n@Directive({\n selector: '[rdxAlertDialogTitle]',\n exportAs: 'rdxAlertDialogTitle',\n hostDirectives: [RdxDialogTitle]\n})\nexport class RdxAlertDialogTitle {}\n","import { Directive } from '@angular/core';\nimport { RdxDialogTrigger } from '@radix-ng/primitives/dialog';\n\n/**\n * A button that opens the alert dialog. Behaves exactly like the dialog trigger.\n */\n@Directive({\n selector: 'button[rdxAlertDialogTrigger]',\n exportAs: 'rdxAlertDialogTrigger',\n hostDirectives: [\n {\n directive: RdxDialogTrigger,\n inputs: ['handle', 'payload', 'id', 'disabled']\n }\n ]\n})\nexport class RdxAlertDialogTrigger {}\n","import { Directive } from '@angular/core';\nimport { RdxDialogViewport } from '@radix-ng/primitives/dialog';\n\n/**\n * A scrollable positioning container for the alert dialog popup.\n */\n@Directive({\n selector: '[rdxAlertDialogViewport]',\n exportAs: 'rdxAlertDialogViewport',\n hostDirectives: [RdxDialogViewport]\n})\nexport class RdxAlertDialogViewport {}\n","import { createRdxDialogHandle, RdxDialogHandle } from '@radix-ng/primitives/dialog';\n\n/**\n * Connects an alert dialog root with trigger elements rendered elsewhere in the DOM.\n *\n * Alert dialogs reuse the dialog handle implementation unchanged.\n */\nexport const RdxAlertDialogHandle = RdxDialogHandle;\nexport type RdxAlertDialogHandle<Payload = unknown> = RdxDialogHandle<Payload>;\n\nexport function createRdxAlertDialogHandle<Payload = unknown>(): RdxAlertDialogHandle<Payload> {\n return createRdxDialogHandle<Payload>();\n}\n","import { NgModule } from '@angular/core';\nimport { RdxAlertDialogBackdrop } from './src/alert-dialog-backdrop';\nimport { RdxAlertDialogClose } from './src/alert-dialog-close';\nimport { RdxAlertDialogDescription } from './src/alert-dialog-description';\nimport { RdxAlertDialogPopup } from './src/alert-dialog-popup';\nimport { RdxAlertDialogPortal } from './src/alert-dialog-portal';\nimport { RdxAlertDialogPortalPresence } from './src/alert-dialog-portal-presence';\nimport { RdxAlertDialogRoot } from './src/alert-dialog-root';\nimport { RdxAlertDialogTitle } from './src/alert-dialog-title';\nimport { RdxAlertDialogTrigger } from './src/alert-dialog-trigger';\nimport { RdxAlertDialogViewport } from './src/alert-dialog-viewport';\n\nexport * from './src/alert-dialog-backdrop';\nexport * from './src/alert-dialog-close';\nexport * from './src/alert-dialog-description';\nexport * from './src/alert-dialog-handle';\nexport * from './src/alert-dialog-popup';\nexport * from './src/alert-dialog-portal';\nexport * from './src/alert-dialog-portal-presence';\nexport * from './src/alert-dialog-root';\nexport * from './src/alert-dialog-title';\nexport * from './src/alert-dialog-trigger';\nexport * from './src/alert-dialog-viewport';\n\nexport const alertDialogImports = [\n RdxAlertDialogRoot,\n RdxAlertDialogTrigger,\n RdxAlertDialogPortalPresence,\n RdxAlertDialogPortal,\n RdxAlertDialogBackdrop,\n RdxAlertDialogViewport,\n RdxAlertDialogPopup,\n RdxAlertDialogTitle,\n RdxAlertDialogDescription,\n RdxAlertDialogClose\n];\n\n@NgModule({\n imports: [...alertDialogImports],\n exports: [...alertDialogImports]\n})\nexport class RdxAlertDialogModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGA;;AAEG;MAMU,sBAAsB,CAAA;8GAAtB,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,C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ps: [], target: i0.ɵɵFactoryTarget.Component }); }
10
10
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.9", type: RdxArrow, isStandalone: true, selector: "rdx-arrow", inputs: { width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: `
11
11
  <ng-content>
12
- <svg [style.width.px]="width()" [style.height.px]="height()" viewBox="0 0 30 10" preserveAspectRatio="none">
13
- <polygon points="0,0 30,0 15,10" />
12
+ <svg
13
+ [style.width.px]="width()"
14
+ [style.height.px]="height()"
15
+ style="display: block"
16
+ viewBox="0 0 30 10"
17
+ preserveAspectRatio="none"
18
+ aria-hidden="true"
19
+ focusable="false"
20
+ >
21
+ <polygon points="0,0 30,0 15,10" fill="currentColor" />
14
22
  </svg>
15
23
  </ng-content>
16
24
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
@@ -22,8 +30,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.9", ngImpor
22
30
  changeDetection: ChangeDetectionStrategy.OnPush,
23
31
  template: `
24
32
  <ng-content>
25
- <svg [style.width.px]="width()" [style.height.px]="height()" viewBox="0 0 30 10" preserveAspectRatio="none">
26
- <polygon points="0,0 30,0 15,10" />
33
+ <svg
34
+ [style.width.px]="width()"
35
+ [style.height.px]="height()"
36
+ style="display: block"
37
+ viewBox="0 0 30 10"
38
+ preserveAspectRatio="none"
39
+ aria-hidden="true"
40
+ focusable="false"
41
+ >
42
+ <polygon points="0,0 30,0 15,10" fill="currentColor" />
27
43
  </svg>
28
44
  </ng-content>
29
45
  `
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-arrow.mjs","sources":["../../../packages/primitives/arrow/src/arrow.ts","../../../packages/primitives/arrow/radix-ng-primitives-arrow.ts"],"sourcesContent":["import { NumberInput } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, input, numberAttribute } from '@angular/core';\n\n@Component({\n selector: 'rdx-arrow',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-content>\n <svg [style.width.px]=\"width()\" [style.height.px]=\"height()\" viewBox=\"0 0 30 10\" preserveAspectRatio=\"none\">\n <polygon points=\"0,0 30,0 15,10\" />\n </svg>\n </ng-content>\n `\n})\nexport class RdxArrow {\n readonly width = input<number, NumberInput>(10, { transform: numberAttribute });\n\n readonly height = input<number, NumberInput>(5, { transform: numberAttribute });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAca,QAAQ,CAAA;AAXrB,IAAA,WAAA,GAAA;QAYa,IAAA,CAAA,KAAK,GAAG,KAAK,CAAsB,EAAE,6EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;QAEtE,IAAA,CAAA,MAAM,GAAG,KAAK,CAAsB,CAAC,8EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAClF,IAAA;8GAJY,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAR,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EARP;;;;;;AAMT,IAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEQ,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAXpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,WAAW;oBACrB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;AAMT,IAAA;AACJ,iBAAA;;;ACbD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-arrow.mjs","sources":["../../../packages/primitives/arrow/src/arrow.ts","../../../packages/primitives/arrow/radix-ng-primitives-arrow.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, input, numberAttribute } from '@angular/core';\nimport { NumberInput } from '@radix-ng/primitives/core';\n\n@Component({\n selector: 'rdx-arrow',\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-content>\n <svg\n [style.width.px]=\"width()\"\n [style.height.px]=\"height()\"\n style=\"display: block\"\n viewBox=\"0 0 30 10\"\n preserveAspectRatio=\"none\"\n aria-hidden=\"true\"\n focusable=\"false\"\n >\n <polygon points=\"0,0 30,0 15,10\" fill=\"currentColor\" />\n </svg>\n </ng-content>\n `\n})\nexport class RdxArrow {\n readonly width = input<number, NumberInput>(10, { transform: numberAttribute });\n\n readonly height = input<number, NumberInput>(5, { transform: numberAttribute });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;MAsBa,QAAQ,CAAA;AAnBrB,IAAA,WAAA,GAAA;QAoBa,IAAA,CAAA,KAAK,GAAG,KAAK,CAAsB,EAAE,6EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;QAEtE,IAAA,CAAA,MAAM,GAAG,KAAK,CAAsB,CAAC,8EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAClF,IAAA;8GAJY,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAR,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,QAAQ,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,WAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,EAAA,iBAAA,EAAA,OAAA,EAAA,UAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,QAAA,EAAA,UAAA,EAAA,QAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAhBP;;;;;;;;;;;;;;AAcT,IAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAEQ,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAnBpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,WAAW;oBACrB,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,QAAQ,EAAE;;;;;;;;;;;;;;AAcT,IAAA;AACJ,iBAAA;;;ACrBD;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"radix-ng-primitives-aspect-ratio.mjs","sources":["../../../packages/primitives/aspect-ratio/src/aspect-ratio.directive.ts","../../../packages/primitives/aspect-ratio/radix-ng-primitives-aspect-ratio.ts"],"sourcesContent":["import { NumberInput } from '@angular/cdk/coercion';\nimport {\n AfterViewInit,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n numberAttribute,\n Renderer2\n} from '@angular/core';\n\n/**\n * Directive to maintain an aspect ratio for an element.\n * The element will have its `padding-bottom` dynamically calculated\n * based on the provided aspect ratio to maintain the desired ratio.\n * The content inside the element will be positioned absolutely.\n * @group Components\n */\n@Directive({\n selector: '[rdxAspectRatio]',\n exportAs: 'rdxAspectRatio',\n standalone: true,\n host: {\n '[style.position]': `'relative'`,\n '[style.width]': `'100%'`,\n '[style.padding-bottom]': 'paddingBottom()'\n }\n})\nexport class RdxAspectRatioDirective implements AfterViewInit {\n private readonly element = inject(ElementRef);\n private readonly renderer = inject(Renderer2);\n\n /**\n * The desired aspect ratio (e.g., 16/9).\n * By default, it is set to 1 (which results in a square, 1:1).\n * @group Props\n * @defaultValue 1\n */\n readonly ratio = input<number, NumberInput>(1, { transform: numberAttribute });\n\n /**\n * Dynamically computed `padding-bottom` style for the element.\n * This value is calculated based on the inverse of the aspect ratio.\n *\n * If the ratio is zero, it defaults to `0%` to avoid division by zero.\n *\n */\n protected readonly paddingBottom = computed(() => {\n const ratioValue = this.ratio();\n return `${ratioValue !== 0 ? (1 / ratioValue) * 100 : 0}%`;\n });\n\n ngAfterViewInit() {\n const content = this.element.nativeElement.firstElementChild;\n if (content) {\n // Set the content to cover the entire element with absolute positioning\n this.renderer.setStyle(content, 'position', 'absolute');\n this.renderer.setStyle(content, 'inset', '0');\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAYA;;;;;;AAMG;MAWU,uBAAuB,CAAA;AAVpC,IAAA,WAAA,GAAA;AAWqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAC5B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAE7C;;;;;AAKG;QACM,IAAA,CAAA,KAAK,GAAG,KA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AAA,CAAA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,gBAAgB;AAC1B,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE;AACF,wBAAA,kBAAkB,EAAE,CAAA,UAAA,CAAY;AAChC,wBAAA,eAAe,EAAE,CAAA,MAAA,CAAQ;AACzB,wBAAA,wBAAwB,EAAE;AAC7B;AACJ,iBAAA;;;AC5BD;;AAEG;;;;"}
1
+ {"version":3,"file":"radix-ng-primitives-aspect-ratio.mjs","sources":["../../../packages/primitives/aspect-ratio/src/aspect-ratio.directive.ts","../../../packages/primitives/aspect-ratio/radix-ng-primitives-aspect-ratio.ts"],"sourcesContent":["import {\n AfterViewInit,\n computed,\n Directive,\n ElementRef,\n inject,\n input,\n numberAttribute,\n Renderer2\n} from '@angular/core';\nimport { NumberInput } from '@radix-ng/primitives/core';\n\n/**\n * Directive to maintain an aspect ratio for an element.\n * The element will have its `padding-bottom` dynamically calculated\n * based on the provided aspect ratio to maintain the desired ratio.\n * The content inside the element will be positioned absolutely.\n * @group Components\n */\n@Directive({\n selector: '[rdxAspectRatio]',\n exportAs: 'rdxAspectRatio',\n standalone: true,\n host: {\n '[style.position]': `'relative'`,\n '[style.width]': `'100%'`,\n '[style.padding-bottom]': 'paddingBottom()'\n }\n})\nexport class RdxAspectRatioDirective implements AfterViewInit {\n private readonly element = inject(ElementRef);\n private readonly renderer = inject(Renderer2);\n\n /**\n * The desired aspect ratio (e.g., 16/9).\n * By default, it is set to 1 (which results in a square, 1:1).\n * @group Props\n * @defaultValue 1\n */\n readonly ratio = input<number, NumberInput>(1, { transform: numberAttribute });\n\n /**\n * Dynamically computed `padding-bottom` style for the element.\n * This value is calculated based on the inverse of the aspect ratio.\n *\n * If the ratio is zero, it defaults to `0%` to avoid division by zero.\n *\n */\n protected readonly paddingBottom = computed(() => {\n const ratioValue = this.ratio();\n return `${ratioValue !== 0 ? (1 / ratioValue) * 100 : 0}%`;\n });\n\n ngAfterViewInit() {\n const content = this.element.nativeElement.firstElementChild;\n if (content) {\n // Set the content to cover the entire element with absolute positioning\n this.renderer.setStyle(content, 'position', 'absolute');\n this.renderer.setStyle(content, 'inset', '0');\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;AAYA;;;;;;AAMG;MAWU,uBAAuB,CAAA;AAVpC,IAAA,WAAA,GAAA;AAWqB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,UAAU,CAAC;AAC5B,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAC,SAAS,CAAC;AAE7C;;;;;AAKG;QACM,IAAA,CAAA,KAAK,GAAG,KAAK,CAAsB,CAAC,6EAAI,SAAS,EAAE,eAAe,EAAA,CAAG;AAE9E;;;;;;AAMG;AACgB,QAAA,IAAA,CAAA,aAAa,GAAG,QAAQ,CAAC,MAAK;AAC7C,YAAA,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,EAAE;AAC/B,YAAA,OAAO,GAAG,UAAU,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,IAAI,GAAG,GAAG,CAAC,GAAG;AAC9D,QAAA,CAAC,oFAAC;AAUL,IAAA;IARG,eAAe,GAAA;QACX,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,iBAAiB;QAC5D,IAAI,OAAO,EAAE;;YAET,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,CAAC;YACvD,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG,CAAC;QACjD;IACJ;8GA/BS,uBAAuB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAvB,uBAAuB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,kBAAA,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