@cdevhub/ngx-tw 0.2.0 → 0.3.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 (144) hide show
  1. package/README.md +264 -49
  2. package/fesm2022/cdevhub-ngx-tw-accordion.mjs +11 -7
  3. package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -1
  4. package/fesm2022/cdevhub-ngx-tw-alert.mjs +43 -29
  5. package/fesm2022/cdevhub-ngx-tw-alert.mjs.map +1 -1
  6. package/fesm2022/cdevhub-ngx-tw-aspect-ratio.mjs +103 -0
  7. package/fesm2022/cdevhub-ngx-tw-aspect-ratio.mjs.map +1 -0
  8. package/fesm2022/cdevhub-ngx-tw-avatar.mjs +56 -31
  9. package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -1
  10. package/fesm2022/cdevhub-ngx-tw-badge.mjs +61 -35
  11. package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
  12. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +154 -93
  13. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -1
  14. package/fesm2022/cdevhub-ngx-tw-button.mjs +35 -22
  15. package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
  16. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +3 -3
  17. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -1
  18. package/fesm2022/cdevhub-ngx-tw-calendar.mjs +416 -216
  19. package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
  20. package/fesm2022/cdevhub-ngx-tw-card.mjs +33 -24
  21. package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
  22. package/fesm2022/cdevhub-ngx-tw-carousel.mjs +152 -81
  23. package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
  24. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +99 -47
  25. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
  26. package/fesm2022/cdevhub-ngx-tw-code-block.mjs +42 -29
  27. package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
  28. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +46 -29
  29. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
  30. package/fesm2022/cdevhub-ngx-tw-combobox.mjs +205 -110
  31. package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
  32. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +141 -74
  33. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
  34. package/fesm2022/cdevhub-ngx-tw-core.mjs +16 -11
  35. package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
  36. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +395 -149
  37. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
  38. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +305 -150
  39. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
  40. package/fesm2022/cdevhub-ngx-tw-dialog.mjs +56 -43
  41. package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
  42. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +51 -33
  43. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -1
  44. package/fesm2022/cdevhub-ngx-tw-file-upload.mjs +905 -0
  45. package/fesm2022/cdevhub-ngx-tw-file-upload.mjs.map +1 -0
  46. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +49 -26
  47. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -1
  48. package/fesm2022/cdevhub-ngx-tw-form-field.mjs +133 -74
  49. package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
  50. package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs +2 -2
  51. package/fesm2022/cdevhub-ngx-tw-icon-lucide.mjs.map +1 -1
  52. package/fesm2022/cdevhub-ngx-tw-icon.mjs +28 -17
  53. package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -1
  54. package/fesm2022/cdevhub-ngx-tw-input.mjs +37 -21
  55. package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
  56. package/fesm2022/cdevhub-ngx-tw-item.mjs +33 -24
  57. package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
  58. package/fesm2022/cdevhub-ngx-tw-menu.mjs +63 -48
  59. package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -1
  60. package/fesm2022/cdevhub-ngx-tw-number-input.mjs +622 -0
  61. package/fesm2022/cdevhub-ngx-tw-number-input.mjs.map +1 -0
  62. package/fesm2022/cdevhub-ngx-tw-paginator.mjs +142 -72
  63. package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
  64. package/fesm2022/cdevhub-ngx-tw-popover.mjs +101 -46
  65. package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
  66. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +57 -30
  67. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -1
  68. package/fesm2022/cdevhub-ngx-tw-radio.mjs +108 -57
  69. package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
  70. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +46 -26
  71. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -1
  72. package/fesm2022/cdevhub-ngx-tw-select.mjs +227 -122
  73. package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
  74. package/fesm2022/cdevhub-ngx-tw-separator.mjs +21 -12
  75. package/fesm2022/cdevhub-ngx-tw-separator.mjs.map +1 -1
  76. package/fesm2022/cdevhub-ngx-tw-sheet.mjs +58 -44
  77. package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
  78. package/fesm2022/cdevhub-ngx-tw-skeleton.mjs +25 -14
  79. package/fesm2022/cdevhub-ngx-tw-skeleton.mjs.map +1 -1
  80. package/fesm2022/cdevhub-ngx-tw-slider.mjs +155 -79
  81. package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
  82. package/fesm2022/cdevhub-ngx-tw-sort.mjs +47 -25
  83. package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
  84. package/fesm2022/cdevhub-ngx-tw-spinner.mjs +29 -16
  85. package/fesm2022/cdevhub-ngx-tw-spinner.mjs.map +1 -1
  86. package/fesm2022/cdevhub-ngx-tw-split.mjs +72 -42
  87. package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -1
  88. package/fesm2022/cdevhub-ngx-tw-stat.mjs +107 -64
  89. package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -1
  90. package/fesm2022/cdevhub-ngx-tw-stepper.mjs +113 -47
  91. package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
  92. package/fesm2022/cdevhub-ngx-tw-switch.mjs +61 -32
  93. package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
  94. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +88 -42
  95. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
  96. package/fesm2022/cdevhub-ngx-tw-table.mjs +266 -118
  97. package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -1
  98. package/fesm2022/cdevhub-ngx-tw-tabs.mjs +102 -52
  99. package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
  100. package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +798 -0
  101. package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -0
  102. package/fesm2022/cdevhub-ngx-tw-textarea.mjs +16 -8
  103. package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
  104. package/fesm2022/cdevhub-ngx-tw-theme.mjs +22 -14
  105. package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
  106. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +243 -95
  107. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
  108. package/fesm2022/cdevhub-ngx-tw-timeline.mjs +149 -82
  109. package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -1
  110. package/fesm2022/cdevhub-ngx-tw-toast.mjs +100 -55
  111. package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
  112. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +50 -28
  113. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -1
  114. package/fesm2022/cdevhub-ngx-tw-transfer.mjs +1129 -0
  115. package/fesm2022/cdevhub-ngx-tw-transfer.mjs.map +1 -0
  116. package/fesm2022/cdevhub-ngx-tw-tree.mjs +554 -0
  117. package/fesm2022/cdevhub-ngx-tw-tree.mjs.map +1 -0
  118. package/fesm2022/cdevhub-ngx-tw.mjs +7 -0
  119. package/fesm2022/cdevhub-ngx-tw.mjs.map +1 -1
  120. package/package.json +45 -17
  121. package/theme/_dark.css +16 -12
  122. package/theme/_semantic.css +3 -2
  123. package/theme/index.css +10 -2
  124. package/types/cdevhub-ngx-tw-aspect-ratio.d.ts +40 -0
  125. package/types/cdevhub-ngx-tw-calendar.d.ts +39 -8
  126. package/types/cdevhub-ngx-tw-code-block.d.ts +8 -7
  127. package/types/cdevhub-ngx-tw-command-palette.d.ts +7 -0
  128. package/types/cdevhub-ngx-tw-date-picker.d.ts +36 -10
  129. package/types/cdevhub-ngx-tw-file-upload.d.ts +250 -0
  130. package/types/cdevhub-ngx-tw-form-field.d.ts +22 -3
  131. package/types/cdevhub-ngx-tw-icon-lucide.d.ts +21 -3
  132. package/types/cdevhub-ngx-tw-number-input.d.ts +130 -0
  133. package/types/cdevhub-ngx-tw-popover.d.ts +8 -0
  134. package/types/cdevhub-ngx-tw-select.d.ts +1 -1
  135. package/types/cdevhub-ngx-tw-stepper.d.ts +30 -2
  136. package/types/cdevhub-ngx-tw-tab-nav.d.ts +8 -0
  137. package/types/cdevhub-ngx-tw-table.d.ts +30 -1
  138. package/types/cdevhub-ngx-tw-tabs.d.ts +8 -0
  139. package/types/cdevhub-ngx-tw-tags-input.d.ts +217 -0
  140. package/types/cdevhub-ngx-tw-time-picker.d.ts +31 -6
  141. package/types/cdevhub-ngx-tw-toast.d.ts +1 -1
  142. package/types/cdevhub-ngx-tw-transfer.d.ts +330 -0
  143. package/types/cdevhub-ngx-tw-tree.d.ts +189 -0
  144. package/types/cdevhub-ngx-tw.d.ts +7 -0
@@ -167,41 +167,55 @@ const ARROW_POSITION_CLASSES = {
167
167
  let nextPopoverId = 0;
168
168
  class PopoverOverlayComponent {
169
169
  id = `tw-popover-${nextPopoverId++}`;
170
- size = signal('md', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
171
- color = signal(undefined, ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
172
- showArrow = signal(true, ...(ngDevMode ? [{ debugName: "showArrow" }] : /* istanbul ignore next */ []));
173
- arrowDirection = signal('top', ...(ngDevMode ? [{ debugName: "arrowDirection" }] : /* istanbul ignore next */ []));
174
- ariaLabel = signal(undefined, ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
175
- ariaModal = signal(true, ...(ngDevMode ? [{ debugName: "ariaModal" }] : /* istanbul ignore next */ []));
176
- ariaLabelledByQueue = signal([], ...(ngDevMode ? [{ debugName: "ariaLabelledByQueue" }] : /* istanbul ignore next */ []));
177
- panelClass = signal('', ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
178
- portal = signal(null, ...(ngDevMode ? [{ debugName: "portal" }] : /* istanbul ignore next */ []));
170
+ size = signal('md', /* @ts-ignore */
171
+ ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
172
+ color = signal(undefined, /* @ts-ignore */
173
+ ...(ngDevMode ? [{ debugName: "color" }] : /* istanbul ignore next */ []));
174
+ showArrow = signal(true, /* @ts-ignore */
175
+ ...(ngDevMode ? [{ debugName: "showArrow" }] : /* istanbul ignore next */ []));
176
+ arrowDirection = signal('top', /* @ts-ignore */
177
+ ...(ngDevMode ? [{ debugName: "arrowDirection" }] : /* istanbul ignore next */ []));
178
+ ariaLabel = signal(undefined, /* @ts-ignore */
179
+ ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
180
+ ariaModal = signal(true, /* @ts-ignore */
181
+ ...(ngDevMode ? [{ debugName: "ariaModal" }] : /* istanbul ignore next */ []));
182
+ ariaLabelledByQueue = signal([], /* @ts-ignore */
183
+ ...(ngDevMode ? [{ debugName: "ariaLabelledByQueue" }] : /* istanbul ignore next */ []));
184
+ panelClass = signal('', /* @ts-ignore */
185
+ ...(ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []));
186
+ portal = signal(null, /* @ts-ignore */
187
+ ...(ngDevMode ? [{ debugName: "portal" }] : /* istanbul ignore next */ []));
179
188
  computedAriaLabelledBy = computed(() => {
180
189
  if (this.ariaLabel())
181
190
  return null;
182
191
  return this.ariaLabelledByQueue()[0] ?? null;
183
- }, ...(ngDevMode ? [{ debugName: "computedAriaLabelledBy" }] : /* istanbul ignore next */ []));
192
+ }, /* @ts-ignore */
193
+ ...(ngDevMode ? [{ debugName: "computedAriaLabelledBy" }] : /* istanbul ignore next */ []));
184
194
  _addAriaLabelledBy(id) {
185
195
  this.ariaLabelledByQueue.update((q) => (q.includes(id) ? q : [...q, id]));
186
196
  }
187
197
  _removeAriaLabelledBy(id) {
188
198
  this.ariaLabelledByQueue.update((q) => q.filter((existing) => existing !== id));
189
199
  }
190
- variantResult = computed(() => popoverVariants({ size: this.size() }), ...(ngDevMode ? [{ debugName: "variantResult" }] : /* istanbul ignore next */ []));
191
- wrapperClasses = computed(() => this.variantResult().wrapper(), ...(ngDevMode ? [{ debugName: "wrapperClasses" }] : /* istanbul ignore next */ []));
200
+ variantResult = computed(() => popoverVariants({ size: this.size() }), /* @ts-ignore */
201
+ ...(ngDevMode ? [{ debugName: "variantResult" }] : /* istanbul ignore next */ []));
202
+ wrapperClasses = computed(() => this.variantResult().wrapper(), /* @ts-ignore */
203
+ ...(ngDevMode ? [{ debugName: "wrapperClasses" }] : /* istanbul ignore next */ []));
192
204
  panelClasses = computed(() => {
193
205
  const base = this.variantResult().panel();
194
206
  const colorClass = this.color() ? COLOR_ACCENT_CLASSES[this.color()] : '';
195
207
  const custom = this.panelClass();
196
208
  return [base, colorClass, custom].filter(Boolean).join(' ');
197
- }, ...(ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []));
209
+ }, /* @ts-ignore */
210
+ ...(ngDevMode ? [{ debugName: "panelClasses" }] : /* istanbul ignore next */ []));
198
211
  arrowClasses = computed(() => {
199
212
  const base = this.variantResult().arrow();
200
213
  const position = ARROW_POSITION_CLASSES[this.arrowDirection()];
201
214
  return `${base} ${position}`;
202
- }, ...(ngDevMode ? [{ debugName: "arrowClasses" }] : /* istanbul ignore next */ []));
203
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PopoverOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
204
- static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.14", type: PopoverOverlayComponent, isStandalone: true, selector: "tw-popover-overlay", host: { properties: { "id": "id", "attr.role": "\"dialog\"", "attr.aria-modal": "ariaModal() ? \"true\" : null", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "computedAriaLabelledBy()", "animate.enter": "\"scale-in\"", "animate.leave": "\"scale-out\"" }, classAttribute: "origin-center" }, ngImport: i0, template: `
215
+ }, /* @ts-ignore */
216
+ ...(ngDevMode ? [{ debugName: "arrowClasses" }] : /* istanbul ignore next */ []));
217
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
218
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.7", type: PopoverOverlayComponent, isStandalone: true, selector: "tw-popover-overlay", host: { properties: { "id": "id", "attr.role": "\"dialog\"", "attr.aria-modal": "ariaModal() ? \"true\" : null", "attr.aria-label": "ariaLabel() ?? null", "attr.aria-labelledby": "computedAriaLabelledBy()", "animate.enter": "\"scale-in\"", "animate.leave": "\"scale-out\"" }, classAttribute: "origin-center" }, ngImport: i0, template: `
205
219
  <div [class]="wrapperClasses()">
206
220
  <div [class]="panelClasses()">
207
221
  <ng-template [cdkPortalOutlet]="portal()" />
@@ -212,7 +226,7 @@ class PopoverOverlayComponent {
212
226
  </div>
213
227
  `, isInline: true, dependencies: [{ kind: "directive", type: CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
214
228
  }
215
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PopoverOverlayComponent, decorators: [{
229
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverOverlayComponent, decorators: [{
216
230
  type: Component,
217
231
  args: [{
218
232
  selector: 'tw-popover-overlay',
@@ -243,47 +257,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImpo
243
257
  // ── Popover directive ──
244
258
  class PopoverDirective {
245
259
  /** The content to render. An `ng-template` receives context with `$implicit` (data) and `close` (function). A component class receives data and a ref via injection tokens. */
246
- twPopover = input.required(...(ngDevMode ? [{ debugName: "twPopover" }] : /* istanbul ignore next */ []));
260
+ twPopover = input.required(/* @ts-ignore */
261
+ ...(ngDevMode ? [{ debugName: "twPopover" }] : /* istanbul ignore next */ []));
247
262
  /** Preferred placement relative to the trigger. CDK handles fallback when space is insufficient. Defaults to `'bottom'`. */
248
- twPopoverPosition = input('bottom', ...(ngDevMode ? [{ debugName: "twPopoverPosition" }] : /* istanbul ignore next */ []));
263
+ twPopoverPosition = input('bottom', /* @ts-ignore */
264
+ ...(ngDevMode ? [{ debugName: "twPopoverPosition" }] : /* istanbul ignore next */ []));
249
265
  /** What user interaction opens the popover. `'manual'` means consumers call `open()`/`close()` programmatically. Defaults to `'click'`. */
250
- twPopoverTriggerOn = input('click', ...(ngDevMode ? [{ debugName: "twPopoverTriggerOn" }] : /* istanbul ignore next */ []));
266
+ twPopoverTriggerOn = input('click', /* @ts-ignore */
267
+ ...(ngDevMode ? [{ debugName: "twPopoverTriggerOn" }] : /* istanbul ignore next */ []));
251
268
  /** When true, all trigger interactions are suppressed. Defaults to `false`. */
252
- twPopoverDisabled = input(false, ...(ngDevMode ? [{ debugName: "twPopoverDisabled" }] : /* istanbul ignore next */ []));
269
+ twPopoverDisabled = input(false, /* @ts-ignore */
270
+ ...(ngDevMode ? [{ debugName: "twPopoverDisabled" }] : /* istanbul ignore next */ []));
253
271
  /** Two-way bindable open state. Setting to `true` opens the popover; the popover sets it to `false` on close. */
254
- twPopoverOpen = model(false, ...(ngDevMode ? [{ debugName: "twPopoverOpen" }] : /* istanbul ignore next */ []));
272
+ twPopoverOpen = model(false, /* @ts-ignore */
273
+ ...(ngDevMode ? [{ debugName: "twPopoverOpen" }] : /* istanbul ignore next */ []));
255
274
  /** Controls panel padding using the standard spacing scale. Defaults to `'md'`. */
256
- twPopoverSize = input('md', ...(ngDevMode ? [{ debugName: "twPopoverSize" }] : /* istanbul ignore next */ []));
275
+ twPopoverSize = input('md', /* @ts-ignore */
276
+ ...(ngDevMode ? [{ debugName: "twPopoverSize" }] : /* istanbul ignore next */ []));
257
277
  /** Pixel distance between trigger and panel edge. Defaults to `8`. */
258
- twPopoverOffset = input(8, ...(ngDevMode ? [{ debugName: "twPopoverOffset" }] : /* istanbul ignore next */ []));
278
+ twPopoverOffset = input(8, /* @ts-ignore */
279
+ ...(ngDevMode ? [{ debugName: "twPopoverOffset" }] : /* istanbul ignore next */ []));
259
280
  // Default true: the panel reads as a floating callout without the arrow; opt-out
260
281
  // is intended for compact iconic triggers where the arrow would crowd the layout.
261
282
  /** Whether to render a directional arrow pointing at the trigger. Defaults to `true`. */
262
- twPopoverArrow = input(true, ...(ngDevMode ? [{ debugName: "twPopoverArrow" }] : /* istanbul ignore next */ []));
283
+ twPopoverArrow = input(true, /* @ts-ignore */
284
+ ...(ngDevMode ? [{ debugName: "twPopoverArrow" }] : /* istanbul ignore next */ []));
263
285
  /** Backdrop behavior. `'transparent'` catches outside clicks invisibly. `'dimmed'` adds a semi-transparent overlay. `'none'` disables the backdrop. Defaults to `'transparent'`. */
264
- twPopoverBackdrop = input('transparent', ...(ngDevMode ? [{ debugName: "twPopoverBackdrop" }] : /* istanbul ignore next */ []));
286
+ twPopoverBackdrop = input('transparent', /* @ts-ignore */
287
+ ...(ngDevMode ? [{ debugName: "twPopoverBackdrop" }] : /* istanbul ignore next */ []));
265
288
  // Default true: clicking away is the universal dismiss gesture for floating panels;
266
289
  // opt-out is for popovers that own multi-step flows the user must complete.
267
290
  /** Whether clicking outside the panel closes the popover. Only relevant when backdrop is `'none'`. Defaults to `true`. */
268
- twPopoverCloseOnOutside = input(true, ...(ngDevMode ? [{ debugName: "twPopoverCloseOnOutside" }] : /* istanbul ignore next */ []));
291
+ twPopoverCloseOnOutside = input(true, /* @ts-ignore */
292
+ ...(ngDevMode ? [{ debugName: "twPopoverCloseOnOutside" }] : /* istanbul ignore next */ []));
269
293
  // Default true: WAI-ARIA dialog pattern mandates Escape closes; opt-out is for
270
294
  // popovers that own a child layer (nested dialog/menu) that should consume Escape first.
271
295
  /** Whether pressing Escape closes the popover. Defaults to `true`. */
272
- twPopoverCloseOnEscape = input(true, ...(ngDevMode ? [{ debugName: "twPopoverCloseOnEscape" }] : /* istanbul ignore next */ []));
296
+ twPopoverCloseOnEscape = input(true, /* @ts-ignore */
297
+ ...(ngDevMode ? [{ debugName: "twPopoverCloseOnEscape" }] : /* istanbul ignore next */ []));
273
298
  /** CDK scroll strategy for the overlay. Defaults to `'reposition'`. */
274
- twPopoverScrollStrategy = input('reposition', ...(ngDevMode ? [{ debugName: "twPopoverScrollStrategy" }] : /* istanbul ignore next */ []));
299
+ twPopoverScrollStrategy = input('reposition', /* @ts-ignore */
300
+ ...(ngDevMode ? [{ debugName: "twPopoverScrollStrategy" }] : /* istanbul ignore next */ []));
275
301
  // Default true: matches the role="dialog" baseline — a focus-trapped panel announces
276
302
  // itself as modal-ish; opt-out for inline popovers acting as informational tooltips.
277
303
  /** Whether to trap focus inside the popover panel using CDK FocusTrapFactory. Defaults to `true`. */
278
- twPopoverTrapFocus = input(true, ...(ngDevMode ? [{ debugName: "twPopoverTrapFocus" }] : /* istanbul ignore next */ []));
304
+ twPopoverTrapFocus = input(true, /* @ts-ignore */
305
+ ...(ngDevMode ? [{ debugName: "twPopoverTrapFocus" }] : /* istanbul ignore next */ []));
279
306
  /** Arbitrary data passed to template context or component via `POPOVER_DATA` token. */
280
- twPopoverData = input(undefined, ...(ngDevMode ? [{ debugName: "twPopoverData" }] : /* istanbul ignore next */ []));
307
+ twPopoverData = input(undefined, /* @ts-ignore */
308
+ ...(ngDevMode ? [{ debugName: "twPopoverData" }] : /* istanbul ignore next */ []));
281
309
  /** Additional CSS classes applied to the overlay panel for consumer customization. */
282
- twPopoverPanelClass = input('', ...(ngDevMode ? [{ debugName: "twPopoverPanelClass" }] : /* istanbul ignore next */ []));
310
+ twPopoverPanelClass = input('', /* @ts-ignore */
311
+ ...(ngDevMode ? [{ debugName: "twPopoverPanelClass" }] : /* istanbul ignore next */ []));
283
312
  /** Optional semantic color. When set, adds a colored top border accent to the panel. */
284
- twPopoverColor = input(undefined, ...(ngDevMode ? [{ debugName: "twPopoverColor" }] : /* istanbul ignore next */ []));
313
+ twPopoverColor = input(undefined, /* @ts-ignore */
314
+ ...(ngDevMode ? [{ debugName: "twPopoverColor" }] : /* istanbul ignore next */ []));
285
315
  /** Explicit `aria-label` for the dialog panel. */
286
- twPopoverAriaLabel = input(undefined, ...(ngDevMode ? [{ debugName: "twPopoverAriaLabel" }] : /* istanbul ignore next */ []));
316
+ twPopoverAriaLabel = input(undefined, /* @ts-ignore */
317
+ ...(ngDevMode ? [{ debugName: "twPopoverAriaLabel" }] : /* istanbul ignore next */ []));
287
318
  /** Fires after the popover becomes visible. */
288
319
  twPopoverOpened = output();
289
320
  /** Fires after the popover is fully removed. */
@@ -302,9 +333,11 @@ class PopoverDirective {
302
333
  closeTimer = null;
303
334
  /** Tracked focus-blur close timer; cleared on destroy so it can't fire post-teardown. */
304
335
  blurCloseTimer = null;
305
- overlayId = signal(null, ...(ngDevMode ? [{ debugName: "overlayId" }] : /* istanbul ignore next */ []));
336
+ overlayId = signal(null, /* @ts-ignore */
337
+ ...(ngDevMode ? [{ debugName: "overlayId" }] : /* istanbul ignore next */ []));
306
338
  /** The overlay component's id for aria-controls binding. */
307
- overlayComponentId = computed(() => this.overlayId(), ...(ngDevMode ? [{ debugName: "overlayComponentId" }] : /* istanbul ignore next */ []));
339
+ overlayComponentId = computed(() => this.overlayId(), /* @ts-ignore */
340
+ ...(ngDevMode ? [{ debugName: "overlayComponentId" }] : /* istanbul ignore next */ []));
308
341
  constructor() {
309
342
  // React to model changes from the parent
310
343
  effect(() => {
@@ -314,6 +347,15 @@ class PopoverDirective {
314
347
  this.closePopover();
315
348
  return;
316
349
  }
350
+ if (isOpen && this.closing && this.popoverInstance && !disabled) {
351
+ // Reopened before the leave animation finished. Cancelling the pending
352
+ // close is preferable to queueing a reopen: the overlay is still
353
+ // attached, so the surface simply stays up instead of visibly closing
354
+ // and springing back. Without this the deferred callback below would
355
+ // also write `false` over the consumer's `true`.
356
+ this.cancelPendingClose();
357
+ return;
358
+ }
317
359
  if (isOpen && !this.popoverInstance && !disabled && !this.closing) {
318
360
  this.openPopover();
319
361
  }
@@ -566,6 +608,18 @@ class PopoverDirective {
566
608
  this.overlayRef = null;
567
609
  this.popoverInstance = null;
568
610
  }
611
+ /**
612
+ * Aborts an in-flight close, leaving the popover open.
613
+ *
614
+ * `closePopover` tears the focus trap down immediately and defers only the
615
+ * detach, so cancelling has to rebuild the trap — the overlay itself is still
616
+ * attached and the instance still live.
617
+ */
618
+ cancelPendingClose() {
619
+ this.clearCloseTimer();
620
+ this.closing = false;
621
+ this.setupFocusTrap();
622
+ }
569
623
  clearCloseTimer() {
570
624
  if (this.closeTimer !== null) {
571
625
  clearTimeout(this.closeTimer);
@@ -589,10 +643,10 @@ class PopoverDirective {
589
643
  const raw = this.twPopoverPanelClass();
590
644
  return Array.isArray(raw) ? raw.join(' ') : raw;
591
645
  }
592
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
593
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: PopoverDirective, isStandalone: true, selector: "[twPopover]", inputs: { twPopover: { classPropertyName: "twPopover", publicName: "twPopover", isSignal: true, isRequired: true, transformFunction: null }, twPopoverPosition: { classPropertyName: "twPopoverPosition", publicName: "twPopoverPosition", isSignal: true, isRequired: false, transformFunction: null }, twPopoverTriggerOn: { classPropertyName: "twPopoverTriggerOn", publicName: "twPopoverTriggerOn", isSignal: true, isRequired: false, transformFunction: null }, twPopoverDisabled: { classPropertyName: "twPopoverDisabled", publicName: "twPopoverDisabled", isSignal: true, isRequired: false, transformFunction: null }, twPopoverOpen: { classPropertyName: "twPopoverOpen", publicName: "twPopoverOpen", isSignal: true, isRequired: false, transformFunction: null }, twPopoverSize: { classPropertyName: "twPopoverSize", publicName: "twPopoverSize", isSignal: true, isRequired: false, transformFunction: null }, twPopoverOffset: { classPropertyName: "twPopoverOffset", publicName: "twPopoverOffset", isSignal: true, isRequired: false, transformFunction: null }, twPopoverArrow: { classPropertyName: "twPopoverArrow", publicName: "twPopoverArrow", isSignal: true, isRequired: false, transformFunction: null }, twPopoverBackdrop: { classPropertyName: "twPopoverBackdrop", publicName: "twPopoverBackdrop", isSignal: true, isRequired: false, transformFunction: null }, twPopoverCloseOnOutside: { classPropertyName: "twPopoverCloseOnOutside", publicName: "twPopoverCloseOnOutside", isSignal: true, isRequired: false, transformFunction: null }, twPopoverCloseOnEscape: { classPropertyName: "twPopoverCloseOnEscape", publicName: "twPopoverCloseOnEscape", isSignal: true, isRequired: false, transformFunction: null }, twPopoverScrollStrategy: { classPropertyName: "twPopoverScrollStrategy", publicName: "twPopoverScrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, twPopoverTrapFocus: { classPropertyName: "twPopoverTrapFocus", publicName: "twPopoverTrapFocus", isSignal: true, isRequired: false, transformFunction: null }, twPopoverData: { classPropertyName: "twPopoverData", publicName: "twPopoverData", isSignal: true, isRequired: false, transformFunction: null }, twPopoverPanelClass: { classPropertyName: "twPopoverPanelClass", publicName: "twPopoverPanelClass", isSignal: true, isRequired: false, transformFunction: null }, twPopoverColor: { classPropertyName: "twPopoverColor", publicName: "twPopoverColor", isSignal: true, isRequired: false, transformFunction: null }, twPopoverAriaLabel: { classPropertyName: "twPopoverAriaLabel", publicName: "twPopoverAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { twPopoverOpen: "twPopoverOpenChange", twPopoverOpened: "twPopoverOpened", twPopoverClosed: "twPopoverClosed" }, host: { listeners: { "click": "onHostClick()", "focus": "onHostFocus()", "blur": "onHostBlur()", "keydown.escape": "onEscape()" }, properties: { "attr.aria-haspopup": "\"dialog\"", "attr.aria-expanded": "twPopoverOpen()", "attr.aria-controls": "overlayComponentId()" } }, exportAs: ["twPopover"], ngImport: i0 });
646
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
647
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: PopoverDirective, isStandalone: true, selector: "[twPopover]", inputs: { twPopover: { classPropertyName: "twPopover", publicName: "twPopover", isSignal: true, isRequired: true, transformFunction: null }, twPopoverPosition: { classPropertyName: "twPopoverPosition", publicName: "twPopoverPosition", isSignal: true, isRequired: false, transformFunction: null }, twPopoverTriggerOn: { classPropertyName: "twPopoverTriggerOn", publicName: "twPopoverTriggerOn", isSignal: true, isRequired: false, transformFunction: null }, twPopoverDisabled: { classPropertyName: "twPopoverDisabled", publicName: "twPopoverDisabled", isSignal: true, isRequired: false, transformFunction: null }, twPopoverOpen: { classPropertyName: "twPopoverOpen", publicName: "twPopoverOpen", isSignal: true, isRequired: false, transformFunction: null }, twPopoverSize: { classPropertyName: "twPopoverSize", publicName: "twPopoverSize", isSignal: true, isRequired: false, transformFunction: null }, twPopoverOffset: { classPropertyName: "twPopoverOffset", publicName: "twPopoverOffset", isSignal: true, isRequired: false, transformFunction: null }, twPopoverArrow: { classPropertyName: "twPopoverArrow", publicName: "twPopoverArrow", isSignal: true, isRequired: false, transformFunction: null }, twPopoverBackdrop: { classPropertyName: "twPopoverBackdrop", publicName: "twPopoverBackdrop", isSignal: true, isRequired: false, transformFunction: null }, twPopoverCloseOnOutside: { classPropertyName: "twPopoverCloseOnOutside", publicName: "twPopoverCloseOnOutside", isSignal: true, isRequired: false, transformFunction: null }, twPopoverCloseOnEscape: { classPropertyName: "twPopoverCloseOnEscape", publicName: "twPopoverCloseOnEscape", isSignal: true, isRequired: false, transformFunction: null }, twPopoverScrollStrategy: { classPropertyName: "twPopoverScrollStrategy", publicName: "twPopoverScrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, twPopoverTrapFocus: { classPropertyName: "twPopoverTrapFocus", publicName: "twPopoverTrapFocus", isSignal: true, isRequired: false, transformFunction: null }, twPopoverData: { classPropertyName: "twPopoverData", publicName: "twPopoverData", isSignal: true, isRequired: false, transformFunction: null }, twPopoverPanelClass: { classPropertyName: "twPopoverPanelClass", publicName: "twPopoverPanelClass", isSignal: true, isRequired: false, transformFunction: null }, twPopoverColor: { classPropertyName: "twPopoverColor", publicName: "twPopoverColor", isSignal: true, isRequired: false, transformFunction: null }, twPopoverAriaLabel: { classPropertyName: "twPopoverAriaLabel", publicName: "twPopoverAriaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { twPopoverOpen: "twPopoverOpenChange", twPopoverOpened: "twPopoverOpened", twPopoverClosed: "twPopoverClosed" }, host: { listeners: { "click": "onHostClick()", "focus": "onHostFocus()", "blur": "onHostBlur()", "keydown.escape": "onEscape()" }, properties: { "attr.aria-haspopup": "\"dialog\"", "attr.aria-expanded": "twPopoverOpen()", "attr.aria-controls": "overlayComponentId()" } }, exportAs: ["twPopover"], ngImport: i0 });
594
648
  }
595
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PopoverDirective, decorators: [{
649
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverDirective, decorators: [{
596
650
  type: Directive,
597
651
  args: [{
598
652
  selector: '[twPopover]',
@@ -622,10 +676,10 @@ class PopoverCloseDirective {
622
676
  closePopover() {
623
677
  this.popoverRef?.close();
624
678
  }
625
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PopoverCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
626
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "21.2.14", type: PopoverCloseDirective, isStandalone: true, selector: "[twPopoverClose]", host: { listeners: { "click": "closePopover()" }, properties: { "attr.type": "\"button\"" } }, ngImport: i0 });
679
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
680
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "22.0.7", type: PopoverCloseDirective, isStandalone: true, selector: "[twPopoverClose]", host: { listeners: { "click": "closePopover()" }, properties: { "attr.type": "\"button\"" } }, ngImport: i0 });
627
681
  }
628
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PopoverCloseDirective, decorators: [{
682
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverCloseDirective, decorators: [{
629
683
  type: Directive,
630
684
  args: [{
631
685
  selector: '[twPopoverClose]',
@@ -649,17 +703,18 @@ class PopoverTitleDirective {
649
703
  elementRef = inject(ElementRef);
650
704
  popoverRef = inject(POPOVER_REF, { optional: true });
651
705
  /** Custom id for the title element. Defaults to a generated unique id. */
652
- id = input(this.generatedId, ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
706
+ id = input(this.generatedId, /* @ts-ignore */
707
+ ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
653
708
  ngOnInit() {
654
709
  this.popoverRef?._addAriaLabelledBy?.(this.id());
655
710
  }
656
711
  ngOnDestroy() {
657
712
  this.popoverRef?._removeAriaLabelledBy?.(this.id());
658
713
  }
659
- static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PopoverTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
660
- static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "21.2.14", type: PopoverTitleDirective, isStandalone: true, selector: "[twPopoverTitle], tw-popover-title", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id()" }, classAttribute: "text-sm font-semibold text-fg" }, ngImport: i0 });
714
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
715
+ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "22.0.7", type: PopoverTitleDirective, isStandalone: true, selector: "[twPopoverTitle], tw-popover-title", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "id": "id()" }, classAttribute: "text-sm font-semibold text-fg" }, ngImport: i0 });
661
716
  }
662
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.14", ngImport: i0, type: PopoverTitleDirective, decorators: [{
717
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverTitleDirective, decorators: [{
663
718
  type: Directive,
664
719
  args: [{
665
720
  selector: '[twPopoverTitle], tw-popover-title',
@@ -1 +1 @@
1
- {"version":3,"file":"cdevhub-ngx-tw-popover.mjs","sources":["../../../projects/ngx-tw/popover/popover-tokens.ts","../../../projects/ngx-tw/popover/popover.ts","../../../projects/ngx-tw/popover/popover-close.ts","../../../projects/ngx-tw/popover/popover-title.ts","../../../projects/ngx-tw/popover/cdevhub-ngx-tw-popover.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Context object provided to popover template content. */\nexport interface PopoverTemplateContext<T = unknown> {\n /** The data passed via `twPopoverData` input. */\n $implicit: T;\n /** Closes the popover. */\n close: () => void;\n}\n\n/** Reference to control the popover from inside component content. */\nexport interface PopoverRef {\n /** Closes the popover. */\n close(): void;\n /** @internal — used by `PopoverTitleDirective` to register itself with `aria-labelledby`. */\n _addAriaLabelledBy?: (id: string) => void;\n /** @internal — used by `PopoverTitleDirective` to unregister itself. */\n _removeAriaLabelledBy?: (id: string) => void;\n}\n\n/** Injection token providing arbitrary data to popover component content. */\nexport const POPOVER_DATA = new InjectionToken<unknown>('POPOVER_DATA');\n\n/** Injection token providing a `PopoverRef` to popover component content. */\nexport const POPOVER_REF = new InjectionToken<PopoverRef>('POPOVER_REF');\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n output,\n signal,\n TemplateRef,\n type Type,\n untracked,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n type ConnectedPosition,\n type FlexibleConnectedPositionStrategy,\n Overlay,\n type OverlayRef,\n} from '@angular/cdk/overlay';\nimport { CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { FocusTrapFactory } from '@angular/cdk/a11y';\nimport { Subscription } from 'rxjs';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\nimport {\n POPOVER_DATA,\n POPOVER_REF,\n type PopoverRef,\n type PopoverTemplateContext,\n} from './popover-tokens';\n\n// ── Types ──\n\n/** Placement position of the popover relative to its trigger element. */\nexport type PopoverPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/** Scroll strategy for the popover overlay. */\nexport type PopoverScrollStrategy = 'reposition' | 'close' | 'block' | 'noop';\n\n/** Backdrop behavior for the popover. */\nexport type PopoverBackdrop = 'transparent' | 'dimmed' | 'none';\n\n/** Trigger interaction that opens the popover. */\nexport type PopoverTrigger = 'click' | 'focus' | 'manual';\n\n/** Direction the arrow points toward (derived from resolved overlay position). */\ntype ArrowDirection = 'top' | 'bottom' | 'left' | 'right';\n\n/** Duration of leave animation in ms (must match _base.css scale-out/fade-out). */\nconst ANIMATION_DURATION = 120;\n\n// ── Variant config ──\n\nconst popoverVariants = tv(\n {\n slots: {\n wrapper: 'relative',\n panel:\n 'bg-surface-overlay text-fg text-sm border border-border rounded-lg shadow-md overflow-hidden',\n arrow: 'absolute size-2.5 rotate-45 bg-surface-overlay border border-border',\n },\n variants: {\n size: {\n xs: { panel: 'p-2' },\n sm: { panel: 'p-3' },\n md: { panel: 'p-4' },\n lg: { panel: 'p-6' },\n xl: { panel: 'p-8' },\n },\n },\n defaultVariants: { size: 'md' },\n },\n { twMerge: true },\n);\n\n// ── Color accent classes ──\n\nconst COLOR_ACCENT_CLASSES: Record<TwColor, string> = {\n primary: 'border-t-2 border-t-primary-500',\n secondary: 'border-t-2 border-t-secondary-500',\n accent: 'border-t-2 border-t-accent-500',\n neutral: 'border-t-2 border-t-neutral-500',\n info: 'border-t-2 border-t-info-500',\n success: 'border-t-2 border-t-success-500',\n warning: 'border-t-2 border-t-warning-500',\n error: 'border-t-2 border-t-error-500',\n};\n\n// ── Position mappings ──\n\nfunction buildPositionMap(offset: number): Record<PopoverPosition, ConnectedPosition> {\n return {\n top: {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -offset,\n },\n 'top-start': {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -offset,\n },\n 'top-end': {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -offset,\n },\n bottom: {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: offset,\n },\n 'bottom-start': {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: offset,\n },\n 'bottom-end': {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: offset,\n },\n left: {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -offset,\n },\n 'left-start': {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offset,\n },\n 'left-end': {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetX: -offset,\n },\n right: {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: offset,\n },\n 'right-start': {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offset,\n },\n 'right-end': {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetX: offset,\n },\n };\n}\n\nconst FALLBACK_ORDER: Record<string, PopoverPosition[]> = {\n top: ['bottom', 'left', 'right'],\n bottom: ['top', 'left', 'right'],\n left: ['right', 'top', 'bottom'],\n right: ['left', 'top', 'bottom'],\n};\n\nfunction buildPositions(\n preferred: PopoverPosition,\n offset: number,\n): ConnectedPosition[] {\n const positionMap = buildPositionMap(offset);\n const primary = preferred.split('-')[0];\n const positions = [positionMap[preferred]];\n const fallbacks = FALLBACK_ORDER[primary] ?? FALLBACK_ORDER['top'];\n for (const fb of fallbacks) {\n positions.push(positionMap[fb]);\n }\n return positions;\n}\n\nfunction resolveArrowDirection(position: ConnectedPosition): ArrowDirection {\n if (position.overlayY === 'bottom') return 'bottom';\n if (position.overlayY === 'top') return 'top';\n if (position.overlayX === 'end') return 'right';\n return 'left';\n}\n\n/** Arrow position classes keyed by which side the arrow sits on. */\nconst ARROW_POSITION_CLASSES: Record<ArrowDirection, string> = {\n bottom: 'left-1/2 -translate-x-1/2 bottom-0 translate-y-1/2 border-t-0 border-l-0',\n top: 'left-1/2 -translate-x-1/2 top-0 -translate-y-1/2 border-b-0 border-r-0',\n right: 'top-1/2 -translate-y-1/2 right-0 translate-x-1/2 border-b-0 border-l-0',\n left: 'top-1/2 -translate-y-1/2 left-0 -translate-x-1/2 border-t-0 border-r-0',\n};\n\n// ── Internal overlay component (not exported) ──\n\nlet nextPopoverId = 0;\n\n@Component({\n selector: 'tw-popover-overlay',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CdkPortalOutlet],\n host: {\n class: 'origin-center',\n '[id]': 'id',\n '[attr.role]': '\"dialog\"',\n '[attr.aria-modal]': 'ariaModal() ? \"true\" : null',\n '[attr.aria-label]': 'ariaLabel() ?? null',\n '[attr.aria-labelledby]': 'computedAriaLabelledBy()',\n '[animate.enter]': '\"scale-in\"',\n '[animate.leave]': '\"scale-out\"',\n },\n template: `\n <div [class]=\"wrapperClasses()\">\n <div [class]=\"panelClasses()\">\n <ng-template [cdkPortalOutlet]=\"portal()\" />\n </div>\n @if (showArrow()) {\n <span [class]=\"arrowClasses()\" aria-hidden=\"true\"></span>\n }\n </div>\n `,\n})\nclass PopoverOverlayComponent {\n readonly id = `tw-popover-${nextPopoverId++}`;\n\n readonly size = signal<TwSize>('md');\n readonly color = signal<TwColor | undefined>(undefined);\n readonly showArrow = signal(true);\n readonly arrowDirection = signal<ArrowDirection>('top');\n readonly ariaLabel = signal<string | undefined>(undefined);\n readonly ariaModal = signal(true);\n readonly ariaLabelledByQueue = signal<readonly string[]>([]);\n readonly panelClass = signal<string>('');\n readonly portal = signal<TemplatePortal<PopoverTemplateContext> | ComponentPortal<unknown> | null>(null);\n\n readonly computedAriaLabelledBy = computed(() => {\n if (this.ariaLabel()) return null;\n return this.ariaLabelledByQueue()[0] ?? null;\n });\n\n _addAriaLabelledBy(id: string): void {\n this.ariaLabelledByQueue.update((q) => (q.includes(id) ? q : [...q, id]));\n }\n\n _removeAriaLabelledBy(id: string): void {\n this.ariaLabelledByQueue.update((q) => q.filter((existing) => existing !== id));\n }\n\n private readonly variantResult = computed(() =>\n popoverVariants({ size: this.size() }),\n );\n\n readonly wrapperClasses = computed(() => this.variantResult().wrapper());\n\n readonly panelClasses = computed(() => {\n const base = this.variantResult().panel();\n const colorClass = this.color() ? COLOR_ACCENT_CLASSES[this.color()!] : '';\n const custom = this.panelClass();\n return [base, colorClass, custom].filter(Boolean).join(' ');\n });\n\n readonly arrowClasses = computed(() => {\n const base = this.variantResult().arrow();\n const position = ARROW_POSITION_CLASSES[this.arrowDirection()];\n return `${base} ${position}`;\n });\n}\n\n// ── Popover directive ──\n\n@Directive({\n selector: '[twPopover]',\n exportAs: 'twPopover',\n host: {\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'twPopoverOpen()',\n '[attr.aria-controls]': 'overlayComponentId()',\n '(click)': 'onHostClick()',\n '(focus)': 'onHostFocus()',\n '(blur)': 'onHostBlur()',\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class PopoverDirective {\n /** The content to render. An `ng-template` receives context with `$implicit` (data) and `close` (function). A component class receives data and a ref via injection tokens. */\n readonly twPopover = input.required<\n TemplateRef<PopoverTemplateContext> | Type<unknown>\n >();\n\n /** Preferred placement relative to the trigger. CDK handles fallback when space is insufficient. Defaults to `'bottom'`. */\n readonly twPopoverPosition = input<PopoverPosition>('bottom');\n\n /** What user interaction opens the popover. `'manual'` means consumers call `open()`/`close()` programmatically. Defaults to `'click'`. */\n readonly twPopoverTriggerOn = input<PopoverTrigger>('click');\n\n /** When true, all trigger interactions are suppressed. Defaults to `false`. */\n readonly twPopoverDisabled = input(false);\n\n /** Two-way bindable open state. Setting to `true` opens the popover; the popover sets it to `false` on close. */\n readonly twPopoverOpen = model(false);\n\n /** Controls panel padding using the standard spacing scale. Defaults to `'md'`. */\n readonly twPopoverSize = input<TwSize>('md');\n\n /** Pixel distance between trigger and panel edge. Defaults to `8`. */\n readonly twPopoverOffset = input(8);\n\n // Default true: the panel reads as a floating callout without the arrow; opt-out\n // is intended for compact iconic triggers where the arrow would crowd the layout.\n /** Whether to render a directional arrow pointing at the trigger. Defaults to `true`. */\n readonly twPopoverArrow = input(true);\n\n /** Backdrop behavior. `'transparent'` catches outside clicks invisibly. `'dimmed'` adds a semi-transparent overlay. `'none'` disables the backdrop. Defaults to `'transparent'`. */\n readonly twPopoverBackdrop = input<PopoverBackdrop>('transparent');\n\n // Default true: clicking away is the universal dismiss gesture for floating panels;\n // opt-out is for popovers that own multi-step flows the user must complete.\n /** Whether clicking outside the panel closes the popover. Only relevant when backdrop is `'none'`. Defaults to `true`. */\n readonly twPopoverCloseOnOutside = input(true);\n\n // Default true: WAI-ARIA dialog pattern mandates Escape closes; opt-out is for\n // popovers that own a child layer (nested dialog/menu) that should consume Escape first.\n /** Whether pressing Escape closes the popover. Defaults to `true`. */\n readonly twPopoverCloseOnEscape = input(true);\n\n /** CDK scroll strategy for the overlay. Defaults to `'reposition'`. */\n readonly twPopoverScrollStrategy = input<PopoverScrollStrategy>('reposition');\n\n // Default true: matches the role=\"dialog\" baseline — a focus-trapped panel announces\n // itself as modal-ish; opt-out for inline popovers acting as informational tooltips.\n /** Whether to trap focus inside the popover panel using CDK FocusTrapFactory. Defaults to `true`. */\n readonly twPopoverTrapFocus = input(true);\n\n /** Arbitrary data passed to template context or component via `POPOVER_DATA` token. */\n readonly twPopoverData = input<unknown>(undefined);\n\n /** Additional CSS classes applied to the overlay panel for consumer customization. */\n readonly twPopoverPanelClass = input<string | string[]>('');\n\n /** Optional semantic color. When set, adds a colored top border accent to the panel. */\n readonly twPopoverColor = input<TwColor | undefined>(undefined);\n\n /** Explicit `aria-label` for the dialog panel. */\n readonly twPopoverAriaLabel = input<string | undefined>(undefined);\n\n /** Fires after the popover becomes visible. */\n readonly twPopoverOpened = output<void>();\n\n /** Fires after the popover is fully removed. */\n readonly twPopoverClosed = output<void>();\n\n private readonly overlay = inject(Overlay);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly focusTrapFactory = inject(FocusTrapFactory);\n\n private overlayRef: OverlayRef | null = null;\n private popoverInstance: PopoverOverlayComponent | null = null;\n private focusTrap: ReturnType<FocusTrapFactory['create']> | null = null;\n private perOpenSubs: Subscription | null = null;\n private closing = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n /** Tracked focus-blur close timer; cleared on destroy so it can't fire post-teardown. */\n private blurCloseTimer: ReturnType<typeof setTimeout> | null = null;\n private readonly overlayId = signal<string | null>(null);\n\n /** The overlay component's id for aria-controls binding. */\n protected readonly overlayComponentId = computed(() => this.overlayId());\n\n constructor() {\n // React to model changes from the parent\n effect(() => {\n const isOpen = this.twPopoverOpen();\n const disabled = this.twPopoverDisabled();\n if (disabled && this.popoverInstance) {\n this.closePopover();\n return;\n }\n if (isOpen && !this.popoverInstance && !disabled && !this.closing) {\n this.openPopover();\n } else if (!isOpen && this.popoverInstance) {\n this.closePopover();\n }\n });\n\n this.destroyRef.onDestroy(() => {\n this.clearCloseTimer();\n if (this.blurCloseTimer !== null) {\n clearTimeout(this.blurCloseTimer);\n this.blurCloseTimer = null;\n }\n this.destroyFocusTrap();\n this.perOpenSubs?.unsubscribe();\n this.disposeOverlay();\n });\n }\n\n /** Programmatically open the popover. */\n open(): void {\n if (this.twPopoverDisabled() || this.popoverInstance || this.closing) return;\n this.twPopoverOpen.set(true);\n }\n\n /** Programmatically close the popover. */\n close(): void {\n if (!this.popoverInstance && !this.closing) return;\n this.twPopoverOpen.set(false);\n }\n\n /** Toggle open/close. */\n toggle(): void {\n if (this.popoverInstance || this.closing) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /** Force CDK to recalculate overlay position. */\n reposition(): void {\n this.overlayRef?.updatePosition();\n }\n\n // ── Host event handlers ──\n\n protected onHostClick(): void {\n if (this.twPopoverTriggerOn() === 'click') {\n this.toggle();\n }\n }\n\n protected onHostFocus(): void {\n if (this.twPopoverTriggerOn() === 'focus') {\n this.open();\n }\n }\n\n protected onHostBlur(): void {\n if (this.twPopoverTriggerOn() === 'focus') {\n if (this.blurCloseTimer !== null) clearTimeout(this.blurCloseTimer);\n this.blurCloseTimer = setTimeout(() => {\n this.blurCloseTimer = null;\n const activeEl = document.activeElement;\n const overlayEl = this.overlayRef?.overlayElement;\n if (overlayEl && overlayEl.contains(activeEl)) return;\n this.close();\n });\n }\n }\n\n protected onEscape(): void {\n if (this.twPopoverCloseOnEscape() && this.popoverInstance) {\n this.close();\n }\n }\n\n // ── Private ──\n\n private openPopover(): void {\n this.ensureOverlay();\n this.updatePositionStrategy();\n this.attachContent();\n this.subscribePerOpen();\n this.overlayId.set(this.popoverInstance?.id ?? null);\n this.setupFocusTrap();\n this.twPopoverOpened.emit();\n }\n\n private closePopover(): void {\n if (this.closing) return;\n this.closing = true;\n\n // Restore focus to the trigger UNLESS the consumer has deliberately moved\n // focus to a different focusable element outside the overlay. We detect\n // that by checking whether the active element is a real focusable target\n // outside the overlay — body/null means focus is \"unset\" and we should\n // still restore (the typical case after Escape or backdrop click).\n const overlayEl = this.overlayRef?.overlayElement;\n const activeEl = document.activeElement as HTMLElement | null;\n const focusOutsideOverlayIntentionally =\n !!activeEl &&\n activeEl !== document.body &&\n activeEl !== this.elementRef.nativeElement &&\n !overlayEl?.contains(activeEl);\n\n // 1. Destroy focus trap so focus can leave\n this.destroyFocusTrap();\n\n // 2. Return focus to trigger only when appropriate\n if (!focusOutsideOverlayIntentionally) {\n this.elementRef.nativeElement.focus();\n }\n\n // 3. Wait for leave animation, then detach\n this.closeTimer = setTimeout(() => {\n this.closeTimer = null;\n\n if (this.overlayRef?.hasAttached()) {\n this.overlayRef.detach();\n }\n\n this.perOpenSubs?.unsubscribe();\n this.perOpenSubs = null;\n this.popoverInstance = null;\n this.overlayId.set(null);\n\n // Use untracked to prevent effect re-trigger\n untracked(() => this.twPopoverOpen.set(false));\n\n this.twPopoverClosed.emit();\n this.closing = false;\n }, ANIMATION_DURATION);\n }\n\n private currentPositionStrategy: FlexibleConnectedPositionStrategy | null = null;\n\n private buildPositionStrategy(): FlexibleConnectedPositionStrategy {\n const positions = buildPositions(\n this.twPopoverPosition(),\n this.twPopoverOffset(),\n );\n\n return this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions(positions)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withViewportMargin(8);\n }\n\n private ensureOverlay(): void {\n if (this.overlayRef) return;\n\n const positionStrategy = this.buildPositionStrategy();\n this.currentPositionStrategy = positionStrategy;\n\n const backdrop = this.twPopoverBackdrop();\n const hasBackdrop = backdrop !== 'none';\n const backdropClass =\n backdrop === 'dimmed' ? 'bg-black/20' : 'cdk-overlay-transparent-backdrop';\n\n const scrollStrategy = this.resolveScrollStrategy();\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy,\n hasBackdrop,\n backdropClass,\n panelClass: 'tw-popover-panel',\n });\n }\n\n private updatePositionStrategy(): void {\n if (!this.overlayRef) return;\n const positionStrategy = this.buildPositionStrategy();\n this.currentPositionStrategy = positionStrategy;\n this.overlayRef.updatePositionStrategy(positionStrategy);\n }\n\n private subscribePerOpen(): void {\n this.perOpenSubs?.unsubscribe();\n this.perOpenSubs = new Subscription();\n\n const backdrop = this.twPopoverBackdrop();\n const hasBackdrop = backdrop !== 'none';\n\n // Backdrop click closes\n if (hasBackdrop) {\n this.perOpenSubs.add(\n this.overlayRef!.backdropClick().subscribe(() => this.close()),\n );\n }\n\n // Outside pointer events when no backdrop\n if (!hasBackdrop && this.twPopoverCloseOnOutside()) {\n this.perOpenSubs.add(\n this.overlayRef!.outsidePointerEvents().subscribe(() => this.close()),\n );\n }\n\n // Escape from within the overlay\n this.perOpenSubs.add(\n this.overlayRef!.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape' && this.twPopoverCloseOnEscape()) {\n this.close();\n }\n }),\n );\n\n // Per-open position change subscription — torn down on close to prevent\n // accumulation when the directive is opened/closed many times.\n if (this.currentPositionStrategy) {\n this.perOpenSubs.add(\n this.currentPositionStrategy.positionChanges.subscribe((change) => {\n if (this.popoverInstance) {\n const dir = resolveArrowDirection(change.connectionPair);\n this.popoverInstance.arrowDirection.set(dir);\n }\n }),\n );\n }\n }\n\n private attachContent(): void {\n const content = this.twPopover();\n\n // Attach the internal overlay component\n const overlayPortal = new ComponentPortal(\n PopoverOverlayComponent,\n this.viewContainerRef,\n );\n const componentRef = this.overlayRef!.attach(overlayPortal);\n this.popoverInstance = componentRef.instance;\n\n // Configure the overlay component\n this.popoverInstance.size.set(this.twPopoverSize());\n this.popoverInstance.color.set(this.twPopoverColor());\n this.popoverInstance.showArrow.set(this.twPopoverArrow());\n this.popoverInstance.ariaLabel.set(this.twPopoverAriaLabel());\n this.popoverInstance.ariaModal.set(this.twPopoverTrapFocus());\n this.popoverInstance.ariaLabelledByQueue.set([]);\n this.popoverInstance.panelClass.set(this.resolvePanelClass());\n\n // Provide POPOVER_REF for both template and component content. Title directives\n // call _addAriaLabelledBy / _removeAriaLabelledBy to register their id with the\n // overlay's aria-labelledby queue.\n const overlayInstance = this.popoverInstance;\n const popoverRef: PopoverRef = {\n close: () => this.close(),\n _addAriaLabelledBy: (id) => overlayInstance._addAriaLabelledBy(id),\n _removeAriaLabelledBy: (id) => overlayInstance._removeAriaLabelledBy(id),\n };\n\n // Create the content portal\n if (content instanceof TemplateRef) {\n const context: PopoverTemplateContext = {\n $implicit: this.twPopoverData(),\n close: () => this.close(),\n };\n const templateInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: POPOVER_DATA, useValue: this.twPopoverData() },\n { provide: POPOVER_REF, useValue: popoverRef },\n ],\n });\n const templatePortal = new TemplatePortal(\n content,\n this.viewContainerRef,\n context,\n templateInjector,\n );\n this.popoverInstance.portal.set(templatePortal);\n } else {\n const contentInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: POPOVER_DATA, useValue: this.twPopoverData() },\n { provide: POPOVER_REF, useValue: popoverRef },\n ],\n });\n const componentPortal = new ComponentPortal(\n content,\n this.viewContainerRef,\n contentInjector,\n );\n this.popoverInstance.portal.set(componentPortal);\n }\n }\n\n private setupFocusTrap(): void {\n if (!this.twPopoverTrapFocus() || !this.overlayRef) return;\n const overlayEl = this.overlayRef.overlayElement;\n this.focusTrap = this.focusTrapFactory.create(overlayEl);\n this.focusTrap.focusInitialElementWhenReady();\n }\n\n private destroyFocusTrap(): void {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n }\n\n private disposeOverlay(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.popoverInstance = null;\n }\n\n private clearCloseTimer(): void {\n if (this.closeTimer !== null) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private resolveScrollStrategy() {\n const strategy = this.twPopoverScrollStrategy();\n switch (strategy) {\n case 'close':\n return this.overlay.scrollStrategies.close();\n case 'block':\n return this.overlay.scrollStrategies.block();\n case 'noop':\n return this.overlay.scrollStrategies.noop();\n default:\n return this.overlay.scrollStrategies.reposition();\n }\n }\n\n private resolvePanelClass(): string {\n const raw = this.twPopoverPanelClass();\n return Array.isArray(raw) ? raw.join(' ') : raw;\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { POPOVER_REF } from './popover-tokens';\n\n/**\n * Convenience directive that closes the enclosing popover when the host element is clicked.\n * Place on any element inside popover content.\n *\n * ```html\n * <button twPopoverClose>Cancel</button>\n * ```\n */\n@Directive({\n selector: '[twPopoverClose]',\n host: {\n '(click)': 'closePopover()',\n '[attr.type]': '\"button\"',\n },\n})\nexport class PopoverCloseDirective {\n private readonly popoverRef = inject(POPOVER_REF, { optional: true });\n\n protected closePopover(): void {\n this.popoverRef?.close();\n }\n}\n","import {\n Directive,\n ElementRef,\n inject,\n input,\n OnDestroy,\n OnInit,\n} from '@angular/core';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { POPOVER_REF } from './popover-tokens';\n\n/**\n * Popover title. Registers its ID with the enclosing popover overlay's\n * `aria-labelledby` queue so screen readers announce it automatically.\n *\n * Mirrors `DialogTitleDirective` and is the recommended way to label a\n * popover whose content has a heading. Use `twPopoverAriaLabel` when no\n * heading is present.\n */\n@Directive({\n selector: '[twPopoverTitle], tw-popover-title',\n host: {\n class: 'text-sm font-semibold text-fg',\n '[id]': 'id()',\n },\n})\nexport class PopoverTitleDirective implements OnInit, OnDestroy {\n private readonly generatedId = inject(_IdGenerator).getId('tw-popover-title-');\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly popoverRef = inject(POPOVER_REF, { optional: true });\n\n /** Custom id for the title element. Defaults to a generated unique id. */\n readonly id = input<string>(this.generatedId);\n\n ngOnInit(): void {\n this.popoverRef?._addAriaLabelledBy?.(this.id());\n }\n\n ngOnDestroy(): void {\n this.popoverRef?._removeAriaLabelledBy?.(this.id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E,GAAG,KAAK,CAAS,IAAI,CAAC,WAAW,yEAAC;IAE7C,QAAQ,GAAA;QACN,IAAI,CAAC,UAAU,EAAE,kBAAkB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IAClD;IAEA,WAAW,GAAA;QACT,IAAI,CAAC,UAAU,EAAE,qBAAqB,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IACrD;wGAdW,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;4FAArB,qBAAqB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oCAAA,EAAA,MAAA,EAAA,EAAA,EAAA,EAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,+BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;4FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,oCAAoC;AAC9C,oBAAA,IAAI,EAAE;AACJ,wBAAA,KAAK,EAAE,+BAA+B;AACtC,wBAAA,MAAM,EAAE,MAAM;AACf,qBAAA;AACF,iBAAA;;;ACzBD;;AAEG;;;;"}
1
+ {"version":3,"file":"cdevhub-ngx-tw-popover.mjs","sources":["../../../projects/ngx-tw/popover/popover-tokens.ts","../../../projects/ngx-tw/popover/popover.ts","../../../projects/ngx-tw/popover/popover-close.ts","../../../projects/ngx-tw/popover/popover-title.ts","../../../projects/ngx-tw/popover/cdevhub-ngx-tw-popover.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\n/** Context object provided to popover template content. */\nexport interface PopoverTemplateContext<T = unknown> {\n /** The data passed via `twPopoverData` input. */\n $implicit: T;\n /** Closes the popover. */\n close: () => void;\n}\n\n/** Reference to control the popover from inside component content. */\nexport interface PopoverRef {\n /** Closes the popover. */\n close(): void;\n /** @internal — used by `PopoverTitleDirective` to register itself with `aria-labelledby`. */\n _addAriaLabelledBy?: (id: string) => void;\n /** @internal — used by `PopoverTitleDirective` to unregister itself. */\n _removeAriaLabelledBy?: (id: string) => void;\n}\n\n/** Injection token providing arbitrary data to popover component content. */\nexport const POPOVER_DATA = new InjectionToken<unknown>('POPOVER_DATA');\n\n/** Injection token providing a `PopoverRef` to popover component content. */\nexport const POPOVER_REF = new InjectionToken<PopoverRef>('POPOVER_REF');\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n DestroyRef,\n Directive,\n effect,\n ElementRef,\n inject,\n Injector,\n input,\n model,\n output,\n signal,\n TemplateRef,\n type Type,\n untracked,\n ViewContainerRef,\n} from '@angular/core';\nimport {\n type ConnectedPosition,\n type FlexibleConnectedPositionStrategy,\n Overlay,\n type OverlayRef,\n} from '@angular/cdk/overlay';\nimport { CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';\nimport { FocusTrapFactory } from '@angular/cdk/a11y';\nimport { Subscription } from 'rxjs';\nimport { tv } from 'tailwind-variants';\nimport type { TwColor, TwSize } from '@cdevhub/ngx-tw/core';\nimport {\n POPOVER_DATA,\n POPOVER_REF,\n type PopoverRef,\n type PopoverTemplateContext,\n} from './popover-tokens';\n\n// ── Types ──\n\n/** Placement position of the popover relative to its trigger element. */\nexport type PopoverPosition =\n | 'top'\n | 'top-start'\n | 'top-end'\n | 'bottom'\n | 'bottom-start'\n | 'bottom-end'\n | 'left'\n | 'left-start'\n | 'left-end'\n | 'right'\n | 'right-start'\n | 'right-end';\n\n/** Scroll strategy for the popover overlay. */\nexport type PopoverScrollStrategy = 'reposition' | 'close' | 'block' | 'noop';\n\n/** Backdrop behavior for the popover. */\nexport type PopoverBackdrop = 'transparent' | 'dimmed' | 'none';\n\n/** Trigger interaction that opens the popover. */\nexport type PopoverTrigger = 'click' | 'focus' | 'manual';\n\n/** Direction the arrow points toward (derived from resolved overlay position). */\ntype ArrowDirection = 'top' | 'bottom' | 'left' | 'right';\n\n/** Duration of leave animation in ms (must match _base.css scale-out/fade-out). */\nconst ANIMATION_DURATION = 120;\n\n// ── Variant config ──\n\nconst popoverVariants = tv(\n {\n slots: {\n wrapper: 'relative',\n panel:\n 'bg-surface-overlay text-fg text-sm border border-border rounded-lg shadow-md overflow-hidden',\n arrow: 'absolute size-2.5 rotate-45 bg-surface-overlay border border-border',\n },\n variants: {\n size: {\n xs: { panel: 'p-2' },\n sm: { panel: 'p-3' },\n md: { panel: 'p-4' },\n lg: { panel: 'p-6' },\n xl: { panel: 'p-8' },\n },\n },\n defaultVariants: { size: 'md' },\n },\n { twMerge: true },\n);\n\n// ── Color accent classes ──\n\nconst COLOR_ACCENT_CLASSES: Record<TwColor, string> = {\n primary: 'border-t-2 border-t-primary-500',\n secondary: 'border-t-2 border-t-secondary-500',\n accent: 'border-t-2 border-t-accent-500',\n neutral: 'border-t-2 border-t-neutral-500',\n info: 'border-t-2 border-t-info-500',\n success: 'border-t-2 border-t-success-500',\n warning: 'border-t-2 border-t-warning-500',\n error: 'border-t-2 border-t-error-500',\n};\n\n// ── Position mappings ──\n\nfunction buildPositionMap(offset: number): Record<PopoverPosition, ConnectedPosition> {\n return {\n top: {\n originX: 'center',\n originY: 'top',\n overlayX: 'center',\n overlayY: 'bottom',\n offsetY: -offset,\n },\n 'top-start': {\n originX: 'start',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetY: -offset,\n },\n 'top-end': {\n originX: 'end',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetY: -offset,\n },\n bottom: {\n originX: 'center',\n originY: 'bottom',\n overlayX: 'center',\n overlayY: 'top',\n offsetY: offset,\n },\n 'bottom-start': {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'top',\n offsetY: offset,\n },\n 'bottom-end': {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'top',\n offsetY: offset,\n },\n left: {\n originX: 'start',\n originY: 'center',\n overlayX: 'end',\n overlayY: 'center',\n offsetX: -offset,\n },\n 'left-start': {\n originX: 'start',\n originY: 'top',\n overlayX: 'end',\n overlayY: 'top',\n offsetX: -offset,\n },\n 'left-end': {\n originX: 'start',\n originY: 'bottom',\n overlayX: 'end',\n overlayY: 'bottom',\n offsetX: -offset,\n },\n right: {\n originX: 'end',\n originY: 'center',\n overlayX: 'start',\n overlayY: 'center',\n offsetX: offset,\n },\n 'right-start': {\n originX: 'end',\n originY: 'top',\n overlayX: 'start',\n overlayY: 'top',\n offsetX: offset,\n },\n 'right-end': {\n originX: 'end',\n originY: 'bottom',\n overlayX: 'start',\n overlayY: 'bottom',\n offsetX: offset,\n },\n };\n}\n\nconst FALLBACK_ORDER: Record<string, PopoverPosition[]> = {\n top: ['bottom', 'left', 'right'],\n bottom: ['top', 'left', 'right'],\n left: ['right', 'top', 'bottom'],\n right: ['left', 'top', 'bottom'],\n};\n\nfunction buildPositions(\n preferred: PopoverPosition,\n offset: number,\n): ConnectedPosition[] {\n const positionMap = buildPositionMap(offset);\n const primary = preferred.split('-')[0];\n const positions = [positionMap[preferred]];\n const fallbacks = FALLBACK_ORDER[primary] ?? FALLBACK_ORDER['top'];\n for (const fb of fallbacks) {\n positions.push(positionMap[fb]);\n }\n return positions;\n}\n\nfunction resolveArrowDirection(position: ConnectedPosition): ArrowDirection {\n if (position.overlayY === 'bottom') return 'bottom';\n if (position.overlayY === 'top') return 'top';\n if (position.overlayX === 'end') return 'right';\n return 'left';\n}\n\n/** Arrow position classes keyed by which side the arrow sits on. */\nconst ARROW_POSITION_CLASSES: Record<ArrowDirection, string> = {\n bottom: 'left-1/2 -translate-x-1/2 bottom-0 translate-y-1/2 border-t-0 border-l-0',\n top: 'left-1/2 -translate-x-1/2 top-0 -translate-y-1/2 border-b-0 border-r-0',\n right: 'top-1/2 -translate-y-1/2 right-0 translate-x-1/2 border-b-0 border-l-0',\n left: 'top-1/2 -translate-y-1/2 left-0 -translate-x-1/2 border-t-0 border-r-0',\n};\n\n// ── Internal overlay component (not exported) ──\n\nlet nextPopoverId = 0;\n\n@Component({\n selector: 'tw-popover-overlay',\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CdkPortalOutlet],\n host: {\n class: 'origin-center',\n '[id]': 'id',\n '[attr.role]': '\"dialog\"',\n '[attr.aria-modal]': 'ariaModal() ? \"true\" : null',\n '[attr.aria-label]': 'ariaLabel() ?? null',\n '[attr.aria-labelledby]': 'computedAriaLabelledBy()',\n '[animate.enter]': '\"scale-in\"',\n '[animate.leave]': '\"scale-out\"',\n },\n template: `\n <div [class]=\"wrapperClasses()\">\n <div [class]=\"panelClasses()\">\n <ng-template [cdkPortalOutlet]=\"portal()\" />\n </div>\n @if (showArrow()) {\n <span [class]=\"arrowClasses()\" aria-hidden=\"true\"></span>\n }\n </div>\n `,\n})\nclass PopoverOverlayComponent {\n readonly id = `tw-popover-${nextPopoverId++}`;\n\n readonly size = signal<TwSize>('md');\n readonly color = signal<TwColor | undefined>(undefined);\n readonly showArrow = signal(true);\n readonly arrowDirection = signal<ArrowDirection>('top');\n readonly ariaLabel = signal<string | undefined>(undefined);\n readonly ariaModal = signal(true);\n readonly ariaLabelledByQueue = signal<readonly string[]>([]);\n readonly panelClass = signal<string>('');\n readonly portal = signal<TemplatePortal<PopoverTemplateContext> | ComponentPortal<unknown> | null>(null);\n\n readonly computedAriaLabelledBy = computed(() => {\n if (this.ariaLabel()) return null;\n return this.ariaLabelledByQueue()[0] ?? null;\n });\n\n _addAriaLabelledBy(id: string): void {\n this.ariaLabelledByQueue.update((q) => (q.includes(id) ? q : [...q, id]));\n }\n\n _removeAriaLabelledBy(id: string): void {\n this.ariaLabelledByQueue.update((q) => q.filter((existing) => existing !== id));\n }\n\n private readonly variantResult = computed(() =>\n popoverVariants({ size: this.size() }),\n );\n\n readonly wrapperClasses = computed(() => this.variantResult().wrapper());\n\n readonly panelClasses = computed(() => {\n const base = this.variantResult().panel();\n const colorClass = this.color() ? COLOR_ACCENT_CLASSES[this.color()!] : '';\n const custom = this.panelClass();\n return [base, colorClass, custom].filter(Boolean).join(' ');\n });\n\n readonly arrowClasses = computed(() => {\n const base = this.variantResult().arrow();\n const position = ARROW_POSITION_CLASSES[this.arrowDirection()];\n return `${base} ${position}`;\n });\n}\n\n// ── Popover directive ──\n\n@Directive({\n selector: '[twPopover]',\n exportAs: 'twPopover',\n host: {\n '[attr.aria-haspopup]': '\"dialog\"',\n '[attr.aria-expanded]': 'twPopoverOpen()',\n '[attr.aria-controls]': 'overlayComponentId()',\n '(click)': 'onHostClick()',\n '(focus)': 'onHostFocus()',\n '(blur)': 'onHostBlur()',\n '(keydown.escape)': 'onEscape()',\n },\n})\nexport class PopoverDirective {\n /** The content to render. An `ng-template` receives context with `$implicit` (data) and `close` (function). A component class receives data and a ref via injection tokens. */\n readonly twPopover = input.required<\n TemplateRef<PopoverTemplateContext> | Type<unknown>\n >();\n\n /** Preferred placement relative to the trigger. CDK handles fallback when space is insufficient. Defaults to `'bottom'`. */\n readonly twPopoverPosition = input<PopoverPosition>('bottom');\n\n /** What user interaction opens the popover. `'manual'` means consumers call `open()`/`close()` programmatically. Defaults to `'click'`. */\n readonly twPopoverTriggerOn = input<PopoverTrigger>('click');\n\n /** When true, all trigger interactions are suppressed. Defaults to `false`. */\n readonly twPopoverDisabled = input(false);\n\n /** Two-way bindable open state. Setting to `true` opens the popover; the popover sets it to `false` on close. */\n readonly twPopoverOpen = model(false);\n\n /** Controls panel padding using the standard spacing scale. Defaults to `'md'`. */\n readonly twPopoverSize = input<TwSize>('md');\n\n /** Pixel distance between trigger and panel edge. Defaults to `8`. */\n readonly twPopoverOffset = input(8);\n\n // Default true: the panel reads as a floating callout without the arrow; opt-out\n // is intended for compact iconic triggers where the arrow would crowd the layout.\n /** Whether to render a directional arrow pointing at the trigger. Defaults to `true`. */\n readonly twPopoverArrow = input(true);\n\n /** Backdrop behavior. `'transparent'` catches outside clicks invisibly. `'dimmed'` adds a semi-transparent overlay. `'none'` disables the backdrop. Defaults to `'transparent'`. */\n readonly twPopoverBackdrop = input<PopoverBackdrop>('transparent');\n\n // Default true: clicking away is the universal dismiss gesture for floating panels;\n // opt-out is for popovers that own multi-step flows the user must complete.\n /** Whether clicking outside the panel closes the popover. Only relevant when backdrop is `'none'`. Defaults to `true`. */\n readonly twPopoverCloseOnOutside = input(true);\n\n // Default true: WAI-ARIA dialog pattern mandates Escape closes; opt-out is for\n // popovers that own a child layer (nested dialog/menu) that should consume Escape first.\n /** Whether pressing Escape closes the popover. Defaults to `true`. */\n readonly twPopoverCloseOnEscape = input(true);\n\n /** CDK scroll strategy for the overlay. Defaults to `'reposition'`. */\n readonly twPopoverScrollStrategy = input<PopoverScrollStrategy>('reposition');\n\n // Default true: matches the role=\"dialog\" baseline — a focus-trapped panel announces\n // itself as modal-ish; opt-out for inline popovers acting as informational tooltips.\n /** Whether to trap focus inside the popover panel using CDK FocusTrapFactory. Defaults to `true`. */\n readonly twPopoverTrapFocus = input(true);\n\n /** Arbitrary data passed to template context or component via `POPOVER_DATA` token. */\n readonly twPopoverData = input<unknown>(undefined);\n\n /** Additional CSS classes applied to the overlay panel for consumer customization. */\n readonly twPopoverPanelClass = input<string | string[]>('');\n\n /** Optional semantic color. When set, adds a colored top border accent to the panel. */\n readonly twPopoverColor = input<TwColor | undefined>(undefined);\n\n /** Explicit `aria-label` for the dialog panel. */\n readonly twPopoverAriaLabel = input<string | undefined>(undefined);\n\n /** Fires after the popover becomes visible. */\n readonly twPopoverOpened = output<void>();\n\n /** Fires after the popover is fully removed. */\n readonly twPopoverClosed = output<void>();\n\n private readonly overlay = inject(Overlay);\n private readonly elementRef = inject(ElementRef<HTMLElement>);\n private readonly viewContainerRef = inject(ViewContainerRef);\n private readonly injector = inject(Injector);\n private readonly destroyRef = inject(DestroyRef);\n private readonly focusTrapFactory = inject(FocusTrapFactory);\n\n private overlayRef: OverlayRef | null = null;\n private popoverInstance: PopoverOverlayComponent | null = null;\n private focusTrap: ReturnType<FocusTrapFactory['create']> | null = null;\n private perOpenSubs: Subscription | null = null;\n private closing = false;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n /** Tracked focus-blur close timer; cleared on destroy so it can't fire post-teardown. */\n private blurCloseTimer: ReturnType<typeof setTimeout> | null = null;\n private readonly overlayId = signal<string | null>(null);\n\n /** The overlay component's id for aria-controls binding. */\n protected readonly overlayComponentId = computed(() => this.overlayId());\n\n constructor() {\n // React to model changes from the parent\n effect(() => {\n const isOpen = this.twPopoverOpen();\n const disabled = this.twPopoverDisabled();\n if (disabled && this.popoverInstance) {\n this.closePopover();\n return;\n }\n if (isOpen && this.closing && this.popoverInstance && !disabled) {\n // Reopened before the leave animation finished. Cancelling the pending\n // close is preferable to queueing a reopen: the overlay is still\n // attached, so the surface simply stays up instead of visibly closing\n // and springing back. Without this the deferred callback below would\n // also write `false` over the consumer's `true`.\n this.cancelPendingClose();\n return;\n }\n if (isOpen && !this.popoverInstance && !disabled && !this.closing) {\n this.openPopover();\n } else if (!isOpen && this.popoverInstance) {\n this.closePopover();\n }\n });\n\n this.destroyRef.onDestroy(() => {\n this.clearCloseTimer();\n if (this.blurCloseTimer !== null) {\n clearTimeout(this.blurCloseTimer);\n this.blurCloseTimer = null;\n }\n this.destroyFocusTrap();\n this.perOpenSubs?.unsubscribe();\n this.disposeOverlay();\n });\n }\n\n /** Programmatically open the popover. */\n open(): void {\n if (this.twPopoverDisabled() || this.popoverInstance || this.closing) return;\n this.twPopoverOpen.set(true);\n }\n\n /** Programmatically close the popover. */\n close(): void {\n if (!this.popoverInstance && !this.closing) return;\n this.twPopoverOpen.set(false);\n }\n\n /** Toggle open/close. */\n toggle(): void {\n if (this.popoverInstance || this.closing) {\n this.close();\n } else {\n this.open();\n }\n }\n\n /** Force CDK to recalculate overlay position. */\n reposition(): void {\n this.overlayRef?.updatePosition();\n }\n\n // ── Host event handlers ──\n\n protected onHostClick(): void {\n if (this.twPopoverTriggerOn() === 'click') {\n this.toggle();\n }\n }\n\n protected onHostFocus(): void {\n if (this.twPopoverTriggerOn() === 'focus') {\n this.open();\n }\n }\n\n protected onHostBlur(): void {\n if (this.twPopoverTriggerOn() === 'focus') {\n if (this.blurCloseTimer !== null) clearTimeout(this.blurCloseTimer);\n this.blurCloseTimer = setTimeout(() => {\n this.blurCloseTimer = null;\n const activeEl = document.activeElement;\n const overlayEl = this.overlayRef?.overlayElement;\n if (overlayEl && overlayEl.contains(activeEl)) return;\n this.close();\n });\n }\n }\n\n protected onEscape(): void {\n if (this.twPopoverCloseOnEscape() && this.popoverInstance) {\n this.close();\n }\n }\n\n // ── Private ──\n\n private openPopover(): void {\n this.ensureOverlay();\n this.updatePositionStrategy();\n this.attachContent();\n this.subscribePerOpen();\n this.overlayId.set(this.popoverInstance?.id ?? null);\n this.setupFocusTrap();\n this.twPopoverOpened.emit();\n }\n\n private closePopover(): void {\n if (this.closing) return;\n this.closing = true;\n\n // Restore focus to the trigger UNLESS the consumer has deliberately moved\n // focus to a different focusable element outside the overlay. We detect\n // that by checking whether the active element is a real focusable target\n // outside the overlay — body/null means focus is \"unset\" and we should\n // still restore (the typical case after Escape or backdrop click).\n const overlayEl = this.overlayRef?.overlayElement;\n const activeEl = document.activeElement as HTMLElement | null;\n const focusOutsideOverlayIntentionally =\n !!activeEl &&\n activeEl !== document.body &&\n activeEl !== this.elementRef.nativeElement &&\n !overlayEl?.contains(activeEl);\n\n // 1. Destroy focus trap so focus can leave\n this.destroyFocusTrap();\n\n // 2. Return focus to trigger only when appropriate\n if (!focusOutsideOverlayIntentionally) {\n this.elementRef.nativeElement.focus();\n }\n\n // 3. Wait for leave animation, then detach\n this.closeTimer = setTimeout(() => {\n this.closeTimer = null;\n\n if (this.overlayRef?.hasAttached()) {\n this.overlayRef.detach();\n }\n\n this.perOpenSubs?.unsubscribe();\n this.perOpenSubs = null;\n this.popoverInstance = null;\n this.overlayId.set(null);\n\n // Use untracked to prevent effect re-trigger\n untracked(() => this.twPopoverOpen.set(false));\n\n this.twPopoverClosed.emit();\n this.closing = false;\n }, ANIMATION_DURATION);\n }\n\n private currentPositionStrategy: FlexibleConnectedPositionStrategy | null = null;\n\n private buildPositionStrategy(): FlexibleConnectedPositionStrategy {\n const positions = buildPositions(\n this.twPopoverPosition(),\n this.twPopoverOffset(),\n );\n\n return this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions(positions)\n .withFlexibleDimensions(false)\n .withPush(true)\n .withViewportMargin(8);\n }\n\n private ensureOverlay(): void {\n if (this.overlayRef) return;\n\n const positionStrategy = this.buildPositionStrategy();\n this.currentPositionStrategy = positionStrategy;\n\n const backdrop = this.twPopoverBackdrop();\n const hasBackdrop = backdrop !== 'none';\n const backdropClass =\n backdrop === 'dimmed' ? 'bg-black/20' : 'cdk-overlay-transparent-backdrop';\n\n const scrollStrategy = this.resolveScrollStrategy();\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy,\n hasBackdrop,\n backdropClass,\n panelClass: 'tw-popover-panel',\n });\n }\n\n private updatePositionStrategy(): void {\n if (!this.overlayRef) return;\n const positionStrategy = this.buildPositionStrategy();\n this.currentPositionStrategy = positionStrategy;\n this.overlayRef.updatePositionStrategy(positionStrategy);\n }\n\n private subscribePerOpen(): void {\n this.perOpenSubs?.unsubscribe();\n this.perOpenSubs = new Subscription();\n\n const backdrop = this.twPopoverBackdrop();\n const hasBackdrop = backdrop !== 'none';\n\n // Backdrop click closes\n if (hasBackdrop) {\n this.perOpenSubs.add(\n this.overlayRef!.backdropClick().subscribe(() => this.close()),\n );\n }\n\n // Outside pointer events when no backdrop\n if (!hasBackdrop && this.twPopoverCloseOnOutside()) {\n this.perOpenSubs.add(\n this.overlayRef!.outsidePointerEvents().subscribe(() => this.close()),\n );\n }\n\n // Escape from within the overlay\n this.perOpenSubs.add(\n this.overlayRef!.keydownEvents().subscribe((event) => {\n if (event.key === 'Escape' && this.twPopoverCloseOnEscape()) {\n this.close();\n }\n }),\n );\n\n // Per-open position change subscription — torn down on close to prevent\n // accumulation when the directive is opened/closed many times.\n if (this.currentPositionStrategy) {\n this.perOpenSubs.add(\n this.currentPositionStrategy.positionChanges.subscribe((change) => {\n if (this.popoverInstance) {\n const dir = resolveArrowDirection(change.connectionPair);\n this.popoverInstance.arrowDirection.set(dir);\n }\n }),\n );\n }\n }\n\n private attachContent(): void {\n const content = this.twPopover();\n\n // Attach the internal overlay component\n const overlayPortal = new ComponentPortal(\n PopoverOverlayComponent,\n this.viewContainerRef,\n );\n const componentRef = this.overlayRef!.attach(overlayPortal);\n this.popoverInstance = componentRef.instance;\n\n // Configure the overlay component\n this.popoverInstance.size.set(this.twPopoverSize());\n this.popoverInstance.color.set(this.twPopoverColor());\n this.popoverInstance.showArrow.set(this.twPopoverArrow());\n this.popoverInstance.ariaLabel.set(this.twPopoverAriaLabel());\n this.popoverInstance.ariaModal.set(this.twPopoverTrapFocus());\n this.popoverInstance.ariaLabelledByQueue.set([]);\n this.popoverInstance.panelClass.set(this.resolvePanelClass());\n\n // Provide POPOVER_REF for both template and component content. Title directives\n // call _addAriaLabelledBy / _removeAriaLabelledBy to register their id with the\n // overlay's aria-labelledby queue.\n const overlayInstance = this.popoverInstance;\n const popoverRef: PopoverRef = {\n close: () => this.close(),\n _addAriaLabelledBy: (id) => overlayInstance._addAriaLabelledBy(id),\n _removeAriaLabelledBy: (id) => overlayInstance._removeAriaLabelledBy(id),\n };\n\n // Create the content portal\n if (content instanceof TemplateRef) {\n const context: PopoverTemplateContext = {\n $implicit: this.twPopoverData(),\n close: () => this.close(),\n };\n const templateInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: POPOVER_DATA, useValue: this.twPopoverData() },\n { provide: POPOVER_REF, useValue: popoverRef },\n ],\n });\n const templatePortal = new TemplatePortal(\n content,\n this.viewContainerRef,\n context,\n templateInjector,\n );\n this.popoverInstance.portal.set(templatePortal);\n } else {\n const contentInjector = Injector.create({\n parent: this.injector,\n providers: [\n { provide: POPOVER_DATA, useValue: this.twPopoverData() },\n { provide: POPOVER_REF, useValue: popoverRef },\n ],\n });\n const componentPortal = new ComponentPortal(\n content,\n this.viewContainerRef,\n contentInjector,\n );\n this.popoverInstance.portal.set(componentPortal);\n }\n }\n\n private setupFocusTrap(): void {\n if (!this.twPopoverTrapFocus() || !this.overlayRef) return;\n const overlayEl = this.overlayRef.overlayElement;\n this.focusTrap = this.focusTrapFactory.create(overlayEl);\n this.focusTrap.focusInitialElementWhenReady();\n }\n\n private destroyFocusTrap(): void {\n this.focusTrap?.destroy();\n this.focusTrap = null;\n }\n\n private disposeOverlay(): void {\n this.overlayRef?.dispose();\n this.overlayRef = null;\n this.popoverInstance = null;\n }\n\n /**\n * Aborts an in-flight close, leaving the popover open.\n *\n * `closePopover` tears the focus trap down immediately and defers only the\n * detach, so cancelling has to rebuild the trap — the overlay itself is still\n * attached and the instance still live.\n */\n private cancelPendingClose(): void {\n this.clearCloseTimer();\n this.closing = false;\n this.setupFocusTrap();\n }\n\n private clearCloseTimer(): void {\n if (this.closeTimer !== null) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private resolveScrollStrategy() {\n const strategy = this.twPopoverScrollStrategy();\n switch (strategy) {\n case 'close':\n return this.overlay.scrollStrategies.close();\n case 'block':\n return this.overlay.scrollStrategies.block();\n case 'noop':\n return this.overlay.scrollStrategies.noop();\n default:\n return this.overlay.scrollStrategies.reposition();\n }\n }\n\n private resolvePanelClass(): string {\n const raw = this.twPopoverPanelClass();\n return Array.isArray(raw) ? raw.join(' ') : raw;\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { POPOVER_REF } from './popover-tokens';\n\n/**\n * Convenience directive that closes the enclosing popover when the host element is clicked.\n * Place on any element inside popover content.\n *\n * ```html\n * <button twPopoverClose>Cancel</button>\n * ```\n */\n@Directive({\n selector: '[twPopoverClose]',\n host: {\n '(click)': 'closePopover()',\n '[attr.type]': '\"button\"',\n },\n})\nexport class PopoverCloseDirective {\n private readonly popoverRef = inject(POPOVER_REF, { optional: true });\n\n protected closePopover(): void {\n this.popoverRef?.close();\n }\n}\n","import {\n Directive,\n ElementRef,\n inject,\n input,\n type OnDestroy,\n type OnInit,\n} from '@angular/core';\nimport { _IdGenerator } from '@angular/cdk/a11y';\nimport { POPOVER_REF } from './popover-tokens';\n\n/**\n * Popover title. Registers its ID with the enclosing popover overlay's\n * `aria-labelledby` queue so screen readers announce it automatically.\n *\n * Mirrors `DialogTitleDirective` and is the recommended way to label a\n * popover whose content has a heading. Use `twPopoverAriaLabel` when no\n * heading is present.\n */\n@Directive({\n selector: '[twPopoverTitle], tw-popover-title',\n host: {\n class: 'text-sm font-semibold text-fg',\n '[id]': 'id()',\n },\n})\nexport class PopoverTitleDirective implements OnInit, OnDestroy {\n private readonly generatedId = inject(_IdGenerator).getId('tw-popover-title-');\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly popoverRef = inject(POPOVER_REF, { optional: true });\n\n /** Custom id for the title element. Defaults to a generated unique id. */\n readonly id = input<string>(this.generatedId);\n\n ngOnInit(): void {\n this.popoverRef?._addAriaLabelledBy?.(this.id());\n }\n\n ngOnDestroy(): void {\n this.popoverRef?._removeAriaLabelledBy?.(this.id());\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AAoBA;MACa,YAAY,GAAG,IAAI,cAAc,CAAU,cAAc;AAEtE;MACa,WAAW,GAAG,IAAI,cAAc,CAAa,aAAa;;AC0CvE;AACA,MAAM,kBAAkB,GAAG,GAAG;AAE9B;AAEA,MAAM,eAAe,GAAG,EAAE,CACxB;AACE,IAAA,KAAK,EAAE;AACL,QAAA,OAAO,EAAE,UAAU;AACnB,QAAA,KAAK,EACH,8FAA8F;AAChG,QAAA,K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