@radix-ng/primitives 0.4.0 → 0.6.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 (181) hide show
  1. package/alert-dialog/README.md +1 -0
  2. package/alert-dialog/index.d.ts +6 -0
  3. package/alert-dialog/src/alert-dialog-cancel.directive.d.ts +7 -0
  4. package/alert-dialog/src/alert-dialog-content.directive.d.ts +8 -0
  5. package/alert-dialog/src/alert-dialog-root.directive.d.ts +9 -0
  6. package/alert-dialog/src/alert-dialog-title.directive.d.ts +5 -0
  7. package/alert-dialog/src/alert-dialog-trigger.directive.d.ts +7 -0
  8. package/alert-dialog/src/alert-dialog.service.d.ts +14 -0
  9. package/avatar/index.d.ts +3 -1
  10. package/avatar/src/avatar-fallback.directive.d.ts +10 -17
  11. package/avatar/src/avatar-image.directive.d.ts +10 -11
  12. package/avatar/src/avatar-root.directive.d.ts +21 -0
  13. package/avatar/src/avatar.config.d.ts +3 -2
  14. package/checkbox/src/checkbox.directive.d.ts +2 -1
  15. package/collapsible/README.md +1 -0
  16. package/collapsible/index.d.ts +3 -0
  17. package/collapsible/src/collapsible-content.directive.d.ts +11 -0
  18. package/collapsible/src/collapsible-root.directive.d.ts +52 -0
  19. package/collapsible/src/collapsible-trigger.directive.d.ts +26 -0
  20. package/esm2022/alert-dialog/index.mjs +7 -0
  21. package/esm2022/alert-dialog/radix-ng-primitives-alert-dialog.mjs +5 -0
  22. package/esm2022/alert-dialog/src/alert-dialog-cancel.directive.mjs +24 -0
  23. package/esm2022/alert-dialog/src/alert-dialog-content.directive.mjs +26 -0
  24. package/esm2022/alert-dialog/src/alert-dialog-root.directive.mjs +24 -0
  25. package/esm2022/alert-dialog/src/alert-dialog-title.directive.mjs +14 -0
  26. package/esm2022/alert-dialog/src/alert-dialog-trigger.directive.mjs +24 -0
  27. package/esm2022/alert-dialog/src/alert-dialog.service.mjs +45 -0
  28. package/esm2022/avatar/index.mjs +2 -2
  29. package/esm2022/avatar/src/avatar-fallback.directive.mjs +23 -30
  30. package/esm2022/avatar/src/avatar-image.directive.mjs +29 -31
  31. package/esm2022/avatar/src/avatar-root.directive.mjs +38 -0
  32. package/esm2022/avatar/src/avatar.config.mjs +2 -2
  33. package/esm2022/checkbox/src/checkbox-indicator.directive.mjs +4 -4
  34. package/esm2022/checkbox/src/checkbox.directive.mjs +4 -4
  35. package/esm2022/collapsible/index.mjs +4 -0
  36. package/esm2022/collapsible/radix-ng-primitives-collapsible.mjs +5 -0
  37. package/esm2022/collapsible/src/collapsible-content.directive.mjs +26 -0
  38. package/esm2022/collapsible/src/collapsible-root.directive.mjs +114 -0
  39. package/esm2022/collapsible/src/collapsible-trigger.directive.mjs +49 -0
  40. package/esm2022/label/index.mjs +2 -2
  41. package/esm2022/label/src/label-root.directive.mjs +48 -0
  42. package/esm2022/progress/index.mjs +2 -2
  43. package/esm2022/progress/src/progress-indicator.directive.mjs +11 -10
  44. package/esm2022/progress/src/progress-root.directive.mjs +71 -0
  45. package/esm2022/radio/index.mjs +2 -4
  46. package/esm2022/radio/src/radio-indicator.directive.mjs +8 -13
  47. package/esm2022/radio/src/radio-item.directive.mjs +27 -42
  48. package/esm2022/radio/src/radio-root.directive.mjs +106 -0
  49. package/esm2022/roving-focus/index.mjs +1 -3
  50. package/esm2022/roving-focus/src/roving-focus-group.directive.mjs +12 -18
  51. package/esm2022/roving-focus/src/roving-focus-item.directive.mjs +21 -26
  52. package/esm2022/separator/src/separator.directive.mjs +12 -17
  53. package/esm2022/switch/index.mjs +2 -3
  54. package/esm2022/switch/src/switch-root.directive.mjs +74 -0
  55. package/esm2022/switch/src/switch-thumb.directive.mjs +10 -12
  56. package/esm2022/toggle/index.mjs +2 -2
  57. package/esm2022/toggle/src/toggle-root.directive.mjs +51 -0
  58. package/esm2022/toggle-group/index.mjs +6 -0
  59. package/esm2022/toggle-group/radix-ng-primitives-toggle-group.mjs +5 -0
  60. package/esm2022/toggle-group/src/toggle-group-button.directive.mjs +79 -0
  61. package/esm2022/toggle-group/src/toggle-group-button.token.mjs +6 -0
  62. package/esm2022/toggle-group/src/toggle-group-multi.directive.mjs +159 -0
  63. package/esm2022/toggle-group/src/toggle-group.directive.mjs +157 -0
  64. package/esm2022/toggle-group/src/toggle-group.token.mjs +6 -0
  65. package/fesm2022/radix-ng-primitives-alert-dialog.mjs +150 -0
  66. package/fesm2022/radix-ng-primitives-alert-dialog.mjs.map +1 -0
  67. package/fesm2022/radix-ng-primitives-avatar.mjs +79 -90
  68. package/fesm2022/radix-ng-primitives-avatar.mjs.map +1 -1
  69. package/fesm2022/radix-ng-primitives-checkbox.mjs +6 -6
  70. package/fesm2022/radix-ng-primitives-checkbox.mjs.map +1 -1
  71. package/fesm2022/radix-ng-primitives-collapsible.mjs +190 -0
  72. package/fesm2022/radix-ng-primitives-collapsible.mjs.map +1 -0
  73. package/fesm2022/radix-ng-primitives-label.mjs +20 -18
  74. package/fesm2022/radix-ng-primitives-label.mjs.map +1 -1
  75. package/fesm2022/radix-ng-primitives-progress.mjs +55 -49
  76. package/fesm2022/radix-ng-primitives-progress.mjs.map +1 -1
  77. package/fesm2022/radix-ng-primitives-radio.mjs +70 -100
  78. package/fesm2022/radix-ng-primitives-radio.mjs.map +1 -1
  79. package/fesm2022/radix-ng-primitives-roving-focus.mjs +22 -44
  80. package/fesm2022/radix-ng-primitives-roving-focus.mjs.map +1 -1
  81. package/fesm2022/radix-ng-primitives-separator.mjs +12 -17
  82. package/fesm2022/radix-ng-primitives-separator.mjs.map +1 -1
  83. package/fesm2022/radix-ng-primitives-switch.mjs +49 -106
  84. package/fesm2022/radix-ng-primitives-switch.mjs.map +1 -1
  85. package/fesm2022/radix-ng-primitives-toggle-group.mjs +397 -0
  86. package/fesm2022/radix-ng-primitives-toggle-group.mjs.map +1 -0
  87. package/fesm2022/radix-ng-primitives-toggle.mjs +15 -29
  88. package/fesm2022/radix-ng-primitives-toggle.mjs.map +1 -1
  89. package/label/index.d.ts +1 -1
  90. package/label/src/label-root.directive.d.ts +13 -0
  91. package/package.json +18 -19
  92. package/progress/index.d.ts +2 -1
  93. package/progress/src/progress-indicator.directive.d.ts +2 -2
  94. package/progress/src/progress-root.directive.d.ts +29 -0
  95. package/radio/index.d.ts +1 -3
  96. package/radio/src/radio-indicator.directive.d.ts +3 -9
  97. package/radio/src/radio-item.directive.d.ts +9 -28
  98. package/radio/src/{radio-group.directive.d.ts → radio-root.directive.d.ts} +24 -16
  99. package/roving-focus/index.d.ts +0 -2
  100. package/roving-focus/src/roving-focus-group.directive.d.ts +5 -7
  101. package/roving-focus/src/roving-focus-item.directive.d.ts +6 -8
  102. package/separator/src/separator.directive.d.ts +14 -8
  103. package/switch/index.d.ts +2 -2
  104. package/switch/src/switch-root.directive.d.ts +35 -0
  105. package/switch/src/switch-thumb.directive.d.ts +2 -5
  106. package/toggle/index.d.ts +2 -1
  107. package/toggle/src/toggle-root.directive.d.ts +32 -0
  108. package/toggle-group/README.md +3 -0
  109. package/toggle-group/index.d.ts +5 -0
  110. package/toggle-group/src/toggle-group-button.directive.d.ts +39 -0
  111. package/toggle-group/src/toggle-group-button.token.d.ts +4 -0
  112. package/toggle-group/src/toggle-group-multi.directive.d.ts +90 -0
  113. package/toggle-group/src/toggle-group.directive.d.ts +90 -0
  114. package/toggle-group/src/toggle-group.token.d.ts +5 -0
  115. package/avatar/src/avatar.directive.d.ts +0 -22
  116. package/avatar/src/avatar.token.d.ts +0 -4
  117. package/esm2022/avatar/src/avatar.directive.mjs +0 -38
  118. package/esm2022/avatar/src/avatar.token.mjs +0 -6
  119. package/esm2022/label/src/label.directive.mjs +0 -46
  120. package/esm2022/overlay/index.mjs +0 -5
  121. package/esm2022/overlay/radix-ng-primitives-overlay.mjs +0 -5
  122. package/esm2022/overlay/src/overlay-arrow.directive.mjs +0 -59
  123. package/esm2022/overlay/src/overlay-arrow.token.mjs +0 -3
  124. package/esm2022/overlay/src/overlay-trigger.directive.mjs +0 -279
  125. package/esm2022/overlay/src/overlay-trigger.token.mjs +0 -9
  126. package/esm2022/overlay/src/overlay.directive.mjs +0 -51
  127. package/esm2022/overlay/src/overlay.token.mjs +0 -3
  128. package/esm2022/progress/src/progress.directive.mjs +0 -62
  129. package/esm2022/progress/src/progress.token.mjs +0 -6
  130. package/esm2022/radio/src/radio-group.directive.mjs +0 -108
  131. package/esm2022/radio/src/radio-group.token.mjs +0 -6
  132. package/esm2022/radio/src/radio-item.token.mjs +0 -6
  133. package/esm2022/roving-focus/src/roving-focus-group.token.mjs +0 -9
  134. package/esm2022/roving-focus/src/roving-focus-item.token.mjs +0 -6
  135. package/esm2022/switch/src/switch.directive.mjs +0 -125
  136. package/esm2022/switch/src/switch.token.mjs +0 -6
  137. package/esm2022/toggle/src/toggle.directive.mjs +0 -65
  138. package/esm2022/tooltip/index.mjs +0 -5
  139. package/esm2022/tooltip/radix-ng-primitives-tooltip.mjs +0 -5
  140. package/esm2022/tooltip/src/tooltip-arrow.directive.mjs +0 -17
  141. package/esm2022/tooltip/src/tooltip-trigger.directive.mjs +0 -148
  142. package/esm2022/tooltip/src/tooltip-trigger.token.mjs +0 -6
  143. package/esm2022/tooltip/src/tooltip.config.mjs +0 -31
  144. package/esm2022/tooltip/src/tooltip.directive.mjs +0 -46
  145. package/esm2022/visually-hidden/index.mjs +0 -2
  146. package/esm2022/visually-hidden/radix-ng-primitives-visually-hidden.mjs +0 -5
  147. package/esm2022/visually-hidden/src/visually-hidden.directive.mjs +0 -42
  148. package/fesm2022/radix-ng-primitives-overlay.mjs +0 -399
  149. package/fesm2022/radix-ng-primitives-overlay.mjs.map +0 -1
  150. package/fesm2022/radix-ng-primitives-tooltip.mjs +0 -242
  151. package/fesm2022/radix-ng-primitives-tooltip.mjs.map +0 -1
  152. package/fesm2022/radix-ng-primitives-visually-hidden.mjs +0 -49
  153. package/fesm2022/radix-ng-primitives-visually-hidden.mjs.map +0 -1
  154. package/label/src/label.directive.d.ts +0 -14
  155. package/overlay/README.md +0 -1
  156. package/overlay/index.d.ts +0 -4
  157. package/overlay/src/overlay-arrow.directive.d.ts +0 -29
  158. package/overlay/src/overlay-arrow.token.d.ts +0 -3
  159. package/overlay/src/overlay-trigger.directive.d.ts +0 -163
  160. package/overlay/src/overlay-trigger.token.d.ts +0 -7
  161. package/overlay/src/overlay.directive.d.ts +0 -29
  162. package/overlay/src/overlay.token.d.ts +0 -3
  163. package/progress/src/progress.directive.d.ts +0 -26
  164. package/progress/src/progress.token.d.ts +0 -4
  165. package/radio/src/radio-group.token.d.ts +0 -4
  166. package/radio/src/radio-item.token.d.ts +0 -4
  167. package/roving-focus/src/roving-focus-group.token.d.ts +0 -7
  168. package/roving-focus/src/roving-focus-item.token.d.ts +0 -4
  169. package/switch/src/switch.directive.d.ts +0 -73
  170. package/switch/src/switch.token.d.ts +0 -4
  171. package/toggle/src/toggle.directive.d.ts +0 -30
  172. package/tooltip/README.md +0 -1
  173. package/tooltip/index.d.ts +0 -4
  174. package/tooltip/src/tooltip-arrow.directive.d.ts +0 -6
  175. package/tooltip/src/tooltip-trigger.directive.d.ts +0 -79
  176. package/tooltip/src/tooltip-trigger.token.d.ts +0 -4
  177. package/tooltip/src/tooltip.config.d.ts +0 -46
  178. package/tooltip/src/tooltip.directive.d.ts +0 -17
  179. package/visually-hidden/README.md +0 -3
  180. package/visually-hidden/index.d.ts +0 -1
  181. package/visually-hidden/src/visually-hidden.directive.d.ts +0 -11
@@ -0,0 +1 @@
1
+ # @radix-ng/primitives/alert-dialog
@@ -0,0 +1,6 @@
1
+ export * from './src/alert-dialog-root.directive';
2
+ export * from './src/alert-dialog-cancel.directive';
3
+ export * from './src/alert-dialog-content.directive';
4
+ export * from './src/alert-dialog-trigger.directive';
5
+ export * from './src/alert-dialog-title.directive';
6
+ export * from './src/alert-dialog.service';
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AlertDialogCancelDirective {
3
+ private readonly alertDialogService;
4
+ onClick(): void;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogCancelDirective, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogCancelDirective, "[rdxAlertDialogCancel]", never, {}, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AlertDialogContentDirective {
3
+ private readonly renderer;
4
+ private readonly elementRef;
5
+ set maxWidth(value: string);
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogContentDirective, never>;
7
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogContentDirective, "[rdxAlertDialogContent]", never, { "maxWidth": { "alias": "maxWidth"; "required": false; }; }, {}, never, never, true, never>;
8
+ }
@@ -0,0 +1,9 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AlertDialogRootDirective {
4
+ private readonly viewContainerRef;
5
+ private readonly alertDialogService;
6
+ set content(template: TemplateRef<any>);
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogRootDirective, never>;
8
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogRootDirective, "[rdxAlertDialogRoot]", never, { "content": { "alias": "content"; "required": false; }; }, {}, never, never, true, never>;
9
+ }
@@ -0,0 +1,5 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AlertDialogTitleDirective {
3
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogTitleDirective, never>;
4
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogTitleDirective, "[rdxAlertDialogTitle]", never, {}, {}, never, never, true, never>;
5
+ }
@@ -0,0 +1,7 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare class AlertDialogTriggerDirective {
3
+ private readonly alertDialogService;
4
+ handleClick(): void;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogTriggerDirective, never>;
6
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AlertDialogTriggerDirective, "[rdxAlertDialogTrigger]", never, {}, {}, never, never, true, never>;
7
+ }
@@ -0,0 +1,14 @@
1
+ import { Overlay } from '@angular/cdk/overlay';
2
+ import { TemplateRef, ViewContainerRef } from '@angular/core';
3
+ import * as i0 from "@angular/core";
4
+ export declare class AlertDialogService {
5
+ private overlay;
6
+ private overlayRef;
7
+ private dialogContent;
8
+ constructor(overlay: Overlay);
9
+ setDialogContent(viewContainerRef: ViewContainerRef, template: TemplateRef<any>): void;
10
+ open(): void;
11
+ close(): void;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<AlertDialogService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<AlertDialogService>;
14
+ }
package/avatar/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export * from './src/avatar-fallback.directive';
2
2
  export * from './src/avatar-image.directive';
3
- export * from './src/avatar.directive';
3
+ export * from './src/avatar-root.directive';
4
4
  export * from './src/avatar.config';
5
+ export type { AvatarImageProps } from './src/avatar-image.directive';
6
+ export type { AvatarFallbackProps } from './src/avatar-fallback.directive';
@@ -1,34 +1,27 @@
1
1
  import { OnDestroy, OnInit } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export declare class RdxAvatarFallbackDirective implements OnInit, OnDestroy {
4
- /**
5
- * Access the avatar
6
- */
3
+ export interface AvatarFallbackProps {
4
+ delayMs?: number;
5
+ }
6
+ export declare class RdxAvatarFallbackDirective implements AvatarFallbackProps, OnInit, OnDestroy {
7
7
  private readonly avatar;
8
- /**
9
- * Access the global configuration.
10
- */
11
8
  private readonly config;
9
+ private readonly ngZone;
12
10
  /**
13
- * Define a delay before the fallback is shown. This is useful to only show the fallback for those with slower connections.
11
+ * Define a delay before the fallback is shown.
12
+ * This is useful to only show the fallback for those with slower connections.
14
13
  * @default 0
15
14
  */
16
- delay: number;
17
- /**
18
- * Determine if this element should be hidden.
19
- */
15
+ delayMs: number;
20
16
  protected get visible(): boolean;
21
17
  /**
22
18
  * Determine the delay has elapsed, and we can show the fallback.
23
19
  */
24
20
  private delayElapsed;
25
- /**
26
- * Store the timeout id.
27
- */
28
21
  private timeoutId;
29
22
  ngOnInit(): void;
30
23
  ngOnDestroy(): void;
31
24
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxAvatarFallbackDirective, never>;
32
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarFallbackDirective, "[rdxAvatarFallback]", never, { "delay": { "alias": "rdxAvatarFallbackDelay"; "required": false; }; }, {}, never, never, true, never>;
33
- static ngAcceptInputType_delay: unknown;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarFallbackDirective, "span[AvatarFallback]", ["AvatarFallback"], { "delayMs": { "alias": "rdxDelayMs"; "required": false; }; }, {}, never, never, true, never>;
26
+ static ngAcceptInputType_delayMs: unknown;
34
27
  }
@@ -1,17 +1,16 @@
1
- import { OnInit } from '@angular/core';
1
+ import { EventEmitter, OnInit } from '@angular/core';
2
+ import { ImageLoadingStatus } from './avatar-root.directive';
2
3
  import * as i0 from "@angular/core";
3
- export declare class RdxAvatarImageDirective implements OnInit {
4
- /**
5
- * Access the avatar
6
- */
4
+ export interface AvatarImageProps {
5
+ onLoadingStatusChange?: EventEmitter<ImageLoadingStatus>;
6
+ }
7
+ export declare class RdxAvatarImageDirective implements AvatarImageProps, OnInit {
7
8
  private readonly avatar;
8
- /**
9
- * Access the image element ref.
10
- */
11
9
  private readonly elementRef;
10
+ onLoadingStatusChange: EventEmitter<ImageLoadingStatus>;
12
11
  ngOnInit(): void;
13
- protected onLoad(): void;
14
- protected onError(): void;
12
+ _onLoad(): void;
13
+ _onError(): void;
15
14
  static ɵfac: i0.ɵɵFactoryDeclaration<RdxAvatarImageDirective, never>;
16
- static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarImageDirective, "img[rdxAvatarImage]", never, {}, {}, never, never, true, never>;
15
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarImageDirective, "img[AvatarImage]", ["AvatarImage"], {}, { "onLoadingStatusChange": "onLoadingStatusChange"; }, never, never, true, never>;
17
16
  }
@@ -0,0 +1,21 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare function injectAvatar(): RdxAvatarRootDirective;
3
+ export type ImageLoadingStatus = 'idle' | 'loading' | 'loaded' | 'error';
4
+ export declare class RdxAvatarRootDirective {
5
+ /**
6
+ * A readonly signal property that holds the current state of image loading.
7
+ * To set a new status, use the `setState` method of the component.
8
+ * @internal
9
+ */
10
+ readonly _state: import("@angular/core").WritableSignal<ImageLoadingStatus>;
11
+ /**
12
+ * Set the avatar state.
13
+ * @param state The new image loading status to set. This value should be one of the predefined states
14
+ * in the `ImageLoadingStatus`
15
+ * @returns void This method does not return a value.
16
+ * @internal
17
+ */
18
+ _setState(state: ImageLoadingStatus): void;
19
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxAvatarRootDirective, never>;
20
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxAvatarRootDirective, "span[AvatarRoot]", ["AvatarRoot"], {}, {}, never, never, true, never>;
21
+ }
@@ -1,10 +1,11 @@
1
1
  import { InjectionToken, Provider } from '@angular/core';
2
2
  export interface RdxAvatarConfig {
3
3
  /**
4
- * Define a delay before the fallback is shown. This is useful to only show the fallback for those with slower connections.
4
+ * Define a delay before the fallback is shown.
5
+ * This is useful to only show the fallback for those with slower connections.
5
6
  * @default 0
6
7
  */
7
- delay: number;
8
+ delayMs: number;
8
9
  }
9
10
  export declare const defaultAvatarConfig: RdxAvatarConfig;
10
11
  export declare const RdxAvatarConfigToken: InjectionToken<RdxAvatarConfig>;
@@ -1,6 +1,7 @@
1
1
  import { EventEmitter } from '@angular/core';
2
2
  import { ControlValueAccessor } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
+ export type CheckboxState = 'unchecked' | 'checked' | 'indeterminate';
4
5
  export declare class RdxCheckboxDirective implements ControlValueAccessor {
5
6
  /**
6
7
  * Defines whether the checkbox is checked.
@@ -25,7 +26,7 @@ export declare class RdxCheckboxDirective implements ControlValueAccessor {
25
26
  /**
26
27
  * Determine the state
27
28
  */
28
- get state(): 'checked' | 'unchecked' | 'indeterminate';
29
+ get state(): CheckboxState;
29
30
  /**
30
31
  * Store the callback function that should be called when the checkbox checked state changes.
31
32
  * @internal
@@ -0,0 +1 @@
1
+ # @radix-ng/primitives/collapsible
@@ -0,0 +1,3 @@
1
+ export * from './src/collapsible-root.directive';
2
+ export * from './src/collapsible-trigger.directive';
3
+ export * from './src/collapsible-content.directive';
@@ -0,0 +1,11 @@
1
+ import { ElementRef, InjectionToken } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare const RdxCollapsibleContentToken: InjectionToken<RdxCollapsibleContentDirective>;
4
+ export declare class RdxCollapsibleContentDirective {
5
+ /**
6
+ * Reference to CollapsibleContent host element
7
+ */
8
+ elementRef: ElementRef<HTMLElement>;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxCollapsibleContentDirective, never>;
10
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxCollapsibleContentDirective, "[CollapsibleContent]", never, {}, {}, never, never, true, never>;
11
+ }
@@ -0,0 +1,52 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare function injectCollapsible(): RdxCollapsibleRootDirective;
4
+ export type RdxCollapsibleState = 'open' | 'closed';
5
+ export declare class RdxCollapsibleRootDirective {
6
+ /**
7
+ * Reference to RdxCollapsibleContent directive
8
+ * @private
9
+ * @ignore
10
+ */
11
+ private readonly contentDirective;
12
+ /**
13
+ * Stores collapsible state
14
+ * @private
15
+ * @ignore
16
+ */
17
+ private _open;
18
+ /**
19
+ * Determines whether a directive is available for interaction
20
+ */
21
+ disabled: boolean;
22
+ /**
23
+ * Sets the state of the directive. `true` - expanded, `false` - collapsed
24
+ * @param {boolean} value
25
+ */
26
+ set open(value: boolean);
27
+ /**
28
+ * Emitted with new value when directive state changed
29
+ */
30
+ openChange: EventEmitter<boolean>;
31
+ /**
32
+ * Allows to change directive state
33
+ * @param {boolean | undefined} value
34
+ */
35
+ setOpen(value?: boolean): void;
36
+ /**
37
+ * Returns directive state (open | closed)
38
+ */
39
+ getState(): RdxCollapsibleState;
40
+ /**
41
+ * Returns current directive state
42
+ */
43
+ isOpen(): boolean;
44
+ /**
45
+ * Controls visibility of content
46
+ * @private
47
+ * @ignore
48
+ */
49
+ private setPresence;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxCollapsibleRootDirective, never>;
51
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxCollapsibleRootDirective, "[CollapsibleRoot]", ["collapsibleRoot"], { "disabled": { "alias": "disabled"; "required": false; }; "open": { "alias": "open"; "required": false; }; }, { "openChange": "openChange"; }, ["contentDirective"], never, true, never>;
52
+ }
@@ -0,0 +1,26 @@
1
+ import { RdxCollapsibleState } from './collapsible-root.directive';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RdxCollapsibleTriggerDirective {
4
+ /**
5
+ * Reference to CollapsibleRoot
6
+ * @private
7
+ * @ignore
8
+ */
9
+ private readonly collapsible;
10
+ /**
11
+ * Called on trigger clicked
12
+ */
13
+ onOpenToggle(): void;
14
+ /**
15
+ * Returns current directive state (open | closed)
16
+ * @ignore
17
+ */
18
+ getState(): RdxCollapsibleState;
19
+ /**
20
+ * Returns current trigger state
21
+ * @ignore
22
+ */
23
+ getDisabled(): string | undefined;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<RdxCollapsibleTriggerDirective, never>;
25
+ static ɵdir: i0.ɵɵDirectiveDeclaration<RdxCollapsibleTriggerDirective, "[CollapsibleTrigger]", never, {}, {}, never, never, true, never>;
26
+ }
@@ -0,0 +1,7 @@
1
+ export * from './src/alert-dialog-root.directive';
2
+ export * from './src/alert-dialog-cancel.directive';
3
+ export * from './src/alert-dialog-content.directive';
4
+ export * from './src/alert-dialog-trigger.directive';
5
+ export * from './src/alert-dialog-title.directive';
6
+ export * from './src/alert-dialog.service';
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2FsZXJ0LWRpYWxvZy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLG1DQUFtQyxDQUFDO0FBQ2xELGNBQWMscUNBQXFDLENBQUM7QUFDcEQsY0FBYyxzQ0FBc0MsQ0FBQztBQUNyRCxjQUFjLHNDQUFzQyxDQUFDO0FBQ3JELGNBQWMsb0NBQW9DLENBQUM7QUFFbkQsY0FBYyw0QkFBNEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCAqIGZyb20gJy4vc3JjL2FsZXJ0LWRpYWxvZy1yb290LmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9hbGVydC1kaWFsb2ctY2FuY2VsLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9hbGVydC1kaWFsb2ctY29udGVudC5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvYWxlcnQtZGlhbG9nLXRyaWdnZXIuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2FsZXJ0LWRpYWxvZy10aXRsZS5kaXJlY3RpdmUnO1xuXG5leHBvcnQgKiBmcm9tICcuL3NyYy9hbGVydC1kaWFsb2cuc2VydmljZSc7XG4iXX0=
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmFkaXgtbmctcHJpbWl0aXZlcy1hbGVydC1kaWFsb2cuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2FsZXJ0LWRpYWxvZy9yYWRpeC1uZy1wcmltaXRpdmVzLWFsZXJ0LWRpYWxvZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUVILGNBQWMsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBHZW5lcmF0ZWQgYnVuZGxlIGluZGV4LiBEbyBub3QgZWRpdC5cbiAqL1xuXG5leHBvcnQgKiBmcm9tICcuL2luZGV4JztcbiJdfQ==
@@ -0,0 +1,24 @@
1
+ import { Directive, inject } from '@angular/core';
2
+ import { AlertDialogService } from './alert-dialog.service';
3
+ import * as i0 from "@angular/core";
4
+ export class AlertDialogCancelDirective {
5
+ constructor() {
6
+ this.alertDialogService = inject(AlertDialogService);
7
+ }
8
+ onClick() {
9
+ this.alertDialogService.close();
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogCancelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: AlertDialogCancelDirective, isStandalone: true, selector: "[rdxAlertDialogCancel]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 }); }
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogCancelDirective, decorators: [{
15
+ type: Directive,
16
+ args: [{
17
+ selector: '[rdxAlertDialogCancel]',
18
+ standalone: true,
19
+ host: {
20
+ '(click)': 'onClick()'
21
+ }
22
+ }]
23
+ }] });
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLWNhbmNlbC5kaXJlY3RpdmUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2FsZXJ0LWRpYWxvZy9zcmMv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b2dTZXJ2aWNlID0gaW5qZWN0KEFsZXJ0RGlhbG9nU2VydmljZSk7XG5cbiAgICBvbkNsaWNrKCkge1xuICAgICAgICB0aGlzLmFsZXJ0RGlhbG9nU2VydmljZS5jbG9zZSgpO1xuICAgIH1cbn1cbiJdfQ==
@@ -0,0 +1,26 @@
1
+ import { Directive, ElementRef, inject, Input, Renderer2 } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class AlertDialogContentDirective {
4
+ constructor() {
5
+ this.renderer = inject(Renderer2);
6
+ this.elementRef = inject(ElementRef);
7
+ }
8
+ set maxWidth(value) {
9
+ this.renderer.setStyle(this.elementRef.nativeElement, 'maxWidth', value);
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: AlertDialogContentDirective, isStandalone: true, selector: "[rdxAlertDialogContent]", inputs: { maxWidth: "maxWidth" }, host: { properties: { "attr.data-state": "open" } }, ngImport: i0 }); }
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogContentDirective, decorators: [{
15
+ type: Directive,
16
+ args: [{
17
+ selector: '[rdxAlertDialogContent]',
18
+ standalone: true,
19
+ host: {
20
+ '[attr.data-state]': 'open'
21
+ }
22
+ }]
23
+ }], propDecorators: { maxWidth: [{
24
+ type: Input
25
+ }] } });
26
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLWNvbnRlbnQuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcHJpbWl0aXZlcy9hbGVydC1kaWFsb2cvc3JjL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3RhdGVdJzogJ29wZW4nXG4gICAgfVxufSlcbmV4cG9ydCBjbGFzcyBBbGVydERpYWxvZ0NvbnRlbnREaXJlY3RpdmUge1xuICAgIHByaXZhdGUgcmVhZG9ubHkgcmVuZGVyZXIgPSBpbmplY3QoUmVuZGVyZXIyKTtcbiAgICBwcml2YXRlIHJlYWRvbmx5IGVsZW1lbnRSZWYgPSBpbmplY3QoRWxlbWVudFJlZik7XG5cbiAgICBASW5wdXQoKSBzZXQgbWF4V2lkdGgodmFsdWU6IHN0cmluZykge1xuICAgICAgICB0aGlzLnJlbmRlcmVyLnNldFN0eWxlKHRoaXMuZWxlbWVudFJlZi5uYXRpdmVFbGVtZW50LCAnbWF4V2lkdGgnLCB2YWx1ZSk7XG4gICAgfVxufVxuIl19
@@ -0,0 +1,24 @@
1
+ import { Directive, inject, Input, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { AlertDialogService } from './alert-dialog.service';
3
+ import * as i0 from "@angular/core";
4
+ export class AlertDialogRootDirective {
5
+ constructor() {
6
+ this.viewContainerRef = inject(ViewContainerRef);
7
+ this.alertDialogService = inject(AlertDialogService);
8
+ }
9
+ set content(template) {
10
+ this.alertDialogService.setDialogContent(this.viewContainerRef, template);
11
+ }
12
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogRootDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
13
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: AlertDialogRootDirective, isStandalone: true, selector: "[rdxAlertDialogRoot]", inputs: { content: "content" }, ngImport: i0 }); }
14
+ }
15
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogRootDirective, decorators: [{
16
+ type: Directive,
17
+ args: [{
18
+ selector: '[rdxAlertDialogRoot]',
19
+ standalone: true
20
+ }]
21
+ }], propDecorators: { content: [{
22
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dGVSZWYsIFZpZXdDb250YWluZXJSZWYgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcblxuaW1wb3J0IHsgQWxlcnREaWFsb2dTZXJ2aWNlIH0gZnJvbSAnLi9hbGVydC1kaWFsb2cuc2VydmljZSc7XG5cbkBEaXJlY3RpdmUoe1xuICAgIHNlbGVjdG9yOiAnW3JkeEFsZXJ0RGlhbG9nUm9vdF0nLFxuICAgIHN0YW5kYWxvbmU6IHRydWVcbn0pXG5leHBvcnQgY2xhc3MgQWxlcnREaWFsb2dSb290RGlyZWN0aXZlIHtcbiAgICBwcml2YXRlIHJlYWRvbmx5IHZpZXdDb250YWluZXJSZWYgPSBpbmplY3QoVmlld0NvbnRhaW5lclJlZik7XG4gICAgcHJpdmF0ZSByZWFkb25seSBhbGVydERpYWxvZ1NlcnZpY2UgPSBpbmplY3QoQWxlcnREaWFsb2dTZXJ2aWNlKTtcblxuICAgIEBJbnB1dCgpIHNldCBjb250ZW50KHRlbXBsYXRlOiBUZW1wbGF0ZVJlZjxhbnk+KSB7XG4gICAgICAgIHRoaXMuYWxlcnREaWFsb2dTZXJ2aWNlLnNldERpYWxvZ0NvbnRlbnQodGhpcy52aWV3Q29udGFpbmVyUmVmLCB0ZW1wbGF0ZSk7XG4gICAgfVxufVxuIl19
@@ -0,0 +1,14 @@
1
+ import { Directive } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class AlertDialogTitleDirective {
4
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
5
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: AlertDialogTitleDirective, isStandalone: true, selector: "[rdxAlertDialogTitle]", ngImport: i0 }); }
6
+ }
7
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogTitleDirective, decorators: [{
8
+ type: Directive,
9
+ args: [{
10
+ selector: '[rdxAlertDialogTitle]',
11
+ standalone: true
12
+ }]
13
+ }] });
14
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLXRpdGxlLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3BhY2thZ2VzL3ByaW1pdGl2ZXMvYWxlcnQtZGlhbG9nL3NyYy9hbGVydC1kaWFsb2ctdGl0bGUuZGlyZWN0aXZlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxlQUFlLENBQUM7O0FBTTFDLE1BQU0sT0FBTyx5QkFBeUI7K0dBQXpCLHlCQUF5QjttR0FBekIseUJBQXlCOzs0RkFBekIseUJBQXlCO2tCQUpyQyxTQUFTO21CQUFDO29CQUNQLFFBQVEsRUFBRSx1QkFBdUI7b0JBQ2pDLFVBQVUsRUFBRSxJQUFJO2lCQUNuQiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpcmVjdGl2ZSB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5ARGlyZWN0aXZlKHtcbiAgICBzZWxlY3RvcjogJ1tyZHhBbGVydERpYWxvZ1RpdGxlXScsXG4gICAgc3RhbmRhbG9uZTogdHJ1ZVxufSlcbmV4cG9ydCBjbGFzcyBBbGVydERpYWxvZ1RpdGxlRGlyZWN0aXZlIHt9XG4iXX0=
@@ -0,0 +1,24 @@
1
+ import { Directive, inject } from '@angular/core';
2
+ import { AlertDialogService } from './alert-dialog.service';
3
+ import * as i0 from "@angular/core";
4
+ export class AlertDialogTriggerDirective {
5
+ constructor() {
6
+ this.alertDialogService = inject(AlertDialogService);
7
+ }
8
+ handleClick() {
9
+ this.alertDialogService.open();
10
+ }
11
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
12
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.11", type: AlertDialogTriggerDirective, isStandalone: true, selector: "[rdxAlertDialogTrigger]", host: { listeners: { "click": "handleClick()" } }, ngImport: i0 }); }
13
+ }
14
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogTriggerDirective, decorators: [{
15
+ type: Directive,
16
+ args: [{
17
+ selector: '[rdxAlertDialogTrigger]',
18
+ standalone: true,
19
+ host: {
20
+ '(click)': 'handleClick()'
21
+ }
22
+ }]
23
+ }] });
24
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLXRyaWdnZXIuZGlyZWN0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcGFja2FnZXMvcHJpbWl0aXZlcy9hbGVydC1kaWFsb2cvc3JjL2FsZXJ0LWRpYWxvZy10cmlnZ2VyLmRpcmVjdGl2ZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUVsRCxPQUFPLEVBQUUsa0JBQWtCLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQzs7QUFTNUQsTUFBTSxPQUFPLDJCQUEyQjtJQVB4QztRQVFxQix1QkFBa0IsR0FBRyxNQUFNLENBQUMsa0JBQWtCLENBQUMsQ0FBQztLQUtwRTtJQUhHLFdBQVc7UUFDUCxJQUFJLENBQUMsa0JBQWtCLENBQUMsSUFBSSxFQUFFLENBQUM7SUFDbkMsQ0FBQzsrR0FMUSwyQkFBMkI7bUdBQTNCLDJCQUEyQjs7NEZBQTNCLDJCQUEyQjtrQkFQdkMsU0FBUzttQkFBQztvQkFDUCxRQUFRLEVBQUUseUJBQXlCO29CQUNuQyxVQUFVLEVBQUUsSUFBSTtvQkFDaEIsSUFBSSxFQUFFO3dCQUNGLFNBQVMsRUFBRSxlQUFlO3FCQUM3QjtpQkFDSiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IERpcmVjdGl2ZSwgaW5qZWN0IH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmltcG9ydCB7IEFsZXJ0RGlhbG9nU2VydmljZSB9IGZyb20gJy4vYWxlcnQtZGlhbG9nLnNlcnZpY2UnO1xuXG5ARGlyZWN0aXZlKHtcbiAgICBzZWxlY3RvcjogJ1tyZHhBbGVydERpYWxvZ1RyaWdnZXJdJyxcbiAgICBzdGFuZGFsb25lOiB0cnVlLFxuICAgIGhvc3Q6IHtcbiAgICAgICAgJyhjbGljayknOiAnaGFuZGxlQ2xpY2soKSdcbiAgICB9XG59KVxuZXhwb3J0IGNsYXNzIEFsZXJ0RGlhbG9nVHJpZ2dlckRpcmVjdGl2ZSB7XG4gICAgcHJpdmF0ZSByZWFkb25seSBhbGVydERpYWxvZ1NlcnZpY2UgPSBpbmplY3QoQWxlcnREaWFsb2dTZXJ2aWNlKTtcblxuICAgIGhhbmRsZUNsaWNrKCkge1xuICAgICAgICB0aGlzLmFsZXJ0RGlhbG9nU2VydmljZS5vcGVuKCk7XG4gICAgfVxufVxuIl19
@@ -0,0 +1,45 @@
1
+ import { Overlay } from '@angular/cdk/overlay';
2
+ import { TemplatePortal } from '@angular/cdk/portal';
3
+ import { Injectable } from '@angular/core';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/cdk/overlay";
6
+ export class AlertDialogService {
7
+ constructor(overlay) {
8
+ this.overlay = overlay;
9
+ }
10
+ setDialogContent(viewContainerRef, template) {
11
+ this.dialogContent = { viewContainerRef, template };
12
+ }
13
+ open() {
14
+ if (!this.dialogContent) {
15
+ throw new Error('Dialog content is not set');
16
+ }
17
+ this.overlayRef = this.overlay.create({
18
+ hasBackdrop: true,
19
+ backdropClass: 'cdk-overlay-dark-backdrop',
20
+ positionStrategy: this.overlay
21
+ .position()
22
+ .global()
23
+ .centerHorizontally()
24
+ .centerVertically()
25
+ });
26
+ const templatePortal = new TemplatePortal(this.dialogContent.template, this.dialogContent.viewContainerRef);
27
+ this.overlayRef.attach(templatePortal);
28
+ this.overlayRef.backdropClick().subscribe(() => this.close());
29
+ }
30
+ close() {
31
+ if (this.overlayRef) {
32
+ this.overlayRef.dispose();
33
+ this.overlayRef = null;
34
+ }
35
+ }
36
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
37
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogService, providedIn: 'root' }); }
38
+ }
39
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.11", ngImport: i0, type: AlertDialogService, decorators: [{
40
+ type: Injectable,
41
+ args: [{
42
+ providedIn: 'root'
43
+ }]
44
+ }], ctorParameters: () => [{ type: i1.Overlay }] });
45
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxlcnQtZGlhbG9nLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2FsZXJ0LWRpYWxvZy9zcmMvYWxlcnQtZGlhbG9nLnNlcnZpY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLE9BQU8sRUFBYyxNQUFNLHNCQUFzQixDQUFDO0FBQzNELE9BQU8sRUFBRSxjQUF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iAgICBjb25zdHJ1Y3Rvcihwcml2YXRlIG92ZXJsYXk6IE92ZXJsYXkpIHt9XG5cbiAgICBzZXREaWFsb2dDb250ZW50KHZpZXdDb250YWluZXJSZWY6IFZpZXdDb250YWluZXJSZWYsIHRlbXBsYXRlOiBUZW1wbGF0ZVJlZjxhbnk+KSB7XG4gICAgICAgIHRoaXMuZGlhbG9nQ29udGVudCA9IHsgdmlld0NvbnRhaW5lclJlZiwgdGVtcGxhdGUgfTtcbiAgICB9XG5cbiAgICBvcGVuKCkge1xuICAgICAgICBpZiAoIXRoaXMuZGlhbG9nQ29udGVudCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdEaWFsb2cgY29udGVudCBpcyBub3Qgc2V0Jyk7XG4gICAgICAgIH1cblxuICAgICAgICB0aGlzLm92ZXJsYXlSZWYgPSB0aGlzLm92ZXJsYXkuY3JlYXRlKHtcbiAgICAgICAgICAgIGhhc0JhY2tkcm9wOiB0cnVlLFxuICAgICAgICAgICAgYmFja2Ryb3BDbGFzczogJ2Nkay1vdmVybGF5LWRhcmstYmFja2Ryb3AnLFxuICAgICAgICAgICAgcG9zaXRpb25TdHJhdGVneTogdGhpcy5vdmVybGF5XG4gICAgICAgICAgICAgICAgLnBvc2l0aW9uKClcbiAgICAgICAgICAgICAgICAuZ2xvYmFsKClcbiAgICAgICAgICAgICAgICAuY2VudGVySG9yaXpvbnRhbGx5KClcbiAgICAgICAgICAgICAgICAuY2VudGVyVmVydGljYWxseSgpXG4gICAgICAgIH0pO1xuXG4gICAgICAgIGNvbnN0IHRlbXBsYXRlUG9ydGFsID0gbmV3IFRlbXBsYXRlUG9ydGFsKFxuICAgICAgICAgICAgdGhpcy5kaWFsb2dDb250ZW50LnRlbXBsYXRlLFxuICAgICAgICAgICAgdGhpcy5kaWFsb2dDb250ZW50LnZpZXdDb250YWluZXJSZWZcbiAgICAgICAgKTtcbiAgICAgICAgdGhpcy5vdmVybGF5UmVmLmF0dGFjaCh0ZW1wbGF0ZVBvcnRhbCk7XG5cbiAgICAgICAgdGhpcy5vdmVybGF5UmVmLmJhY2tkcm9wQ2xpY2soKS5zdWJzY3JpYmUoKCkgPT4gdGhpcy5jbG9zZSgpKTtcbiAgICB9XG5cbiAgICBjbG9zZSgpIHtcbiAgICAgICAgaWYgKHRoaXMub3ZlcmxheVJlZikge1xuICAgICAgICAgICAgdGhpcy5vdmVybGF5UmVmLmRpc3Bvc2UoKTtcbiAgICAgICAgICAgIHRoaXMub3ZlcmxheVJlZiA9IG51bGw7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=
@@ -1,5 +1,5 @@
1
1
  export * from './src/avatar-fallback.directive';
2
2
  export * from './src/avatar-image.directive';
3
- export * from './src/avatar.directive';
3
+ export * from './src/avatar-root.directive';
4
4
  export * from './src/avatar.config';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wYWNrYWdlcy9wcmltaXRpdmVzL2F2YXRhci9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGlDQUFpQyxDQUFDO0FBQ2hELGNBQWMsOEJBQThCLENBQUM7QUFDN0MsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLHFCQUFxQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9zcmMvYXZhdGFyLWZhbGxiYWNrLmRpcmVjdGl2ZSc7XG5leHBvcnQgKiBmcm9tICcuL3NyYy9hdmF0YXItaW1hZ2UuZGlyZWN0aXZlJztcbmV4cG9ydCAqIGZyb20gJy4vc3JjL2F2YXRhci5kaXJlY3RpdmUnO1xuZXhwb3J0ICogZnJvbSAnLi9zcmMvYXZhdGFyLmNvbmZpZyc7XG4iXX0=
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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