ng-primitives 0.124.0 → 0.126.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 (77) hide show
  1. package/date-time-date-fns/README.md +3 -0
  2. package/fesm2022/ng-primitives-avatar.mjs +4 -2
  3. package/fesm2022/ng-primitives-avatar.mjs.map +1 -1
  4. package/fesm2022/ng-primitives-checkbox.mjs +4 -2
  5. package/fesm2022/ng-primitives-checkbox.mjs.map +1 -1
  6. package/fesm2022/ng-primitives-date-picker.mjs +42 -44
  7. package/fesm2022/ng-primitives-date-picker.mjs.map +1 -1
  8. package/fesm2022/ng-primitives-date-time-date-fns.mjs +95 -0
  9. package/fesm2022/ng-primitives-date-time-date-fns.mjs.map +1 -0
  10. package/fesm2022/ng-primitives-date-time-luxon.mjs +21 -3
  11. package/fesm2022/ng-primitives-date-time-luxon.mjs.map +1 -1
  12. package/fesm2022/ng-primitives-date-time.mjs +18 -3
  13. package/fesm2022/ng-primitives-date-time.mjs.map +1 -1
  14. package/fesm2022/ng-primitives-dialog.mjs +11 -4
  15. package/fesm2022/ng-primitives-dialog.mjs.map +1 -1
  16. package/fesm2022/ng-primitives-form-field.mjs +3 -0
  17. package/fesm2022/ng-primitives-form-field.mjs.map +1 -1
  18. package/fesm2022/ng-primitives-input-otp.mjs +15 -7
  19. package/fesm2022/ng-primitives-input-otp.mjs.map +1 -1
  20. package/fesm2022/ng-primitives-listbox.mjs +5 -4
  21. package/fesm2022/ng-primitives-listbox.mjs.map +1 -1
  22. package/fesm2022/ng-primitives-menu.mjs +8 -0
  23. package/fesm2022/ng-primitives-menu.mjs.map +1 -1
  24. package/fesm2022/ng-primitives-meter.mjs +20 -5
  25. package/fesm2022/ng-primitives-meter.mjs.map +1 -1
  26. package/fesm2022/ng-primitives-number-field.mjs +10 -0
  27. package/fesm2022/ng-primitives-number-field.mjs.map +1 -1
  28. package/fesm2022/ng-primitives-pagination.mjs +16 -6
  29. package/fesm2022/ng-primitives-pagination.mjs.map +1 -1
  30. package/fesm2022/ng-primitives-password.mjs +293 -0
  31. package/fesm2022/ng-primitives-password.mjs.map +1 -0
  32. package/fesm2022/ng-primitives-popover.mjs +4 -0
  33. package/fesm2022/ng-primitives-popover.mjs.map +1 -1
  34. package/fesm2022/ng-primitives-progress.mjs +36 -11
  35. package/fesm2022/ng-primitives-progress.mjs.map +1 -1
  36. package/fesm2022/ng-primitives-roving-focus.mjs +13 -2
  37. package/fesm2022/ng-primitives-roving-focus.mjs.map +1 -1
  38. package/fesm2022/ng-primitives-search.mjs +2 -1
  39. package/fesm2022/ng-primitives-search.mjs.map +1 -1
  40. package/fesm2022/ng-primitives-slider.mjs +38 -18
  41. package/fesm2022/ng-primitives-slider.mjs.map +1 -1
  42. package/fesm2022/ng-primitives-switch.mjs +18 -8
  43. package/fesm2022/ng-primitives-switch.mjs.map +1 -1
  44. package/fesm2022/ng-primitives-tabs.mjs +22 -6
  45. package/fesm2022/ng-primitives-tabs.mjs.map +1 -1
  46. package/fesm2022/ng-primitives-textarea.mjs +10 -8
  47. package/fesm2022/ng-primitives-textarea.mjs.map +1 -1
  48. package/fesm2022/ng-primitives-toast.mjs +3 -0
  49. package/fesm2022/ng-primitives-toast.mjs.map +1 -1
  50. package/fesm2022/ng-primitives-toggle-group.mjs +31 -8
  51. package/fesm2022/ng-primitives-toggle-group.mjs.map +1 -1
  52. package/package.json +12 -1
  53. package/password/README.md +3 -0
  54. package/schematics/ng-generate/templates/checkbox/checkbox.__fileSuffix@dasherize__.ts.template +2 -1
  55. package/schematics/ng-generate/templates/combobox/combobox.__fileSuffix@dasherize__.ts.template +3 -2
  56. package/schematics/ng-generate/templates/date-picker/date-picker.__fileSuffix@dasherize__.ts.template +2 -1
  57. package/schematics/ng-generate/templates/listbox/listbox.__fileSuffix@dasherize__.ts.template +9 -4
  58. package/schematics/ng-generate/templates/pagination/pagination.__fileSuffix@dasherize__.ts.template +7 -1
  59. package/schematics/ng-generate/templates/password/password.__fileSuffix@dasherize__.ts.template +141 -0
  60. package/schematics/ng-generate/templates/range-slider/range-slider.__fileSuffix@dasherize__.ts.template +4 -3
  61. package/schematics/ng-generate/templates/slider/slider.__fileSuffix@dasherize__.ts.template +2 -1
  62. package/schematics/ng-generate/templates/switch/switch.__fileSuffix@dasherize__.ts.template +2 -1
  63. package/types/ng-primitives-checkbox.d.ts +5 -1
  64. package/types/ng-primitives-date-picker.d.ts +7 -9
  65. package/types/ng-primitives-date-time-date-fns.d.ts +30 -0
  66. package/types/ng-primitives-date-time.d.ts +15 -3
  67. package/types/ng-primitives-dialog.d.ts +4 -0
  68. package/types/ng-primitives-input-otp.d.ts +5 -5
  69. package/types/ng-primitives-meter.d.ts +9 -2
  70. package/types/ng-primitives-pagination.d.ts +34 -8
  71. package/types/ng-primitives-password.d.ts +296 -0
  72. package/types/ng-primitives-progress.d.ts +4 -2
  73. package/types/ng-primitives-roving-focus.d.ts +7 -0
  74. package/types/ng-primitives-slider.d.ts +5 -4
  75. package/types/ng-primitives-switch.d.ts +14 -4
  76. package/types/ng-primitives-tabs.d.ts +6 -1
  77. package/types/ng-primitives-toggle-group.d.ts +51 -37
@@ -0,0 +1,293 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, signal, computed, input, booleanAttribute, Directive, output } from '@angular/core';
3
+ import { uniqueId } from 'ng-primitives/utils';
4
+ import { ngpInput } from 'ng-primitives/input';
5
+ import { injectElementRef } from 'ng-primitives/internal';
6
+ import { createPrimitive, controlled, controlledState, dataBinding, deprecatedSetter, attrBinding, onMount, listener } from 'ng-primitives/state';
7
+ import { LiveAnnouncer } from '@angular/cdk/a11y';
8
+
9
+ const defaultPasswordConfig = {
10
+ showLabel: 'Show password',
11
+ hideLabel: 'Hide password',
12
+ shownAnnouncement: 'Your password is shown',
13
+ hiddenAnnouncement: 'Your password is hidden',
14
+ ignorePasswordManagers: false,
15
+ };
16
+ const NgpPasswordConfigToken = new InjectionToken('NgpPasswordConfigToken');
17
+ /**
18
+ * Provide the default Password configuration
19
+ * @param config The Password configuration
20
+ * @returns The provider
21
+ */
22
+ function providePasswordConfig(config) {
23
+ return [
24
+ {
25
+ provide: NgpPasswordConfigToken,
26
+ useValue: { ...defaultPasswordConfig, ...config },
27
+ },
28
+ ];
29
+ }
30
+ /**
31
+ * Inject the Password configuration
32
+ * @returns The global Password configuration
33
+ */
34
+ function injectPasswordConfig() {
35
+ return inject(NgpPasswordConfigToken, { optional: true }) ?? defaultPasswordConfig;
36
+ }
37
+
38
+ const [NgpPasswordStateToken, ngpPassword, injectPasswordState, providePasswordState] = createPrimitive('NgpPassword', ({ visible: _visible, defaultVisible: _defaultVisible, onVisibleChange, }) => {
39
+ const element = injectElementRef();
40
+ const defaultVisible = controlled(_defaultVisible, false);
41
+ const input = signal(null, ...(ngDevMode ? [{ debugName: "input" }] : /* istanbul ignore next */ []));
42
+ const inputId = signal(null, ...(ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []));
43
+ const [visible, setVisible, visibleChange] = controlledState({
44
+ value: _visible,
45
+ defaultValue: defaultVisible,
46
+ onChange: onVisibleChange,
47
+ });
48
+ dataBinding(element, 'data-visible', visible);
49
+ function toggle() {
50
+ setVisible(!visible());
51
+ }
52
+ function registerInput(el, id) {
53
+ input.set(el);
54
+ inputId.set(id);
55
+ }
56
+ function focusInput() {
57
+ input()?.focus();
58
+ }
59
+ return {
60
+ visible: deprecatedSetter(visible, 'setVisible', setVisible),
61
+ visibleChange,
62
+ inputId: computed(() => inputId()?.() ?? null),
63
+ toggle,
64
+ setVisible,
65
+ setDefaultVisible: defaultVisible.set,
66
+ registerInput,
67
+ focusInput,
68
+ };
69
+ });
70
+
71
+ const [NgpPasswordInputStateToken, ngpPasswordInput, injectPasswordInputState, providePasswordInputState,] = createPrimitive('NgpPasswordInput', ({ id, disabled, ignorePasswordManagers = signal(false), }) => {
72
+ const element = injectElementRef();
73
+ const password = injectPasswordState();
74
+ // Compose ngpInput for form control, interactions, autofill and the id.
75
+ const input = ngpInput({ id, disabled });
76
+ // Register with the container for aria-controls.
77
+ password().registerInput(element.nativeElement, input.id);
78
+ // Consumers keep type="password" in the markup so the field renders masked
79
+ // from the start; this drives the toggle to text and back.
80
+ attrBinding(element, 'type', () => (password().visible() ? 'text' : 'password'));
81
+ dataBinding(element, 'data-visible', () => password().visible());
82
+ // Opt out of password manager injection when requested.
83
+ attrBinding(element, 'data-1p-ignore', () => (ignorePasswordManagers() ? '' : null));
84
+ attrBinding(element, 'data-lpignore', () => (ignorePasswordManagers() ? 'true' : null));
85
+ attrBinding(element, 'data-bwignore', () => (ignorePasswordManagers() ? '' : null));
86
+ // Reset to hidden on submit so browsers don't cache a plaintext field.
87
+ onMount(() => {
88
+ const form = element.nativeElement.form;
89
+ if (form) {
90
+ listener(form, 'submit', () => password().setVisible(false));
91
+ }
92
+ });
93
+ return input;
94
+ });
95
+
96
+ /**
97
+ * Apply the `ngpPasswordInput` directive to an `input` element within an `ngpPassword` container.
98
+ * It is a complete input (form control, interactions, autofill) with password visibility toggling
99
+ * layered on top, so it does not need to be combined with `ngpInput`.
100
+ */
101
+ class NgpPasswordInput {
102
+ constructor() {
103
+ /**
104
+ * Access the global password configuration.
105
+ */
106
+ this.config = injectPasswordConfig();
107
+ /**
108
+ * The id of the input.
109
+ */
110
+ this.id = input(uniqueId('ngp-password-input'), ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
111
+ /**
112
+ * Whether the input is disabled.
113
+ */
114
+ this.disabled = input(false, { ...(ngDevMode ? { debugName: "disabled" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
115
+ /**
116
+ * Whether to opt the input out of password manager injection
117
+ * (1Password, LastPass, Bitwarden, etc.).
118
+ */
119
+ this.ignorePasswordManagers = input(this.config.ignorePasswordManagers, { ...(ngDevMode ? { debugName: "ignorePasswordManagers" } : /* istanbul ignore next */ {}), alias: 'ngpPasswordInputIgnorePasswordManagers',
120
+ transform: booleanAttribute });
121
+ /**
122
+ * The state for the password input primitive.
123
+ */
124
+ this.state = ngpPasswordInput({
125
+ id: this.id,
126
+ disabled: this.disabled,
127
+ ignorePasswordManagers: this.ignorePasswordManagers,
128
+ });
129
+ }
130
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpPasswordInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
131
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpPasswordInput, isStandalone: true, selector: "input[ngpPasswordInput]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, ignorePasswordManagers: { classPropertyName: "ignorePasswordManagers", publicName: "ngpPasswordInputIgnorePasswordManagers", isSignal: true, isRequired: false, transformFunction: null } }, providers: [providePasswordInputState()], exportAs: ["ngpPasswordInput"], ngImport: i0 }); }
132
+ }
133
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpPasswordInput, decorators: [{
134
+ type: Directive,
135
+ args: [{
136
+ selector: 'input[ngpPasswordInput]',
137
+ exportAs: 'ngpPasswordInput',
138
+ providers: [providePasswordInputState()],
139
+ }]
140
+ }], propDecorators: { id: [{ type: i0.Input, args: [{ isSignal: true, alias: "id", required: false }] }], disabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "disabled", required: false }] }], ignorePasswordManagers: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpPasswordInputIgnorePasswordManagers", required: false }] }] } });
141
+
142
+ const [NgpPasswordToggleStateToken, ngpPasswordToggle, injectPasswordToggleState, providePasswordToggleState,] = createPrimitive('NgpPasswordToggle', ({ showLabel, hideLabel, shownAnnouncement, hiddenAnnouncement, }) => {
143
+ const element = injectElementRef();
144
+ const password = injectPasswordState();
145
+ const announcer = inject(LiveAnnouncer);
146
+ // Pointer activation returns focus to the input; keyboard keeps it on the button.
147
+ const pointerActivated = signal(false, ...(ngDevMode ? [{ debugName: "pointerActivated" }] : /* istanbul ignore next */ []));
148
+ attrBinding(element, 'type', 'button');
149
+ attrBinding(element, 'aria-controls', () => password().inputId());
150
+ attrBinding(element, 'aria-label', () => {
151
+ // Defer to the button's own text if it has any.
152
+ if ((element.nativeElement.textContent ?? '').trim().length > 0) {
153
+ return null;
154
+ }
155
+ return password().visible() ? hideLabel() : showLabel();
156
+ });
157
+ dataBinding(element, 'data-visible', () => password().visible());
158
+ listener(element, 'pointerdown', () => pointerActivated.set(true));
159
+ listener(element, 'click', () => toggle());
160
+ function toggle() {
161
+ const state = password();
162
+ // Announce the intended state: in controlled mode state.visible() may not
163
+ // reflect the new value until the parent propagates it back.
164
+ const willBeVisible = !state.visible();
165
+ state.toggle();
166
+ announcer.announce(willBeVisible ? shownAnnouncement() : hiddenAnnouncement());
167
+ if (pointerActivated()) {
168
+ state.focusInput();
169
+ }
170
+ pointerActivated.set(false);
171
+ }
172
+ return { toggle };
173
+ });
174
+
175
+ /**
176
+ * Apply the `ngpPasswordToggle` directive to a `button` element to toggle the visibility of the
177
+ * password within an `ngpPassword` container.
178
+ */
179
+ class NgpPasswordToggle {
180
+ constructor() {
181
+ /**
182
+ * Access the global password configuration.
183
+ */
184
+ this.config = injectPasswordConfig();
185
+ /**
186
+ * The accessible label shown when the password is hidden.
187
+ */
188
+ this.showLabel = input(this.config.showLabel, { ...(ngDevMode ? { debugName: "showLabel" } : /* istanbul ignore next */ {}), alias: 'ngpPasswordToggleShowLabel' });
189
+ /**
190
+ * The accessible label shown when the password is visible.
191
+ */
192
+ this.hideLabel = input(this.config.hideLabel, { ...(ngDevMode ? { debugName: "hideLabel" } : /* istanbul ignore next */ {}), alias: 'ngpPasswordToggleHideLabel' });
193
+ /**
194
+ * The message announced when the password becomes visible.
195
+ */
196
+ this.shownAnnouncement = input(this.config.shownAnnouncement, { ...(ngDevMode ? { debugName: "shownAnnouncement" } : /* istanbul ignore next */ {}), alias: 'ngpPasswordToggleShownAnnouncement' });
197
+ /**
198
+ * The message announced when the password becomes hidden.
199
+ */
200
+ this.hiddenAnnouncement = input(this.config.hiddenAnnouncement, { ...(ngDevMode ? { debugName: "hiddenAnnouncement" } : /* istanbul ignore next */ {}), alias: 'ngpPasswordToggleHiddenAnnouncement' });
201
+ /**
202
+ * The state for the password toggle primitive.
203
+ */
204
+ this.state = ngpPasswordToggle({
205
+ showLabel: this.showLabel,
206
+ hideLabel: this.hideLabel,
207
+ shownAnnouncement: this.shownAnnouncement,
208
+ hiddenAnnouncement: this.hiddenAnnouncement,
209
+ });
210
+ }
211
+ /**
212
+ * Toggle the visibility of the password.
213
+ */
214
+ toggle() {
215
+ this.state.toggle();
216
+ }
217
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpPasswordToggle, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
218
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpPasswordToggle, isStandalone: true, selector: "button[ngpPasswordToggle]", inputs: { showLabel: { classPropertyName: "showLabel", publicName: "ngpPasswordToggleShowLabel", isSignal: true, isRequired: false, transformFunction: null }, hideLabel: { classPropertyName: "hideLabel", publicName: "ngpPasswordToggleHideLabel", isSignal: true, isRequired: false, transformFunction: null }, shownAnnouncement: { classPropertyName: "shownAnnouncement", publicName: "ngpPasswordToggleShownAnnouncement", isSignal: true, isRequired: false, transformFunction: null }, hiddenAnnouncement: { classPropertyName: "hiddenAnnouncement", publicName: "ngpPasswordToggleHiddenAnnouncement", isSignal: true, isRequired: false, transformFunction: null } }, providers: [providePasswordToggleState()], exportAs: ["ngpPasswordToggle"], ngImport: i0 }); }
219
+ }
220
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpPasswordToggle, decorators: [{
221
+ type: Directive,
222
+ args: [{
223
+ selector: 'button[ngpPasswordToggle]',
224
+ exportAs: 'ngpPasswordToggle',
225
+ providers: [providePasswordToggleState()],
226
+ }]
227
+ }], propDecorators: { showLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpPasswordToggleShowLabel", required: false }] }], hideLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpPasswordToggleHideLabel", required: false }] }], shownAnnouncement: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpPasswordToggleShownAnnouncement", required: false }] }], hiddenAnnouncement: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpPasswordToggleHiddenAnnouncement", required: false }] }] } });
228
+
229
+ /**
230
+ * The `NgpPassword` directive is a container for a password field and its visibility toggle.
231
+ */
232
+ class NgpPassword {
233
+ constructor() {
234
+ /**
235
+ * Whether the password is visible.
236
+ */
237
+ this.visible = input(undefined, { ...(ngDevMode ? { debugName: "visible" } : /* istanbul ignore next */ {}), alias: 'ngpPasswordVisible',
238
+ transform: booleanAttribute });
239
+ /**
240
+ * The default visibility state for uncontrolled usage.
241
+ * @default false
242
+ */
243
+ this.defaultVisible = input(false, { ...(ngDevMode ? { debugName: "defaultVisible" } : /* istanbul ignore next */ {}), alias: 'ngpPasswordDefaultVisible',
244
+ transform: booleanAttribute });
245
+ /**
246
+ * Emits when the visibility state changes.
247
+ */
248
+ this.visibleChange = output({
249
+ alias: 'ngpPasswordVisibleChange',
250
+ });
251
+ /**
252
+ * The state for the password primitive.
253
+ */
254
+ this.state = ngpPassword({
255
+ visible: this.visible,
256
+ defaultVisible: this.defaultVisible,
257
+ onVisibleChange: value => this.visibleChange.emit(value),
258
+ });
259
+ /**
260
+ * Whether the password is currently visible.
261
+ */
262
+ this.isVisible = computed(() => this.state.visible(), ...(ngDevMode ? [{ debugName: "isVisible" }] : /* istanbul ignore next */ []));
263
+ }
264
+ /**
265
+ * Toggle the visibility of the password.
266
+ */
267
+ toggle() {
268
+ this.state.toggle();
269
+ }
270
+ /**
271
+ * Set the visibility of the password.
272
+ */
273
+ setVisible(value, options) {
274
+ this.state.setVisible(value, options);
275
+ }
276
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpPassword, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
277
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: NgpPassword, isStandalone: true, selector: "[ngpPassword]", inputs: { visible: { classPropertyName: "visible", publicName: "ngpPasswordVisible", isSignal: true, isRequired: false, transformFunction: null }, defaultVisible: { classPropertyName: "defaultVisible", publicName: "ngpPasswordDefaultVisible", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { visibleChange: "ngpPasswordVisibleChange" }, providers: [providePasswordState()], exportAs: ["ngpPassword"], ngImport: i0 }); }
278
+ }
279
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: NgpPassword, decorators: [{
280
+ type: Directive,
281
+ args: [{
282
+ selector: '[ngpPassword]',
283
+ exportAs: 'ngpPassword',
284
+ providers: [providePasswordState()],
285
+ }]
286
+ }], propDecorators: { visible: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpPasswordVisible", required: false }] }], defaultVisible: [{ type: i0.Input, args: [{ isSignal: true, alias: "ngpPasswordDefaultVisible", required: false }] }], visibleChange: [{ type: i0.Output, args: ["ngpPasswordVisibleChange"] }] } });
287
+
288
+ /**
289
+ * Generated bundle index. Do not edit.
290
+ */
291
+
292
+ export { NgpPassword, NgpPasswordConfigToken, NgpPasswordInput, NgpPasswordToggle, defaultPasswordConfig, injectPasswordConfig, injectPasswordInputState, injectPasswordState, injectPasswordToggleState, ngpPassword, ngpPasswordInput, ngpPasswordToggle, providePasswordConfig, providePasswordInputState, providePasswordState, providePasswordToggleState };
293
+ //# sourceMappingURL=ng-primitives-password.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ng-primitives-password.mjs","sources":["../../../../packages/ng-primitives/password/src/config/password-config.ts","../../../../packages/ng-primitives/password/src/password/password-state.ts","../../../../packages/ng-primitives/password/src/password-input/password-input-state.ts","../../../../packages/ng-primitives/password/src/password-input/password-input.ts","../../../../packages/ng-primitives/password/src/password-toggle/password-toggle-state.ts","../../../../packages/ng-primitives/password/src/password-toggle/password-toggle.ts","../../../../packages/ng-primitives/password/src/password/password.ts","../../../../packages/ng-primitives/password/src/ng-primitives-password.ts"],"sourcesContent":["import { inject, InjectionToken, Provider } from '@angular/core';\n\nexport interface NgpPasswordConfig {\n /**\n * The accessible label for the toggle button when the password is hidden.\n * @default 'Show password'\n */\n showLabel: string;\n\n /**\n * The accessible label for the toggle button when the password is visible.\n * @default 'Hide password'\n */\n hideLabel: string;\n\n /**\n * The message announced to screen readers when the password becomes visible.\n * @default 'Your password is shown'\n */\n shownAnnouncement: string;\n\n /**\n * The message announced to screen readers when the password becomes hidden.\n * @default 'Your password is hidden'\n */\n hiddenAnnouncement: string;\n\n /**\n * Whether to opt the input out of password manager injection by default.\n * @default false\n */\n ignorePasswordManagers: boolean;\n}\n\nexport const defaultPasswordConfig: NgpPasswordConfig = {\n showLabel: 'Show password',\n hideLabel: 'Hide password',\n shownAnnouncement: 'Your password is shown',\n hiddenAnnouncement: 'Your password is hidden',\n ignorePasswordManagers: false,\n};\n\nexport const NgpPasswordConfigToken = new InjectionToken<NgpPasswordConfig>(\n 'NgpPasswordConfigToken',\n);\n\n/**\n * Provide the default Password configuration\n * @param config The Password configuration\n * @returns The provider\n */\nexport function providePasswordConfig(config: Partial<NgpPasswordConfig>): Provider[] {\n return [\n {\n provide: NgpPasswordConfigToken,\n useValue: { ...defaultPasswordConfig, ...config },\n },\n ];\n}\n\n/**\n * Inject the Password configuration\n * @returns The global Password configuration\n */\nexport function injectPasswordConfig(): NgpPasswordConfig {\n return inject(NgpPasswordConfigToken, { optional: true }) ?? defaultPasswordConfig;\n}\n","import { computed, Signal, signal, WritableSignal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n controlled,\n controlledState,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n SetterOptions,\n} from 'ng-primitives/state';\nimport { Observable } from 'rxjs';\n\n/**\n * Public state surface for the Password primitive.\n */\nexport interface NgpPasswordState {\n /**\n * Whether the password is currently visible.\n */\n readonly visible: WritableSignal<boolean>;\n /**\n * Emits when the visibility state changes.\n */\n readonly visibleChange: Observable<boolean>;\n /**\n * The id of the registered input, used to wire up `aria-controls`.\n * @internal\n */\n readonly inputId: Signal<string | null>;\n /**\n * Toggle the visibility state.\n */\n toggle(): void;\n /**\n * Set the visibility state.\n */\n setVisible(value: boolean, options?: SetterOptions): void;\n /**\n * Set the default visibility state.\n */\n setDefaultVisible(value: boolean): void;\n /**\n * Register the password input with the container.\n * @internal\n */\n registerInput(input: HTMLInputElement, id: Signal<string>): void;\n /**\n * Focus the registered input.\n * @internal\n */\n focusInput(): void;\n}\n\n/**\n * Inputs for configuring the Password primitive.\n */\nexport interface NgpPasswordProps {\n /**\n * Whether the password is visible.\n */\n readonly visible: Signal<boolean | undefined>;\n /**\n * The default visibility state for uncontrolled usage.\n */\n readonly defaultVisible?: Signal<boolean>;\n /**\n * Callback fired when the visibility state changes.\n */\n readonly onVisibleChange?: (visible: boolean) => void;\n}\n\nexport const [NgpPasswordStateToken, ngpPassword, injectPasswordState, providePasswordState] =\n createPrimitive(\n 'NgpPassword',\n ({\n visible: _visible,\n defaultVisible: _defaultVisible,\n onVisibleChange,\n }: NgpPasswordProps): NgpPasswordState => {\n const element = injectElementRef<HTMLElement>();\n const defaultVisible = controlled(_defaultVisible, false);\n\n const input = signal<HTMLInputElement | null>(null);\n const inputId = signal<Signal<string> | null>(null);\n\n const [visible, setVisible, visibleChange] = controlledState({\n value: _visible,\n defaultValue: defaultVisible,\n onChange: onVisibleChange,\n });\n\n dataBinding(element, 'data-visible', visible);\n\n function toggle(): void {\n setVisible(!visible());\n }\n\n function registerInput(el: HTMLInputElement, id: Signal<string>): void {\n input.set(el);\n inputId.set(id);\n }\n\n function focusInput(): void {\n input()?.focus();\n }\n\n return {\n visible: deprecatedSetter(visible, 'setVisible', setVisible),\n visibleChange,\n inputId: computed(() => inputId()?.() ?? null),\n toggle,\n setVisible,\n setDefaultVisible: defaultVisible.set,\n registerInput,\n focusInput,\n } satisfies NgpPasswordState;\n },\n );\n","import { Signal, signal } from '@angular/core';\nimport { ngpInput, NgpInputState } from 'ng-primitives/input';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener, onMount } from 'ng-primitives/state';\nimport { injectPasswordState } from '../password/password-state';\n\n/**\n * The state for the PasswordInput pattern, extending the Input state.\n */\nexport type NgpPasswordInputState = NgpInputState;\n\n/**\n * The props interface for the PasswordInput pattern.\n */\nexport interface NgpPasswordInputProps {\n /**\n * The id of the input.\n */\n readonly id?: Signal<string>;\n /**\n * Whether the input is disabled.\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Whether to opt the input out of password manager injection.\n */\n readonly ignorePasswordManagers?: Signal<boolean>;\n}\n\nexport const [\n NgpPasswordInputStateToken,\n ngpPasswordInput,\n injectPasswordInputState,\n providePasswordInputState,\n] = createPrimitive(\n 'NgpPasswordInput',\n ({\n id,\n disabled,\n ignorePasswordManagers = signal(false),\n }: NgpPasswordInputProps): NgpPasswordInputState => {\n const element = injectElementRef<HTMLInputElement>();\n const password = injectPasswordState();\n\n // Compose ngpInput for form control, interactions, autofill and the id.\n const input = ngpInput({ id, disabled });\n\n // Register with the container for aria-controls.\n password().registerInput(element.nativeElement, input.id);\n\n // Consumers keep type=\"password\" in the markup so the field renders masked\n // from the start; this drives the toggle to text and back.\n attrBinding(element, 'type', () => (password().visible() ? 'text' : 'password'));\n dataBinding(element, 'data-visible', () => password().visible());\n\n // Opt out of password manager injection when requested.\n attrBinding(element, 'data-1p-ignore', () => (ignorePasswordManagers() ? '' : null));\n attrBinding(element, 'data-lpignore', () => (ignorePasswordManagers() ? 'true' : null));\n attrBinding(element, 'data-bwignore', () => (ignorePasswordManagers() ? '' : null));\n\n // Reset to hidden on submit so browsers don't cache a plaintext field.\n onMount(() => {\n const form = element.nativeElement.form;\n if (form) {\n listener(form, 'submit', () => password().setVisible(false));\n }\n });\n\n return input;\n },\n);\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, Directive, input } from '@angular/core';\nimport { uniqueId } from 'ng-primitives/utils';\nimport { injectPasswordConfig } from '../config/password-config';\nimport { ngpPasswordInput, providePasswordInputState } from './password-input-state';\n\n/**\n * Apply the `ngpPasswordInput` directive to an `input` element within an `ngpPassword` container.\n * It is a complete input (form control, interactions, autofill) with password visibility toggling\n * layered on top, so it does not need to be combined with `ngpInput`.\n */\n@Directive({\n selector: 'input[ngpPasswordInput]',\n exportAs: 'ngpPasswordInput',\n providers: [providePasswordInputState()],\n})\nexport class NgpPasswordInput {\n /**\n * Access the global password configuration.\n */\n private readonly config = injectPasswordConfig();\n\n /**\n * The id of the input.\n */\n readonly id = input<string>(uniqueId('ngp-password-input'));\n\n /**\n * Whether the input is disabled.\n */\n readonly disabled = input<boolean, BooleanInput>(false, {\n transform: booleanAttribute,\n });\n\n /**\n * Whether to opt the input out of password manager injection\n * (1Password, LastPass, Bitwarden, etc.).\n */\n readonly ignorePasswordManagers = input<boolean, BooleanInput>(\n this.config.ignorePasswordManagers,\n {\n alias: 'ngpPasswordInputIgnorePasswordManagers',\n transform: booleanAttribute,\n },\n );\n\n /**\n * The state for the password input primitive.\n */\n protected readonly state = ngpPasswordInput({\n id: this.id,\n disabled: this.disabled,\n ignorePasswordManagers: this.ignorePasswordManagers,\n });\n}\n","import { LiveAnnouncer } from '@angular/cdk/a11y';\nimport { inject, Signal, signal } from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport { attrBinding, createPrimitive, dataBinding, listener } from 'ng-primitives/state';\nimport { injectPasswordState } from '../password/password-state';\n\n/**\n * The state interface for the PasswordToggle pattern.\n */\nexport interface NgpPasswordToggleState {\n /**\n * Toggle the visibility of the password.\n */\n toggle(): void;\n}\n\n/**\n * The props interface for the PasswordToggle pattern.\n */\nexport interface NgpPasswordToggleProps {\n /**\n * The accessible label shown when the password is hidden.\n */\n readonly showLabel: Signal<string>;\n /**\n * The accessible label shown when the password is visible.\n */\n readonly hideLabel: Signal<string>;\n /**\n * The message announced when the password becomes visible.\n */\n readonly shownAnnouncement: Signal<string>;\n /**\n * The message announced when the password becomes hidden.\n */\n readonly hiddenAnnouncement: Signal<string>;\n}\n\nexport const [\n NgpPasswordToggleStateToken,\n ngpPasswordToggle,\n injectPasswordToggleState,\n providePasswordToggleState,\n] = createPrimitive(\n 'NgpPasswordToggle',\n ({\n showLabel,\n hideLabel,\n shownAnnouncement,\n hiddenAnnouncement,\n }: NgpPasswordToggleProps): NgpPasswordToggleState => {\n const element = injectElementRef<HTMLButtonElement>();\n const password = injectPasswordState();\n const announcer = inject(LiveAnnouncer);\n\n // Pointer activation returns focus to the input; keyboard keeps it on the button.\n const pointerActivated = signal(false);\n\n attrBinding(element, 'type', 'button');\n attrBinding(element, 'aria-controls', () => password().inputId());\n attrBinding(element, 'aria-label', () => {\n // Defer to the button's own text if it has any.\n if ((element.nativeElement.textContent ?? '').trim().length > 0) {\n return null;\n }\n return password().visible() ? hideLabel() : showLabel();\n });\n dataBinding(element, 'data-visible', () => password().visible());\n\n listener(element, 'pointerdown', () => pointerActivated.set(true));\n listener(element, 'click', () => toggle());\n\n function toggle(): void {\n const state = password();\n // Announce the intended state: in controlled mode state.visible() may not\n // reflect the new value until the parent propagates it back.\n const willBeVisible = !state.visible();\n state.toggle();\n\n announcer.announce(willBeVisible ? shownAnnouncement() : hiddenAnnouncement());\n\n if (pointerActivated()) {\n state.focusInput();\n }\n pointerActivated.set(false);\n }\n\n return { toggle } satisfies NgpPasswordToggleState;\n },\n);\n","import { Directive, input } from '@angular/core';\nimport { injectPasswordConfig } from '../config/password-config';\nimport { ngpPasswordToggle, providePasswordToggleState } from './password-toggle-state';\n\n/**\n * Apply the `ngpPasswordToggle` directive to a `button` element to toggle the visibility of the\n * password within an `ngpPassword` container.\n */\n@Directive({\n selector: 'button[ngpPasswordToggle]',\n exportAs: 'ngpPasswordToggle',\n providers: [providePasswordToggleState()],\n})\nexport class NgpPasswordToggle {\n /**\n * Access the global password configuration.\n */\n private readonly config = injectPasswordConfig();\n\n /**\n * The accessible label shown when the password is hidden.\n */\n readonly showLabel = input(this.config.showLabel, { alias: 'ngpPasswordToggleShowLabel' });\n\n /**\n * The accessible label shown when the password is visible.\n */\n readonly hideLabel = input(this.config.hideLabel, { alias: 'ngpPasswordToggleHideLabel' });\n\n /**\n * The message announced when the password becomes visible.\n */\n readonly shownAnnouncement = input(this.config.shownAnnouncement, {\n alias: 'ngpPasswordToggleShownAnnouncement',\n });\n\n /**\n * The message announced when the password becomes hidden.\n */\n readonly hiddenAnnouncement = input(this.config.hiddenAnnouncement, {\n alias: 'ngpPasswordToggleHiddenAnnouncement',\n });\n\n /**\n * The state for the password toggle primitive.\n */\n protected readonly state = ngpPasswordToggle({\n showLabel: this.showLabel,\n hideLabel: this.hideLabel,\n shownAnnouncement: this.shownAnnouncement,\n hiddenAnnouncement: this.hiddenAnnouncement,\n });\n\n /**\n * Toggle the visibility of the password.\n */\n toggle(): void {\n this.state.toggle();\n }\n}\n","import { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, input, output, Signal } from '@angular/core';\nimport { SetterOptions } from 'ng-primitives/state';\nimport { ngpPassword, providePasswordState } from './password-state';\n\n/**\n * The `NgpPassword` directive is a container for a password field and its visibility toggle.\n */\n@Directive({\n selector: '[ngpPassword]',\n exportAs: 'ngpPassword',\n providers: [providePasswordState()],\n})\nexport class NgpPassword {\n /**\n * Whether the password is visible.\n */\n readonly visible = input<boolean | undefined, BooleanInput>(undefined, {\n alias: 'ngpPasswordVisible',\n transform: booleanAttribute,\n });\n\n /**\n * The default visibility state for uncontrolled usage.\n * @default false\n */\n readonly defaultVisible = input<boolean, BooleanInput>(false, {\n alias: 'ngpPasswordDefaultVisible',\n transform: booleanAttribute,\n });\n\n /**\n * Emits when the visibility state changes.\n */\n readonly visibleChange = output<boolean>({\n alias: 'ngpPasswordVisibleChange',\n });\n\n /**\n * The state for the password primitive.\n */\n protected readonly state = ngpPassword({\n visible: this.visible,\n defaultVisible: this.defaultVisible,\n onVisibleChange: value => this.visibleChange.emit(value),\n });\n\n /**\n * Whether the password is currently visible.\n */\n readonly isVisible: Signal<boolean> = computed(() => this.state.visible());\n\n /**\n * Toggle the visibility of the password.\n */\n toggle(): void {\n this.state.toggle();\n }\n\n /**\n * Set the visibility of the password.\n */\n setVisible(value: boolean, options?: SetterOptions): void {\n this.state.setVisible(value, options);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAkCO,MAAM,qBAAqB,GAAsB;AACtD,IAAA,SAAS,EAAE,eAAe;AAC1B,IAAA,SAAS,EAAE,eAAe;AAC1B,IAAA,iBAAiB,EAAE,wBAAwB;AAC3C,IAAA,kBAAkB,EAAE,yBAAyB;AAC7C,IAAA,sBAAsB,EAAE,KAAK;;MAGlB,sBAAsB,GAAG,IAAI,cAAc,CACtD,wBAAwB;AAG1B;;;;AAIG;AACG,SAAU,qBAAqB,CAAC,MAAkC,EAAA;IACtE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,sBAAsB;AAC/B,YAAA,QAAQ,EAAE,EAAE,GAAG,qBAAqB,EAAE,GAAG,MAAM,EAAE;AAClD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,oBAAoB,GAAA;AAClC,IAAA,OAAO,MAAM,CAAC,sBAAsB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,qBAAqB;AACpF;;ACKO,MAAM,CAAC,qBAAqB,EAAE,WAAW,EAAE,mBAAmB,EAAE,oBAAoB,CAAC,GAC1F,eAAe,CACb,aAAa,EACb,CAAC,EACC,OA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AAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,EAAA,iBAAA,EAAA,gBAAA,EAAA,UAAA,EAAA,2BAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,aAAA,EAAA,0BAAA,EAAA,EAAA,SAAA,EAFX,CAAC,oBAAoB,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,aAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAExB,WAAW,EAAA,UAAA,EAAA,CAAA;kBALvB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,SAAS,EAAE,CAAC,oBAAoB,EAAE,CAAC;AACpC,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -86,7 +86,11 @@ const [NgpPopoverTriggerStateToken, ngpPopoverTrigger, _injectPopoverTriggerStat
86
86
  const open = computed(() => overlay()?.isOpen() ?? false, ...(ngDevMode ? [{ debugName: "open" }] : /* istanbul ignore next */ []));
87
87
  // Host binding
88
88
  attrBinding(elementRef, 'aria-expanded', () => (open() ? 'true' : 'false'));
89
+ // the popover is a focus-trapped, dialog-like overlay, so advertise the popup type
90
+ attrBinding(elementRef, 'aria-haspopup', 'dialog');
89
91
  attrBinding(elementRef, 'aria-describedby', () => overlay()?.ariaDescribedBy());
92
+ // reference the controlled popover by id while it is open (it does not exist when closed)
93
+ attrBinding(elementRef, 'aria-controls', () => (open() ? (overlay()?.id() ?? null) : null));
90
94
  dataBinding(elementRef, 'data-open', open);
91
95
  dataBinding(elementRef, 'data-placement', placement);
92
96
  dataBinding(elementRef, 'data-disabled', disabled);
@@ -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-arrow/popover-arrow-state.ts","../../../../packages/ng-primitives/popover/src/popover-arrow/popover-arrow.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/popover/popover-state.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';\nimport { NgpDismissGuard, NgpFlip, NgpOffset, NgpShift } from 'ng-primitives/portal';\n\nexport interface NgpPopoverConfig {\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 4\n */\n offset: NgpOffset;\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 * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n flip: NgpFlip;\n\n /**\n * Define the container element or selector in to which the popover should be attached.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n closeOnOutsideClick: NgpDismissGuard<Element>;\n\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n closeOnEscape: NgpDismissGuard<KeyboardEvent>;\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block' | 'close';\n\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n shift: NgpShift;\n\n /**\n * Whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n trackPosition: boolean;\n\n /**\n * Cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n cooldown: number;\n}\n\nexport const defaultPopoverConfig: NgpPopoverConfig = {\n offset: 4,\n placement: 'bottom',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: 'body',\n closeOnOutsideClick: true,\n closeOnEscape: true,\n scrollBehavior: 'reposition',\n shift: undefined,\n trackPosition: false,\n cooldown: 0,\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 { NgpOverlayArrowProps, NgpOverlayArrowState, ngpOverlayArrow } from 'ng-primitives/portal';\nimport { createPrimitive } from 'ng-primitives/state';\n\n// Re-export types with popover-specific aliases\nexport { NgpOverlayArrowProps as NgpPopoverArrowProps };\nexport { NgpOverlayArrowState as NgpPopoverArrowState };\n\nexport const [\n NgpPopoverArrowStateToken,\n ngpPopoverArrow,\n injectPopoverArrowState,\n providePopoverArrowState,\n] = createPrimitive(\n 'NgpPopoverArrow',\n ({ padding }: NgpOverlayArrowProps): NgpOverlayArrowState => {\n return ngpOverlayArrow({ padding });\n },\n);\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, input, numberAttribute } from '@angular/core';\nimport { ngpPopoverArrow, providePopoverArrowState } from './popover-arrow-state';\n\n@Directive({\n selector: '[ngpPopoverArrow]',\n exportAs: 'ngpPopoverArrow',\n providers: [providePopoverArrowState()],\n})\nexport class NgpPopoverArrow {\n /**\n * Padding between the arrow and the edges of the popover.\n * This prevents the arrow from overflowing the rounded corners.\n */\n readonly padding = input<number | undefined, NumberInput>(undefined, {\n alias: 'ngpPopoverArrowPadding',\n transform: numberAttribute,\n });\n\n private readonly state = ngpPopoverArrow({ padding: this.padding });\n\n /**\n * Set the padding between the arrow and the edges of the popover.\n * @param value The padding value in pixels\n */\n setPadding(value: number | undefined): void {\n this.state.setPadding(value);\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport {\n computed,\n ElementRef,\n inject,\n Injector,\n signal,\n Signal,\n ViewContainerRef,\n WritableSignal,\n} from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpDismissGuard,\n NgpFlip,\n NgpOffset,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n NgpShift,\n} from 'ng-primitives/portal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n listener,\n StateInjectionOptions,\n} from 'ng-primitives/state';\n\nexport interface NgpPopoverTriggerState<T> {\n /** Access the trigger element. */\n readonly elementRef: ElementRef;\n /** Access the popover template ref. */\n readonly popover: WritableSignal<NgpOverlayContent<T> | undefined>;\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled: Signal<boolean>;\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement: Signal<NgpPopoverPlacement>;\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset: Signal<NgpOffset>;\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay: Signal<number>;\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay: Signal<number>;\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip: Signal<NgpFlip>;\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift: Signal<NgpShift>;\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container: WritableSignal<HTMLElement | string | null>;\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick: Signal<NgpDismissGuard<Element>>;\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape: Signal<NgpDismissGuard<KeyboardEvent>>;\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior: Signal<'reposition' | 'block' | 'close'>;\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context: Signal<T | undefined>;\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor: Signal<HTMLElement | null>;\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition: Signal<boolean>;\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown: Signal<number>;\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay: Signal<NgpOverlay<T> | null>;\n /**\n * The open state of the popover.\n * @internal\n */\n readonly open: Signal<boolean>;\n /** @internal onDestroy callback */\n destroy: () => void;\n /**\n * Set the container in which the popover should be attached. Takes effect the\n * next time the popover is opened; it does not move a popover that is already\n * open.\n * @param container - The new container\n */\n setContainer: (container: HTMLElement | string | null) => void;\n /**\n * Show the popover.\n * @returns A promise that resolves when the popover has been shown\n */\n show: () => Promise<void>;\n /**\n * @internal\n * Hide the popover.\n * @returns A promise that resolves when the popover has been hidden\n */\n hide: (origin: FocusOrigin) => Promise<void>;\n}\n\nexport interface NgpPopoverTriggerProps<T> {\n /** Access the popover template ref. */\n readonly popover?: Signal<NgpOverlayContent<T> | undefined>;\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement?: Signal<NgpPopoverPlacement>;\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset?: Signal<NgpOffset>;\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay?: Signal<number>;\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay?: Signal<number>;\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip?: Signal<NgpFlip>;\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift?: Signal<NgpShift>;\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container?: Signal<HTMLElement | string | null>;\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick?: Signal<NgpDismissGuard<Element>>;\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape?: Signal<NgpDismissGuard<KeyboardEvent>>;\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior?: Signal<'reposition' | 'block' | 'close'>;\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context?: Signal<T | undefined>;\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor?: Signal<HTMLElement | null>;\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition?: Signal<boolean>;\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown?: Signal<number>;\n /** Callback fired when the open state changes. */\n readonly onOpenChange?: (value: boolean) => void;\n}\n\nexport const [\n NgpPopoverTriggerStateToken,\n ngpPopoverTrigger,\n _injectPopoverTriggerState,\n providePopoverTriggerState,\n] = createPrimitive(\n 'NgpPopoverTrigger',\n <T>({\n popover: _popover = signal<NgpOverlayContent<T> | undefined>(undefined),\n disabled = signal<boolean>(false),\n placement = signal<NgpPopoverPlacement>('bottom'),\n offset = signal<NgpOffset>(4),\n showDelay = signal<number>(0),\n hideDelay = signal<number>(0),\n flip = signal<NgpFlip>(true),\n shift = signal<NgpShift>(undefined),\n container: _container,\n closeOnOutsideClick = signal<NgpDismissGuard<Element>>(true),\n closeOnEscape = signal<NgpDismissGuard<KeyboardEvent>>(true),\n scrollBehavior = signal<'reposition' | 'block' | 'close'>('reposition'),\n context = signal<T | undefined>(undefined),\n anchor = signal<HTMLElement | null>(null),\n trackPosition = signal<boolean>(false),\n cooldown = signal<number>(0),\n onOpenChange,\n }: NgpPopoverTriggerProps<T>): NgpPopoverTriggerState<T> => {\n const elementRef = injectElementRef<HTMLElement>();\n const viewContainerRef = inject(ViewContainerRef);\n const injector = inject(Injector);\n\n const popover = controlled(_popover);\n const container = controlled(_container, 'body');\n\n const overlay = signal<NgpOverlay<T> | null>(null);\n const open = computed(() => overlay()?.isOpen() ?? false);\n\n // Host binding\n attrBinding(elementRef, 'aria-expanded', () => (open() ? 'true' : 'false'));\n attrBinding(elementRef, 'aria-describedby', () => overlay()?.ariaDescribedBy());\n dataBinding(elementRef, 'data-open', open);\n dataBinding(elementRef, 'data-placement', placement);\n dataBinding(elementRef, 'data-disabled', disabled);\n\n // Event listener\n listener(elementRef, 'click', toggle);\n\n function destroy(): void {\n overlay()?.destroy();\n }\n\n function createOverlayInstance(): void {\n const popoverInstance = popover();\n\n if (!popoverInstance) {\n throw new Error('Popover must be either a TemplateRef or a ComponentType');\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T> = {\n content: popoverInstance,\n triggerElement: elementRef.nativeElement,\n anchorElement: anchor(),\n injector: injector,\n context: context,\n container: container(),\n placement: placement,\n offset: offset(),\n flip: flip(),\n shift: shift(),\n showDelay: showDelay(),\n hideDelay: hideDelay(),\n closeOnOutsideClick: closeOnOutsideClick(),\n closeOnEscape: closeOnEscape(),\n restoreFocus: true,\n scrollBehaviour: scrollBehavior(),\n viewContainerRef: viewContainerRef,\n trackPosition: trackPosition(),\n overlayType: 'popover',\n cooldown: cooldown(),\n onClose: () => onOpenChange?.(false),\n };\n\n overlay.set(createOverlay(config));\n }\n\n function toggle(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the popover\n if (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 (open()) {\n hide(origin);\n } else {\n show();\n }\n }\n\n async function show(): Promise<void> {\n // If the trigger is disabled, don't show the popover\n if (disabled()) {\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!overlay()) {\n createOverlayInstance();\n }\n\n // Show the overlay\n await overlay()?.show();\n\n if (open()) {\n onOpenChange?.(true);\n }\n }\n\n async function hide(origin: FocusOrigin): Promise<void> {\n // If the trigger is disabled or the popover is not open, do nothing\n if (disabled() || !open()) {\n return;\n }\n\n // Hide the overlay\n await overlay()?.hide({ origin });\n }\n\n function setContainer(newContainer: HTMLElement | string | null): void {\n container.set(newContainer);\n }\n\n return {\n elementRef,\n popover,\n disabled,\n placement,\n offset,\n showDelay,\n hideDelay,\n flip,\n shift,\n container: deprecatedSetter(container, 'setContainer', setContainer),\n closeOnOutsideClick,\n closeOnEscape,\n scrollBehavior,\n context,\n anchor,\n trackPosition,\n cooldown,\n overlay,\n open,\n destroy,\n setContainer,\n show,\n hide,\n } satisfies NgpPopoverTriggerState<T>;\n },\n);\n\nexport function injectPopoverTriggerState<T>(\n options?: StateInjectionOptions,\n): Signal<NgpPopoverTriggerState<T>> {\n return _injectPopoverTriggerState(options) as Signal<NgpPopoverTriggerState<T>>;\n}\n\nexport type NgpPopoverPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end';\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n Directive,\n input,\n numberAttribute,\n OnDestroy,\n output,\n} from '@angular/core';\nimport {\n coerceFlip,\n dismissGuardAttribute,\n NgpDismissGuard,\n NgpDismissGuardInput,\n NgpFlip,\n NgpFlipInput,\n NgpOverlayContent,\n coerceOffset,\n NgpOffset,\n NgpOffsetInput,\n coerceShift,\n NgpShift,\n NgpShiftInput,\n} from 'ng-primitives/portal';\nimport { injectPopoverConfig } from '../config/popover-config';\nimport {\n NgpPopoverPlacement,\n ngpPopoverTrigger,\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 })],\n})\nexport class NgpPopoverTrigger<T = null> implements OnDestroy {\n /**\n * Access the global popover configuration.\n */\n private readonly config = injectPopoverConfig();\n\n /**\n * Access the popover template ref.\n */\n readonly popover = input<NgpOverlayContent<T>>(undefined, {\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<NgpPopoverPlacement>(this.config.placement, {\n alias: 'ngpPopoverTriggerPlacement',\n });\n\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n alias: 'ngpPopoverTriggerOffset',\n transform: coerceOffset,\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 * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip = input<NgpFlip, NgpFlipInput>(this.config.flip, {\n alias: 'ngpPopoverTriggerFlip',\n transform: coerceFlip,\n });\n\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift = input<NgpShift, NgpShiftInput>(this.config.shift, {\n alias: 'ngpPopoverTriggerShift',\n transform: coerceShift,\n });\n\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpPopoverTriggerContainer',\n });\n\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick = input<NgpDismissGuard<Element>, NgpDismissGuardInput<Element>>(\n this.config.closeOnOutsideClick,\n {\n alias: 'ngpPopoverTriggerCloseOnOutsideClick',\n transform: dismissGuardAttribute,\n },\n );\n\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape = input<\n NgpDismissGuard<KeyboardEvent>,\n NgpDismissGuardInput<KeyboardEvent>\n >(this.config.closeOnEscape, {\n alias: 'ngpPopoverTriggerCloseOnEscape',\n transform: dismissGuardAttribute,\n });\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior = input<'reposition' | 'block' | 'close'>(this.config.scrollBehavior, {\n alias: 'ngpPopoverTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context = input<T>(undefined, {\n alias: 'ngpPopoverTriggerContext',\n });\n\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor = input<HTMLElement | null>(null, {\n alias: 'ngpPopoverTriggerAnchor',\n });\n\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition = input<boolean, BooleanInput>(this.config.trackPosition, {\n alias: 'ngpPopoverTriggerTrackPosition',\n transform: booleanAttribute,\n });\n\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown = input<number, NumberInput>(this.config.cooldown, {\n alias: 'ngpPopoverTriggerCooldown',\n transform: numberAttribute,\n });\n\n /**\n * Event emitted when the popover open state changes.\n */\n readonly openChange = output<boolean>({\n alias: 'ngpPopoverTriggerOpenChange',\n });\n\n /**\n * The popover trigger state.\n */\n protected readonly state = ngpPopoverTrigger({\n popover: this.popover,\n disabled: this.disabled,\n placement: this.placement,\n offset: this.offset,\n showDelay: this.showDelay,\n hideDelay: this.hideDelay,\n flip: this.flip,\n shift: this.shift,\n container: this.container,\n closeOnOutsideClick: this.closeOnOutsideClick,\n closeOnEscape: this.closeOnEscape,\n scrollBehavior: this.scrollBehavior,\n context: this.context,\n anchor: this.anchor,\n trackPosition: this.trackPosition,\n cooldown: this.cooldown,\n onOpenChange: (value: boolean) => this.openChange.emit(value),\n });\n\n ngOnDestroy(): void {\n this.state.destroy();\n }\n\n /**\n * Show the popover.\n * @returns A promise that resolves when the popover has been shown\n */\n show(): Promise<void> {\n return this.state.show();\n }\n\n /**\n * @internal\n * Hide the popover.\n * @returns A promise that resolves when the popover has been hidden\n */\n hide(origin: FocusOrigin = 'program'): Promise<void> {\n return this.state.hide(origin);\n }\n}\n","import { signal, Signal } from '@angular/core';\nimport { explicitEffect, injectElementRef } from 'ng-primitives/internal';\nimport { injectOverlay } from 'ng-primitives/portal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n styleBinding,\n} from 'ng-primitives/state';\n\nexport interface NgpPopoverState {\n /** The unique id of the tooltip. */\n readonly id: Signal<string>;\n}\n\nexport interface NgpPopoverProps {\n /** The unique id of the tooltip. */\n readonly id?: Signal<string>;\n}\n\nexport const [NgpPopoverStateToken, ngpPopover, injectPopoverState, providePopoverState] =\n createPrimitive('NgpPopover', ({ id: _id = signal<string>('') }: NgpPopoverProps) => {\n const elementRef = injectElementRef<HTMLElement>();\n\n const overlay = injectOverlay();\n const id = controlled(_id);\n\n id.set(overlay.id());\n\n // Host binding\n attrBinding(elementRef, 'role', 'dialog');\n attrBinding(elementRef, 'id', id);\n styleBinding(elementRef, 'left.px', () => overlay.position().x ?? null);\n styleBinding(elementRef, 'top.px', () => overlay.position().y ?? null);\n styleBinding(elementRef, '--ngp-popover-trigger-width.px', () => overlay.triggerWidth());\n styleBinding(elementRef, '--ngp-popover-transform-origin', () => overlay.transformOrigin());\n styleBinding(elementRef, '--ngp-popover-available-width.px', () => overlay.availableWidth());\n styleBinding(elementRef, '--ngp-popover-available-height.px', () => overlay.availableHeight());\n dataBinding(elementRef, 'data-placement', () => overlay.finalPlacement() ?? null);\n dataBinding(elementRef, 'data-overlay', '');\n\n // Effect handle\n explicitEffect([id], ([id]) => overlay.id.set(id));\n\n return {\n id,\n } satisfies NgpPopoverState;\n });\n","import { Directive, input } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { provideControlContainerIsolation } from 'ng-primitives/portal';\nimport { ngpPopover, providePopoverState } from './popover-state';\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 providers: [providePopoverState(), provideControlContainerIsolation()],\n})\nexport class NgpPopover {\n /**\n * The unique id of the tooltip.\n */\n readonly id = input('');\n\n protected readonly state = ngpPopover({\n id: this.id,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoFO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,mBAAmB,EAAE,IAAI;AACzB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,cAAc,EAAE,YAAY;AAC5B,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,QAAQ,EAAE,CAAC;CACZ;AAEM,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAmB,uBAAuB,CAAC;AAElG;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAAiC,EAAA;IACpE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;AAC9B,YAAA,QAAQ,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,MAAM,EAAE;AACjD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,qBAAq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AA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAV,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,UAAU,sLAFV,CAAC,mBAAmB,EAAE,EAAE,gCAAgC,EAAE,CAAC,EAAA,QAAA,EAAA,CAAA,YAAA,CAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAE3D,UAAU,EAAA,UAAA,EAAA,CAAA;kBANtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,QAAQ,EAAE,YAAY;oBACtB,cAAc,EAAE,CAAC,YAAY,CAAC;AAC9B,oBAAA,SAAS,EAAE,CAAC,mBAAmB,EAAE,EAAE,gCAAgC,EAAE,CAAC;AACvE,iBAAA;;;ACbD;;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-arrow/popover-arrow-state.ts","../../../../packages/ng-primitives/popover/src/popover-arrow/popover-arrow.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/popover/popover-state.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';\nimport { NgpDismissGuard, NgpFlip, NgpOffset, NgpShift } from 'ng-primitives/portal';\n\nexport interface NgpPopoverConfig {\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 4\n */\n offset: NgpOffset;\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 * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n flip: NgpFlip;\n\n /**\n * Define the container element or selector in to which the popover should be attached.\n * @default 'body'\n */\n container: HTMLElement | string | null;\n\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n closeOnOutsideClick: NgpDismissGuard<Element>;\n\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n closeOnEscape: NgpDismissGuard<KeyboardEvent>;\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default scroll\n */\n scrollBehavior: 'reposition' | 'block' | 'close';\n\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n shift: NgpShift;\n\n /**\n * Whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n trackPosition: boolean;\n\n /**\n * Cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n cooldown: number;\n}\n\nexport const defaultPopoverConfig: NgpPopoverConfig = {\n offset: 4,\n placement: 'bottom',\n showDelay: 0,\n hideDelay: 0,\n flip: true,\n container: 'body',\n closeOnOutsideClick: true,\n closeOnEscape: true,\n scrollBehavior: 'reposition',\n shift: undefined,\n trackPosition: false,\n cooldown: 0,\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 { NgpOverlayArrowProps, NgpOverlayArrowState, ngpOverlayArrow } from 'ng-primitives/portal';\nimport { createPrimitive } from 'ng-primitives/state';\n\n// Re-export types with popover-specific aliases\nexport { NgpOverlayArrowProps as NgpPopoverArrowProps };\nexport { NgpOverlayArrowState as NgpPopoverArrowState };\n\nexport const [\n NgpPopoverArrowStateToken,\n ngpPopoverArrow,\n injectPopoverArrowState,\n providePopoverArrowState,\n] = createPrimitive(\n 'NgpPopoverArrow',\n ({ padding }: NgpOverlayArrowProps): NgpOverlayArrowState => {\n return ngpOverlayArrow({ padding });\n },\n);\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Directive, input, numberAttribute } from '@angular/core';\nimport { ngpPopoverArrow, providePopoverArrowState } from './popover-arrow-state';\n\n@Directive({\n selector: '[ngpPopoverArrow]',\n exportAs: 'ngpPopoverArrow',\n providers: [providePopoverArrowState()],\n})\nexport class NgpPopoverArrow {\n /**\n * Padding between the arrow and the edges of the popover.\n * This prevents the arrow from overflowing the rounded corners.\n */\n readonly padding = input<number | undefined, NumberInput>(undefined, {\n alias: 'ngpPopoverArrowPadding',\n transform: numberAttribute,\n });\n\n private readonly state = ngpPopoverArrow({ padding: this.padding });\n\n /**\n * Set the padding between the arrow and the edges of the popover.\n * @param value The padding value in pixels\n */\n setPadding(value: number | undefined): void {\n this.state.setPadding(value);\n }\n}\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport {\n computed,\n ElementRef,\n inject,\n Injector,\n signal,\n Signal,\n ViewContainerRef,\n WritableSignal,\n} from '@angular/core';\nimport { injectElementRef } from 'ng-primitives/internal';\nimport {\n createOverlay,\n NgpDismissGuard,\n NgpFlip,\n NgpOffset,\n NgpOverlay,\n NgpOverlayConfig,\n NgpOverlayContent,\n NgpShift,\n} from 'ng-primitives/portal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n deprecatedSetter,\n listener,\n StateInjectionOptions,\n} from 'ng-primitives/state';\n\nexport interface NgpPopoverTriggerState<T> {\n /** Access the trigger element. */\n readonly elementRef: ElementRef;\n /** Access the popover template ref. */\n readonly popover: WritableSignal<NgpOverlayContent<T> | undefined>;\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled: Signal<boolean>;\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement: Signal<NgpPopoverPlacement>;\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset: Signal<NgpOffset>;\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay: Signal<number>;\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay: Signal<number>;\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip: Signal<NgpFlip>;\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift: Signal<NgpShift>;\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container: WritableSignal<HTMLElement | string | null>;\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick: Signal<NgpDismissGuard<Element>>;\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape: Signal<NgpDismissGuard<KeyboardEvent>>;\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior: Signal<'reposition' | 'block' | 'close'>;\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context: Signal<T | undefined>;\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor: Signal<HTMLElement | null>;\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition: Signal<boolean>;\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown: Signal<number>;\n /**\n * The overlay that manages the popover\n * @internal\n */\n readonly overlay: Signal<NgpOverlay<T> | null>;\n /**\n * The open state of the popover.\n * @internal\n */\n readonly open: Signal<boolean>;\n /** @internal onDestroy callback */\n destroy: () => void;\n /**\n * Set the container in which the popover should be attached. Takes effect the\n * next time the popover is opened; it does not move a popover that is already\n * open.\n * @param container - The new container\n */\n setContainer: (container: HTMLElement | string | null) => void;\n /**\n * Show the popover.\n * @returns A promise that resolves when the popover has been shown\n */\n show: () => Promise<void>;\n /**\n * @internal\n * Hide the popover.\n * @returns A promise that resolves when the popover has been hidden\n */\n hide: (origin: FocusOrigin) => Promise<void>;\n}\n\nexport interface NgpPopoverTriggerProps<T> {\n /** Access the popover template ref. */\n readonly popover?: Signal<NgpOverlayContent<T> | undefined>;\n /**\n * Define if the trigger should be disabled.\n * @default false\n */\n readonly disabled?: Signal<boolean>;\n /**\n * Define the placement of the popover relative to the trigger.\n * @default 'top'\n */\n readonly placement?: Signal<NgpPopoverPlacement>;\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset?: Signal<NgpOffset>;\n /**\n * Define the delay before the popover is displayed.\n * @default 0\n */\n readonly showDelay?: Signal<number>;\n /**\n * Define the delay before the popover is hidden.\n * @default 0\n */\n readonly hideDelay?: Signal<number>;\n /**\n * Define whether the popover should flip when there is not enough space for the popover.\n * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip?: Signal<NgpFlip>;\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift?: Signal<NgpShift>;\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container?: Signal<HTMLElement | string | null>;\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick?: Signal<NgpDismissGuard<Element>>;\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape?: Signal<NgpDismissGuard<KeyboardEvent>>;\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior?: Signal<'reposition' | 'block' | 'close'>;\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context?: Signal<T | undefined>;\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor?: Signal<HTMLElement | null>;\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition?: Signal<boolean>;\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown?: Signal<number>;\n /** Callback fired when the open state changes. */\n readonly onOpenChange?: (value: boolean) => void;\n}\n\nexport const [\n NgpPopoverTriggerStateToken,\n ngpPopoverTrigger,\n _injectPopoverTriggerState,\n providePopoverTriggerState,\n] = createPrimitive(\n 'NgpPopoverTrigger',\n <T>({\n popover: _popover = signal<NgpOverlayContent<T> | undefined>(undefined),\n disabled = signal<boolean>(false),\n placement = signal<NgpPopoverPlacement>('bottom'),\n offset = signal<NgpOffset>(4),\n showDelay = signal<number>(0),\n hideDelay = signal<number>(0),\n flip = signal<NgpFlip>(true),\n shift = signal<NgpShift>(undefined),\n container: _container,\n closeOnOutsideClick = signal<NgpDismissGuard<Element>>(true),\n closeOnEscape = signal<NgpDismissGuard<KeyboardEvent>>(true),\n scrollBehavior = signal<'reposition' | 'block' | 'close'>('reposition'),\n context = signal<T | undefined>(undefined),\n anchor = signal<HTMLElement | null>(null),\n trackPosition = signal<boolean>(false),\n cooldown = signal<number>(0),\n onOpenChange,\n }: NgpPopoverTriggerProps<T>): NgpPopoverTriggerState<T> => {\n const elementRef = injectElementRef<HTMLElement>();\n const viewContainerRef = inject(ViewContainerRef);\n const injector = inject(Injector);\n\n const popover = controlled(_popover);\n const container = controlled(_container, 'body');\n\n const overlay = signal<NgpOverlay<T> | null>(null);\n const open = computed(() => overlay()?.isOpen() ?? false);\n\n // Host binding\n attrBinding(elementRef, 'aria-expanded', () => (open() ? 'true' : 'false'));\n // the popover is a focus-trapped, dialog-like overlay, so advertise the popup type\n attrBinding(elementRef, 'aria-haspopup', 'dialog');\n attrBinding(elementRef, 'aria-describedby', () => overlay()?.ariaDescribedBy());\n // reference the controlled popover by id while it is open (it does not exist when closed)\n attrBinding(elementRef, 'aria-controls', () => (open() ? (overlay()?.id() ?? null) : null));\n dataBinding(elementRef, 'data-open', open);\n dataBinding(elementRef, 'data-placement', placement);\n dataBinding(elementRef, 'data-disabled', disabled);\n\n // Event listener\n listener(elementRef, 'click', toggle);\n\n function destroy(): void {\n overlay()?.destroy();\n }\n\n function createOverlayInstance(): void {\n const popoverInstance = popover();\n\n if (!popoverInstance) {\n throw new Error('Popover must be either a TemplateRef or a ComponentType');\n }\n\n // Create config for the overlay\n const config: NgpOverlayConfig<T> = {\n content: popoverInstance,\n triggerElement: elementRef.nativeElement,\n anchorElement: anchor(),\n injector: injector,\n context: context,\n container: container(),\n placement: placement,\n offset: offset(),\n flip: flip(),\n shift: shift(),\n showDelay: showDelay(),\n hideDelay: hideDelay(),\n closeOnOutsideClick: closeOnOutsideClick(),\n closeOnEscape: closeOnEscape(),\n restoreFocus: true,\n scrollBehaviour: scrollBehavior(),\n viewContainerRef: viewContainerRef,\n trackPosition: trackPosition(),\n overlayType: 'popover',\n cooldown: cooldown(),\n onClose: () => onOpenChange?.(false),\n };\n\n overlay.set(createOverlay(config));\n }\n\n function toggle(event: MouseEvent): void {\n // if the trigger is disabled then do not toggle the popover\n if (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 (open()) {\n hide(origin);\n } else {\n show();\n }\n }\n\n async function show(): Promise<void> {\n // If the trigger is disabled, don't show the popover\n if (disabled()) {\n return;\n }\n\n // Create the overlay if it doesn't exist yet\n if (!overlay()) {\n createOverlayInstance();\n }\n\n // Show the overlay\n await overlay()?.show();\n\n if (open()) {\n onOpenChange?.(true);\n }\n }\n\n async function hide(origin: FocusOrigin): Promise<void> {\n // If the trigger is disabled or the popover is not open, do nothing\n if (disabled() || !open()) {\n return;\n }\n\n // Hide the overlay\n await overlay()?.hide({ origin });\n }\n\n function setContainer(newContainer: HTMLElement | string | null): void {\n container.set(newContainer);\n }\n\n return {\n elementRef,\n popover,\n disabled,\n placement,\n offset,\n showDelay,\n hideDelay,\n flip,\n shift,\n container: deprecatedSetter(container, 'setContainer', setContainer),\n closeOnOutsideClick,\n closeOnEscape,\n scrollBehavior,\n context,\n anchor,\n trackPosition,\n cooldown,\n overlay,\n open,\n destroy,\n setContainer,\n show,\n hide,\n } satisfies NgpPopoverTriggerState<T>;\n },\n);\n\nexport function injectPopoverTriggerState<T>(\n options?: StateInjectionOptions,\n): Signal<NgpPopoverTriggerState<T>> {\n return _injectPopoverTriggerState(options) as Signal<NgpPopoverTriggerState<T>>;\n}\n\nexport type NgpPopoverPlacement =\n | 'top'\n | 'right'\n | 'bottom'\n | 'left'\n | 'top-start'\n | 'top-end'\n | 'right-start'\n | 'right-end'\n | 'bottom-start'\n | 'bottom-end'\n | 'left-start'\n | 'left-end';\n","import { FocusOrigin } from '@angular/cdk/a11y';\nimport { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n booleanAttribute,\n Directive,\n input,\n numberAttribute,\n OnDestroy,\n output,\n} from '@angular/core';\nimport {\n coerceFlip,\n dismissGuardAttribute,\n NgpDismissGuard,\n NgpDismissGuardInput,\n NgpFlip,\n NgpFlipInput,\n NgpOverlayContent,\n coerceOffset,\n NgpOffset,\n NgpOffsetInput,\n coerceShift,\n NgpShift,\n NgpShiftInput,\n} from 'ng-primitives/portal';\nimport { injectPopoverConfig } from '../config/popover-config';\nimport {\n NgpPopoverPlacement,\n ngpPopoverTrigger,\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 })],\n})\nexport class NgpPopoverTrigger<T = null> implements OnDestroy {\n /**\n * Access the global popover configuration.\n */\n private readonly config = injectPopoverConfig();\n\n /**\n * Access the popover template ref.\n */\n readonly popover = input<NgpOverlayContent<T>>(undefined, {\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<NgpPopoverPlacement>(this.config.placement, {\n alias: 'ngpPopoverTriggerPlacement',\n });\n\n /**\n * Define the offset of the popover relative to the trigger.\n * Can be a number (applies to mainAxis) or an object with mainAxis, crossAxis, and alignmentAxis.\n * @default 0\n */\n readonly offset = input<NgpOffset, NgpOffsetInput>(this.config.offset, {\n alias: 'ngpPopoverTriggerOffset',\n transform: coerceOffset,\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 * Can be a boolean to enable/disable, or an object with padding and fallbackPlacements options.\n * @default true\n */\n readonly flip = input<NgpFlip, NgpFlipInput>(this.config.flip, {\n alias: 'ngpPopoverTriggerFlip',\n transform: coerceFlip,\n });\n\n /**\n * Configure shift behavior to keep the popover in view.\n * Can be a boolean to enable/disable, or an object with padding and limiter options.\n * @default undefined (enabled by default in overlay)\n */\n readonly shift = input<NgpShift, NgpShiftInput>(this.config.shift, {\n alias: 'ngpPopoverTriggerShift',\n transform: coerceShift,\n });\n\n /**\n * Define the container in which the popover should be attached.\n * @default document.body\n */\n readonly container = input<HTMLElement | string | null>(this.config.container, {\n alias: 'ngpPopoverTriggerContainer',\n });\n\n /**\n * Define whether the popover should close when clicking outside of it, or a guard function.\n * @default true\n */\n readonly closeOnOutsideClick = input<NgpDismissGuard<Element>, NgpDismissGuardInput<Element>>(\n this.config.closeOnOutsideClick,\n {\n alias: 'ngpPopoverTriggerCloseOnOutsideClick',\n transform: dismissGuardAttribute,\n },\n );\n\n /**\n * Define whether the popover should close when the escape key is pressed, or a guard function.\n * @default true\n */\n readonly closeOnEscape = input<\n NgpDismissGuard<KeyboardEvent>,\n NgpDismissGuardInput<KeyboardEvent>\n >(this.config.closeOnEscape, {\n alias: 'ngpPopoverTriggerCloseOnEscape',\n transform: dismissGuardAttribute,\n });\n\n /**\n * Defines how the popover behaves when the window is scrolled.\n * @default 'reposition'\n */\n readonly scrollBehavior = input<'reposition' | 'block' | 'close'>(this.config.scrollBehavior, {\n alias: 'ngpPopoverTriggerScrollBehavior',\n });\n\n /**\n * Provide context to the popover. This can be used to pass data to the popover content.\n */\n readonly context = input<T>(undefined, {\n alias: 'ngpPopoverTriggerContext',\n });\n\n /**\n * Define an anchor element for positioning the popover.\n * If provided, the popover will be positioned relative to this element instead of the trigger.\n */\n readonly anchor = input<HTMLElement | null>(null, {\n alias: 'ngpPopoverTriggerAnchor',\n });\n\n /**\n * Define whether to track the trigger element position on every animation frame.\n * Useful for moving elements like slider thumbs.\n * @default false\n */\n readonly trackPosition = input<boolean, BooleanInput>(this.config.trackPosition, {\n alias: 'ngpPopoverTriggerTrackPosition',\n transform: booleanAttribute,\n });\n\n /**\n * Define the cooldown duration in milliseconds.\n * When moving from one popover to another within this duration,\n * the showDelay is skipped for the new popover.\n * @default 0\n */\n readonly cooldown = input<number, NumberInput>(this.config.cooldown, {\n alias: 'ngpPopoverTriggerCooldown',\n transform: numberAttribute,\n });\n\n /**\n * Event emitted when the popover open state changes.\n */\n readonly openChange = output<boolean>({\n alias: 'ngpPopoverTriggerOpenChange',\n });\n\n /**\n * The popover trigger state.\n */\n protected readonly state = ngpPopoverTrigger({\n popover: this.popover,\n disabled: this.disabled,\n placement: this.placement,\n offset: this.offset,\n showDelay: this.showDelay,\n hideDelay: this.hideDelay,\n flip: this.flip,\n shift: this.shift,\n container: this.container,\n closeOnOutsideClick: this.closeOnOutsideClick,\n closeOnEscape: this.closeOnEscape,\n scrollBehavior: this.scrollBehavior,\n context: this.context,\n anchor: this.anchor,\n trackPosition: this.trackPosition,\n cooldown: this.cooldown,\n onOpenChange: (value: boolean) => this.openChange.emit(value),\n });\n\n ngOnDestroy(): void {\n this.state.destroy();\n }\n\n /**\n * Show the popover.\n * @returns A promise that resolves when the popover has been shown\n */\n show(): Promise<void> {\n return this.state.show();\n }\n\n /**\n * @internal\n * Hide the popover.\n * @returns A promise that resolves when the popover has been hidden\n */\n hide(origin: FocusOrigin = 'program'): Promise<void> {\n return this.state.hide(origin);\n }\n}\n","import { signal, Signal } from '@angular/core';\nimport { explicitEffect, injectElementRef } from 'ng-primitives/internal';\nimport { injectOverlay } from 'ng-primitives/portal';\nimport {\n attrBinding,\n controlled,\n createPrimitive,\n dataBinding,\n styleBinding,\n} from 'ng-primitives/state';\n\nexport interface NgpPopoverState {\n /** The unique id of the tooltip. */\n readonly id: Signal<string>;\n}\n\nexport interface NgpPopoverProps {\n /** The unique id of the tooltip. */\n readonly id?: Signal<string>;\n}\n\nexport const [NgpPopoverStateToken, ngpPopover, injectPopoverState, providePopoverState] =\n createPrimitive('NgpPopover', ({ id: _id = signal<string>('') }: NgpPopoverProps) => {\n const elementRef = injectElementRef<HTMLElement>();\n\n const overlay = injectOverlay();\n const id = controlled(_id);\n\n id.set(overlay.id());\n\n // Host binding\n attrBinding(elementRef, 'role', 'dialog');\n attrBinding(elementRef, 'id', id);\n styleBinding(elementRef, 'left.px', () => overlay.position().x ?? null);\n styleBinding(elementRef, 'top.px', () => overlay.position().y ?? null);\n styleBinding(elementRef, '--ngp-popover-trigger-width.px', () => overlay.triggerWidth());\n styleBinding(elementRef, '--ngp-popover-transform-origin', () => overlay.transformOrigin());\n styleBinding(elementRef, '--ngp-popover-available-width.px', () => overlay.availableWidth());\n styleBinding(elementRef, '--ngp-popover-available-height.px', () => overlay.availableHeight());\n dataBinding(elementRef, 'data-placement', () => overlay.finalPlacement() ?? null);\n dataBinding(elementRef, 'data-overlay', '');\n\n // Effect handle\n explicitEffect([id], ([id]) => overlay.id.set(id));\n\n return {\n id,\n } satisfies NgpPopoverState;\n });\n","import { Directive, input } from '@angular/core';\nimport { NgpFocusTrap } from 'ng-primitives/focus-trap';\nimport { provideControlContainerIsolation } from 'ng-primitives/portal';\nimport { ngpPopover, providePopoverState } from './popover-state';\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 providers: [providePopoverState(), provideControlContainerIsolation()],\n})\nexport class NgpPopover {\n /**\n * The unique id of the tooltip.\n */\n readonly id = input('');\n\n protected readonly state = ngpPopover({\n id: this.id,\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoFO,MAAM,oBAAoB,GAAqB;AACpD,IAAA,MAAM,EAAE,CAAC;AACT,IAAA,SAAS,EAAE,QAAQ;AACnB,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,SAAS,EAAE,CAAC;AACZ,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,mBAAmB,EAAE,IAAI;AACzB,IAAA,aAAa,EAAE,IAAI;AACnB,IAAA,cAAc,EAAE,YAAY;AAC5B,IAAA,KAAK,EAAE,SAAS;AAChB,IAAA,aAAa,EAAE,KAAK;AACpB,IAAA,QAAQ,EAAE,CAAC;CACZ;AAEM,MAAM,qBAAqB,GAAG,IAAI,cAAc,CAAmB,uBAAuB,CAAC;AAElG;;;;AAIG;AACG,SAAU,oBAAoB,CAAC,MAAiC,EAAA;IACpE,OAAO;AACL,QAAA;AACE,YAAA,OAAO,EAAE,qBAAqB;AAC9B,YAAA,QAAQ,EAAE,EAAE,GAAG,oBAAoB,EAAE,GAAG,MAAM,EAAE;AACjD,SAAA;KACF;AACH;AAEA;;;AAGG;SACa,mBAAmB,GAAA;AACjC,IAAA,OAAO,MAAM,CAAC,qBAAqB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,IAAI,oBAAoB;AAClF;;MClHa,CACX,yBAAyB,EACzB,eAAe,EACf,uBAAuB,EACvB,wBAAwB,EACzB,GAAG,eAAe,CACjB,iBAAiB,EACjB,CAAC,EAAE,OAAO,EAAwB,KAA0B;AAC1D,IAAA,OAAO,eAAe,CAAC,EAAE,OAAO,EAAE,CAAC;AACrC,CAAC;;MCPU,eAAe,CAAA;AAL5B,IAAA,WAAA,GAAA;AAME;;;AAGG;AACM,QAAA,IAAA,CAAA,OAAO,GAAG,K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