@cdevhub/ngx-tw 0.5.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (209) hide show
  1. package/README.md +78 -15
  2. package/fesm2022/cdevhub-ngx-tw-accordion.mjs +16 -5
  3. package/fesm2022/cdevhub-ngx-tw-accordion.mjs.map +1 -1
  4. package/fesm2022/cdevhub-ngx-tw-avatar.mjs +26 -15
  5. package/fesm2022/cdevhub-ngx-tw-avatar.mjs.map +1 -1
  6. package/fesm2022/cdevhub-ngx-tw-badge.mjs +17 -5
  7. package/fesm2022/cdevhub-ngx-tw-badge.mjs.map +1 -1
  8. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs +27 -6
  9. package/fesm2022/cdevhub-ngx-tw-breadcrumbs.mjs.map +1 -1
  10. package/fesm2022/cdevhub-ngx-tw-button.mjs +23 -11
  11. package/fesm2022/cdevhub-ngx-tw-button.mjs.map +1 -1
  12. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs +5 -5
  13. package/fesm2022/cdevhub-ngx-tw-calendar-luxon.mjs.map +1 -1
  14. package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs +3 -3
  15. package/fesm2022/cdevhub-ngx-tw-calendar-testing.mjs.map +1 -1
  16. package/fesm2022/cdevhub-ngx-tw-calendar.mjs +427 -122
  17. package/fesm2022/cdevhub-ngx-tw-calendar.mjs.map +1 -1
  18. package/fesm2022/cdevhub-ngx-tw-card.mjs +21 -11
  19. package/fesm2022/cdevhub-ngx-tw-card.mjs.map +1 -1
  20. package/fesm2022/cdevhub-ngx-tw-carousel.mjs +215 -96
  21. package/fesm2022/cdevhub-ngx-tw-carousel.mjs.map +1 -1
  22. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs +108 -64
  23. package/fesm2022/cdevhub-ngx-tw-checkbox.mjs.map +1 -1
  24. package/fesm2022/cdevhub-ngx-tw-code-block.mjs +18 -6
  25. package/fesm2022/cdevhub-ngx-tw-code-block.mjs.map +1 -1
  26. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs +55 -30
  27. package/fesm2022/cdevhub-ngx-tw-collapsible.mjs.map +1 -1
  28. package/fesm2022/cdevhub-ngx-tw-combobox-testing.mjs +218 -0
  29. package/fesm2022/cdevhub-ngx-tw-combobox-testing.mjs.map +1 -0
  30. package/fesm2022/cdevhub-ngx-tw-combobox.mjs +236 -211
  31. package/fesm2022/cdevhub-ngx-tw-combobox.mjs.map +1 -1
  32. package/fesm2022/cdevhub-ngx-tw-command-palette-testing.mjs +200 -0
  33. package/fesm2022/cdevhub-ngx-tw-command-palette-testing.mjs.map +1 -0
  34. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs +34 -7
  35. package/fesm2022/cdevhub-ngx-tw-command-palette.mjs.map +1 -1
  36. package/fesm2022/cdevhub-ngx-tw-core.mjs +135 -15
  37. package/fesm2022/cdevhub-ngx-tw-core.mjs.map +1 -1
  38. package/fesm2022/cdevhub-ngx-tw-date-picker-testing.mjs +203 -0
  39. package/fesm2022/cdevhub-ngx-tw-date-picker-testing.mjs.map +1 -0
  40. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs +160 -102
  41. package/fesm2022/cdevhub-ngx-tw-date-picker.mjs.map +1 -1
  42. package/fesm2022/cdevhub-ngx-tw-date-range-picker-testing.mjs +209 -0
  43. package/fesm2022/cdevhub-ngx-tw-date-range-picker-testing.mjs.map +1 -0
  44. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs +182 -107
  45. package/fesm2022/cdevhub-ngx-tw-date-range-picker.mjs.map +1 -1
  46. package/fesm2022/cdevhub-ngx-tw-dialog-testing.mjs +122 -0
  47. package/fesm2022/cdevhub-ngx-tw-dialog-testing.mjs.map +1 -0
  48. package/fesm2022/cdevhub-ngx-tw-dialog.mjs +11 -2
  49. package/fesm2022/cdevhub-ngx-tw-dialog.mjs.map +1 -1
  50. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs +1 -1
  51. package/fesm2022/cdevhub-ngx-tw-empty-state.mjs.map +1 -1
  52. package/fesm2022/cdevhub-ngx-tw-file-upload-testing.mjs +149 -0
  53. package/fesm2022/cdevhub-ngx-tw-file-upload-testing.mjs.map +1 -0
  54. package/fesm2022/cdevhub-ngx-tw-file-upload.mjs +57 -67
  55. package/fesm2022/cdevhub-ngx-tw-file-upload.mjs.map +1 -1
  56. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs +42 -24
  57. package/fesm2022/cdevhub-ngx-tw-flip-card.mjs.map +1 -1
  58. package/fesm2022/cdevhub-ngx-tw-form-field.mjs +114 -21
  59. package/fesm2022/cdevhub-ngx-tw-form-field.mjs.map +1 -1
  60. package/fesm2022/cdevhub-ngx-tw-icon.mjs +16 -6
  61. package/fesm2022/cdevhub-ngx-tw-icon.mjs.map +1 -1
  62. package/fesm2022/cdevhub-ngx-tw-input.mjs +52 -61
  63. package/fesm2022/cdevhub-ngx-tw-input.mjs.map +1 -1
  64. package/fesm2022/cdevhub-ngx-tw-item.mjs +18 -3
  65. package/fesm2022/cdevhub-ngx-tw-item.mjs.map +1 -1
  66. package/fesm2022/cdevhub-ngx-tw-menu-testing.mjs +168 -0
  67. package/fesm2022/cdevhub-ngx-tw-menu-testing.mjs.map +1 -0
  68. package/fesm2022/cdevhub-ngx-tw-menu.mjs +58 -21
  69. package/fesm2022/cdevhub-ngx-tw-menu.mjs.map +1 -1
  70. package/fesm2022/cdevhub-ngx-tw-number-input.mjs +34 -1
  71. package/fesm2022/cdevhub-ngx-tw-number-input.mjs.map +1 -1
  72. package/fesm2022/cdevhub-ngx-tw-paginator.mjs +95 -45
  73. package/fesm2022/cdevhub-ngx-tw-paginator.mjs.map +1 -1
  74. package/fesm2022/cdevhub-ngx-tw-popover.mjs +81 -32
  75. package/fesm2022/cdevhub-ngx-tw-popover.mjs.map +1 -1
  76. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs +1 -1
  77. package/fesm2022/cdevhub-ngx-tw-progress-bar.mjs.map +1 -1
  78. package/fesm2022/cdevhub-ngx-tw-radio.mjs +131 -98
  79. package/fesm2022/cdevhub-ngx-tw-radio.mjs.map +1 -1
  80. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs +207 -42
  81. package/fesm2022/cdevhub-ngx-tw-segmented-control.mjs.map +1 -1
  82. package/fesm2022/cdevhub-ngx-tw-select-testing.mjs +165 -0
  83. package/fesm2022/cdevhub-ngx-tw-select-testing.mjs.map +1 -0
  84. package/fesm2022/cdevhub-ngx-tw-select.mjs +386 -210
  85. package/fesm2022/cdevhub-ngx-tw-select.mjs.map +1 -1
  86. package/fesm2022/{cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs → cdevhub-ngx-tw-sheet-sheet-renderer-CqVJwgmp.mjs} +3 -3
  87. package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-CqVJwgmp.mjs.map +1 -0
  88. package/fesm2022/cdevhub-ngx-tw-sheet-testing.mjs +129 -0
  89. package/fesm2022/cdevhub-ngx-tw-sheet-testing.mjs.map +1 -0
  90. package/fesm2022/cdevhub-ngx-tw-sheet.mjs +23 -7
  91. package/fesm2022/cdevhub-ngx-tw-sheet.mjs.map +1 -1
  92. package/fesm2022/cdevhub-ngx-tw-slider.mjs +89 -54
  93. package/fesm2022/cdevhub-ngx-tw-slider.mjs.map +1 -1
  94. package/fesm2022/cdevhub-ngx-tw-sort.mjs +122 -17
  95. package/fesm2022/cdevhub-ngx-tw-sort.mjs.map +1 -1
  96. package/fesm2022/cdevhub-ngx-tw-split.mjs +72 -19
  97. package/fesm2022/cdevhub-ngx-tw-split.mjs.map +1 -1
  98. package/fesm2022/cdevhub-ngx-tw-stat.mjs +63 -25
  99. package/fesm2022/cdevhub-ngx-tw-stat.mjs.map +1 -1
  100. package/fesm2022/cdevhub-ngx-tw-stepper.mjs +35 -8
  101. package/fesm2022/cdevhub-ngx-tw-stepper.mjs.map +1 -1
  102. package/fesm2022/cdevhub-ngx-tw-switch.mjs +54 -48
  103. package/fesm2022/cdevhub-ngx-tw-switch.mjs.map +1 -1
  104. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs +12 -15
  105. package/fesm2022/cdevhub-ngx-tw-tab-nav.mjs.map +1 -1
  106. package/fesm2022/cdevhub-ngx-tw-table.mjs +74 -13
  107. package/fesm2022/cdevhub-ngx-tw-table.mjs.map +1 -1
  108. package/fesm2022/cdevhub-ngx-tw-tabs.mjs +84 -30
  109. package/fesm2022/cdevhub-ngx-tw-tabs.mjs.map +1 -1
  110. package/fesm2022/cdevhub-ngx-tw-tags-input-testing.mjs +172 -0
  111. package/fesm2022/cdevhub-ngx-tw-tags-input-testing.mjs.map +1 -0
  112. package/fesm2022/cdevhub-ngx-tw-tags-input.mjs +107 -71
  113. package/fesm2022/cdevhub-ngx-tw-tags-input.mjs.map +1 -1
  114. package/fesm2022/cdevhub-ngx-tw-textarea.mjs +41 -9
  115. package/fesm2022/cdevhub-ngx-tw-textarea.mjs.map +1 -1
  116. package/fesm2022/cdevhub-ngx-tw-theme.mjs +257 -45
  117. package/fesm2022/cdevhub-ngx-tw-theme.mjs.map +1 -1
  118. package/fesm2022/cdevhub-ngx-tw-time-picker-testing.mjs +201 -0
  119. package/fesm2022/cdevhub-ngx-tw-time-picker-testing.mjs.map +1 -0
  120. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs +184 -77
  121. package/fesm2022/cdevhub-ngx-tw-time-picker.mjs.map +1 -1
  122. package/fesm2022/cdevhub-ngx-tw-timeline.mjs +110 -27
  123. package/fesm2022/cdevhub-ngx-tw-timeline.mjs.map +1 -1
  124. package/fesm2022/{cdevhub-ngx-tw-toast-toast-renderer-DSu4YoTy.mjs → cdevhub-ngx-tw-toast-toast-renderer-BlDxemsU.mjs} +107 -19
  125. package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-BlDxemsU.mjs.map +1 -0
  126. package/fesm2022/cdevhub-ngx-tw-toast.mjs +21 -13
  127. package/fesm2022/cdevhub-ngx-tw-toast.mjs.map +1 -1
  128. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs +102 -15
  129. package/fesm2022/cdevhub-ngx-tw-tooltip.mjs.map +1 -1
  130. package/fesm2022/cdevhub-ngx-tw-transfer-testing.mjs +219 -0
  131. package/fesm2022/cdevhub-ngx-tw-transfer-testing.mjs.map +1 -0
  132. package/fesm2022/cdevhub-ngx-tw-transfer.mjs +88 -69
  133. package/fesm2022/cdevhub-ngx-tw-transfer.mjs.map +1 -1
  134. package/fesm2022/cdevhub-ngx-tw-tree.mjs +68 -19
  135. package/fesm2022/cdevhub-ngx-tw-tree.mjs.map +1 -1
  136. package/index.json +1 -1
  137. package/package.json +63 -2
  138. package/theme/_base.css +13 -0
  139. package/theme/_dark.css +110 -36
  140. package/theme/_high-contrast-dark.css +367 -0
  141. package/theme/_high-contrast.css +13 -2
  142. package/theme/_light.css +276 -0
  143. package/theme/_semantic.css +47 -12
  144. package/theme/_typography.css +17 -0
  145. package/theme/index.css +86 -7
  146. package/types/cdevhub-ngx-tw-accordion.d.ts +12 -4
  147. package/types/cdevhub-ngx-tw-avatar.d.ts +10 -3
  148. package/types/cdevhub-ngx-tw-button.d.ts +1 -0
  149. package/types/cdevhub-ngx-tw-calendar-luxon.d.ts +2 -2
  150. package/types/cdevhub-ngx-tw-calendar-testing.d.ts +1 -1
  151. package/types/cdevhub-ngx-tw-calendar.d.ts +179 -73
  152. package/types/cdevhub-ngx-tw-card.d.ts +11 -3
  153. package/types/cdevhub-ngx-tw-carousel.d.ts +89 -20
  154. package/types/cdevhub-ngx-tw-checkbox.d.ts +40 -12
  155. package/types/cdevhub-ngx-tw-code-block.d.ts +11 -2
  156. package/types/cdevhub-ngx-tw-collapsible.d.ts +32 -5
  157. package/types/cdevhub-ngx-tw-combobox-testing.d.ts +157 -0
  158. package/types/cdevhub-ngx-tw-combobox.d.ts +94 -53
  159. package/types/cdevhub-ngx-tw-command-palette-testing.d.ts +136 -0
  160. package/types/cdevhub-ngx-tw-command-palette.d.ts +33 -5
  161. package/types/cdevhub-ngx-tw-core.d.ts +152 -21
  162. package/types/cdevhub-ngx-tw-date-picker-testing.d.ts +141 -0
  163. package/types/cdevhub-ngx-tw-date-picker.d.ts +37 -29
  164. package/types/cdevhub-ngx-tw-date-range-picker-testing.d.ts +148 -0
  165. package/types/cdevhub-ngx-tw-date-range-picker.d.ts +36 -29
  166. package/types/cdevhub-ngx-tw-dialog-testing.d.ts +98 -0
  167. package/types/cdevhub-ngx-tw-dialog.d.ts +12 -3
  168. package/types/cdevhub-ngx-tw-file-upload-testing.d.ts +120 -0
  169. package/types/cdevhub-ngx-tw-file-upload.d.ts +8 -10
  170. package/types/cdevhub-ngx-tw-flip-card.d.ts +18 -11
  171. package/types/cdevhub-ngx-tw-form-field.d.ts +19 -2
  172. package/types/cdevhub-ngx-tw-icon.d.ts +3 -3
  173. package/types/cdevhub-ngx-tw-input.d.ts +5 -8
  174. package/types/cdevhub-ngx-tw-item.d.ts +2 -0
  175. package/types/cdevhub-ngx-tw-menu-testing.d.ts +131 -0
  176. package/types/cdevhub-ngx-tw-menu.d.ts +2 -2
  177. package/types/cdevhub-ngx-tw-number-input.d.ts +20 -0
  178. package/types/cdevhub-ngx-tw-paginator.d.ts +58 -24
  179. package/types/cdevhub-ngx-tw-popover.d.ts +41 -10
  180. package/types/cdevhub-ngx-tw-progress-bar.d.ts +1 -1
  181. package/types/cdevhub-ngx-tw-radio.d.ts +68 -25
  182. package/types/cdevhub-ngx-tw-segmented-control.d.ts +79 -16
  183. package/types/cdevhub-ngx-tw-select-testing.d.ts +114 -0
  184. package/types/cdevhub-ngx-tw-select.d.ts +104 -33
  185. package/types/cdevhub-ngx-tw-sheet-testing.d.ts +104 -0
  186. package/types/cdevhub-ngx-tw-sheet.d.ts +19 -3
  187. package/types/cdevhub-ngx-tw-slider.d.ts +79 -25
  188. package/types/cdevhub-ngx-tw-sort.d.ts +45 -4
  189. package/types/cdevhub-ngx-tw-split.d.ts +32 -2
  190. package/types/cdevhub-ngx-tw-stat.d.ts +14 -4
  191. package/types/cdevhub-ngx-tw-stepper.d.ts +16 -2
  192. package/types/cdevhub-ngx-tw-switch.d.ts +35 -13
  193. package/types/cdevhub-ngx-tw-tab-nav.d.ts +7 -6
  194. package/types/cdevhub-ngx-tw-table.d.ts +53 -10
  195. package/types/cdevhub-ngx-tw-tabs.d.ts +41 -10
  196. package/types/cdevhub-ngx-tw-tags-input-testing.d.ts +135 -0
  197. package/types/cdevhub-ngx-tw-tags-input.d.ts +26 -11
  198. package/types/cdevhub-ngx-tw-textarea.d.ts +3 -2
  199. package/types/cdevhub-ngx-tw-theme.d.ts +245 -39
  200. package/types/cdevhub-ngx-tw-time-picker-testing.d.ts +129 -0
  201. package/types/cdevhub-ngx-tw-time-picker.d.ts +76 -19
  202. package/types/cdevhub-ngx-tw-timeline.d.ts +36 -12
  203. package/types/cdevhub-ngx-tw-toast.d.ts +20 -6
  204. package/types/cdevhub-ngx-tw-tooltip.d.ts +28 -6
  205. package/types/cdevhub-ngx-tw-transfer-testing.d.ts +152 -0
  206. package/types/cdevhub-ngx-tw-transfer.d.ts +21 -8
  207. package/types/cdevhub-ngx-tw-tree.d.ts +6 -1
  208. package/fesm2022/cdevhub-ngx-tw-sheet-sheet-renderer-ByyNluUd.mjs.map +0 -1
  209. package/fesm2022/cdevhub-ngx-tw-toast-toast-renderer-DSu4YoTy.mjs.map +0 -1
@@ -7,9 +7,23 @@ import { Subscription } from 'rxjs';
7
7
  import { tv } from 'tailwind-variants';
8
8
 
9
9
  /** Injection token providing arbitrary data to popover component content. */
10
- const POPOVER_DATA = new InjectionToken('POPOVER_DATA');
10
+ const TW_POPOVER_DATA = new InjectionToken('TW_POPOVER_DATA');
11
11
  /** Injection token providing a `PopoverRef` to popover component content. */
12
- const POPOVER_REF = new InjectionToken('POPOVER_REF');
12
+ const TW_POPOVER_REF = new InjectionToken('TW_POPOVER_REF');
13
+ /**
14
+ * @deprecated Renamed to {@link TW_POPOVER_DATA} for consistency with every
15
+ * other ngx-tw injection token. This is the *same token instance*, not a copy —
16
+ * providing under either name and injecting under the other resolves — so the
17
+ * rename is safe to adopt incrementally. Removed in the next major.
18
+ */
19
+ const POPOVER_DATA = TW_POPOVER_DATA;
20
+ /**
21
+ * @deprecated Renamed to {@link TW_POPOVER_REF} for consistency with every
22
+ * other ngx-tw injection token. This is the *same token instance*, not a copy —
23
+ * providing under either name and injecting under the other resolves — so the
24
+ * rename is safe to adopt incrementally. Removed in the next major.
25
+ */
26
+ const POPOVER_REF = TW_POPOVER_REF;
13
27
 
14
28
  /** Duration of leave animation in ms (must match _base.css scale-out/fade-out). */
15
29
  const ANIMATION_DURATION = 120;
@@ -191,9 +205,11 @@ class PopoverOverlayComponent {
191
205
  return this.ariaLabelledByQueue()[0] ?? null;
192
206
  }, /* @ts-ignore */
193
207
  ...(ngDevMode ? [{ debugName: "computedAriaLabelledBy" }] : /* istanbul ignore next */ []));
208
+ /** @internal Registers a projected title's id so the panel's `aria-labelledby` points at it. */
194
209
  _addAriaLabelledBy(id) {
195
210
  this.ariaLabelledByQueue.update((q) => (q.includes(id) ? q : [...q, id]));
196
211
  }
212
+ /** @internal Unregisters a previously added `aria-labelledby` id when the title is destroyed. */
197
213
  _removeAriaLabelledBy(id) {
198
214
  this.ariaLabelledByQueue.update((q) => q.filter((existing) => existing !== id));
199
215
  }
@@ -268,7 +284,7 @@ class PopoverDirective {
268
284
  /** When true, all trigger interactions are suppressed. Defaults to `false`. */
269
285
  twPopoverDisabled = input(false, /* @ts-ignore */
270
286
  ...(ngDevMode ? [{ debugName: "twPopoverDisabled" }] : /* istanbul ignore next */ []));
271
- /** Two-way bindable open state. Setting to `true` opens the popover; the popover sets it to `false` on close. */
287
+ /** Two-way bindable open state. Setting to `true` opens the popover; the popover sets it to `false` on close. Defaults to `false`. */
272
288
  twPopoverOpen = model(false, /* @ts-ignore */
273
289
  ...(ngDevMode ? [{ debugName: "twPopoverOpen" }] : /* istanbul ignore next */ []));
274
290
  /** Controls panel padding using the standard spacing scale. Defaults to `'md'`. */
@@ -277,42 +293,34 @@ class PopoverDirective {
277
293
  /** Pixel distance between trigger and panel edge. Defaults to `8`. */
278
294
  twPopoverOffset = input(8, /* @ts-ignore */
279
295
  ...(ngDevMode ? [{ debugName: "twPopoverOffset" }] : /* istanbul ignore next */ []));
280
- // Default true: the panel reads as a floating callout without the arrow; opt-out
281
- // is intended for compact iconic triggers where the arrow would crowd the layout.
282
- /** Whether to render a directional arrow pointing at the trigger. Defaults to `true`. */
296
+ /** Whether to render a directional arrow pointing at the trigger. Defaults to `true` the arrow is the visual anchor tying the panel to its trigger; the special case is a compact iconic trigger where the arrow would crowd the layout. */
283
297
  twPopoverArrow = input(true, /* @ts-ignore */
284
298
  ...(ngDevMode ? [{ debugName: "twPopoverArrow" }] : /* istanbul ignore next */ []));
285
299
  /** Backdrop behavior. `'transparent'` catches outside clicks invisibly. `'dimmed'` adds a semi-transparent overlay. `'none'` disables the backdrop. Defaults to `'transparent'`. */
286
300
  twPopoverBackdrop = input('transparent', /* @ts-ignore */
287
301
  ...(ngDevMode ? [{ debugName: "twPopoverBackdrop" }] : /* istanbul ignore next */ []));
288
- // Default true: clicking away is the universal dismiss gesture for floating panels;
289
- // opt-out is for popovers that own multi-step flows the user must complete.
290
- /** Whether clicking outside the panel closes the popover. Only relevant when backdrop is `'none'`. Defaults to `true`. */
302
+ /** Whether clicking outside the panel closes the popover. Only relevant when backdrop is `'none'`. Defaults to `true` clicking away is the universal dismiss gesture for floating panels; the special case is a popover owning a multi-step flow the user must complete. */
291
303
  twPopoverCloseOnOutside = input(true, /* @ts-ignore */
292
304
  ...(ngDevMode ? [{ debugName: "twPopoverCloseOnOutside" }] : /* istanbul ignore next */ []));
293
- // Default true: WAI-ARIA dialog pattern mandates Escape closes; opt-out is for
294
- // popovers that own a child layer (nested dialog/menu) that should consume Escape first.
295
- /** Whether pressing Escape closes the popover. Defaults to `true`. */
305
+ /** Whether pressing Escape closes the popover. Defaults to `true` — the WAI-ARIA dialog pattern mandates that Escape closes; the special case is a popover owning a child layer (nested dialog or menu) that should consume Escape first. */
296
306
  twPopoverCloseOnEscape = input(true, /* @ts-ignore */
297
307
  ...(ngDevMode ? [{ debugName: "twPopoverCloseOnEscape" }] : /* istanbul ignore next */ []));
298
308
  /** CDK scroll strategy for the overlay. Defaults to `'reposition'`. */
299
309
  twPopoverScrollStrategy = input('reposition', /* @ts-ignore */
300
310
  ...(ngDevMode ? [{ debugName: "twPopoverScrollStrategy" }] : /* istanbul ignore next */ []));
301
- // Default true: matches the role="dialog" baseline a focus-trapped panel announces
302
- // itself as modal-ish; opt-out for inline popovers acting as informational tooltips.
303
- /** Whether to trap focus inside the popover panel using CDK FocusTrapFactory. Defaults to `true`. */
311
+ /** Whether to trap focus inside the popover panel using CDK FocusTrapFactory. Defaults to `true` — it matches the `role="dialog"` baseline, where a focus-trapped panel announces itself as modal; the special case is an inline popover acting as an informational tooltip. */
304
312
  twPopoverTrapFocus = input(true, /* @ts-ignore */
305
313
  ...(ngDevMode ? [{ debugName: "twPopoverTrapFocus" }] : /* istanbul ignore next */ []));
306
- /** Arbitrary data passed to template context or component via `POPOVER_DATA` token. */
314
+ /** Arbitrary data passed to template context or component via `TW_POPOVER_DATA` token. Defaults to `undefined`. */
307
315
  twPopoverData = input(undefined, /* @ts-ignore */
308
316
  ...(ngDevMode ? [{ debugName: "twPopoverData" }] : /* istanbul ignore next */ []));
309
- /** Additional CSS classes applied to the overlay panel for consumer customization. */
317
+ /** Additional CSS classes applied to the overlay panel for consumer customization. Defaults to an empty string. */
310
318
  twPopoverPanelClass = input('', /* @ts-ignore */
311
319
  ...(ngDevMode ? [{ debugName: "twPopoverPanelClass" }] : /* istanbul ignore next */ []));
312
320
  /** Optional semantic color. When set, adds a colored top border accent to the panel. */
313
321
  twPopoverColor = input(undefined, /* @ts-ignore */
314
322
  ...(ngDevMode ? [{ debugName: "twPopoverColor" }] : /* istanbul ignore next */ []));
315
- /** Explicit `aria-label` for the dialog panel. */
323
+ /** Explicit `aria-label` for the dialog panel. Defaults to `undefined`. */
316
324
  twPopoverAriaLabel = input(undefined, /* @ts-ignore */
317
325
  ...(ngDevMode ? [{ debugName: "twPopoverAriaLabel" }] : /* istanbul ignore next */ []));
318
326
  /** Fires after the popover becomes visible. */
@@ -329,6 +337,10 @@ class PopoverDirective {
329
337
  popoverInstance = null;
330
338
  focusTrap = null;
331
339
  perOpenSubs = null;
340
+ /** The `twPopoverBackdrop` value baked into the current `overlayRef`. */
341
+ appliedBackdrop = null;
342
+ /** The `twPopoverScrollStrategy` value baked into the current `overlayRef`. */
343
+ appliedScrollStrategy = null;
332
344
  closing = false;
333
345
  closeTimer = null;
334
346
  /** Tracked focus-blur close timer; cleared on destroy so it can't fire post-teardown. */
@@ -431,8 +443,11 @@ class PopoverDirective {
431
443
  }
432
444
  // ── Private ──
433
445
  openPopover() {
434
- this.ensureOverlay();
435
- this.updatePositionStrategy();
446
+ const createdFresh = this.ensureOverlay();
447
+ // A freshly built OverlayRef already carries a strategy made from the
448
+ // current inputs; only a reused one needs the per-open position refresh.
449
+ if (!createdFresh)
450
+ this.updatePositionStrategy();
436
451
  this.attachContent();
437
452
  this.subscribePerOpen();
438
453
  this.overlayId.set(this.popoverInstance?.id ?? null);
@@ -487,15 +502,38 @@ class PopoverDirective {
487
502
  .withPush(true)
488
503
  .withViewportMargin(8);
489
504
  }
505
+ /**
506
+ * Ensures an `OverlayRef` exists whose creation-time configuration matches the
507
+ * current inputs. Returns `true` when a fresh ref was built.
508
+ *
509
+ * `hasBackdrop` / `backdropClass` are read by CDK inside `OverlayRef.attach()`
510
+ * straight off the config object handed to `Overlay.create()`, and there is no
511
+ * public setter that re-renders them. Since closing only detaches, a ref built
512
+ * on the first open would otherwise keep the first open's backdrop for the
513
+ * directive's whole lifetime — while `subscribePerOpen` re-reads
514
+ * `twPopoverBackdrop` every open to decide whether backdrop-click closes, so
515
+ * the two reads of one input disagreed. Rebuilding only when a creation-time
516
+ * input actually changed keeps the common reopen path on the same ref.
517
+ */
490
518
  ensureOverlay() {
491
- if (this.overlayRef)
492
- return;
519
+ const backdrop = this.twPopoverBackdrop();
520
+ const scrollStrategyName = this.twPopoverScrollStrategy();
521
+ if (this.overlayRef) {
522
+ if (backdrop === this.appliedBackdrop &&
523
+ scrollStrategyName === this.appliedScrollStrategy) {
524
+ return false;
525
+ }
526
+ this.overlayRef.dispose();
527
+ this.overlayRef = null;
528
+ this.currentPositionStrategy = null;
529
+ }
493
530
  const positionStrategy = this.buildPositionStrategy();
494
531
  this.currentPositionStrategy = positionStrategy;
495
- const backdrop = this.twPopoverBackdrop();
496
532
  const hasBackdrop = backdrop !== 'none';
497
533
  const backdropClass = backdrop === 'dimmed' ? 'bg-black/20' : 'cdk-overlay-transparent-backdrop';
498
534
  const scrollStrategy = this.resolveScrollStrategy();
535
+ this.appliedBackdrop = backdrop;
536
+ this.appliedScrollStrategy = scrollStrategyName;
499
537
  this.overlayRef = this.overlay.create({
500
538
  positionStrategy,
501
539
  scrollStrategy,
@@ -503,6 +541,7 @@ class PopoverDirective {
503
541
  backdropClass,
504
542
  panelClass: 'tw-popover-panel',
505
543
  });
544
+ return true;
506
545
  }
507
546
  updatePositionStrategy() {
508
547
  if (!this.overlayRef)
@@ -555,7 +594,7 @@ class PopoverDirective {
555
594
  this.popoverInstance.ariaModal.set(this.twPopoverTrapFocus());
556
595
  this.popoverInstance.ariaLabelledByQueue.set([]);
557
596
  this.popoverInstance.panelClass.set(this.resolvePanelClass());
558
- // Provide POPOVER_REF for both template and component content. Title directives
597
+ // Provide TW_POPOVER_REF for both template and component content. Title directives
559
598
  // call _addAriaLabelledBy / _removeAriaLabelledBy to register their id with the
560
599
  // overlay's aria-labelledby queue.
561
600
  const overlayInstance = this.popoverInstance;
@@ -573,8 +612,8 @@ class PopoverDirective {
573
612
  const templateInjector = Injector.create({
574
613
  parent: this.injector,
575
614
  providers: [
576
- { provide: POPOVER_DATA, useValue: this.twPopoverData() },
577
- { provide: POPOVER_REF, useValue: popoverRef },
615
+ { provide: TW_POPOVER_DATA, useValue: this.twPopoverData() },
616
+ { provide: TW_POPOVER_REF, useValue: popoverRef },
578
617
  ],
579
618
  });
580
619
  const templatePortal = new TemplatePortal(content, this.viewContainerRef, context, templateInjector);
@@ -584,8 +623,8 @@ class PopoverDirective {
584
623
  const contentInjector = Injector.create({
585
624
  parent: this.injector,
586
625
  providers: [
587
- { provide: POPOVER_DATA, useValue: this.twPopoverData() },
588
- { provide: POPOVER_REF, useValue: popoverRef },
626
+ { provide: TW_POPOVER_DATA, useValue: this.twPopoverData() },
627
+ { provide: TW_POPOVER_REF, useValue: popoverRef },
589
628
  ],
590
629
  });
591
630
  const componentPortal = new ComponentPortal(content, this.viewContainerRef, contentInjector);
@@ -606,6 +645,9 @@ class PopoverDirective {
606
645
  disposeOverlay() {
607
646
  this.overlayRef?.dispose();
608
647
  this.overlayRef = null;
648
+ this.currentPositionStrategy = null;
649
+ this.appliedBackdrop = null;
650
+ this.appliedScrollStrategy = null;
609
651
  this.popoverInstance = null;
610
652
  }
611
653
  /**
@@ -644,7 +686,7 @@ class PopoverDirective {
644
686
  return Array.isArray(raw) ? raw.join(' ') : raw;
645
687
  }
646
688
  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 });
689
+ 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: { attributes: { "data-tw-popover-trigger": "" }, 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 });
648
690
  }
649
691
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImport: i0, type: PopoverDirective, decorators: [{
650
692
  type: Directive,
@@ -652,6 +694,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
652
694
  selector: '[twPopover]',
653
695
  exportAs: 'twPopover',
654
696
  host: {
697
+ // Static marker so the directive is locatable in tests and by consumers.
698
+ // Its own selector is not usable for that: `[twPopover]` takes a required
699
+ // `TemplateRef`, so it is ALWAYS property-bound and Angular emits no
700
+ // attribute for a bound input. Material solves this with a class
701
+ // (`.mat-mdc-menu-trigger`); `data-tw-*` is this repo's existing convention
702
+ // (see `data-tw-table-loading`, `data-tw-sort-arrow`) and carries no styling.
703
+ 'data-tw-popover-trigger': '',
655
704
  '[attr.aria-haspopup]': '"dialog"',
656
705
  '[attr.aria-expanded]': 'twPopoverOpen()',
657
706
  '[attr.aria-controls]': 'overlayComponentId()',
@@ -672,7 +721,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
672
721
  * ```
673
722
  */
674
723
  class PopoverCloseDirective {
675
- popoverRef = inject(POPOVER_REF, { optional: true });
724
+ popoverRef = inject(TW_POPOVER_REF, { optional: true });
676
725
  closePopover() {
677
726
  this.popoverRef?.close();
678
727
  }
@@ -701,7 +750,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
701
750
  class PopoverTitleDirective {
702
751
  generatedId = inject(_IdGenerator).getId('tw-popover-title-');
703
752
  elementRef = inject(ElementRef);
704
- popoverRef = inject(POPOVER_REF, { optional: true });
753
+ popoverRef = inject(TW_POPOVER_REF, { optional: true });
705
754
  /** Custom id for the title element. Defaults to a generated unique id. */
706
755
  id = input(this.generatedId, /* @ts-ignore */
707
756
  ...(ngDevMode ? [{ debugName: "id" }] : /* istanbul ignore next */ []));
@@ -729,5 +778,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.7", ngImpor
729
778
  * Generated bundle index. Do not edit.
730
779
  */
731
780
 
732
- export { POPOVER_DATA, POPOVER_REF, PopoverCloseDirective, PopoverDirective, PopoverTitleDirective };
781
+ export { POPOVER_DATA, POPOVER_REF, PopoverCloseDirective, PopoverDirective, PopoverTitleDirective, TW_POPOVER_DATA, TW_POPOVER_REF };
733
782
  //# sourceMappingURL=cdevhub-ngx-tw-popover.mjs.map
@@ -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.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;AACh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A,CAAA,SAAA,EAAA,CAAA;2FAArB,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;;2FAArB,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 TW_POPOVER_DATA = new InjectionToken<unknown>('TW_POPOVER_DATA');\n\n/** Injection token providing a `PopoverRef` to popover component content. */\nexport const TW_POPOVER_REF = new InjectionToken<PopoverRef>('TW_POPOVER_REF');\n\n/**\n * @deprecated Renamed to {@link TW_POPOVER_DATA} for consistency with every\n * other ngx-tw injection token. This is the *same token instance*, not a copy —\n * providing under either name and injecting under the other resolves — so the\n * rename is safe to adopt incrementally. Removed in the next major.\n */\nexport const POPOVER_DATA = TW_POPOVER_DATA;\n\n/**\n * @deprecated Renamed to {@link TW_POPOVER_REF} for consistency with every\n * other ngx-tw injection token. This is the *same token instance*, not a copy —\n * providing under either name and injecting under the other resolves — so the\n * rename is safe to adopt incrementally. Removed in the next major.\n */\nexport const POPOVER_REF = TW_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 TW_POPOVER_DATA,\n TW_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 /** @internal Registers a projected title's id so the panel's `aria-labelledby` points at it. */\n _addAriaLabelledBy(id: string): void {\n this.ariaLabelledByQueue.update((q) => (q.includes(id) ? q : [...q, id]));\n }\n\n /** @internal Unregisters a previously added `aria-labelledby` id when the title is destroyed. */\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 // Static marker so the directive is locatable in tests and by consumers.\n // Its own selector is not usable for that: `[twPopover]` takes a required\n // `TemplateRef`, so it is ALWAYS property-bound and Angular emits no\n // attribute for a bound input. Material solves this with a class\n // (`.mat-mdc-menu-trigger`); `data-tw-*` is this repo's existing convention\n // (see `data-tw-table-loading`, `data-tw-sort-arrow`) and carries no styling.\n 'data-tw-popover-trigger': '',\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. Defaults to `false`. */\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 /** Whether to render a directional arrow pointing at the trigger. Defaults to `true` — the arrow is the visual anchor tying the panel to its trigger; the special case is a compact iconic trigger where the arrow would crowd the layout. */\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 /** Whether clicking outside the panel closes the popover. Only relevant when backdrop is `'none'`. Defaults to `true` — clicking away is the universal dismiss gesture for floating panels; the special case is a popover owning a multi-step flow the user must complete. */\n readonly twPopoverCloseOnOutside = input(true);\n\n /** Whether pressing Escape closes the popover. Defaults to `true` — the WAI-ARIA dialog pattern mandates that Escape closes; the special case is a popover owning a child layer (nested dialog or menu) that should consume Escape first. */\n readonly twPopoverCloseOnEscape = input(true);\n\n /** CDK scroll strategy for the overlay. Defaults to `'reposition'`. */\n readonly twPopoverScrollStrategy = input<PopoverScrollStrategy>('reposition');\n\n /** Whether to trap focus inside the popover panel using CDK FocusTrapFactory. Defaults to `true` — it matches the `role=\"dialog\"` baseline, where a focus-trapped panel announces itself as modal; the special case is an inline popover acting as an informational tooltip. */\n readonly twPopoverTrapFocus = input(true);\n\n /** Arbitrary data passed to template context or component via `TW_POPOVER_DATA` token. Defaults to `undefined`. */\n readonly twPopoverData = input<unknown>(undefined);\n\n /** Additional CSS classes applied to the overlay panel for consumer customization. Defaults to an empty string. */\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. Defaults to `undefined`. */\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 /** The `twPopoverBackdrop` value baked into the current `overlayRef`. */\n private appliedBackdrop: PopoverBackdrop | null = null;\n /** The `twPopoverScrollStrategy` value baked into the current `overlayRef`. */\n private appliedScrollStrategy: PopoverScrollStrategy | 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 const createdFresh = this.ensureOverlay();\n // A freshly built OverlayRef already carries a strategy made from the\n // current inputs; only a reused one needs the per-open position refresh.\n if (!createdFresh) 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 /**\n * Ensures an `OverlayRef` exists whose creation-time configuration matches the\n * current inputs. Returns `true` when a fresh ref was built.\n *\n * `hasBackdrop` / `backdropClass` are read by CDK inside `OverlayRef.attach()`\n * straight off the config object handed to `Overlay.create()`, and there is no\n * public setter that re-renders them. Since closing only detaches, a ref built\n * on the first open would otherwise keep the first open's backdrop for the\n * directive's whole lifetime — while `subscribePerOpen` re-reads\n * `twPopoverBackdrop` every open to decide whether backdrop-click closes, so\n * the two reads of one input disagreed. Rebuilding only when a creation-time\n * input actually changed keeps the common reopen path on the same ref.\n */\n private ensureOverlay(): boolean {\n const backdrop = this.twPopoverBackdrop();\n const scrollStrategyName = this.twPopoverScrollStrategy();\n\n if (this.overlayRef) {\n if (\n backdrop === this.appliedBackdrop &&\n scrollStrategyName === this.appliedScrollStrategy\n ) {\n return false;\n }\n this.overlayRef.dispose();\n this.overlayRef = null;\n this.currentPositionStrategy = null;\n }\n\n const positionStrategy = this.buildPositionStrategy();\n this.currentPositionStrategy = positionStrategy;\n\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.appliedBackdrop = backdrop;\n this.appliedScrollStrategy = scrollStrategyName;\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy,\n hasBackdrop,\n backdropClass,\n panelClass: 'tw-popover-panel',\n });\n return true;\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 TW_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: TW_POPOVER_DATA, useValue: this.twPopoverData() },\n { provide: TW_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: TW_POPOVER_DATA, useValue: this.twPopoverData() },\n { provide: TW_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.currentPositionStrategy = null;\n this.appliedBackdrop = null;\n this.appliedScrollStrategy = 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 { TW_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(TW_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 { TW_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(TW_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,eAAe,GAAG,IAAI,cAAc,CAAU,iBAAiB;AAE5E;MACa,cAAc,GAAG,IAAI,cAAc,CAAa,gBAAgB;AAE7E;;;;;AAKG;AACI,MAAM,YAAY,GAAG;AAE5B;;;;;AAKG;AACI,MAAM,WAAW,GAAG;;AC0B3B;AACA,MAAM,kBAAkB,GAAG,GAAG;AAE9B;AAEA,MA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,EAAA,MAAA,EAAA,EAAA,cAAA,EAAA,+BAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAArB,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;;;;"}
@@ -88,7 +88,7 @@ const DEFAULT_FORMATTER = (value, max, min) => {
88
88
  * ```
89
89
  */
90
90
  class ProgressBarComponent {
91
- /** Current progress value. When null or undefined, the bar renders indeterminate. Values outside `[options.min, options.max]` are clamped. */
91
+ /** Current progress value. When null or undefined, the bar renders indeterminate. Values outside `[options.min, options.max]` are clamped. Defaults to `null`. */
92
92
  value = input(null, /* @ts-ignore */
93
93
  ...(ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []));
94
94
  /** Visual style of the bar. `'linear'` renders a single fill; `'segmented'` splits the rail into discrete steps. Defaults to `'linear'`. */