ng-primitives 0.35.0 → 0.37.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 (138) hide show
  1. package/a11y/visually-hidden/visually-hidden-state.d.ts +1 -1
  2. package/accordion/accordion/accordion-state.d.ts +1 -1
  3. package/accordion/accordion-item/accordion-item-state.d.ts +1 -1
  4. package/accordion/accordion-trigger/accordion-trigger.d.ts +4 -0
  5. package/avatar/avatar/avatar-state.d.ts +1 -1
  6. package/button/button/button-state.d.ts +1 -1
  7. package/checkbox/checkbox/checkbox-state.d.ts +1 -1
  8. package/date-picker/date-picker/date-picker-state.d.ts +1 -1
  9. package/dialog/dialog/dialog-state.d.ts +1 -1
  10. package/dialog/dialog-overlay/dialog-overlay.d.ts +7 -1
  11. package/dialog/dialog-trigger/dialog-trigger.d.ts +0 -2
  12. package/example-theme/index.css +2 -0
  13. package/fesm2022/ng-primitives-a11y.mjs +3 -3
  14. package/fesm2022/ng-primitives-accordion.mjs +18 -13
  15. package/fesm2022/ng-primitives-accordion.mjs.map +1 -1
  16. package/fesm2022/ng-primitives-autofill.mjs +4 -4
  17. package/fesm2022/ng-primitives-avatar.mjs +9 -9
  18. package/fesm2022/ng-primitives-button.mjs +3 -3
  19. package/fesm2022/ng-primitives-checkbox.mjs +4 -4
  20. package/fesm2022/ng-primitives-common.mjs +3 -3
  21. package/fesm2022/ng-primitives-date-picker.mjs +27 -27
  22. package/fesm2022/ng-primitives-dialog.mjs +30 -22
  23. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  24. package/fesm2022/ng-primitives-file-upload.mjs +18 -12
  25. package/fesm2022/ng-primitives-file-upload.mjs.map +1 -1
  26. package/fesm2022/ng-primitives-focus-trap.mjs +31 -8
  27. package/fesm2022/ng-primitives-focus-trap.mjs.map +1 -1
  28. package/fesm2022/ng-primitives-form-field.mjs +15 -15
  29. package/fesm2022/ng-primitives-input.mjs +3 -3
  30. package/fesm2022/ng-primitives-interactions.mjs +15 -15
  31. package/fesm2022/ng-primitives-internal.mjs +66 -70
  32. package/fesm2022/ng-primitives-internal.mjs.map +1 -1
  33. package/fesm2022/ng-primitives-listbox.mjs +12 -12
  34. package/fesm2022/ng-primitives-menu.mjs +13 -13
  35. package/fesm2022/ng-primitives-meter.mjs +164 -0
  36. package/fesm2022/ng-primitives-meter.mjs.map +1 -0
  37. package/fesm2022/ng-primitives-pagination.mjs +19 -19
  38. package/fesm2022/ng-primitives-popover.mjs +114 -68
  39. package/fesm2022/ng-primitives-popover.mjs.map +1 -1
  40. package/fesm2022/ng-primitives-progress.mjs +6 -6
  41. package/fesm2022/ng-primitives-radio.mjs +13 -9
  42. package/fesm2022/ng-primitives-radio.mjs.map +1 -1
  43. package/fesm2022/ng-primitives-resize.mjs +3 -3
  44. package/fesm2022/ng-primitives-roving-focus.mjs +6 -6
  45. package/fesm2022/ng-primitives-search.mjs +7 -7
  46. package/fesm2022/ng-primitives-select.mjs +3 -3
  47. package/fesm2022/ng-primitives-separator.mjs +3 -3
  48. package/fesm2022/ng-primitives-slider.mjs +12 -12
  49. package/fesm2022/ng-primitives-state.mjs +10 -3
  50. package/fesm2022/ng-primitives-state.mjs.map +1 -1
  51. package/fesm2022/ng-primitives-switch.mjs +6 -6
  52. package/fesm2022/ng-primitives-tabs.mjs +35 -48
  53. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  54. package/fesm2022/ng-primitives-textarea.mjs +3 -3
  55. package/fesm2022/ng-primitives-toast.mjs +3 -3
  56. package/fesm2022/ng-primitives-toggle-group.mjs +9 -14
  57. package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
  58. package/fesm2022/ng-primitives-toggle.mjs +4 -4
  59. package/fesm2022/ng-primitives-toolbar.mjs +38 -14
  60. package/fesm2022/ng-primitives-toolbar.mjs.map +1 -1
  61. package/fesm2022/ng-primitives-tooltip.mjs +108 -51
  62. package/fesm2022/ng-primitives-tooltip.mjs.map +1 -1
  63. package/fesm2022/ng-primitives-utils.mjs +18 -0
  64. package/fesm2022/ng-primitives-utils.mjs.map +1 -1
  65. package/file-upload/file-dropzone/file-dropzone-state.d.ts +2 -2
  66. package/file-upload/file-dropzone/file-dropzone.d.ts +3 -2
  67. package/file-upload/file-upload/file-upload-state.d.ts +2 -2
  68. package/file-upload/file-upload/file-upload.d.ts +3 -2
  69. package/focus-trap/focus-trap/focus-trap-state.d.ts +41 -0
  70. package/focus-trap/focus-trap/focus-trap.d.ts +4 -0
  71. package/focus-trap/index.d.ts +1 -0
  72. package/form-field/form-control/form-control-state.d.ts +24 -24
  73. package/form-field/form-field/form-field-state.d.ts +1 -1
  74. package/input/input/input-state.d.ts +1 -1
  75. package/internal/exit-animation/exit-animation-manager.d.ts +17 -0
  76. package/internal/exit-animation/exit-animation.d.ts +4 -17
  77. package/internal/index.d.ts +2 -1
  78. package/listbox/listbox/listbox-state.d.ts +4 -4
  79. package/meter/README.md +3 -0
  80. package/meter/index.d.ts +6 -0
  81. package/meter/meter/meter-state.d.ts +25 -0
  82. package/meter/meter/meter.d.ts +27 -0
  83. package/meter/meter-indicator/meter-indicator.d.ts +15 -0
  84. package/meter/meter-label/meter-label.d.ts +18 -0
  85. package/meter/meter-track/meter-track.d.ts +5 -0
  86. package/meter/meter-value/meter-value.d.ts +5 -0
  87. package/package.json +13 -9
  88. package/pagination/pagination/pagination-state.d.ts +3 -3
  89. package/pagination/pagination-first/pagination-first.d.ts +2 -2
  90. package/pagination/pagination-next/pagination-next.d.ts +2 -2
  91. package/pagination/pagination-previous/pagination-previous.d.ts +2 -2
  92. package/popover/index.d.ts +1 -0
  93. package/popover/popover/popover-token.d.ts +10 -0
  94. package/popover/popover/popover.d.ts +34 -3
  95. package/popover/popover-trigger/popover-trigger-state.d.ts +5 -3
  96. package/popover/popover-trigger/popover-trigger.d.ts +26 -18
  97. package/progress/progress/progress-state.d.ts +3 -3
  98. package/progress/progress-indicator/progress-indicator.d.ts +2 -2
  99. package/radio/radio-group/radio-group-state.d.ts +1 -1
  100. package/radio/radio-item/radio-item-state.d.ts +1 -1
  101. package/roving-focus/roving-focus-group/roving-focus-group-state.d.ts +7 -7
  102. package/schematics/ng-generate/schema.d.ts +4 -1
  103. package/schematics/ng-generate/schema.json +4 -1
  104. package/schematics/ng-generate/templates/meter/meter.__fileSuffix@dasherize__.ts.template +78 -0
  105. package/schematics/ng-generate/templates/pagination/pagination.__fileSuffix@dasherize__.ts.template +11 -11
  106. package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +8 -3
  107. package/schematics/ng-generate/templates/toolbar/toolbar-button.__fileSuffix@dasherize__.ts.template +58 -0
  108. package/schematics/ng-generate/templates/toolbar/toolbar.__fileSuffix@dasherize__.ts.template +37 -0
  109. package/schematics/ng-generate/templates/tooltip/tooltip-trigger.__fileSuffix@dasherize__.ts.template +35 -0
  110. package/schematics/ng-generate/templates/tooltip/tooltip.__fileSuffix@dasherize__.ts.template +60 -0
  111. package/search/search/search-state.d.ts +1 -1
  112. package/select/select/select-state.d.ts +1 -1
  113. package/slider/slider/slider-state.d.ts +5 -5
  114. package/slider/slider-range/slider-range.d.ts +4 -4
  115. package/slider/slider-thumb/slider-thumb.d.ts +4 -4
  116. package/slider/slider-track/slider-track.d.ts +4 -4
  117. package/state/index.d.ts +7 -1
  118. package/switch/switch/switch-state.d.ts +1 -1
  119. package/tabs/index.d.ts +1 -2
  120. package/tabs/tab-button/tab-button.d.ts +9 -10
  121. package/tabs/tab-list/tab-list.d.ts +6 -7
  122. package/tabs/tab-panel/tab-panel.d.ts +11 -9
  123. package/tabs/tabset/tabset-state.d.ts +7 -8
  124. package/tabs/tabset/tabset.d.ts +3 -4
  125. package/textarea/textarea/textarea-state.d.ts +1 -1
  126. package/toggle/toggle/toggle-state.d.ts +1 -1
  127. package/toggle-group/toggle-group/toggle-group-state.d.ts +7 -7
  128. package/toggle-group/toggle-group/toggle-group.d.ts +1 -1
  129. package/toggle-group/toggle-group-item/toggle-group-item-state.d.ts +13 -13
  130. package/toolbar/index.d.ts +1 -0
  131. package/toolbar/toolbar/toolbar-state.d.ts +39 -0
  132. package/toolbar/toolbar/toolbar.d.ts +10 -1
  133. package/tooltip/index.d.ts +1 -0
  134. package/tooltip/tooltip/tooltip-token.d.ts +10 -0
  135. package/tooltip/tooltip/tooltip.d.ts +2 -1
  136. package/tooltip/tooltip-trigger/tooltip-trigger-state.d.ts +3 -3
  137. package/tooltip/tooltip-trigger/tooltip-trigger.d.ts +44 -18
  138. package/tabs/tabset/tabset-token.d.ts +0 -11
@@ -1,17 +1,18 @@
1
1
  import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, ElementRef, ViewContainerRef, Injector, input, booleanAttribute, output, numberAttribute, computed, signal, Directive } from '@angular/core';
2
+ import { InjectionToken, inject, ViewContainerRef, Injector, input, booleanAttribute, numberAttribute, signal, computed, ComponentRef, TemplateRef, Type, Directive } from '@angular/core';
3
3
  import { FocusMonitor, InteractivityChecker } from '@angular/cdk/a11y';
4
4
  import { ViewportRuler, BlockScrollStrategy, NoopScrollStrategy } from '@angular/cdk/overlay';
5
- import { TemplatePortal, DomPortalOutlet } from '@angular/cdk/portal';
5
+ import { TemplatePortal, ComponentPortal, DomPortalOutlet } from '@angular/cdk/portal';
6
6
  import { DOCUMENT } from '@angular/common';
7
7
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
8
8
  import { offset, shift, flip, autoUpdate, computePosition } from '@floating-ui/dom';
9
+ import * as i2 from 'ng-primitives/internal';
10
+ import { injectElementRef, injectExitAnimationManager, provideExitAnimationManager, NgpExitAnimation } from 'ng-primitives/internal';
9
11
  import { fromResizeEvent } from 'ng-primitives/resize';
10
- import { injectDisposables, onBooleanChange } from 'ng-primitives/utils';
12
+ import { injectDisposables } from 'ng-primitives/utils';
11
13
  import { createStateToken, createStateProvider, createStateInjector, createState } from 'ng-primitives/state';
12
14
  import * as i1 from 'ng-primitives/focus-trap';
13
- import { NgpFocusTrap } from 'ng-primitives/focus-trap';
14
- import { injectElementRef } from 'ng-primitives/internal';
15
+ import { injectFocusTrapState, NgpFocusTrap } from 'ng-primitives/focus-trap';
15
16
 
16
17
  const defaultPopoverConfig = {
17
18
  offset: 4,
@@ -46,6 +47,20 @@ function injectPopoverConfig() {
46
47
  return inject(NgpPopoverConfigToken, { optional: true }) ?? defaultPopoverConfig;
47
48
  }
48
49
 
50
+ const NgpPopoverContextToken = new InjectionToken('NgpPopoverContextToken');
51
+ /**
52
+ * Inject the Popover context
53
+ */
54
+ function injectPopoverContext() {
55
+ return inject(NgpPopoverContextToken);
56
+ }
57
+ /**
58
+ * Provide the Popover context
59
+ */
60
+ function providePopoverContext(context) {
61
+ return { provide: NgpPopoverContextToken, useValue: context };
62
+ }
63
+
49
64
  /**
50
65
  * The state token for the PopoverTrigger primitive.
51
66
  */
@@ -71,13 +86,17 @@ class NgpPopoverTrigger {
71
86
  /**
72
87
  * Access the trigger element
73
88
  */
74
- this.trigger = inject((ElementRef));
89
+ this.trigger = injectElementRef();
90
+ /**
91
+ * Access the exit animation state.
92
+ */
93
+ this.exitAnimationState = injectExitAnimationManager();
75
94
  /**
76
95
  * Inject the parent popover trigger if available.
77
96
  */
78
97
  this.parentTrigger = injectPopoverTriggerState({
79
- optional: true,
80
98
  skipSelf: true,
99
+ optional: true,
81
100
  });
82
101
  /**
83
102
  * Access the view container ref.
@@ -110,23 +129,9 @@ class NgpPopoverTrigger {
110
129
  /**
111
130
  * Access the popover template ref.
112
131
  */
113
- this.popover = input.required({
132
+ this.popover = input(null, {
114
133
  alias: 'ngpPopoverTrigger',
115
134
  });
116
- /**
117
- * The open state of the popover.
118
- * @default false
119
- */
120
- this.open = input(false, {
121
- alias: 'ngpPopoverTriggerOpen',
122
- transform: booleanAttribute,
123
- });
124
- /**
125
- * Emit when the open state changes.
126
- */
127
- this.openChange = output({
128
- alias: 'ngpPopoverTriggerOpenChange',
129
- });
130
135
  /**
131
136
  * Define if the trigger should be disabled.
132
137
  * @default false
@@ -204,10 +209,21 @@ class NgpPopoverTrigger {
204
209
  this.scrollBehavior = input(this.config.scrollBehavior, {
205
210
  alias: 'ngpPopoverTriggerScrollBehavior',
206
211
  });
212
+ /**
213
+ * Provide context to the popover.
214
+ * @default null
215
+ */
216
+ this.context = input(null, {
217
+ alias: 'ngpPopoverTriggerContext',
218
+ });
207
219
  /**
208
220
  * Store the popover view ref.
209
221
  */
210
- this.viewRef = null;
222
+ this.viewRef = signal(null);
223
+ /**
224
+ * Determines if the popover is open.
225
+ */
226
+ this.open = computed(() => this.viewRef() !== null);
211
227
  /**
212
228
  * Derive the popover middleware from the provided configuration.
213
229
  */
@@ -246,6 +262,7 @@ class NgpPopoverTrigger {
246
262
  * @internal
247
263
  * Register any child popover to the stack.
248
264
  */
265
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
249
266
  this.stack = [];
250
267
  /**
251
268
  * The popover trigger state.
@@ -253,8 +270,6 @@ class NgpPopoverTrigger {
253
270
  this.state = popoverTriggerState(this);
254
271
  // if the trigger has a parent trigger then register it to the stack
255
272
  this.parentTrigger()?.stack.push(this);
256
- // any time the open state changes then show or hide the popover
257
- onBooleanChange(this.state.open, this.show.bind(this, 'program'), this.hide.bind(this, 'program'));
258
273
  // update the width of the trigger when it resizes
259
274
  fromResizeEvent(this.trigger.nativeElement)
260
275
  .pipe(takeUntilDestroyed())
@@ -262,7 +277,7 @@ class NgpPopoverTrigger {
262
277
  }
263
278
  ngOnDestroy() {
264
279
  // remove the trigger from the parent trigger's stack
265
- this.parentTrigger()?.stack.splice(this.parentTrigger().stack.indexOf(this), 1);
280
+ this.parentTrigger()?.stack.splice(this.parentTrigger()?.stack.indexOf(this), 1);
266
281
  this.destroyPopover();
267
282
  }
268
283
  toggleOpenState(event) {
@@ -273,7 +288,7 @@ class NgpPopoverTrigger {
273
288
  // determine the origin of the event, 0 is keyboard, 1 is mouse
274
289
  const origin = event.detail === 0 ? 'keyboard' : 'mouse';
275
290
  // if the popover is open then hide it
276
- if (this.state.open()) {
291
+ if (this.open()) {
277
292
  this.hide(origin);
278
293
  }
279
294
  else {
@@ -281,20 +296,17 @@ class NgpPopoverTrigger {
281
296
  }
282
297
  }
283
298
  /**
284
- * @internal
285
299
  * Show the popover.
286
300
  */
287
301
  show(origin) {
288
302
  // if closing is in progress then clear the timeout to stop the popover from closing
289
303
  this.closeTimeout?.();
290
304
  // if the trigger is disabled or the popover is already open then do not show the popover
291
- if (this.state.disabled() || this.state.open() || this.openTimeout) {
305
+ if (this.state.disabled() || this.openTimeout) {
292
306
  return;
293
307
  }
294
308
  this.openTimeout = this.disposables.setTimeout(() => {
295
309
  this.openTimeout = undefined;
296
- this.state.open.set(true);
297
- this.openChange.emit(true);
298
310
  this.createPopover(origin);
299
311
  }, this.state.showDelay());
300
312
  // Add document click listener to detect outside clicks
@@ -311,27 +323,30 @@ class NgpPopoverTrigger {
311
323
  // if opening is in progress then clear the timeout to stop the popover from opening
312
324
  this.openTimeout?.();
313
325
  // if the trigger is disabled or the popover is not open then do not hide the popover
314
- if (this.state.disabled() || !this.state.open() || this.closeTimeout) {
326
+ if (this.state.disabled() || this.closeTimeout || !this.open()) {
315
327
  return;
316
328
  }
317
329
  // close all child popovers
318
330
  for (const child of this.stack) {
319
331
  child.hide(origin);
320
332
  }
321
- this.closeTimeout = this.disposables.setTimeout(() => {
333
+ // disable the focus trap in the popover to prevent it trying to return focus to the popover
334
+ // when the popover is closed/closing
335
+ this.popoverInstance?.focusTrap().disabled.set(true);
336
+ // ensure the trigger is focused after closing the popover
337
+ this.focusTrigger(origin);
338
+ this.closeTimeout = this.disposables.setTimeout(async () => {
322
339
  this.closeTimeout = undefined;
323
- this.state.open.set(false);
324
- this.openChange.emit(false);
325
- this.destroyPopover();
326
- // ensure the trigger is focused after closing the popover
327
- this.disposables.setTimeout(() => this.focusTrigger(origin), 0);
340
+ await this.destroyPopover();
328
341
  }, this.state.hideDelay());
329
342
  }
330
343
  onDocumentClick(event) {
331
344
  const target = event.target;
345
+ const viewRef = this.viewRef();
346
+ // get the popover element
347
+ const popoverElement = viewRef instanceof ComponentRef ? viewRef.location.nativeElement : viewRef?.rootNodes[0];
332
348
  // Check if the click is outside the trigger or the popover
333
- const isOutside = !this.trigger.nativeElement.contains(target) &&
334
- !this.viewRef?.rootNodes[0]?.contains(target);
349
+ const isOutside = !this.trigger.nativeElement.contains(target) && !popoverElement?.contains(target);
335
350
  // Determine if this is a click inside another popover
336
351
  if (isOutside) {
337
352
  // Close the popover
@@ -341,14 +356,37 @@ class NgpPopoverTrigger {
341
356
  createPopover(origin) {
342
357
  // clear the open timeout
343
358
  this.openTimeout = undefined;
344
- const portal = new TemplatePortal(this.state.popover(), this.viewContainerRef, undefined, this.injector);
345
- const domOutlet = new DomPortalOutlet(this.state.container() ?? this.document.body, undefined, undefined, Injector.create({
359
+ const popover = this.state.popover();
360
+ let portal;
361
+ // Create a new inject with the tooltip context
362
+ const injector = Injector.create({
346
363
  parent: this.injector,
347
- providers: [{ provide: NgpPopoverTriggerStateToken, useValue: signal(this.state) }],
348
- }));
349
- this.viewRef = domOutlet.attach(portal);
350
- this.viewRef.detectChanges();
351
- const outletElement = this.viewRef.rootNodes[0];
364
+ providers: [providePopoverContext(this.state.context())],
365
+ });
366
+ if (popover instanceof TemplateRef) {
367
+ portal = new TemplatePortal(popover, this.viewContainerRef, { $implicit: this.state.context() }, injector);
368
+ }
369
+ else if (popover instanceof Type) {
370
+ portal = new ComponentPortal(popover, this.viewContainerRef, injector);
371
+ }
372
+ else {
373
+ throw new Error('Popover must be either a TemplateRef or a ComponentType');
374
+ }
375
+ const domOutlet = new DomPortalOutlet(this.state.container() ?? this.document.body, undefined, undefined, injector);
376
+ const viewRef = domOutlet.attach(portal);
377
+ this.viewRef.set(viewRef);
378
+ let outletElement = null;
379
+ if (viewRef instanceof ComponentRef) {
380
+ viewRef.changeDetectorRef.detectChanges();
381
+ outletElement = viewRef.location.nativeElement;
382
+ }
383
+ else if (viewRef) {
384
+ viewRef.detectChanges();
385
+ outletElement = viewRef.rootNodes[0];
386
+ }
387
+ if (!outletElement) {
388
+ throw new Error('Outlet element is not available.');
389
+ }
352
390
  // determine if the popover is fixed or absolute
353
391
  const strategy = getComputedStyle(outletElement).position === 'fixed' ? 'fixed' : 'absolute';
354
392
  this.dispose = autoUpdate(this.trigger.nativeElement, outletElement, async () => {
@@ -358,24 +396,27 @@ class NgpPopoverTrigger {
358
396
  strategy,
359
397
  });
360
398
  this.position.set({ x: position.x, y: position.y });
361
- this.viewRef?.detectChanges();
399
+ viewRef?.detectChanges();
362
400
  });
363
401
  // activate the scroll strategy
364
402
  this.scrollStrategy().enable();
365
403
  // set the initial focus to the first tabbable element in the popover
366
404
  this.popoverInstance?.setInitialFocus(origin);
367
405
  }
368
- destroyPopover() {
406
+ async destroyPopover() {
369
407
  // clear the close timeout
370
408
  this.closeTimeout = undefined;
371
- this.state.open.set(false);
372
- this.openChange.emit(false);
373
- // if the view is already destroyed then do not destroy it again
374
- if (this.viewRef && !this.viewRef.destroyed) {
375
- // destroy the view ref
376
- this.viewRef.destroy();
409
+ const viewRef = this.viewRef();
410
+ if (!viewRef) {
411
+ return;
377
412
  }
378
- this.viewRef = null;
413
+ // we remove this to prevent the popover from being destroyed twice
414
+ // because ngOnDestroy will be called on the viewRef
415
+ // when the popover is destroyed triggering this method again
416
+ this.viewRef.set(null);
417
+ await this.exitAnimationState.exit();
418
+ // destroy the view ref
419
+ viewRef.destroy();
379
420
  this.dispose?.();
380
421
  // deactivate the scroll strategy
381
422
  this.scrollStrategy().disable();
@@ -403,18 +444,18 @@ class NgpPopoverTrigger {
403
444
  setPopover(instance) {
404
445
  this.popoverInstance = instance;
405
446
  }
406
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpPopoverTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
407
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.7", type: NgpPopoverTrigger, isStandalone: true, selector: "[ngpPopoverTrigger]", inputs: { popover: { classPropertyName: "popover", publicName: "ngpPopoverTrigger", isSignal: true, isRequired: true, transformFunction: null }, open: { classPropertyName: "open", publicName: "ngpPopoverTriggerOpen", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpPopoverTriggerDisabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpPopoverTriggerPlacement", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "ngpPopoverTriggerOffset", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "ngpPopoverTriggerShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "ngpPopoverTriggerHideDelay", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "ngpPopoverTriggerFlip", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpPopoverTriggerContainer", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsideClick: { classPropertyName: "closeOnOutsideClick", publicName: "ngpPopoverTriggerCloseOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "ngpPopoverTriggerCloseOnEscape", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "ngpPopoverTriggerScrollBehavior", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { openChange: "ngpPopoverTriggerOpenChange" }, host: { listeners: { "click": "toggleOpenState($event)", "document:keydown.escape": "handleEscapeKey()" }, properties: { "attr.aria-expanded": "state.open() ? \"true\" : \"false\"", "attr.data-open": "state.open() ? \"\" : null", "attr.data-placement": "state.placement()", "attr.data-disabled": "state.disabled() ? \"\" : null" } }, providers: [providePopoverTriggerState()], exportAs: ["ngpPopoverTrigger"], ngImport: i0 }); }
447
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpPopoverTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
448
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpPopoverTrigger, isStandalone: true, selector: "[ngpPopoverTrigger]", inputs: { popover: { classPropertyName: "popover", publicName: "ngpPopoverTrigger", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "ngpPopoverTriggerDisabled", isSignal: true, isRequired: false, transformFunction: null }, placement: { classPropertyName: "placement", publicName: "ngpPopoverTriggerPlacement", isSignal: true, isRequired: false, transformFunction: null }, offset: { classPropertyName: "offset", publicName: "ngpPopoverTriggerOffset", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "ngpPopoverTriggerShowDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "ngpPopoverTriggerHideDelay", isSignal: true, isRequired: false, transformFunction: null }, flip: { classPropertyName: "flip", publicName: "ngpPopoverTriggerFlip", isSignal: true, isRequired: false, transformFunction: null }, container: { classPropertyName: "container", publicName: "ngpPopoverTriggerContainer", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsideClick: { classPropertyName: "closeOnOutsideClick", publicName: "ngpPopoverTriggerCloseOnOutsideClick", isSignal: true, isRequired: false, transformFunction: null }, closeOnEscape: { classPropertyName: "closeOnEscape", publicName: "ngpPopoverTriggerCloseOnEscape", isSignal: true, isRequired: false, transformFunction: null }, scrollBehavior: { classPropertyName: "scrollBehavior", publicName: "ngpPopoverTriggerScrollBehavior", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "ngpPopoverTriggerContext", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "toggleOpenState($event)", "document:keydown.escape": "handleEscapeKey()" }, properties: { "attr.aria-expanded": "open() ? \"true\" : \"false\"", "attr.data-open": "open() ? \"\" : null", "attr.data-placement": "state.placement()", "attr.data-disabled": "state.disabled() ? \"\" : null" } }, providers: [providePopoverTriggerState({ inherit: false }), provideExitAnimationManager()], exportAs: ["ngpPopoverTrigger"], ngImport: i0 }); }
408
449
  }
409
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpPopoverTrigger, decorators: [{
450
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpPopoverTrigger, decorators: [{
410
451
  type: Directive,
411
452
  args: [{
412
453
  selector: '[ngpPopoverTrigger]',
413
454
  exportAs: 'ngpPopoverTrigger',
414
- providers: [providePopoverTriggerState()],
455
+ providers: [providePopoverTriggerState({ inherit: false }), provideExitAnimationManager()],
415
456
  host: {
416
- '[attr.aria-expanded]': 'state.open() ? "true" : "false"',
417
- '[attr.data-open]': 'state.open() ? "" : null',
457
+ '[attr.aria-expanded]': 'open() ? "true" : "false"',
458
+ '[attr.data-open]': 'open() ? "" : null',
418
459
  '[attr.data-placement]': 'state.placement()',
419
460
  '[attr.data-disabled]': 'state.disabled() ? "" : null',
420
461
  '(click)': 'toggleOpenState($event)',
@@ -468,6 +509,11 @@ class NgpPopover {
468
509
  * Access the focus monitor.
469
510
  */
470
511
  this.focusMonitor = inject(FocusMonitor);
512
+ /**
513
+ * Access the focus trap.
514
+ * @internal
515
+ */
516
+ this.focusTrap = injectFocusTrapState();
471
517
  /**
472
518
  * Access the trigger instance.
473
519
  */
@@ -507,22 +553,22 @@ class NgpPopover {
507
553
  this.popover.nativeElement.focus();
508
554
  }
509
555
  }
510
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpPopover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
511
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.7", type: NgpPopover, isStandalone: true, selector: "[ngpPopover]", host: { attributes: { "role": "menu" }, listeners: { "keydown.escape": "trigger.handleEscapeKey()" }, properties: { "style.left.px": "x()", "style.top.px": "y()", "style.--ngp-popover-trigger-width.px": "trigger().width()", "style.--ngp-popover-transform-origin": "transformOrigin()" } }, exportAs: ["ngpPopover"], hostDirectives: [{ directive: i1.NgpFocusTrap }], ngImport: i0 }); }
556
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpPopover, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
557
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpPopover, isStandalone: true, selector: "[ngpPopover]", host: { attributes: { "role": "menu" }, listeners: { "keydown.escape": "trigger().handleEscapeKey()" }, properties: { "style.left.px": "x()", "style.top.px": "y()", "style.--ngp-popover-trigger-width.px": "trigger().width()", "style.--ngp-popover-transform-origin": "transformOrigin()" } }, exportAs: ["ngpPopover"], hostDirectives: [{ directive: i1.NgpFocusTrap }, { directive: i2.NgpExitAnimation }], ngImport: i0 }); }
512
558
  }
513
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpPopover, decorators: [{
559
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpPopover, decorators: [{
514
560
  type: Directive,
515
561
  args: [{
516
562
  selector: '[ngpPopover]',
517
563
  exportAs: 'ngpPopover',
518
- hostDirectives: [NgpFocusTrap],
564
+ hostDirectives: [NgpFocusTrap, NgpExitAnimation],
519
565
  host: {
520
566
  role: 'menu',
521
567
  '[style.left.px]': 'x()',
522
568
  '[style.top.px]': 'y()',
523
569
  '[style.--ngp-popover-trigger-width.px]': 'trigger().width()',
524
570
  '[style.--ngp-popover-transform-origin]': 'transformOrigin()',
525
- '(keydown.escape)': 'trigger.handleEscapeKey()',
571
+ '(keydown.escape)': 'trigger().handleEscapeKey()',
526
572
  },
527
573
  }]
528
574
  }], ctorParameters: () => [] });
@@ -531,5 +577,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImpor
531
577
  * Generated bundle index. Do not edit.
532
578
  */
533
579
 
534
- export { NgpPopover, NgpPopoverTrigger, getTransformOrigin, injectPopoverTriggerState, providePopoverConfig, providePopoverTriggerState };
580
+ export { NgpPopover, NgpPopoverContextToken, NgpPopoverTrigger, getTransformOrigin, injectPopoverContext, injectPopoverTriggerState, providePopoverConfig, providePopoverTriggerState };
535
581
  //# sourceMappingURL=ng-primitives-popover.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"ng-primitives-popover.mjs","sources":["../../../../packages/ng-primitives/popover/src/config/popover-config.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger-state.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger.ts","../../../../packages/ng-primitives/popover/src/utils/transform-origin.ts","../../../../packages/ng-primitives/popover/src/popover/popover.ts","../../../../packages/ng-primitives/popover/src/ng-primitives-popover.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\n\nexport interface NgpPopoverConfig {\n /**\n * Define the offset of the popover relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * Define the delay before the popover is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the popover should be attached.\n * @default document.body\n */\n container: HTMLElement | null;\n\n /**\n * Define whether the popover should close when clicking outside of it.\n * @default true\n */\n closeOnOutsideClick: boolean;\n\n /**\n * Define whether the popover should close when the escape key is pressed.\n * @default true\n */\n closeOnEscape: boolean;\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block';\n}\n\nexport const defaultPopoverConfig: NgpPopoverConfig = {\n offset: 4,\n placement: 'bottom',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: null,\n closeOnOutsideClick: true,\n closeOnEscape: true,\n scrollBehavior: 'reposition',\n};\n\nexport const NgpPopoverConfigToken = new InjectionToken<NgpPopoverConfig>('NgpPopoverConfigToken');\n\n/**\n * Provide the default Popover configuration\n * @param config The Popover configuration\n * @returns The provider\n */\nexport function providePopoverConfig(config: Partial<NgpPopoverConfig>): Provider[] {\n return [\n {\n provide: NgpPopoverConfigToken,\n useValue: { ...defaultPopoverConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Popover configuration\n * @returns The global Popover configuration\n */\nexport function injectPopoverConfig(): NgpPopoverConfig {\n return inject(NgpPopoverConfigToken, { optional: true }) ?? defaultPopoverConfig;\n}\n","import {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n} from 'ng-primitives/state';\nimport type { NgpPopoverTrigger } from './popover-trigger';\n\n/**\n * The state token for the PopoverTrigger primitive.\n */\nexport const NgpPopoverTriggerStateToken = createStateToken<NgpPopoverTrigger>('PopoverTrigger');\n\n/**\n * Provides the PopoverTrigger state.\n */\nexport const providePopoverTriggerState = createStateProvider(NgpPopoverTriggerStateToken);\n\n/**\n * Injects the PopoverTrigger state.\n */\nexport const injectPopoverTriggerState = createStateInjector<NgpPopoverTrigger>(\n NgpPopoverTriggerStateToken,\n);\n\n/**\n * The PopoverTrigger state registration function.\n */\nexport const popoverTriggerState = createState(NgpPopoverTriggerStateToken);\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { BlockScrollStrategy, NoopScrollStrategy, ViewportRuler } from '@angular/cdk/overlay';\nimport { DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n booleanAttribute,\n computed,\n Directive,\n ElementRef,\n EmbeddedViewRef,\n inject,\n Injector,\n input,\n numberAttribute,\n OnDestroy,\n output,\n signal,\n TemplateRef,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n autoUpdate,\n computePosition,\n flip,\n Middleware,\n offset,\n Placement,\n shift,\n} from '@floating-ui/dom';\nimport { fromResizeEvent } from 'ng-primitives/resize';\nimport { injectDisposables, onBooleanChange } from 'ng-primitives/utils';\nimport { injectPopoverConfig } from '../config/popover-config';\nimport type { NgpPopover } from '../popover/popover';\nimport {\n injectPopoverTriggerState,\n NgpPopoverTriggerStateToken,\n popoverTriggerState,\n providePopoverTriggerState,\n} from './popover-trigger-state';\n\n/**\n * Apply the `ngpPopoverTrigger` directive to an element that triggers the popover to show.\n */\n@Directive({\n selector: '[ngpPopoverTrigger]',\n exportAs: 'ngpPopoverTrigger',\n providers: [providePopoverTriggerState()],\n host: {\n '[attr.aria-expanded]': 'state.open() ? \"true\" : \"false\"',\n '[attr.data-open]': 'state.open() ? \"\" : null',\n '[attr.data-placement]': 'state.placement()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '(click)': 'toggleOpenState($event)',\n '(document:keydown.escape)': 'handleEscapeKey()',\n },\n})\nexport class NgpPopoverTrigger implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = inject(ElementRef<HTMLElement>);\n\n /**\n * Inject the parent popover trigger if available.\n */\n private readonly parentTrigger = injectPopoverTriggerState({\n optional: true,\n skipSelf: true,\n });\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the document.\n */\n private readonly document = inject(DOCUMENT);\n\n /**\n * Access the viewport ruler.\n */\n private readonly viewportRuler = inject(ViewportRuler);\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the global popover configuration.\n */\n private readonly config = injectPopoverConfig();\n\n /**\n * Access the disposable utilities\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the popover template ref.\n */\n readonly popover = input.required<TemplateRef<void>>({\n alias: 'ngpPopoverTrigger',\n });\n\n /**\n * The open state of the popover.\n * @default false\n */\n readonly open = input<boolean, BooleanInput>(false, {\n alias: 'ngpPopoverTriggerOpen',\n transform: booleanAttribute,\n });\n\n /**\n * Emit when the open state changes.\n */\n readonly openChange = output<boolean>({\n alias: 'ngpPopoverTriggerOpenChange',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpPopoverTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpPopoverTriggerPlacement',\n });\n\n /**\n * Define the offset of the popover relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(this.config.offset, {\n alias: 'ngpPopoverTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpPopoverTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpPopoverTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpPopoverTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | null>(this.config.container, {\n alias: 'ngpPopoverTriggerContainer',\n });\n\n /**\n * Define whether the popover should close when clicking outside of it.\n * @default true\n */\n readonly closeOnOutsideClick = input<boolean, BooleanInput>(this.config.closeOnOutsideClick, {\n alias: 'ngpPopoverTriggerCloseOnOutsideClick',\n transform: booleanAttribute,\n });\n\n /**\n * Define whether the popover should close when the escape key is pressed.\n * @default true\n */\n readonly closeOnEscape = input<boolean, BooleanInput>(this.config.closeOnEscape, {\n alias: 'ngpPopoverTriggerCloseOnEscape',\n transform: booleanAttribute,\n });\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior = input<'reposition' | 'block'>(this.config.scrollBehavior, {\n alias: 'ngpPopoverTriggerScrollBehavior',\n });\n\n /**\n * Store the popover view ref.\n */\n private viewRef: EmbeddedViewRef<void> | null = null;\n\n /**\n * Derive the popover middleware from the provided configuration.\n */\n private readonly middleware = computed(() => {\n const middleware: Middleware[] = [offset(this.state.offset()), shift()];\n\n if (this.state.flip()) {\n middleware.push(flip());\n }\n\n return middleware;\n });\n\n /**\n * Store the computed position of the popover.\n * @internal\n */\n readonly position = signal<{ x: number; y: number }>({\n x: 0,\n y: 0,\n });\n\n /**\n * @internal\n * Store the trigger width.\n */\n readonly width = signal<number | null>(null);\n\n /**\n * The dispose function to stop computing the position of the popover.\n */\n private dispose?: () => void;\n\n /**\n * A document-wide click listener that checks if the click\n * occurred outside of the popover and trigger elements.\n */\n private documentClickListener?: (event: MouseEvent) => void;\n\n /**\n * Store the popover instance.\n * @internal\n */\n private popoverInstance: NgpPopover | null = null;\n\n /**\n * Get the scroll strategy based on the configuration.\n */\n private readonly scrollStrategy = computed(() =>\n this.state.scrollBehavior() === 'block'\n ? new BlockScrollStrategy(this.viewportRuler, this.document)\n : new NoopScrollStrategy(),\n );\n\n /**\n * @internal\n * Register any child popover to the stack.\n */\n readonly stack: NgpPopoverTrigger[] = [];\n\n /**\n * @internal\n * The timeout to open the popover.\n */\n private openTimeout?: () => void;\n\n /**\n * @internal\n * The timeout to close the popover.\n */\n private closeTimeout?: () => void;\n\n /**\n * The popover trigger state.\n */\n protected readonly state = popoverTriggerState<NgpPopoverTrigger>(this);\n\n constructor() {\n // if the trigger has a parent trigger then register it to the stack\n this.parentTrigger()?.stack.push(this);\n\n // any time the open state changes then show or hide the popover\n onBooleanChange(\n this.state.open,\n this.show.bind(this, 'program'),\n this.hide.bind(this, 'program'),\n );\n\n // update the width of the trigger when it resizes\n fromResizeEvent(this.trigger.nativeElement)\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.width.set(this.trigger.nativeElement.offsetWidth));\n }\n\n ngOnDestroy(): void {\n // remove the trigger from the parent trigger's stack\n this.parentTrigger()?.stack.splice(this.parentTrigger().stack.indexOf(this), 1);\n\n this.destroyPopover();\n }\n\n protected toggleOpenState(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the popover\n if (this.state.disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the popover is open then hide it\n if (this.state.open()) {\n this.hide(origin);\n } else {\n this.show(origin);\n }\n }\n\n /**\n * @internal\n * Show the popover.\n */\n show(origin: FocusOrigin): void {\n // if closing is in progress then clear the timeout to stop the popover from closing\n this.closeTimeout?.();\n\n // if the trigger is disabled or the popover is already open then do not show the popover\n if (this.state.disabled() || this.state.open() || this.openTimeout) {\n return;\n }\n\n this.openTimeout = this.disposables.setTimeout(() => {\n this.openTimeout = undefined;\n this.state.open.set(true);\n this.openChange.emit(true);\n this.createPopover(origin);\n }, this.state.showDelay());\n\n // Add document click listener to detect outside clicks\n if (this.state.closeOnOutsideClick()) {\n this.documentClickListener = this.onDocumentClick.bind(this);\n this.document.addEventListener('mouseup', this.documentClickListener, true);\n }\n }\n\n /**\n * @internal\n * Hide the popover.\n */\n hide(origin: FocusOrigin = 'program'): void {\n // if opening is in progress then clear the timeout to stop the popover from opening\n this.openTimeout?.();\n\n // if the trigger is disabled or the popover is not open then do not hide the popover\n if (this.state.disabled() || !this.state.open() || this.closeTimeout) {\n return;\n }\n\n // close all child popovers\n for (const child of this.stack) {\n child.hide(origin);\n }\n\n this.closeTimeout = this.disposables.setTimeout(() => {\n this.closeTimeout = undefined;\n this.state.open.set(false);\n this.openChange.emit(false);\n\n this.destroyPopover();\n // ensure the trigger is focused after closing the popover\n this.disposables.setTimeout(() => this.focusTrigger(origin), 0);\n }, this.state.hideDelay());\n }\n\n private onDocumentClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n // Check if the click is outside the trigger or the popover\n const isOutside =\n !this.trigger.nativeElement.contains(target) &&\n !(this.viewRef?.rootNodes[0] as HTMLElement)?.contains(target);\n\n // Determine if this is a click inside another popover\n\n if (isOutside) {\n // Close the popover\n this.hide('mouse');\n }\n }\n\n private createPopover(origin: FocusOrigin): void {\n // clear the open timeout\n this.openTimeout = undefined;\n\n const portal = new TemplatePortal(\n this.state.popover(),\n this.viewContainerRef,\n undefined,\n this.injector,\n );\n\n const domOutlet = new DomPortalOutlet(\n this.state.container() ?? this.document.body,\n undefined,\n undefined,\n Injector.create({\n parent: this.injector,\n providers: [{ provide: NgpPopoverTriggerStateToken, useValue: signal(this.state) }],\n }),\n );\n\n this.viewRef = domOutlet.attach(portal);\n this.viewRef.detectChanges();\n\n const outletElement = this.viewRef.rootNodes[0];\n\n // determine if the popover is fixed or absolute\n const strategy = getComputedStyle(outletElement).position === 'fixed' ? 'fixed' : 'absolute';\n\n this.dispose = autoUpdate(this.trigger.nativeElement, outletElement, async () => {\n const position = await computePosition(this.trigger.nativeElement, outletElement, {\n placement: this.state.placement(),\n middleware: this.middleware(),\n strategy,\n });\n\n this.position.set({ x: position.x, y: position.y });\n this.viewRef?.detectChanges();\n });\n\n // activate the scroll strategy\n this.scrollStrategy().enable();\n\n // set the initial focus to the first tabbable element in the popover\n this.popoverInstance?.setInitialFocus(origin);\n }\n\n private destroyPopover(): void {\n // clear the close timeout\n this.closeTimeout = undefined;\n\n this.state.open.set(false);\n this.openChange.emit(false);\n\n // if the view is already destroyed then do not destroy it again\n if (this.viewRef && !this.viewRef.destroyed) {\n // destroy the view ref\n this.viewRef.destroy();\n }\n\n this.viewRef = null;\n this.dispose?.();\n\n // deactivate the scroll strategy\n this.scrollStrategy().disable();\n\n // Remove the document click listener when the popover is hidden\n if (this.documentClickListener) {\n this.document.removeEventListener('mouseup', this.documentClickListener, true);\n }\n }\n\n /**\n * @internal\n * Handle escape key press to close the popover.\n */\n protected handleEscapeKey(): void {\n if (this.state.closeOnEscape()) {\n this.hide('keyboard');\n }\n }\n\n private focusTrigger(origin: FocusOrigin): void {\n this.focusMonitor.focusVia(this.trigger.nativeElement, origin);\n }\n\n /**\n * Set the popover instance.\n * @internal\n */\n setPopover(instance: NgpPopover): void {\n this.popoverInstance = instance;\n }\n}\n","import type { Placement } from '@floating-ui/dom';\n\nexport function getTransformOrigin(placement: Placement): string {\n const basePlacement = placement.split('-')[0]; // Extract \"top\", \"bottom\", etc.\n const alignment = placement.split('-')[1]; // Extract \"start\" or \"end\"\n\n const map: Record<string, string> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n };\n\n let x = 'center';\n let y = 'center';\n\n if (basePlacement === 'top' || basePlacement === 'bottom') {\n y = map[basePlacement];\n if (alignment === 'start') x = 'left';\n else if (alignment === 'end') x = 'right';\n } else {\n x = map[basePlacement];\n if (alignment === 'start') y = 'top';\n else if (alignment === 'end') y = 'bottom';\n }\n\n return `${y} ${x}`;\n}\n","import { FocusMonitor, FocusOrigin, InteractivityChecker } from '@angular/cdk/a11y';\nimport { computed, Directive, inject } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { injectPopoverTriggerState } from '../popover-trigger/popover-trigger-state';\nimport { getTransformOrigin } from '../utils/transform-origin';\n\n/**\n * Apply the `ngpPopover` directive to an element that represents the popover. This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n selector: '[ngpPopover]',\n exportAs: 'ngpPopover',\n hostDirectives: [NgpFocusTrap],\n host: {\n role: 'menu',\n '[style.left.px]': 'x()',\n '[style.top.px]': 'y()',\n '[style.--ngp-popover-trigger-width.px]': 'trigger().width()',\n '[style.--ngp-popover-transform-origin]': 'transformOrigin()',\n '(keydown.escape)': 'trigger.handleEscapeKey()',\n },\n})\nexport class NgpPopover {\n /**\n * Access the popover element.\n */\n private readonly popover = injectElementRef();\n\n /**\n * Access the interactivity checker.\n */\n private readonly interactivity = inject(InteractivityChecker);\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the trigger instance.\n */\n protected readonly trigger = injectPopoverTriggerState();\n\n /**\n * Compute the x position of the popover.\n */\n protected readonly x = computed(() => this.trigger().position().x);\n\n /**\n * Compute the y position of the popover.\n */\n protected readonly y = computed(() => this.trigger().position().y);\n\n /**\n * Derive the transform origin of the popover.\n */\n protected readonly transformOrigin = computed(() =>\n getTransformOrigin(this.trigger().placement()),\n );\n\n constructor() {\n this.trigger().setPopover(this);\n }\n\n /**\n * Focus the first tabbable element inside the popover.\n * If no tabbable element is found, focus the popover itself.\n * @internal\n */\n setInitialFocus(origin: FocusOrigin): void {\n // use a tree walker to find the first tabbable child\n const treeWalker = document.createTreeWalker(\n this.popover.nativeElement,\n NodeFilter.SHOW_ELEMENT,\n {\n acceptNode: node =>\n node instanceof HTMLElement && this.interactivity.isTabbable(node)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP,\n },\n );\n\n const tabbableNode = treeWalker.nextNode() as HTMLElement | null;\n\n if (tabbableNode) {\n this.focusMonitor.focusVia(tabbableNode, origin);\n } else {\n // if no tabbable child is found, focus the popover element itself\n this.popover.nativeElement.focus();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AA2DO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,SAAS,EA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,EAAA,UAAA,EAAA,CAAA;kBAbtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;oBACtB,cAAc,EAAE,CAAC,YAAY,CAAC;AAC9B,oBAAA,IAAI,EAAE;AACJ,wBAAA,IAAI,EAAE,MAAM;AACZ,wBAAA,iBAAiB,EAAE,KAAK;AACxB,wBAAA,gBAAgB,EAAE,KAAK;AACvB,wBAAA,wCAAwC,EAAE,mBAAmB;AAC7D,wBAAA,wCAAwC,EAAE,mBAAmB;AAC7D,wBAAA,kBAAkB,EAAE,2BAA2B;AAChD,qBAAA;AACF,iBAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"ng-primitives-popover.mjs","sources":["../../../../packages/ng-primitives/popover/src/config/popover-config.ts","../../../../packages/ng-primitives/popover/src/popover/popover-token.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger-state.ts","../../../../packages/ng-primitives/popover/src/popover-trigger/popover-trigger.ts","../../../../packages/ng-primitives/popover/src/utils/transform-origin.ts","../../../../packages/ng-primitives/popover/src/popover/popover.ts","../../../../packages/ng-primitives/popover/src/ng-primitives-popover.ts"],"sourcesContent":["import { InjectionToken, Provider, inject } from '@angular/core';\nimport { type Placement } from '@floating-ui/dom';\n\nexport interface NgpPopoverConfig {\n /**\n * Define the offset of the popover relative to the trigger.\n * @default 4\n */\n offset: number;\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'bottom'\n */\n placement: Placement;\n\n /**\n * Define the delay before the popover is shown.\n * @default 0\n */\n showDelay: number;\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n hideDelay: number;\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * @default true\n */\n flip: boolean;\n\n /**\n * Define the container in to which the popover should be attached.\n * @default document.body\n */\n container: HTMLElement | null;\n\n /**\n * Define whether the popover should close when clicking outside of it.\n * @default true\n */\n closeOnOutsideClick: boolean;\n\n /**\n * Define whether the popover should close when the escape key is pressed.\n * @default true\n */\n closeOnEscape: boolean;\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block';\n}\n\nexport const defaultPopoverConfig: NgpPopoverConfig = {\n offset: 4,\n placement: 'bottom',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: null,\n closeOnOutsideClick: true,\n closeOnEscape: true,\n scrollBehavior: 'reposition',\n};\n\nexport const NgpPopoverConfigToken = new InjectionToken<NgpPopoverConfig>('NgpPopoverConfigToken');\n\n/**\n * Provide the default Popover configuration\n * @param config The Popover configuration\n * @returns The provider\n */\nexport function providePopoverConfig(config: Partial<NgpPopoverConfig>): Provider[] {\n return [\n {\n provide: NgpPopoverConfigToken,\n useValue: { ...defaultPopoverConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Popover configuration\n * @returns The global Popover configuration\n */\nexport function injectPopoverConfig(): NgpPopoverConfig {\n return inject(NgpPopoverConfigToken, { optional: true }) ?? defaultPopoverConfig;\n}\n","import { inject, InjectionToken, ValueProvider } from '@angular/core';\n\nexport const NgpPopoverContextToken = new InjectionToken<unknown>('NgpPopoverContextToken');\n\n/**\n * Inject the Popover context\n */\nexport function injectPopoverContext<T>(): T {\n return inject(NgpPopoverContextToken) as T;\n}\n\n/**\n * Provide the Popover context\n */\nexport function providePopoverContext<T>(context: T): ValueProvider {\n return { provide: NgpPopoverContextToken, useValue: context };\n}\n","import { InjectOptions, Signal } from '@angular/core';\nimport {\n createState,\n createStateInjector,\n createStateProvider,\n createStateToken,\n State,\n} from 'ng-primitives/state';\nimport type { NgpPopoverTrigger } from './popover-trigger';\n\n/**\n * The state token for the PopoverTrigger primitive.\n */\nexport const NgpPopoverTriggerStateToken = createStateToken<NgpPopoverTrigger>('PopoverTrigger');\n\n/**\n * Provides the PopoverTrigger state.\n */\nexport const providePopoverTriggerState = createStateProvider(NgpPopoverTriggerStateToken);\n\n/**\n * Injects the PopoverTrigger state.\n */\nexport const injectPopoverTriggerState = createStateInjector<NgpPopoverTrigger>(\n NgpPopoverTriggerStateToken,\n) as <T>(options?: InjectOptions) => Signal<State<NgpPopoverTrigger<T>>>;\n\n/**\n * The PopoverTrigger state registration function.\n */\nexport const popoverTriggerState = createState(NgpPopoverTriggerStateToken);\n","import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport { BlockScrollStrategy, NoopScrollStrategy, ViewportRuler } from '@angular/cdk/overlay';\nimport { ComponentPortal, DomPortalOutlet, TemplatePortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n booleanAttribute,\n ComponentRef,\n computed,\n Directive,\n EmbeddedViewRef,\n inject,\n Injector,\n input,\n numberAttribute,\n OnDestroy,\n signal,\n TemplateRef,\n Type,\n ViewContainerRef,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport {\n autoUpdate,\n computePosition,\n flip,\n Middleware,\n offset,\n Placement,\n shift,\n} from '@floating-ui/dom';\nimport {\n injectElementRef,\n injectExitAnimationManager,\n provideExitAnimationManager,\n} from 'ng-primitives/internal';\nimport { fromResizeEvent } from 'ng-primitives/resize';\nimport { injectDisposables } from 'ng-primitives/utils';\nimport { injectPopoverConfig } from '../config/popover-config';\nimport type { NgpPopover } from '../popover/popover';\nimport { providePopoverContext } from '../popover/popover-token';\nimport {\n injectPopoverTriggerState,\n popoverTriggerState,\n providePopoverTriggerState,\n} from './popover-trigger-state';\n\n/**\n * Apply the `ngpPopoverTrigger` directive to an element that triggers the popover to show.\n */\n@Directive({\n selector: '[ngpPopoverTrigger]',\n exportAs: 'ngpPopoverTrigger',\n providers: [providePopoverTriggerState({ inherit: false }), provideExitAnimationManager()],\n host: {\n '[attr.aria-expanded]': 'open() ? \"true\" : \"false\"',\n '[attr.data-open]': 'open() ? \"\" : null',\n '[attr.data-placement]': 'state.placement()',\n '[attr.data-disabled]': 'state.disabled() ? \"\" : null',\n '(click)': 'toggleOpenState($event)',\n '(document:keydown.escape)': 'handleEscapeKey()',\n },\n})\nexport class NgpPopoverTrigger<T = null> implements OnDestroy {\n /**\n * Access the trigger element\n */\n private readonly trigger = injectElementRef();\n\n /**\n * Access the exit animation state.\n */\n private readonly exitAnimationState = injectExitAnimationManager();\n\n /**\n * Inject the parent popover trigger if available.\n */\n private readonly parentTrigger = injectPopoverTriggerState<T>({\n skipSelf: true,\n optional: true,\n });\n\n /**\n * Access the view container ref.\n */\n private readonly viewContainerRef = inject(ViewContainerRef);\n\n /**\n * Access the document.\n */\n private readonly document = inject(DOCUMENT);\n\n /**\n * Access the viewport ruler.\n */\n private readonly viewportRuler = inject(ViewportRuler);\n\n /**\n * Access the injector.\n */\n private readonly injector = inject(Injector);\n\n /**\n * Access the global popover configuration.\n */\n private readonly config = injectPopoverConfig();\n\n /**\n * Access the disposable utilities\n */\n private readonly disposables = injectDisposables();\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the popover template ref.\n */\n readonly popover = input<NgpPopoverContent<T> | null>(null, {\n alias: 'ngpPopoverTrigger',\n });\n\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n alias: 'ngpPopoverTriggerDisabled',\n transform: booleanAttribute,\n });\n\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement = input<Placement>(this.config.placement, {\n alias: 'ngpPopoverTriggerPlacement',\n });\n\n /**\n * Define the offset of the popover relative to the trigger.\n * @default 0\n */\n readonly offset = input<number, NumberInput>(this.config.offset, {\n alias: 'ngpPopoverTriggerOffset',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay = input<number, NumberInput>(this.config.showDelay, {\n alias: 'ngpPopoverTriggerShowDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay = input<number, NumberInput>(this.config.hideDelay, {\n alias: 'ngpPopoverTriggerHideDelay',\n transform: numberAttribute,\n });\n\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * @default true\n */\n readonly flip = input<boolean, BooleanInput>(this.config.flip, {\n alias: 'ngpPopoverTriggerFlip',\n transform: booleanAttribute,\n });\n\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | null>(this.config.container, {\n alias: 'ngpPopoverTriggerContainer',\n });\n\n /**\n * Define whether the popover should close when clicking outside of it.\n * @default true\n */\n readonly closeOnOutsideClick = input<boolean, BooleanInput>(this.config.closeOnOutsideClick, {\n alias: 'ngpPopoverTriggerCloseOnOutsideClick',\n transform: booleanAttribute,\n });\n\n /**\n * Define whether the popover should close when the escape key is pressed.\n * @default true\n */\n readonly closeOnEscape = input<boolean, BooleanInput>(this.config.closeOnEscape, {\n alias: 'ngpPopoverTriggerCloseOnEscape',\n transform: booleanAttribute,\n });\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior = input<'reposition' | 'block'>(this.config.scrollBehavior, {\n alias: 'ngpPopoverTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the popover.\n * @default null\n */\n readonly context = input<T | null>(null, {\n alias: 'ngpPopoverTriggerContext',\n });\n\n /**\n * Store the popover view ref.\n */\n protected readonly viewRef = signal<ComponentRef<unknown> | EmbeddedViewRef<void> | null>(null);\n\n /**\n * Determines if the popover is open.\n */\n readonly open = computed(() => this.viewRef() !== null);\n\n /**\n * Derive the popover middleware from the provided configuration.\n */\n private readonly middleware = computed(() => {\n const middleware: Middleware[] = [offset(this.state.offset()), shift()];\n\n if (this.state.flip()) {\n middleware.push(flip());\n }\n\n return middleware;\n });\n\n /**\n * Store the computed position of the popover.\n * @internal\n */\n readonly position = signal<{ x: number; y: number }>({\n x: 0,\n y: 0,\n });\n\n /**\n * @internal\n * Store the trigger width.\n */\n readonly width = signal<number | null>(null);\n\n /**\n * The dispose function to stop computing the position of the popover.\n */\n private dispose?: () => void;\n\n /**\n * A document-wide click listener that checks if the click\n * occurred outside of the popover and trigger elements.\n */\n private documentClickListener?: (event: MouseEvent) => void;\n\n /**\n * Store the popover instance.\n * @internal\n */\n private popoverInstance: NgpPopover | null = null;\n\n /**\n * Get the scroll strategy based on the configuration.\n */\n private readonly scrollStrategy = computed(() =>\n this.state.scrollBehavior() === 'block'\n ? new BlockScrollStrategy(this.viewportRuler, this.document)\n : new NoopScrollStrategy(),\n );\n\n /**\n * @internal\n * Register any child popover to the stack.\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n readonly stack: NgpPopoverTrigger<any>[] = [];\n\n /**\n * @internal\n * The timeout to open the popover.\n */\n private openTimeout?: () => void;\n\n /**\n * @internal\n * The timeout to close the popover.\n */\n private closeTimeout?: () => void;\n\n /**\n * The popover trigger state.\n */\n readonly state = popoverTriggerState<NgpPopoverTrigger<T>>(this);\n\n constructor() {\n // if the trigger has a parent trigger then register it to the stack\n this.parentTrigger()?.stack.push(this);\n\n // update the width of the trigger when it resizes\n fromResizeEvent(this.trigger.nativeElement)\n .pipe(takeUntilDestroyed())\n .subscribe(() => this.width.set(this.trigger.nativeElement.offsetWidth));\n }\n\n ngOnDestroy(): void {\n // remove the trigger from the parent trigger's stack\n this.parentTrigger()?.stack.splice(this.parentTrigger()?.stack.indexOf(this), 1);\n\n this.destroyPopover();\n }\n\n protected toggleOpenState(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the popover\n if (this.state.disabled()) {\n return;\n }\n\n // determine the origin of the event, 0 is keyboard, 1 is mouse\n const origin: FocusOrigin = event.detail === 0 ? 'keyboard' : 'mouse';\n\n // if the popover is open then hide it\n if (this.open()) {\n this.hide(origin);\n } else {\n this.show(origin);\n }\n }\n\n /**\n * Show the popover.\n */\n show(origin: FocusOrigin): void {\n // if closing is in progress then clear the timeout to stop the popover from closing\n this.closeTimeout?.();\n\n // if the trigger is disabled or the popover is already open then do not show the popover\n if (this.state.disabled() || this.openTimeout) {\n return;\n }\n\n this.openTimeout = this.disposables.setTimeout(() => {\n this.openTimeout = undefined;\n this.createPopover(origin);\n }, this.state.showDelay());\n\n // Add document click listener to detect outside clicks\n if (this.state.closeOnOutsideClick()) {\n this.documentClickListener = this.onDocumentClick.bind(this);\n this.document.addEventListener('mouseup', this.documentClickListener, true);\n }\n }\n\n /**\n * @internal\n * Hide the popover.\n */\n hide(origin: FocusOrigin = 'program'): void {\n // if opening is in progress then clear the timeout to stop the popover from opening\n this.openTimeout?.();\n\n // if the trigger is disabled or the popover is not open then do not hide the popover\n if (this.state.disabled() || this.closeTimeout || !this.open()) {\n return;\n }\n\n // close all child popovers\n for (const child of this.stack) {\n child.hide(origin);\n }\n\n // disable the focus trap in the popover to prevent it trying to return focus to the popover\n // when the popover is closed/closing\n this.popoverInstance?.focusTrap().disabled.set(true);\n\n // ensure the trigger is focused after closing the popover\n this.focusTrigger(origin);\n\n this.closeTimeout = this.disposables.setTimeout(async () => {\n this.closeTimeout = undefined;\n\n await this.destroyPopover();\n }, this.state.hideDelay());\n }\n\n private onDocumentClick(event: MouseEvent): void {\n const target = event.target as HTMLElement;\n\n const viewRef = this.viewRef();\n\n // get the popover element\n const popoverElement =\n viewRef instanceof ComponentRef ? viewRef.location.nativeElement : viewRef?.rootNodes[0];\n\n // Check if the click is outside the trigger or the popover\n const isOutside =\n !this.trigger.nativeElement.contains(target) && !popoverElement?.contains(target);\n\n // Determine if this is a click inside another popover\n\n if (isOutside) {\n // Close the popover\n this.hide('mouse');\n }\n }\n\n private createPopover(origin: FocusOrigin): void {\n // clear the open timeout\n this.openTimeout = undefined;\n\n const popover = this.state.popover();\n\n let portal: TemplatePortal | ComponentPortal<unknown>;\n\n // Create a new inject with the tooltip context\n const injector = Injector.create({\n parent: this.injector,\n providers: [providePopoverContext(this.state.context())],\n });\n\n if (popover instanceof TemplateRef) {\n portal = new TemplatePortal<NgpPopoverTemplateContext<T>>(\n popover,\n this.viewContainerRef,\n { $implicit: this.state.context() } as NgpPopoverTemplateContext<T>,\n injector,\n );\n } else if (popover instanceof Type) {\n portal = new ComponentPortal(popover, this.viewContainerRef, injector);\n } else {\n throw new Error('Popover must be either a TemplateRef or a ComponentType');\n }\n\n const domOutlet = new DomPortalOutlet(\n this.state.container() ?? this.document.body,\n undefined,\n undefined,\n injector,\n );\n\n const viewRef = domOutlet.attach(portal);\n this.viewRef.set(viewRef);\n\n let outletElement: HTMLElement | null = null;\n\n if (viewRef instanceof ComponentRef) {\n viewRef.changeDetectorRef.detectChanges();\n outletElement = viewRef.location.nativeElement;\n } else if (viewRef) {\n viewRef.detectChanges();\n outletElement = viewRef.rootNodes[0] as HTMLElement;\n }\n\n if (!outletElement) {\n throw new Error('Outlet element is not available.');\n }\n\n // determine if the popover is fixed or absolute\n const strategy = getComputedStyle(outletElement).position === 'fixed' ? 'fixed' : 'absolute';\n\n this.dispose = autoUpdate(this.trigger.nativeElement, outletElement, async () => {\n const position = await computePosition(this.trigger.nativeElement, outletElement, {\n placement: this.state.placement(),\n middleware: this.middleware(),\n strategy,\n });\n\n this.position.set({ x: position.x, y: position.y });\n viewRef?.detectChanges();\n });\n\n // activate the scroll strategy\n this.scrollStrategy().enable();\n\n // set the initial focus to the first tabbable element in the popover\n this.popoverInstance?.setInitialFocus(origin);\n }\n\n private async destroyPopover(): Promise<void> {\n // clear the close timeout\n this.closeTimeout = undefined;\n\n const viewRef = this.viewRef();\n\n if (!viewRef) {\n return;\n }\n\n // we remove this to prevent the popover from being destroyed twice\n // because ngOnDestroy will be called on the viewRef\n // when the popover is destroyed triggering this method again\n this.viewRef.set(null);\n\n await this.exitAnimationState.exit();\n\n // destroy the view ref\n viewRef.destroy();\n\n this.dispose?.();\n\n // deactivate the scroll strategy\n this.scrollStrategy().disable();\n\n // Remove the document click listener when the popover is hidden\n if (this.documentClickListener) {\n this.document.removeEventListener('mouseup', this.documentClickListener, true);\n }\n }\n\n /**\n * @internal\n * Handle escape key press to close the popover.\n */\n protected handleEscapeKey(): void {\n if (this.state.closeOnEscape()) {\n this.hide('keyboard');\n }\n }\n\n private focusTrigger(origin: FocusOrigin): void {\n this.focusMonitor.focusVia(this.trigger.nativeElement, origin);\n }\n\n /**\n * Set the popover instance.\n * @internal\n */\n setPopover(instance: NgpPopover): void {\n this.popoverInstance = instance;\n }\n}\n\ntype NgpPopoverTemplateContext<T> = {\n $implicit: T;\n};\ntype NgpPopoverContent<T> = TemplateRef<NgpPopoverTemplateContext<T>> | Type<unknown>;\n","import type { Placement } from '@floating-ui/dom';\n\nexport function getTransformOrigin(placement: Placement): string {\n const basePlacement = placement.split('-')[0]; // Extract \"top\", \"bottom\", etc.\n const alignment = placement.split('-')[1]; // Extract \"start\" or \"end\"\n\n const map: Record<string, string> = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left',\n };\n\n let x = 'center';\n let y = 'center';\n\n if (basePlacement === 'top' || basePlacement === 'bottom') {\n y = map[basePlacement];\n if (alignment === 'start') x = 'left';\n else if (alignment === 'end') x = 'right';\n } else {\n x = map[basePlacement];\n if (alignment === 'start') y = 'top';\n else if (alignment === 'end') y = 'bottom';\n }\n\n return `${y} ${x}`;\n}\n","import { FocusMonitor, FocusOrigin, InteractivityChecker } from '@angular/cdk/a11y';\nimport { computed, Directive, inject } from '@angular/core';\nimport { injectFocusTrapState, NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { injectElementRef, NgpExitAnimation } from 'ng-primitives/internal';\nimport { injectPopoverTriggerState } from '../popover-trigger/popover-trigger-state';\nimport { getTransformOrigin } from '../utils/transform-origin';\n\n/**\n * Apply the `ngpPopover` directive to an element that represents the popover. This typically would be a `div` inside an `ng-template`.\n */\n@Directive({\n selector: '[ngpPopover]',\n exportAs: 'ngpPopover',\n hostDirectives: [NgpFocusTrap, NgpExitAnimation],\n host: {\n role: 'menu',\n '[style.left.px]': 'x()',\n '[style.top.px]': 'y()',\n '[style.--ngp-popover-trigger-width.px]': 'trigger().width()',\n '[style.--ngp-popover-transform-origin]': 'transformOrigin()',\n '(keydown.escape)': 'trigger().handleEscapeKey()',\n },\n})\nexport class NgpPopover {\n /**\n * Access the popover element.\n */\n private readonly popover = injectElementRef();\n\n /**\n * Access the interactivity checker.\n */\n private readonly interactivity = inject(InteractivityChecker);\n\n /**\n * Access the focus monitor.\n */\n private readonly focusMonitor = inject(FocusMonitor);\n\n /**\n * Access the focus trap.\n * @internal\n */\n readonly focusTrap = injectFocusTrapState();\n\n /**\n * Access the trigger instance.\n */\n protected readonly trigger = injectPopoverTriggerState();\n\n /**\n * Compute the x position of the popover.\n */\n protected readonly x = computed(() => this.trigger().position().x);\n\n /**\n * Compute the y position of the popover.\n */\n protected readonly y = computed(() => this.trigger().position().y);\n\n /**\n * Derive the transform origin of the popover.\n */\n protected readonly transformOrigin = computed(() =>\n getTransformOrigin(this.trigger().placement()),\n );\n\n constructor() {\n this.trigger().setPopover(this);\n }\n\n /**\n * Focus the first tabbable element inside the popover.\n * If no tabbable element is found, focus the popover itself.\n * @internal\n */\n setInitialFocus(origin: FocusOrigin): void {\n // use a tree walker to find the first tabbable child\n const treeWalker = document.createTreeWalker(\n this.popover.nativeElement,\n NodeFilter.SHOW_ELEMENT,\n {\n acceptNode: node =>\n node instanceof HTMLElement && this.interactivity.isTabbable(node)\n ? NodeFilter.FILTER_ACCEPT\n : NodeFilter.FILTER_SKIP,\n },\n );\n\n const tabbableNode = treeWalker.nextNode() as HTMLElement | null;\n\n if (tabbableNode) {\n this.focusMonitor.focusVia(tabbableNode, origin);\n } else {\n // if no tabbable child is found, focus the popover element itself\n this.popover.nativeElement.focus();\n }\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;AA2DO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,SAAS,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
30
  */
31
31
  this.state = injectProgressState();
32
32
  }
33
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpProgressIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
34
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.7", type: NgpProgressIndicator, isStandalone: true, selector: "[ngpProgressIndicator]", host: { properties: { "attr.data-state": "state().dataState()", "attr.data-value": "state().value()", "attr.data-max": "state().max()" } }, ngImport: i0 }); }
33
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpProgressIndicator, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
34
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: NgpProgressIndicator, isStandalone: true, selector: "[ngpProgressIndicator]", host: { properties: { "attr.data-state": "state().dataState()", "attr.data-value": "state().value()", "attr.data-max": "state().max()" } }, ngImport: i0 }); }
35
35
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpProgressIndicator, decorators: [{
36
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpProgressIndicator, decorators: [{
37
37
  type: Directive,
38
38
  args: [{
39
39
  selector: '[ngpProgressIndicator]',
@@ -94,10 +94,10 @@ class NgpProgress {
94
94
  */
95
95
  this.state = progressState(this);
96
96
  }
97
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpProgress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
98
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.7", type: NgpProgress, isStandalone: true, selector: "[ngpProgress]", inputs: { value: { classPropertyName: "value", publicName: "ngpProgressValue", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpProgressMax", isSignal: true, isRequired: false, transformFunction: null }, valueLabel: { classPropertyName: "valueLabel", publicName: "ngpProgressValueLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-valuemax": "state.max()", "attr.aria-valuemin": "0", "attr.aria-valuenow": "state.value()", "attr.aria-valuetext": "label()", "attr.data-state": "dataState()", "attr.data-value": "state.value()", "attr.data-max": "state.max()" } }, providers: [provideProgressState()], ngImport: i0 }); }
97
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpProgress, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
98
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: NgpProgress, isStandalone: true, selector: "[ngpProgress]", inputs: { value: { classPropertyName: "value", publicName: "ngpProgressValue", isSignal: true, isRequired: false, transformFunction: null }, max: { classPropertyName: "max", publicName: "ngpProgressMax", isSignal: true, isRequired: false, transformFunction: null }, valueLabel: { classPropertyName: "valueLabel", publicName: "ngpProgressValueLabel", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "progressbar" }, properties: { "attr.aria-valuemax": "state.max()", "attr.aria-valuemin": "0", "attr.aria-valuenow": "state.value()", "attr.aria-valuetext": "label()", "attr.data-state": "dataState()", "attr.data-value": "state.value()", "attr.data-max": "state.max()" } }, providers: [provideProgressState()], ngImport: i0 }); }
99
99
  }
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.7", ngImport: i0, type: NgpProgress, decorators: [{
100
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: NgpProgress, decorators: [{
101
101
  type: Directive,
102
102
  args: [{
103
103
  selector: '[ngpProgress]',