@testgorilla/tgo-ui 11.22.3 → 12.0.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 (225) hide show
  1. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs +335 -229
  2. package/fesm2022/testgorilla-tgo-ui-components-accordion.mjs.map +1 -1
  3. package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs +547 -465
  4. package/fesm2022/testgorilla-tgo-ui-components-ai-audio-circle.mjs.map +1 -1
  5. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs +160 -75
  6. package/fesm2022/testgorilla-tgo-ui-components-ai-caveat.mjs.map +1 -1
  7. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs +678 -278
  8. package/fesm2022/testgorilla-tgo-ui-components-ai-feedback.mjs.map +1 -1
  9. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs +337 -274
  10. package/fesm2022/testgorilla-tgo-ui-components-alert-banner.mjs.map +1 -1
  11. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs +351 -192
  12. package/fesm2022/testgorilla-tgo-ui-components-audio-waveform.mjs.map +1 -1
  13. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs +1950 -960
  14. package/fesm2022/testgorilla-tgo-ui-components-autocomplete-v2.mjs.map +1 -1
  15. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs +1206 -1044
  16. package/fesm2022/testgorilla-tgo-ui-components-autocomplete.mjs.map +1 -1
  17. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs +328 -182
  18. package/fesm2022/testgorilla-tgo-ui-components-avatar.mjs.map +1 -1
  19. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs +383 -203
  20. package/fesm2022/testgorilla-tgo-ui-components-badge.mjs.map +1 -1
  21. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs +553 -261
  22. package/fesm2022/testgorilla-tgo-ui-components-breadcrumb.mjs.map +1 -1
  23. package/fesm2022/testgorilla-tgo-ui-components-button.mjs +709 -739
  24. package/fesm2022/testgorilla-tgo-ui-components-button.mjs.map +1 -1
  25. package/fesm2022/testgorilla-tgo-ui-components-card.mjs +219 -184
  26. package/fesm2022/testgorilla-tgo-ui-components-card.mjs.map +1 -1
  27. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs +515 -458
  28. package/fesm2022/testgorilla-tgo-ui-components-checkbox.mjs.map +1 -1
  29. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs +423 -162
  30. package/fesm2022/testgorilla-tgo-ui-components-checklist.mjs.map +1 -1
  31. package/fesm2022/testgorilla-tgo-ui-components-core.mjs +10784 -10996
  32. package/fesm2022/testgorilla-tgo-ui-components-core.mjs.map +1 -1
  33. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs +810 -533
  34. package/fesm2022/testgorilla-tgo-ui-components-datepicker.mjs.map +1 -1
  35. package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs +473 -116
  36. package/fesm2022/testgorilla-tgo-ui-components-device-control.mjs.map +1 -1
  37. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs +1149 -540
  38. package/fesm2022/testgorilla-tgo-ui-components-dialog.mjs.map +1 -1
  39. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs +148 -84
  40. package/fesm2022/testgorilla-tgo-ui-components-divider.mjs.map +1 -1
  41. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs +239 -142
  42. package/fesm2022/testgorilla-tgo-ui-components-donut-chart.mjs.map +1 -1
  43. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs +599 -467
  44. package/fesm2022/testgorilla-tgo-ui-components-dropdown.mjs.map +1 -1
  45. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs +126 -70
  46. package/fesm2022/testgorilla-tgo-ui-components-elevation-shadow.mjs.map +1 -1
  47. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs +324 -329
  48. package/fesm2022/testgorilla-tgo-ui-components-empty-state.mjs.map +1 -1
  49. package/fesm2022/testgorilla-tgo-ui-components-field.mjs +969 -648
  50. package/fesm2022/testgorilla-tgo-ui-components-field.mjs.map +1 -1
  51. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs +553 -419
  52. package/fesm2022/testgorilla-tgo-ui-components-file-upload.mjs.map +1 -1
  53. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs +847 -452
  54. package/fesm2022/testgorilla-tgo-ui-components-filter-button.mjs.map +1 -1
  55. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs +398 -302
  56. package/fesm2022/testgorilla-tgo-ui-components-gaussian-chart.mjs.map +1 -1
  57. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs +162 -95
  58. package/fesm2022/testgorilla-tgo-ui-components-icon-label.mjs.map +1 -1
  59. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs +1825 -1795
  60. package/fesm2022/testgorilla-tgo-ui-components-icon.mjs.map +1 -1
  61. package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs +1018 -672
  62. package/fesm2022/testgorilla-tgo-ui-components-infinite-scroll-table.mjs.map +1 -1
  63. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs +758 -368
  64. package/fesm2022/testgorilla-tgo-ui-components-inline-field.mjs.map +1 -1
  65. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs +204 -212
  66. package/fesm2022/testgorilla-tgo-ui-components-logo.mjs.map +1 -1
  67. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs +183 -48
  68. package/fesm2022/testgorilla-tgo-ui-components-media-card.mjs.map +1 -1
  69. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs +243 -79
  70. package/fesm2022/testgorilla-tgo-ui-components-media-dialog.mjs.map +1 -1
  71. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs +751 -361
  72. package/fesm2022/testgorilla-tgo-ui-components-multi-input.mjs.map +1 -1
  73. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs +1122 -385
  74. package/fesm2022/testgorilla-tgo-ui-components-navbar.mjs.map +1 -1
  75. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs +689 -413
  76. package/fesm2022/testgorilla-tgo-ui-components-overflow-menu.mjs.map +1 -1
  77. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs +227 -92
  78. package/fesm2022/testgorilla-tgo-ui-components-page-header.mjs.map +1 -1
  79. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs +174 -113
  80. package/fesm2022/testgorilla-tgo-ui-components-paginator.mjs.map +1 -1
  81. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs +367 -165
  82. package/fesm2022/testgorilla-tgo-ui-components-password-criteria.mjs.map +1 -1
  83. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs +253 -118
  84. package/fesm2022/testgorilla-tgo-ui-components-password-strength.mjs.map +1 -1
  85. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs +730 -444
  86. package/fesm2022/testgorilla-tgo-ui-components-phone-input.mjs.map +1 -1
  87. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs +533 -221
  88. package/fesm2022/testgorilla-tgo-ui-components-popover.mjs.map +1 -1
  89. package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs +274 -76
  90. package/fesm2022/testgorilla-tgo-ui-components-popup-tip.mjs.map +1 -1
  91. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs +184 -124
  92. package/fesm2022/testgorilla-tgo-ui-components-progress-bar.mjs.map +1 -1
  93. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs +1223 -574
  94. package/fesm2022/testgorilla-tgo-ui-components-prompt.mjs.map +1 -1
  95. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs +249 -160
  96. package/fesm2022/testgorilla-tgo-ui-components-radial-progress.mjs.map +1 -1
  97. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs +447 -439
  98. package/fesm2022/testgorilla-tgo-ui-components-radio-button.mjs.map +1 -1
  99. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs +226 -150
  100. package/fesm2022/testgorilla-tgo-ui-components-rating.mjs.map +1 -1
  101. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs +255 -67
  102. package/fesm2022/testgorilla-tgo-ui-components-scale-table.mjs.map +1 -1
  103. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs +205 -162
  104. package/fesm2022/testgorilla-tgo-ui-components-scale.mjs.map +1 -1
  105. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs +245 -153
  106. package/fesm2022/testgorilla-tgo-ui-components-segmented-bar.mjs.map +1 -1
  107. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs +274 -140
  108. package/fesm2022/testgorilla-tgo-ui-components-segmented-button.mjs.map +1 -1
  109. package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs +319 -147
  110. package/fesm2022/testgorilla-tgo-ui-components-segmented-toggle.mjs.map +1 -1
  111. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs +286 -84
  112. package/fesm2022/testgorilla-tgo-ui-components-selectable-card.mjs.map +1 -1
  113. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs +660 -208
  114. package/fesm2022/testgorilla-tgo-ui-components-side-navigation.mjs.map +1 -1
  115. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs +579 -320
  116. package/fesm2022/testgorilla-tgo-ui-components-side-panel.mjs.map +1 -1
  117. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs +419 -200
  118. package/fesm2022/testgorilla-tgo-ui-components-side-sheet.mjs.map +1 -1
  119. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs +132 -80
  120. package/fesm2022/testgorilla-tgo-ui-components-skeleton.mjs.map +1 -1
  121. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs +741 -390
  122. package/fesm2022/testgorilla-tgo-ui-components-slider.mjs.map +1 -1
  123. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs +455 -329
  124. package/fesm2022/testgorilla-tgo-ui-components-snackbar.mjs.map +1 -1
  125. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs +543 -514
  126. package/fesm2022/testgorilla-tgo-ui-components-spider-chart.mjs.map +1 -1
  127. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs +193 -104
  128. package/fesm2022/testgorilla-tgo-ui-components-spinner.mjs.map +1 -1
  129. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs +760 -524
  130. package/fesm2022/testgorilla-tgo-ui-components-stepper.mjs.map +1 -1
  131. package/fesm2022/testgorilla-tgo-ui-components-table.mjs +714 -415
  132. package/fesm2022/testgorilla-tgo-ui-components-table.mjs.map +1 -1
  133. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs +847 -438
  134. package/fesm2022/testgorilla-tgo-ui-components-tabs.mjs.map +1 -1
  135. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs +535 -275
  136. package/fesm2022/testgorilla-tgo-ui-components-tag.mjs.map +1 -1
  137. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs +316 -246
  138. package/fesm2022/testgorilla-tgo-ui-components-toggle.mjs.map +1 -1
  139. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs +404 -284
  140. package/fesm2022/testgorilla-tgo-ui-components-tooltip.mjs.map +1 -1
  141. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs +664 -383
  142. package/fesm2022/testgorilla-tgo-ui-components-universal-skills.mjs.map +1 -1
  143. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs +201 -112
  144. package/fesm2022/testgorilla-tgo-ui-components-validation-error.mjs.map +1 -1
  145. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs +1014 -458
  146. package/fesm2022/testgorilla-tgo-ui-components-write-with-ai.mjs.map +1 -1
  147. package/fesm2022/testgorilla-tgo-ui.mjs +147 -155
  148. package/fesm2022/testgorilla-tgo-ui.mjs.map +1 -1
  149. package/mcp/catalog.json +1 -1
  150. package/package.json +16 -17
  151. package/projects/tgo-canopy-ui/theme/_palette.scss +23 -18
  152. package/types/testgorilla-tgo-ui-components-accordion.d.ts +214 -158
  153. package/types/testgorilla-tgo-ui-components-ai-audio-circle.d.ts +93 -69
  154. package/types/testgorilla-tgo-ui-components-ai-caveat.d.ts +37 -34
  155. package/types/testgorilla-tgo-ui-components-ai-feedback.d.ts +126 -86
  156. package/types/testgorilla-tgo-ui-components-alert-banner.d.ts +260 -185
  157. package/types/testgorilla-tgo-ui-components-audio-waveform.d.ts +96 -67
  158. package/types/testgorilla-tgo-ui-components-autocomplete-v2.d.ts +455 -256
  159. package/types/testgorilla-tgo-ui-components-autocomplete.d.ts +545 -390
  160. package/types/testgorilla-tgo-ui-components-avatar.d.ts +128 -102
  161. package/types/testgorilla-tgo-ui-components-badge.d.ts +191 -139
  162. package/types/testgorilla-tgo-ui-components-breadcrumb.d.ts +100 -62
  163. package/types/testgorilla-tgo-ui-components-button.d.ts +479 -340
  164. package/types/testgorilla-tgo-ui-components-card.d.ts +153 -114
  165. package/types/testgorilla-tgo-ui-components-checkbox.d.ts +299 -223
  166. package/types/testgorilla-tgo-ui-components-checklist.d.ts +149 -97
  167. package/types/testgorilla-tgo-ui-components-core.d.ts +307 -295
  168. package/types/testgorilla-tgo-ui-components-datepicker.d.ts +404 -299
  169. package/types/testgorilla-tgo-ui-components-device-control.d.ts +151 -81
  170. package/types/testgorilla-tgo-ui-components-dialog.d.ts +442 -329
  171. package/types/testgorilla-tgo-ui-components-divider.d.ts +64 -51
  172. package/types/testgorilla-tgo-ui-components-donut-chart.d.ts +41 -37
  173. package/types/testgorilla-tgo-ui-components-dropdown.d.ts +335 -241
  174. package/types/testgorilla-tgo-ui-components-elevation-shadow.d.ts +48 -43
  175. package/types/testgorilla-tgo-ui-components-empty-state.d.ts +317 -215
  176. package/types/testgorilla-tgo-ui-components-field.d.ts +559 -388
  177. package/types/testgorilla-tgo-ui-components-file-upload.d.ts +230 -168
  178. package/types/testgorilla-tgo-ui-components-filter-button.d.ts +263 -206
  179. package/types/testgorilla-tgo-ui-components-gaussian-chart.d.ts +107 -94
  180. package/types/testgorilla-tgo-ui-components-icon-label.d.ts +84 -61
  181. package/types/testgorilla-tgo-ui-components-icon.d.ts +137 -110
  182. package/types/testgorilla-tgo-ui-components-infinite-scroll-table.d.ts +429 -303
  183. package/types/testgorilla-tgo-ui-components-inline-field.d.ts +338 -254
  184. package/types/testgorilla-tgo-ui-components-logo.d.ts +119 -101
  185. package/types/testgorilla-tgo-ui-components-media-card.d.ts +51 -35
  186. package/types/testgorilla-tgo-ui-components-media-dialog.d.ts +40 -45
  187. package/types/testgorilla-tgo-ui-components-multi-input.d.ts +283 -194
  188. package/types/testgorilla-tgo-ui-components-navbar.d.ts +326 -208
  189. package/types/testgorilla-tgo-ui-components-overflow-menu.d.ts +276 -204
  190. package/types/testgorilla-tgo-ui-components-page-header.d.ts +67 -50
  191. package/types/testgorilla-tgo-ui-components-paginator.d.ts +103 -70
  192. package/types/testgorilla-tgo-ui-components-password-criteria.d.ts +67 -58
  193. package/types/testgorilla-tgo-ui-components-password-strength.d.ts +66 -57
  194. package/types/testgorilla-tgo-ui-components-phone-input.d.ts +217 -175
  195. package/types/testgorilla-tgo-ui-components-popover.d.ts +94 -53
  196. package/types/testgorilla-tgo-ui-components-popup-tip.d.ts +81 -44
  197. package/types/testgorilla-tgo-ui-components-progress-bar.d.ts +115 -84
  198. package/types/testgorilla-tgo-ui-components-prompt.d.ts +315 -219
  199. package/types/testgorilla-tgo-ui-components-radial-progress.d.ts +146 -107
  200. package/types/testgorilla-tgo-ui-components-radio-button.d.ts +296 -219
  201. package/types/testgorilla-tgo-ui-components-rating.d.ts +134 -95
  202. package/types/testgorilla-tgo-ui-components-scale-table.d.ts +67 -47
  203. package/types/testgorilla-tgo-ui-components-scale.d.ts +91 -66
  204. package/types/testgorilla-tgo-ui-components-segmented-bar.d.ts +118 -89
  205. package/types/testgorilla-tgo-ui-components-segmented-button.d.ts +107 -80
  206. package/types/testgorilla-tgo-ui-components-segmented-toggle.d.ts +138 -105
  207. package/types/testgorilla-tgo-ui-components-selectable-card.d.ts +90 -56
  208. package/types/testgorilla-tgo-ui-components-side-navigation.d.ts +183 -107
  209. package/types/testgorilla-tgo-ui-components-side-panel.d.ts +156 -145
  210. package/types/testgorilla-tgo-ui-components-side-sheet.d.ts +98 -89
  211. package/types/testgorilla-tgo-ui-components-skeleton.d.ts +50 -33
  212. package/types/testgorilla-tgo-ui-components-slider.d.ts +278 -198
  213. package/types/testgorilla-tgo-ui-components-snackbar.d.ts +211 -159
  214. package/types/testgorilla-tgo-ui-components-spider-chart.d.ts +140 -121
  215. package/types/testgorilla-tgo-ui-components-spinner.d.ts +93 -72
  216. package/types/testgorilla-tgo-ui-components-stepper.d.ts +480 -338
  217. package/types/testgorilla-tgo-ui-components-table.d.ts +280 -233
  218. package/types/testgorilla-tgo-ui-components-tabs.d.ts +282 -183
  219. package/types/testgorilla-tgo-ui-components-tag.d.ts +266 -193
  220. package/types/testgorilla-tgo-ui-components-toggle.d.ts +180 -132
  221. package/types/testgorilla-tgo-ui-components-tooltip.d.ts +142 -105
  222. package/types/testgorilla-tgo-ui-components-universal-skills.d.ts +165 -144
  223. package/types/testgorilla-tgo-ui-components-validation-error.d.ts +70 -51
  224. package/types/testgorilla-tgo-ui-components-write-with-ai.d.ts +210 -133
  225. package/types/testgorilla-tgo-ui.d.ts +52 -45
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-popover.mjs","sources":["../../../components/popover/popover.component.ts","../../../components/popover/popover.component.html","../../../components/popover/popover.directive.ts","../../../components/popover/public-api.ts","../../../components/popover/testgorilla-tgo-ui-components-popover.ts"],"sourcesContent":["import { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input, TemplateRef } from '@angular/core';\n\nimport { CardComponentModule, CardSize } from '@testgorilla/tgo-ui/components/card';\n\n@Component({\n selector: 'ui-popover',\n standalone: true,\n imports: [NgTemplateOutlet, CardComponentModule, CdkTrapFocus],\n templateUrl: './popover.component.html',\n styleUrls: ['./popover.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PopoverComponent {\n templateRef = input<TemplateRef<unknown> | null>(null);\n ctx = input<Record<string, unknown>>({});\n popoverCard = input(true);\n popoverCardSize = input<CardSize>('medium');\n trapFocus = input(false);\n ariaLabel = input('');\n}\n","@if (templateRef()) {\n <div class=\"popover-focus-scope\" [cdkTrapFocus]=\"trapFocus()\" [cdkTrapFocusAutoCapture]=\"trapFocus()\">\n <div\n class=\"popover-surface\"\n [attr.role]=\"trapFocus() ? 'dialog' : null\"\n [attr.aria-label]=\"trapFocus() && ariaLabel() ? ariaLabel() : null\"\n [attr.tabindex]=\"trapFocus() ? '-1' : null\"\n [attr.cdkFocusInitial]=\"trapFocus() ? '' : null\"\n >\n @if (popoverCard()) {\n <ui-card [size]=\"popoverCardSize()\">\n <ng-container *ngTemplateOutlet=\"templateRef(); context: ctx()\"></ng-container>\n </ui-card>\n } @else {\n <ng-container *ngTemplateOutlet=\"templateRef(); context: ctx()\"></ng-container>\n }\n </div>\n </div>\n}\n","import { HorizontalConnectionPos, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n HostListener,\n inject,\n Injector,\n input,\n NgZone,\n OnDestroy,\n OnInit,\n signal,\n TemplateRef,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { CardSize } from '@testgorilla/tgo-ui/components/card';\n\nimport { PopoverComponent } from './popover.component';\nimport { PopoverTrigger } from './popover.model';\n\n@Directive({\n selector: '[uiPopover]',\n exportAs: 'uiPopover',\n standalone: true,\n})\nexport class PopoverDirective implements OnInit, OnDestroy {\n uiPopover = input.required<TemplateRef<unknown>>();\n popoverOffset = input(4);\n popoverAlign = input<HorizontalConnectionPos>('center');\n popoverOpen = input(false);\n popoverCard = input(true);\n popoverCardSize = input<CardSize>('medium');\n popoverTrigger = input<PopoverTrigger>('hover');\n popoverAriaLabel = input('');\n uiPopoverDisabled = input(false);\n\n private readonly openState = signal(false);\n\n /** Whether the popover is currently showing. Read it via `#ref=\"uiPopover\"` or `viewChild(PopoverDirective)`. */\n readonly isOpen = this.openState.asReadonly();\n\n private readonly overlay = inject(Overlay);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n private readonly ngZone = inject(NgZone);\n\n private overlayRef: OverlayRef | null = null;\n private openTimeout: ReturnType<typeof setTimeout> | null = null;\n private closeTimeout: ReturnType<typeof setTimeout> | null = null;\n private overlayListeners: { enter: () => void; leave: () => void } | null = null;\n private dismissSubscriptions: Subscription | null = null;\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (this.popoverTrigger() !== 'hover' || this.uiPopoverDisabled()) {\n return;\n }\n this.cancelClose();\n this.scheduleOpen();\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n if (this.popoverTrigger() !== 'hover') {\n return;\n }\n this.cancelOpen();\n this.scheduleClose();\n }\n\n @HostListener('click')\n onClick(): void {\n if (this.popoverTrigger() !== 'click') {\n return;\n }\n this.toggle();\n }\n\n /** Opens the popover. No-op while `uiPopoverDisabled` is `true` or it is already open. */\n open(): void {\n if (this.uiPopoverDisabled()) {\n return;\n }\n\n if (!this.overlayRef) {\n this.createOverlay();\n }\n\n const overlayRef = this.overlayRef;\n if (!overlayRef || overlayRef.hasAttached()) {\n return;\n }\n\n const portal = new ComponentPortal(PopoverComponent, null, this.injector);\n const ref = overlayRef.attach(portal);\n ref.setInput('templateRef', this.uiPopover());\n ref.setInput('ctx', { close: () => this.close() });\n ref.setInput('popoverCard', this.popoverCard());\n ref.setInput('popoverCardSize', this.popoverCardSize());\n ref.setInput('trapFocus', this.popoverTrigger() === 'click');\n ref.setInput('ariaLabel', this.popoverAriaLabel());\n\n if (this.popoverTrigger() === 'hover') {\n const el = overlayRef.overlayElement;\n const enter = (): void => this.ngZone.run(() => this.cancelClose());\n const leave = (): void => this.ngZone.run(() => this.scheduleClose());\n el.addEventListener('mouseenter', enter);\n el.addEventListener('mouseleave', leave);\n this.overlayListeners = { enter, leave };\n }\n\n this.openState.set(true);\n }\n\n /** Closes the popover. Safe to call when it is already closed. */\n close(): void {\n if (!this.overlayRef) {\n return;\n }\n\n if (this.overlayListeners) {\n const el = this.overlayRef.overlayElement;\n el.removeEventListener('mouseenter', this.overlayListeners.enter);\n el.removeEventListener('mouseleave', this.overlayListeners.leave);\n this.overlayListeners = null;\n }\n\n this.overlayRef.detach();\n this.openState.set(false);\n }\n\n /** Opens the popover when closed, closes it when open. */\n toggle(): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n private createOverlay(): void {\n const align = this.popoverAlign();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n { originX: align, originY: 'bottom', overlayX: align, overlayY: 'top', offsetY: this.popoverOffset() },\n { originX: align, originY: 'top', overlayX: align, overlayY: 'bottom', offsetY: -this.popoverOffset() },\n ]);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: false,\n });\n\n if (this.popoverTrigger() === 'click') {\n this.listenForDismiss(this.overlayRef);\n }\n }\n\n /** Click-triggered popovers dismiss on an outside pointer event or on Escape. */\n private listenForDismiss(overlayRef: OverlayRef): void {\n const subscriptions = new Subscription();\n\n subscriptions.add(\n overlayRef.outsidePointerEvents().subscribe(event => {\n // The anchor's own click handler toggles, so ignore it here to avoid closing and reopening.\n if (this.elementRef.nativeElement.contains(event.target as Node)) {\n return;\n }\n this.close();\n })\n );\n\n subscriptions.add(\n overlayRef.keydownEvents().subscribe(event => {\n if (event.key !== 'Escape') {\n return;\n }\n event.preventDefault();\n // cdkTrapFocusAutoCapture restores focus to whatever was focused before the popover opened,\n // so closing is all this has to do.\n this.close();\n })\n );\n\n this.dismissSubscriptions = subscriptions;\n }\n\n private scheduleOpen(): void {\n this.openTimeout = setTimeout(() => this.open(), 100);\n }\n\n private cancelOpen(): void {\n if (this.openTimeout) {\n clearTimeout(this.openTimeout);\n this.openTimeout = null;\n }\n }\n\n private scheduleClose(): void {\n this.closeTimeout = setTimeout(() => this.close(), 150);\n }\n\n private cancelClose(): void {\n if (this.closeTimeout) {\n clearTimeout(this.closeTimeout);\n this.closeTimeout = null;\n }\n }\n\n ngOnInit(): void {\n if (this.popoverOpen()) {\n this.open();\n }\n }\n\n ngOnDestroy(): void {\n this.cancelOpen();\n this.cancelClose();\n this.close();\n this.dismissSubscriptions?.unsubscribe();\n this.overlayRef?.dispose();\n }\n}\n","export * from './popover.directive';\nexport * from './popover.model';\n// PopoverComponent is internal — not part of the public API\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;MAca,gBAAgB,CAAA;AAR7B,IAAA,WAAA,GAAA;AASE,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAA8B,IAAI,kFAAC;AACtD,QAAA,IAAA,CAAA,GAAG,GAAG,KAAK,CAA0B,EAAE,0EAAC;AACxC,QAAA,IAAA,CAAA,WAAW,GAAG,KAAK,CAAC,IAAI,kFAAC;AACzB,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAW,QAAQ,sFAAC;AAC3C,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,KAAK,gFAAC;AACxB,QAAA,IAAA,CAAA,SAAS,GAAG,KAAK,CAAC,EAAE,gFAAC;AACtB,IAAA;+GAPY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,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,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,YAAA,EAAA,gBAAA,EAAA,OAAA,EAAA,WAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA,WAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAL5B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,QAAQ,EAAE,aAAa;AACvB,oBAAA,QAAQ,EAAE,WAAW;AACrB,oBAAA,UAAU,EAAE,IAAI;AACjB,iBAAA;;sBA4BE,YAAY;uBAAC,YAAY;;sBASzB,YAAY;uBAAC,YAAY;;sBASzB,YAAY;uBAAC,OAAO;;;ACtEvB;;ACFA;;AAEG;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-popover.mjs","names":[],"sources":["../../../components/popover/popover.component.ts","../../../components/popover/popover.component.html","../../../components/popover/popover.directive.ts"],"sourcesContent":["import { CdkTrapFocus } from '@angular/cdk/a11y';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, input, TemplateRef } from '@angular/core';\n\nimport { CardComponentModule, CardSize } from '@testgorilla/tgo-ui/components/card';\n\n@Component({\n selector: 'ui-popover',\n standalone: true,\n imports: [NgTemplateOutlet, CardComponentModule, CdkTrapFocus],\n templateUrl: './popover.component.html',\n styleUrls: ['./popover.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class PopoverComponent {\n templateRef = input<TemplateRef<unknown> | null>(null);\n ctx = input<Record<string, unknown>>({});\n popoverCard = input(true);\n popoverCardSize = input<CardSize>('medium');\n trapFocus = input(false);\n ariaLabel = input('');\n}\n","@if (templateRef()) {\n <div class=\"popover-focus-scope\" [cdkTrapFocus]=\"trapFocus()\" [cdkTrapFocusAutoCapture]=\"trapFocus()\">\n <div\n class=\"popover-surface\"\n [attr.role]=\"trapFocus() ? 'dialog' : null\"\n [attr.aria-label]=\"trapFocus() && ariaLabel() ? ariaLabel() : null\"\n [attr.tabindex]=\"trapFocus() ? '-1' : null\"\n [attr.cdkFocusInitial]=\"trapFocus() ? '' : null\"\n >\n @if (popoverCard()) {\n <ui-card [size]=\"popoverCardSize()\">\n <ng-container *ngTemplateOutlet=\"templateRef(); context: ctx()\"></ng-container>\n </ui-card>\n } @else {\n <ng-container *ngTemplateOutlet=\"templateRef(); context: ctx()\"></ng-container>\n }\n </div>\n </div>\n}\n","import { HorizontalConnectionPos, Overlay, OverlayRef } from '@angular/cdk/overlay';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport {\n Directive,\n ElementRef,\n HostListener,\n inject,\n Injector,\n input,\n NgZone,\n OnDestroy,\n OnInit,\n signal,\n TemplateRef,\n} from '@angular/core';\nimport { Subscription } from 'rxjs';\n\nimport { CardSize } from '@testgorilla/tgo-ui/components/card';\n\nimport { PopoverComponent } from './popover.component';\nimport { PopoverTrigger } from './popover.model';\n\n@Directive({\n selector: '[uiPopover]',\n exportAs: 'uiPopover',\n standalone: true,\n})\nexport class PopoverDirective implements OnInit, OnDestroy {\n uiPopover = input.required<TemplateRef<unknown>>();\n popoverOffset = input(4);\n popoverAlign = input<HorizontalConnectionPos>('center');\n popoverOpen = input(false);\n popoverCard = input(true);\n popoverCardSize = input<CardSize>('medium');\n popoverTrigger = input<PopoverTrigger>('hover');\n popoverAriaLabel = input('');\n uiPopoverDisabled = input(false);\n\n private readonly openState = signal(false);\n\n /** Whether the popover is currently showing. Read it via `#ref=\"uiPopover\"` or `viewChild(PopoverDirective)`. */\n readonly isOpen = this.openState.asReadonly();\n\n private readonly overlay = inject(Overlay);\n private readonly elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n private readonly injector = inject(Injector);\n private readonly ngZone = inject(NgZone);\n\n private overlayRef: OverlayRef | null = null;\n private openTimeout: ReturnType<typeof setTimeout> | null = null;\n private closeTimeout: ReturnType<typeof setTimeout> | null = null;\n private overlayListeners: { enter: () => void; leave: () => void } | null = null;\n private dismissSubscriptions: Subscription | null = null;\n\n @HostListener('mouseenter')\n onMouseEnter(): void {\n if (this.popoverTrigger() !== 'hover' || this.uiPopoverDisabled()) {\n return;\n }\n this.cancelClose();\n this.scheduleOpen();\n }\n\n @HostListener('mouseleave')\n onMouseLeave(): void {\n if (this.popoverTrigger() !== 'hover') {\n return;\n }\n this.cancelOpen();\n this.scheduleClose();\n }\n\n @HostListener('click')\n onClick(): void {\n if (this.popoverTrigger() !== 'click') {\n return;\n }\n this.toggle();\n }\n\n /** Opens the popover. No-op while `uiPopoverDisabled` is `true` or it is already open. */\n open(): void {\n if (this.uiPopoverDisabled()) {\n return;\n }\n\n if (!this.overlayRef) {\n this.createOverlay();\n }\n\n const overlayRef = this.overlayRef;\n if (!overlayRef || overlayRef.hasAttached()) {\n return;\n }\n\n const portal = new ComponentPortal(PopoverComponent, null, this.injector);\n const ref = overlayRef.attach(portal);\n ref.setInput('templateRef', this.uiPopover());\n ref.setInput('ctx', { close: () => this.close() });\n ref.setInput('popoverCard', this.popoverCard());\n ref.setInput('popoverCardSize', this.popoverCardSize());\n ref.setInput('trapFocus', this.popoverTrigger() === 'click');\n ref.setInput('ariaLabel', this.popoverAriaLabel());\n\n if (this.popoverTrigger() === 'hover') {\n const el = overlayRef.overlayElement;\n const enter = (): void => this.ngZone.run(() => this.cancelClose());\n const leave = (): void => this.ngZone.run(() => this.scheduleClose());\n el.addEventListener('mouseenter', enter);\n el.addEventListener('mouseleave', leave);\n this.overlayListeners = { enter, leave };\n }\n\n this.openState.set(true);\n }\n\n /** Closes the popover. Safe to call when it is already closed. */\n close(): void {\n if (!this.overlayRef) {\n return;\n }\n\n if (this.overlayListeners) {\n const el = this.overlayRef.overlayElement;\n el.removeEventListener('mouseenter', this.overlayListeners.enter);\n el.removeEventListener('mouseleave', this.overlayListeners.leave);\n this.overlayListeners = null;\n }\n\n this.overlayRef.detach();\n this.openState.set(false);\n }\n\n /** Opens the popover when closed, closes it when open. */\n toggle(): void {\n if (this.isOpen()) {\n this.close();\n } else {\n this.open();\n }\n }\n\n private createOverlay(): void {\n const align = this.popoverAlign();\n const positionStrategy = this.overlay\n .position()\n .flexibleConnectedTo(this.elementRef)\n .withPositions([\n { originX: align, originY: 'bottom', overlayX: align, overlayY: 'top', offsetY: this.popoverOffset() },\n { originX: align, originY: 'top', overlayX: align, overlayY: 'bottom', offsetY: -this.popoverOffset() },\n ]);\n\n this.overlayRef = this.overlay.create({\n positionStrategy,\n scrollStrategy: this.overlay.scrollStrategies.reposition(),\n hasBackdrop: false,\n });\n\n if (this.popoverTrigger() === 'click') {\n this.listenForDismiss(this.overlayRef);\n }\n }\n\n /** Click-triggered popovers dismiss on an outside pointer event or on Escape. */\n private listenForDismiss(overlayRef: OverlayRef): void {\n const subscriptions = new Subscription();\n\n subscriptions.add(\n overlayRef.outsidePointerEvents().subscribe(event => {\n // The anchor's own click handler toggles, so ignore it here to avoid closing and reopening.\n if (this.elementRef.nativeElement.contains(event.target as Node)) {\n return;\n }\n this.close();\n })\n );\n\n subscriptions.add(\n overlayRef.keydownEvents().subscribe(event => {\n if (event.key !== 'Escape') {\n return;\n }\n event.preventDefault();\n // cdkTrapFocusAutoCapture restores focus to whatever was focused before the popover opened,\n // so closing is all this has to do.\n this.close();\n })\n );\n\n this.dismissSubscriptions = subscriptions;\n }\n\n private scheduleOpen(): void {\n this.openTimeout = setTimeout(() => this.open(), 100);\n }\n\n private cancelOpen(): void {\n if (this.openTimeout) {\n clearTimeout(this.openTimeout);\n this.openTimeout = null;\n }\n }\n\n private scheduleClose(): void {\n this.closeTimeout = setTimeout(() => this.close(), 150);\n }\n\n private cancelClose(): void {\n if (this.closeTimeout) {\n clearTimeout(this.closeTimeout);\n this.closeTimeout = null;\n }\n }\n\n ngOnInit(): void {\n if (this.popoverOpen()) {\n this.open();\n }\n }\n\n ngOnDestroy(): void {\n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AAA;GAAA;GAAA,MAAA,EAAA,WAAA;IAAA,cAAA;IAAA,cAAA;IAAA,SAAA;GAAA,EAAA;GAAA,UAAA,CAAA,WAAA;GAAA,UAAA;EAAA,CAAA;CAAA;;AAAhB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAgB,YAAA,CAAA;EAL5B,MAAA;EAAU,MAAA,CAAA;GACT,UAAU;GACV,UAAU;GACV,YAAY;EACb,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BE,MAAA;GAAa,MAAA,CAAA,YAAY;;;GASzB,MAAA;GAAa,MAAA,CAAA,YAAY;;;GASzB,MAAA;GAAa,MAAA,CAAA,OAAO"}
@@ -1,77 +1,275 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, output, inject, computed, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
- import { IconComponent } from '@testgorilla/tgo-ui/components/icon';
4
- import { CommonModule } from '@angular/common';
5
-
6
- /**
7
- * Tooltip that stays open until it is dismissed, with an optional inline link and a close button.
8
- * Unlike `ui-tooltip` it is not hover driven: the application opens it in response to a system state.
9
- */
10
- class PopupTipComponent {
11
- constructor() {
12
- this.message = input('', ...(ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []));
13
- /** Optional link rendered inline after the message. Needs `linkUrl` to render. */
14
- this.linkText = input('', ...(ngDevMode ? [{ debugName: "linkText" }] : /* istanbul ignore next */ []));
15
- this.linkUrl = input('', ...(ngDevMode ? [{ debugName: "linkUrl" }] : /* istanbul ignore next */ []));
16
- /** Side of the anchor the tip sits on, which decides where its arrow is drawn. Default: 'top'. */
17
- this.position = input('top', ...(ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []));
18
- this.closeButtonTestId = input(null, ...(ngDevMode ? [{ debugName: "closeButtonTestId" }] : /* istanbul ignore next */ []));
19
- this.includeCloseButton = input(true, { ...(ngDevMode ? { debugName: "includeCloseButton" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
20
- /**
21
- * Accessible name of the close button. Pass a localized string: the English default is only a
22
- * last-resort fallback so the button is never nameless. Default: 'Close'.
23
- */
24
- this.closeButtonLabel = input('Close', ...(ngDevMode ? [{ debugName: "closeButtonLabel" }] : /* istanbul ignore next */ []));
25
- /**
26
- * Defines the application theme. Defaults to dark because the design sheet only specifies the
27
- * dark tip; the light variant exists for reuse on light surfaces.
28
- */
29
- this.applicationTheme = input(undefined, ...(ngDevMode ? [{ debugName: "applicationTheme" }] : /* istanbul ignore next */ []));
30
- /**
31
- * Emits when the user dismisses the tip, with the close button or with Escape. Escape only fires
32
- * while focus is inside the tip: call `focus()` on it when opening, especially without the button.
33
- */
34
- this.closed = output();
35
- this.defaultAppTheme = inject('CANOPYUI_DEFAULT_APPLICATION_THEME', {
36
- optional: true,
37
- });
38
- this.theme = computed(() => this.applicationTheme() ?? this.defaultAppTheme ?? 'dark', ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
39
- }
40
- close() {
41
- this.closed.emit();
42
- }
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PopupTipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
44
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: PopupTipComponent, isStandalone: true, selector: "ui-popup-tip", inputs: { message: { classPropertyName: "message", publicName: "message", isSignal: true, isRequired: false, transformFunction: null }, linkText: { classPropertyName: "linkText", publicName: "linkText", isSignal: true, isRequired: false, transformFunction: null }, linkUrl: { classPropertyName: "linkUrl", publicName: "linkUrl", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, closeButtonTestId: { classPropertyName: "closeButtonTestId", publicName: "closeButtonTestId", isSignal: true, isRequired: false, transformFunction: null }, includeCloseButton: { classPropertyName: "includeCloseButton", publicName: "includeCloseButton", isSignal: true, isRequired: false, transformFunction: null }, closeButtonLabel: { classPropertyName: "closeButtonLabel", publicName: "closeButtonLabel", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed" }, host: { attributes: { "role": "alert", "aria-live": "assertive", "tabindex": "-1" }, listeners: { "keydown.escape": "close()" }, properties: { "attr.position": "position()", "attr.theme": "theme()" } }, ngImport: i0, template: "<span class=\"ui-popup-tip__message\">\n <ng-content>{{ message() }}</ng-content>\n @if (linkText() && linkUrl()) {\n <!-- Explicit space: Angular strips the whitespace around a control-flow block. -->\n {{ ' ' }}<a class=\"ui-popup-tip__link\" [href]=\"linkUrl()\" target=\"_blank\" rel=\"noopener\">{{ linkText() }}</a>\n }\n</span>\n\n@if (includeCloseButton()) {\n <button\n type=\"button\"\n class=\"ui-popup-tip__close\"\n [attr.data-testid]=\"closeButtonTestId() ?? 'popup-tip-close'\"\n [attr.aria-label]=\"closeButtonLabel()\"\n (click)=\"close()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" name=\"Close-in-line\"></ui-icon>\n </button>\n}\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{position:relative;box-sizing:border-box;display:flex;align-items:flex-start;gap:8px;width:248px;max-width:100%;padding:8px;border:1px solid #ffffff;border-radius:4px;background-color:#242424;color:#fff;text-align:left;outline:none}:host([position=top]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;bottom:-5px;left:20px;transform:rotate(135deg)}:host([position=bottom]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;top:-5px;left:20px;transform:rotate(-45deg)}:host([position=left]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;right:-5px;top:20px;transform:rotate(45deg)}:host([position=right]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;left:-5px;top:20px;transform:rotate(-135deg)}:host([theme=light]){border-color:#242424;background-color:#fff;color:#242424}:host([theme=light]):after{border-color:#242424}.ui-popup-tip__message{font-size:12px;font-weight:400;line-height:16px}.ui-popup-tip__link{font:inherit;color:inherit;text-decoration:underline}.ui-popup-tip__close{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:none;color:inherit;cursor:pointer}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
45
- }
46
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PopupTipComponent, decorators: [{
47
- type: Component,
48
- args: [{ selector: 'ui-popup-tip', changeDetection: ChangeDetectionStrategy.OnPush, host: {
49
- role: 'alert',
50
- 'aria-live': 'assertive',
51
- // Focusable programmatically, so Escape can dismiss the tip even without the close button.
52
- tabindex: '-1',
53
- '[attr.position]': 'position()',
54
- '[attr.theme]': 'theme()',
55
- '(keydown.escape)': 'close()',
56
- }, imports: [IconComponent], template: "<span class=\"ui-popup-tip__message\">\n <ng-content>{{ message() }}</ng-content>\n @if (linkText() && linkUrl()) {\n <!-- Explicit space: Angular strips the whitespace around a control-flow block. -->\n {{ ' ' }}<a class=\"ui-popup-tip__link\" [href]=\"linkUrl()\" target=\"_blank\" rel=\"noopener\">{{ linkText() }}</a>\n }\n</span>\n\n@if (includeCloseButton()) {\n <button\n type=\"button\"\n class=\"ui-popup-tip__close\"\n [attr.data-testid]=\"closeButtonTestId() ?? 'popup-tip-close'\"\n [attr.aria-label]=\"closeButtonLabel()\"\n (click)=\"close()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" name=\"Close-in-line\"></ui-icon>\n </button>\n}\n", styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{position:relative;box-sizing:border-box;display:flex;align-items:flex-start;gap:8px;width:248px;max-width:100%;padding:8px;border:1px solid #ffffff;border-radius:4px;background-color:#242424;color:#fff;text-align:left;outline:none}:host([position=top]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;bottom:-5px;left:20px;transform:rotate(135deg)}:host([position=bottom]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;top:-5px;left:20px;transform:rotate(-45deg)}:host([position=left]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;right:-5px;top:20px;transform:rotate(45deg)}:host([position=right]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;left:-5px;top:20px;transform:rotate(-135deg)}:host([theme=light]){border-color:#242424;background-color:#fff;color:#242424}:host([theme=light]):after{border-color:#242424}.ui-popup-tip__message{font-size:12px;font-weight:400;line-height:16px}.ui-popup-tip__link{font:inherit;color:inherit;text-decoration:underline}.ui-popup-tip__close{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:none;color:inherit;cursor:pointer}\n"] }]
57
- }], propDecorators: { message: [{ type: i0.Input, args: [{ isSignal: true, alias: "message", required: false }] }], linkText: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkText", required: false }] }], linkUrl: [{ type: i0.Input, args: [{ isSignal: true, alias: "linkUrl", required: false }] }], position: [{ type: i0.Input, args: [{ isSignal: true, alias: "position", required: false }] }], closeButtonTestId: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonTestId", required: false }] }], includeCloseButton: [{ type: i0.Input, args: [{ isSignal: true, alias: "includeCloseButton", required: false }] }], closeButtonLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "closeButtonLabel", required: false }] }], applicationTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "applicationTheme", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }] } });
58
-
59
- class PopupTipComponentModule {
60
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PopupTipComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
61
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: PopupTipComponentModule, imports: [CommonModule, PopupTipComponent], exports: [PopupTipComponent] }); }
62
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PopupTipComponentModule, imports: [CommonModule, PopupTipComponent] }); }
63
- }
64
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: PopupTipComponentModule, decorators: [{
65
- type: NgModule,
66
- args: [{
67
- imports: [CommonModule, PopupTipComponent],
68
- exports: [PopupTipComponent],
69
- }]
70
- }] });
71
-
72
- /**
73
- * Generated bundle index. Do not edit.
74
- */
75
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, NgModule, booleanAttribute, computed, inject, input, output } from "@angular/core";
3
+ import { IconComponent } from "@testgorilla/tgo-ui/components/icon";
4
+ import { CommonModule } from "@angular/common";
5
+ var PopupTipComponent = class PopupTipComponent {
6
+ constructor() {
7
+ this.message = input("", ...ngDevMode ? [{ debugName: "message" }] : /* istanbul ignore next */ []);
8
+ this.linkText = input("", ...ngDevMode ? [{ debugName: "linkText" }] : /* istanbul ignore next */ []);
9
+ this.linkUrl = input("", ...ngDevMode ? [{ debugName: "linkUrl" }] : /* istanbul ignore next */ []);
10
+ this.position = input("top", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
11
+ this.closeButtonTestId = input(null, ...ngDevMode ? [{ debugName: "closeButtonTestId" }] : /* istanbul ignore next */ []);
12
+ this.includeCloseButton = input(true, {
13
+ ...ngDevMode ? { debugName: "includeCloseButton" } : /* istanbul ignore next */ {},
14
+ transform: booleanAttribute
15
+ });
16
+ this.closeButtonLabel = input("Close", ...ngDevMode ? [{ debugName: "closeButtonLabel" }] : /* istanbul ignore next */ []);
17
+ this.applicationTheme = input(void 0, ...ngDevMode ? [{ debugName: "applicationTheme" }] : /* istanbul ignore next */ []);
18
+ this.closed = output();
19
+ this.defaultAppTheme = inject("CANOPYUI_DEFAULT_APPLICATION_THEME", { optional: true });
20
+ this.theme = computed(() => this.applicationTheme() ?? this.defaultAppTheme ?? "dark", ...ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []);
21
+ }
22
+ close() {
23
+ this.closed.emit();
24
+ }
25
+ static {
26
+ this.ɵfac = i0.ɵɵngDeclareFactory({
27
+ minVersion: "12.0.0",
28
+ version: "22.2.4",
29
+ ngImport: i0,
30
+ type: PopupTipComponent,
31
+ deps: [],
32
+ target: i0.ɵɵFactoryTarget.Component
33
+ });
34
+ }
35
+ static {
36
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
37
+ minVersion: "17.0.0",
38
+ version: "22.2.4",
39
+ type: PopupTipComponent,
40
+ isStandalone: true,
41
+ selector: "ui-popup-tip",
42
+ inputs: {
43
+ message: {
44
+ classPropertyName: "message",
45
+ publicName: "message",
46
+ isSignal: true,
47
+ isRequired: false,
48
+ transformFunction: null
49
+ },
50
+ linkText: {
51
+ classPropertyName: "linkText",
52
+ publicName: "linkText",
53
+ isSignal: true,
54
+ isRequired: false,
55
+ transformFunction: null
56
+ },
57
+ linkUrl: {
58
+ classPropertyName: "linkUrl",
59
+ publicName: "linkUrl",
60
+ isSignal: true,
61
+ isRequired: false,
62
+ transformFunction: null
63
+ },
64
+ position: {
65
+ classPropertyName: "position",
66
+ publicName: "position",
67
+ isSignal: true,
68
+ isRequired: false,
69
+ transformFunction: null
70
+ },
71
+ closeButtonTestId: {
72
+ classPropertyName: "closeButtonTestId",
73
+ publicName: "closeButtonTestId",
74
+ isSignal: true,
75
+ isRequired: false,
76
+ transformFunction: null
77
+ },
78
+ includeCloseButton: {
79
+ classPropertyName: "includeCloseButton",
80
+ publicName: "includeCloseButton",
81
+ isSignal: true,
82
+ isRequired: false,
83
+ transformFunction: null
84
+ },
85
+ closeButtonLabel: {
86
+ classPropertyName: "closeButtonLabel",
87
+ publicName: "closeButtonLabel",
88
+ isSignal: true,
89
+ isRequired: false,
90
+ transformFunction: null
91
+ },
92
+ applicationTheme: {
93
+ classPropertyName: "applicationTheme",
94
+ publicName: "applicationTheme",
95
+ isSignal: true,
96
+ isRequired: false,
97
+ transformFunction: null
98
+ }
99
+ },
100
+ outputs: { closed: "closed" },
101
+ host: {
102
+ attributes: {
103
+ "role": "alert",
104
+ "aria-live": "assertive",
105
+ "tabindex": "-1"
106
+ },
107
+ listeners: { "keydown.escape": "close()" },
108
+ properties: {
109
+ "attr.position": "position()",
110
+ "attr.theme": "theme()"
111
+ }
112
+ },
113
+ ngImport: i0,
114
+ template: "<span class=\"ui-popup-tip__message\">\n <ng-content>{{ message() }}</ng-content>\n @if (linkText() && linkUrl()) {\n <!-- Explicit space: Angular strips the whitespace around a control-flow block. -->\n {{ ' ' }}<a class=\"ui-popup-tip__link\" [href]=\"linkUrl()\" target=\"_blank\" rel=\"noopener\">{{ linkText() }}</a>\n }\n</span>\n\n@if (includeCloseButton()) {\n <button\n type=\"button\"\n class=\"ui-popup-tip__close\"\n [attr.data-testid]=\"closeButtonTestId() ?? 'popup-tip-close'\"\n [attr.aria-label]=\"closeButtonLabel()\"\n (click)=\"close()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" name=\"Close-in-line\"></ui-icon>\n </button>\n}\n",
115
+ styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{position:relative;box-sizing:border-box;display:flex;align-items:flex-start;gap:8px;width:248px;max-width:100%;padding:8px;border:1px solid #ffffff;border-radius:4px;background-color:#242424;color:#fff;text-align:left;outline:none}:host([position=top]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;bottom:-5px;left:20px;transform:rotate(135deg)}:host([position=bottom]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;top:-5px;left:20px;transform:rotate(-45deg)}:host([position=left]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;right:-5px;top:20px;transform:rotate(45deg)}:host([position=right]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;left:-5px;top:20px;transform:rotate(-135deg)}:host([theme=light]){border-color:#242424;background-color:#fff;color:#242424}:host([theme=light]):after{border-color:#242424}.ui-popup-tip__message{font-size:12px;font-weight:400;line-height:16px}.ui-popup-tip__link{font:inherit;color:inherit;text-decoration:underline}.ui-popup-tip__close{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:none;color:inherit;cursor:pointer}\n"],
116
+ dependencies: [{
117
+ kind: "component",
118
+ type: IconComponent,
119
+ selector: "ui-icon",
120
+ inputs: [
121
+ "size",
122
+ "cssClass",
123
+ "name",
124
+ "color",
125
+ "filled",
126
+ "toggleIconStyle",
127
+ "applicationTheme",
128
+ "useFullIconName"
129
+ ]
130
+ }],
131
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
132
+ });
133
+ }
134
+ };
135
+ i0.ɵɵngDeclareClassMetadata({
136
+ minVersion: "12.0.0",
137
+ version: "22.2.4",
138
+ ngImport: i0,
139
+ type: PopupTipComponent,
140
+ decorators: [{
141
+ type: Component,
142
+ args: [{
143
+ selector: "ui-popup-tip",
144
+ changeDetection: ChangeDetectionStrategy.OnPush,
145
+ host: {
146
+ role: "alert",
147
+ "aria-live": "assertive",
148
+ tabindex: "-1",
149
+ "[attr.position]": "position()",
150
+ "[attr.theme]": "theme()",
151
+ "(keydown.escape)": "close()"
152
+ },
153
+ imports: [IconComponent],
154
+ template: "<span class=\"ui-popup-tip__message\">\n <ng-content>{{ message() }}</ng-content>\n @if (linkText() && linkUrl()) {\n <!-- Explicit space: Angular strips the whitespace around a control-flow block. -->\n {{ ' ' }}<a class=\"ui-popup-tip__link\" [href]=\"linkUrl()\" target=\"_blank\" rel=\"noopener\">{{ linkText() }}</a>\n }\n</span>\n\n@if (includeCloseButton()) {\n <button\n type=\"button\"\n class=\"ui-popup-tip__close\"\n [attr.data-testid]=\"closeButtonTestId() ?? 'popup-tip-close'\"\n [attr.aria-label]=\"closeButtonLabel()\"\n (click)=\"close()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" name=\"Close-in-line\"></ui-icon>\n </button>\n}\n",
155
+ styles: [".bg-teal-60b{background:#1c443c}.bg-teal-30b{background:#31766a}.bg-teal-default{background:#46a997}.bg-teal-30w{background:#7ec3b6}.bg-teal-60w{background:#b5ddd5}.bg-teal-secondary{background:#cbd6cb}.bg-teal-90w{background:#ecf6f5}.bg-petrol-60b{background:#102930}.bg-petrol-30b{background:#1b4754}.bg-petrol-default{background:#276678}.bg-petrol-30w{background:#6894a0}.bg-petrol-60w{background:#a9c2c9}.bg-petrol-secondary{background:#c8d7de}.bg-petrol-90w{background:#e9f0f1}.bg-error-60b{background:#513131}.bg-error-30b{background:#8e5655}.bg-error-60w{background:#e3c3c6}.bg-error-secondary{background:#f0dad9}.bg-error-default{background:#cb7b7a}.bg-warning-secondary{background:#f0d6bb}.bg-warning-default{background:#cca45f}.bg-black{background:#000}.bg-dark{background:#888}.bg-medium{background:#e0e0e0}.bg-grey{background:#ededed}.bg-light{background:#f6f6f6}.bg-white{background:#fff}.bg-box-shadow{background:#00000014}.bg-navigation-subtitle{background:#528593}.bgc-teal-60b{background-color:#1c443c}.bgc-teal-30b{background-color:#31766a}.bgc-teal-default{background-color:#46a997}.bgc-teal-30w{background-color:#7ec3b6}.bgc-teal-60w{background-color:#b5ddd5}.bgc-teal-secondary{background-color:#cbd6cb}.bgc-teal-90w{background-color:#ecf6f5}.bgc-petrol-60b{background-color:#102930}.bgc-petrol-30b{background-color:#1b4754}.bgc-petrol-default{background-color:#276678}.bgc-petrol-30w{background-color:#6894a0}.bgc-petrol-60w{background-color:#a9c2c9}.bgc-petrol-secondary{background-color:#c8d7de}.bgc-petrol-90w{background-color:#e9f0f1}.bgc-error-60b{background-color:#513131}.bgc-error-30b{background-color:#8e5655}.bgc-error-60w{background-color:#e3c3c6}.bgc-error-secondary{background-color:#f0dad9}.bgc-error-default{background-color:#cb7b7a}.bgc-warning-secondary{background-color:#f0d6bb}.bgc-warning-default{background-color:#cca45f}.bgc-black{background-color:#000}.bgc-dark{background-color:#888}.bgc-medium{background-color:#e0e0e0}.bgc-grey{background-color:#ededed}.bgc-light{background-color:#f6f6f6}.bgc-white{background-color:#fff}.bgc-box-shadow{background-color:#00000014}.bgc-navigation-subtitle{background-color:#528593}:host{position:relative;box-sizing:border-box;display:flex;align-items:flex-start;gap:8px;width:248px;max-width:100%;padding:8px;border:1px solid #ffffff;border-radius:4px;background-color:#242424;color:#fff;text-align:left;outline:none}:host([position=top]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;bottom:-5px;left:20px;transform:rotate(135deg)}:host([position=bottom]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;top:-5px;left:20px;transform:rotate(-45deg)}:host([position=left]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;right:-5px;top:20px;transform:rotate(45deg)}:host([position=right]):after{content:\"\";position:absolute;height:8px;width:8px;border-top:1px solid #ffffff;border-right:1px solid #ffffff;background:inherit;z-index:10;border-top-right-radius:0;left:-5px;top:20px;transform:rotate(-135deg)}:host([theme=light]){border-color:#242424;background-color:#fff;color:#242424}:host([theme=light]):after{border-color:#242424}.ui-popup-tip__message{font-size:12px;font-weight:400;line-height:16px}.ui-popup-tip__link{font:inherit;color:inherit;text-decoration:underline}.ui-popup-tip__close{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;padding:0;border:0;background:none;color:inherit;cursor:pointer}\n"]
156
+ }]
157
+ }],
158
+ propDecorators: {
159
+ message: [{
160
+ type: i0.Input,
161
+ args: [{
162
+ isSignal: true,
163
+ alias: "message",
164
+ required: false
165
+ }]
166
+ }],
167
+ linkText: [{
168
+ type: i0.Input,
169
+ args: [{
170
+ isSignal: true,
171
+ alias: "linkText",
172
+ required: false
173
+ }]
174
+ }],
175
+ linkUrl: [{
176
+ type: i0.Input,
177
+ args: [{
178
+ isSignal: true,
179
+ alias: "linkUrl",
180
+ required: false
181
+ }]
182
+ }],
183
+ position: [{
184
+ type: i0.Input,
185
+ args: [{
186
+ isSignal: true,
187
+ alias: "position",
188
+ required: false
189
+ }]
190
+ }],
191
+ closeButtonTestId: [{
192
+ type: i0.Input,
193
+ args: [{
194
+ isSignal: true,
195
+ alias: "closeButtonTestId",
196
+ required: false
197
+ }]
198
+ }],
199
+ includeCloseButton: [{
200
+ type: i0.Input,
201
+ args: [{
202
+ isSignal: true,
203
+ alias: "includeCloseButton",
204
+ required: false
205
+ }]
206
+ }],
207
+ closeButtonLabel: [{
208
+ type: i0.Input,
209
+ args: [{
210
+ isSignal: true,
211
+ alias: "closeButtonLabel",
212
+ required: false
213
+ }]
214
+ }],
215
+ applicationTheme: [{
216
+ type: i0.Input,
217
+ args: [{
218
+ isSignal: true,
219
+ alias: "applicationTheme",
220
+ required: false
221
+ }]
222
+ }],
223
+ closed: [{
224
+ type: i0.Output,
225
+ args: ["closed"]
226
+ }]
227
+ }
228
+ });
229
+ var PopupTipComponentModule = class PopupTipComponentModule {
230
+ static {
231
+ this.ɵfac = i0.ɵɵngDeclareFactory({
232
+ minVersion: "12.0.0",
233
+ version: "22.2.4",
234
+ ngImport: i0,
235
+ type: PopupTipComponentModule,
236
+ deps: [],
237
+ target: i0.ɵɵFactoryTarget.NgModule
238
+ });
239
+ }
240
+ static {
241
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
242
+ minVersion: "14.0.0",
243
+ version: "22.2.4",
244
+ ngImport: i0,
245
+ type: PopupTipComponentModule,
246
+ imports: [CommonModule, PopupTipComponent],
247
+ exports: [PopupTipComponent]
248
+ });
249
+ }
250
+ static {
251
+ this.ɵinj = i0.ɵɵngDeclareInjector({
252
+ minVersion: "12.0.0",
253
+ version: "22.2.4",
254
+ ngImport: i0,
255
+ type: PopupTipComponentModule,
256
+ imports: [CommonModule, PopupTipComponent]
257
+ });
258
+ }
259
+ };
260
+ i0.ɵɵngDeclareClassMetadata({
261
+ minVersion: "12.0.0",
262
+ version: "22.2.4",
263
+ ngImport: i0,
264
+ type: PopupTipComponentModule,
265
+ decorators: [{
266
+ type: NgModule,
267
+ args: [{
268
+ imports: [CommonModule, PopupTipComponent],
269
+ exports: [PopupTipComponent]
270
+ }]
271
+ }]
272
+ });
76
273
  export { PopupTipComponent, PopupTipComponentModule };
77
- //# sourceMappingURL=testgorilla-tgo-ui-components-popup-tip.mjs.map
274
+
275
+ //# sourceMappingURL=testgorilla-tgo-ui-components-popup-tip.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-popup-tip.mjs","sources":["../../../components/popup-tip/popup-tip.component.ts","../../../components/popup-tip/popup-tip.component.html","../../../components/popup-tip/popup-tip.component.module.ts","../../../components/popup-tip/testgorilla-tgo-ui-components-popup-tip.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\n\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponent } from '@testgorilla/tgo-ui/components/icon';\n\nimport { PopupTipPosition } from './popup-tip.model';\n\n/**\n * Tooltip that stays open until it is dismissed, with an optional inline link and a close button.\n * Unlike `ui-tooltip` it is not hover driven: the application opens it in response to a system state.\n */\n@Component({\n selector: 'ui-popup-tip',\n templateUrl: './popup-tip.component.html',\n styleUrls: ['./popup-tip.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'alert',\n 'aria-live': 'assertive',\n // Focusable programmatically, so Escape can dismiss the tip even without the close button.\n tabindex: '-1',\n '[attr.position]': 'position()',\n '[attr.theme]': 'theme()',\n '(keydown.escape)': 'close()',\n },\n imports: [IconComponent],\n})\nexport class PopupTipComponent {\n readonly message = input('');\n\n /** Optional link rendered inline after the message. Needs `linkUrl` to render. */\n readonly linkText = input('');\n\n readonly linkUrl = input('');\n\n /** Side of the anchor the tip sits on, which decides where its arrow is drawn. Default: 'top'. */\n readonly position = input<PopupTipPosition>('top');\n\n readonly closeButtonTestId = input<string | null>(null);\n\n readonly includeCloseButton = input(true, { transform: booleanAttribute });\n\n /**\n * Accessible name of the close button. Pass a localized string: the English default is only a\n * last-resort fallback so the button is never nameless. Default: 'Close'.\n */\n readonly closeButtonLabel = input('Close');\n\n /**\n * Defines the application theme. Defaults to dark because the design sheet only specifies the\n * dark tip; the light variant exists for reuse on light surfaces.\n */\n readonly applicationTheme = input<ApplicationTheme | undefined>(undefined);\n\n /**\n * Emits when the user dismisses the tip, with the close button or with Escape. Escape only fires\n * while focus is inside the tip: call `focus()` on it when opening, especially without the button.\n */\n readonly closed = output<void>();\n\n private readonly defaultAppTheme = inject<ApplicationTheme>('CANOPYUI_DEFAULT_APPLICATION_THEME' as never, {\n optional: true,\n });\n\n protected readonly theme = computed<ApplicationTheme>(\n () => this.applicationTheme() ?? this.defaultAppTheme ?? 'dark'\n );\n\n close(): void {\n this.closed.emit();\n }\n}\n","<span class=\"ui-popup-tip__message\">\n <ng-content>{{ message() }}</ng-content>\n @if (linkText() && linkUrl()) {\n <!-- Explicit space: Angular strips the whitespace around a control-flow block. -->\n {{ ' ' }}<a class=\"ui-popup-tip__link\" [href]=\"linkUrl()\" target=\"_blank\" rel=\"noopener\">{{ linkText() }}</a>\n }\n</span>\n\n@if (includeCloseButton()) {\n <button\n type=\"button\"\n class=\"ui-popup-tip__close\"\n [attr.data-testid]=\"closeButtonTestId() ?? 'popup-tip-close'\"\n [attr.aria-label]=\"closeButtonLabel()\"\n (click)=\"close()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" name=\"Close-in-line\"></ui-icon>\n </button>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { PopupTipComponent } from './popup-tip.component';\n\n@NgModule({\n imports: [CommonModule, PopupTipComponent],\n exports: [PopupTipComponent],\n})\nexport class PopupTipComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAOA;;;AAGG;MAiBU,iBAAiB,CAAA;AAhB9B,IAAA,WAAA,GAAA;AAiBW,QAAA,IAAA,CAAA,OAAO,GAAG,KAAK,CAAC,EAAE,8EAAC;;AAGnB,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAC,EAAE,+EAAC;AAEpB,QAAA,IAAA,CAAA,OAAO,GAAG,K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,CAAA,CAAA;gHAEhB,uBAAuB,EAAA,OAAA,EAAA,CAHxB,YAAY,EAAE,iBAAiB,CAAA,EAAA,CAAA,CAAA;;4FAG9B,uBAAuB,EAAA,UAAA,EAAA,CAAA;kBAJnC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;oBAC1C,OAAO,EAAE,CAAC,iBAAiB,CAAC;AAC7B,iBAAA;;;ACRD;;AAEG;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-popup-tip.mjs","names":[],"sources":["../../../components/popup-tip/popup-tip.component.ts","../../../components/popup-tip/popup-tip.component.html","../../../components/popup-tip/popup-tip.component.module.ts"],"sourcesContent":["import { booleanAttribute, ChangeDetectionStrategy, Component, computed, inject, input, output } from '@angular/core';\n\nimport { ApplicationTheme } from '@testgorilla/tgo-ui/components/core';\nimport { IconComponent } from '@testgorilla/tgo-ui/components/icon';\n\nimport { PopupTipPosition } from './popup-tip.model';\n\n/**\n * Tooltip that stays open until it is dismissed, with an optional inline link and a close button.\n * Unlike `ui-tooltip` it is not hover driven: the application opens it in response to a system state.\n */\n@Component({\n selector: 'ui-popup-tip',\n templateUrl: './popup-tip.component.html',\n styleUrls: ['./popup-tip.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n role: 'alert',\n 'aria-live': 'assertive',\n // Focusable programmatically, so Escape can dismiss the tip even without the close button.\n tabindex: '-1',\n '[attr.position]': 'position()',\n '[attr.theme]': 'theme()',\n '(keydown.escape)': 'close()',\n },\n imports: [IconComponent],\n})\nexport class PopupTipComponent {\n readonly message = input('');\n\n /** Optional link rendered inline after the message. Needs `linkUrl` to render. */\n readonly linkText = input('');\n\n readonly linkUrl = input('');\n\n /** Side of the anchor the tip sits on, which decides where its arrow is drawn. Default: 'top'. */\n readonly position = input<PopupTipPosition>('top');\n\n readonly closeButtonTestId = input<string | null>(null);\n\n readonly includeCloseButton = input(true, { transform: booleanAttribute });\n\n /**\n * Accessible name of the close button. Pass a localized string: the English default is only a\n * last-resort fallback so the button is never nameless. Default: 'Close'.\n */\n readonly closeButtonLabel = input('Close');\n\n /**\n * Defines the application theme. Defaults to dark because the design sheet only specifies the\n * dark tip; the light variant exists for reuse on light surfaces.\n */\n readonly applicationTheme = input<ApplicationTheme | undefined>(undefined);\n\n /**\n * Emits when the user dismisses the tip, with the close button or with Escape. Escape only fires\n * while focus is inside the tip: call `focus()` on it when opening, especially without the button.\n */\n readonly closed = output<void>();\n\n private readonly defaultAppTheme = inject<ApplicationTheme>('CANOPYUI_DEFAULT_APPLICATION_THEME' as never, {\n optional: true,\n });\n\n protected readonly theme = computed<ApplicationTheme>(\n () => this.applicationTheme() ?? this.defaultAppTheme ?? 'dark'\n );\n\n close(): void {\n this.closed.emit();\n }\n}\n","<span class=\"ui-popup-tip__message\">\n <ng-content>{{ message() }}</ng-content>\n @if (linkText() && linkUrl()) {\n <!-- Explicit space: Angular strips the whitespace around a control-flow block. -->\n {{ ' ' }}<a class=\"ui-popup-tip__link\" [href]=\"linkUrl()\" target=\"_blank\" rel=\"noopener\">{{ linkText() }}</a>\n }\n</span>\n\n@if (includeCloseButton()) {\n <button\n type=\"button\"\n class=\"ui-popup-tip__close\"\n [attr.data-testid]=\"closeButtonTestId() ?? 'popup-tip-close'\"\n [attr.aria-label]=\"closeButtonLabel()\"\n (click)=\"close()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" name=\"Close-in-line\"></ui-icon>\n </button>\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { PopupTipComponent } from './popup-tip.component';\n\n@NgModule({\n imports: [CommonModule, PopupTipComponent],\n exports: [PopupTipComponent],\n})\nexport class PopupTipComponentModule {}\n"],"mappings":";;;;AA2BA,IAAa,oBAAb,MAAa,kBAAiB;CAhB9B,cAAA;EAiBW,KAAA,UAAU,MAAM,IAAG,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA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