@testgorilla/tgo-ui 11.22.2 → 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 (227) 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 -1789
  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/assets/icons/rebrand/Sequences-filled.svg +3 -0
  152. package/projects/tgo-canopy-ui/assets/icons/rebrand/Sequences-in-line.svg +3 -0
  153. package/projects/tgo-canopy-ui/theme/_palette.scss +23 -18
  154. package/types/testgorilla-tgo-ui-components-accordion.d.ts +214 -158
  155. package/types/testgorilla-tgo-ui-components-ai-audio-circle.d.ts +93 -69
  156. package/types/testgorilla-tgo-ui-components-ai-caveat.d.ts +37 -34
  157. package/types/testgorilla-tgo-ui-components-ai-feedback.d.ts +126 -86
  158. package/types/testgorilla-tgo-ui-components-alert-banner.d.ts +260 -185
  159. package/types/testgorilla-tgo-ui-components-audio-waveform.d.ts +96 -67
  160. package/types/testgorilla-tgo-ui-components-autocomplete-v2.d.ts +455 -256
  161. package/types/testgorilla-tgo-ui-components-autocomplete.d.ts +545 -390
  162. package/types/testgorilla-tgo-ui-components-avatar.d.ts +128 -102
  163. package/types/testgorilla-tgo-ui-components-badge.d.ts +191 -139
  164. package/types/testgorilla-tgo-ui-components-breadcrumb.d.ts +100 -62
  165. package/types/testgorilla-tgo-ui-components-button.d.ts +479 -340
  166. package/types/testgorilla-tgo-ui-components-card.d.ts +153 -114
  167. package/types/testgorilla-tgo-ui-components-checkbox.d.ts +299 -223
  168. package/types/testgorilla-tgo-ui-components-checklist.d.ts +149 -97
  169. package/types/testgorilla-tgo-ui-components-core.d.ts +307 -295
  170. package/types/testgorilla-tgo-ui-components-datepicker.d.ts +404 -299
  171. package/types/testgorilla-tgo-ui-components-device-control.d.ts +151 -81
  172. package/types/testgorilla-tgo-ui-components-dialog.d.ts +442 -329
  173. package/types/testgorilla-tgo-ui-components-divider.d.ts +64 -51
  174. package/types/testgorilla-tgo-ui-components-donut-chart.d.ts +41 -37
  175. package/types/testgorilla-tgo-ui-components-dropdown.d.ts +335 -241
  176. package/types/testgorilla-tgo-ui-components-elevation-shadow.d.ts +48 -43
  177. package/types/testgorilla-tgo-ui-components-empty-state.d.ts +317 -215
  178. package/types/testgorilla-tgo-ui-components-field.d.ts +559 -388
  179. package/types/testgorilla-tgo-ui-components-file-upload.d.ts +230 -168
  180. package/types/testgorilla-tgo-ui-components-filter-button.d.ts +263 -206
  181. package/types/testgorilla-tgo-ui-components-gaussian-chart.d.ts +107 -94
  182. package/types/testgorilla-tgo-ui-components-icon-label.d.ts +84 -61
  183. package/types/testgorilla-tgo-ui-components-icon.d.ts +137 -110
  184. package/types/testgorilla-tgo-ui-components-infinite-scroll-table.d.ts +429 -303
  185. package/types/testgorilla-tgo-ui-components-inline-field.d.ts +338 -254
  186. package/types/testgorilla-tgo-ui-components-logo.d.ts +119 -101
  187. package/types/testgorilla-tgo-ui-components-media-card.d.ts +51 -35
  188. package/types/testgorilla-tgo-ui-components-media-dialog.d.ts +40 -45
  189. package/types/testgorilla-tgo-ui-components-multi-input.d.ts +283 -194
  190. package/types/testgorilla-tgo-ui-components-navbar.d.ts +326 -208
  191. package/types/testgorilla-tgo-ui-components-overflow-menu.d.ts +276 -204
  192. package/types/testgorilla-tgo-ui-components-page-header.d.ts +67 -50
  193. package/types/testgorilla-tgo-ui-components-paginator.d.ts +103 -70
  194. package/types/testgorilla-tgo-ui-components-password-criteria.d.ts +67 -58
  195. package/types/testgorilla-tgo-ui-components-password-strength.d.ts +66 -57
  196. package/types/testgorilla-tgo-ui-components-phone-input.d.ts +217 -175
  197. package/types/testgorilla-tgo-ui-components-popover.d.ts +94 -53
  198. package/types/testgorilla-tgo-ui-components-popup-tip.d.ts +81 -44
  199. package/types/testgorilla-tgo-ui-components-progress-bar.d.ts +115 -84
  200. package/types/testgorilla-tgo-ui-components-prompt.d.ts +315 -219
  201. package/types/testgorilla-tgo-ui-components-radial-progress.d.ts +146 -107
  202. package/types/testgorilla-tgo-ui-components-radio-button.d.ts +296 -219
  203. package/types/testgorilla-tgo-ui-components-rating.d.ts +134 -95
  204. package/types/testgorilla-tgo-ui-components-scale-table.d.ts +67 -47
  205. package/types/testgorilla-tgo-ui-components-scale.d.ts +91 -66
  206. package/types/testgorilla-tgo-ui-components-segmented-bar.d.ts +118 -89
  207. package/types/testgorilla-tgo-ui-components-segmented-button.d.ts +107 -80
  208. package/types/testgorilla-tgo-ui-components-segmented-toggle.d.ts +138 -105
  209. package/types/testgorilla-tgo-ui-components-selectable-card.d.ts +90 -56
  210. package/types/testgorilla-tgo-ui-components-side-navigation.d.ts +183 -107
  211. package/types/testgorilla-tgo-ui-components-side-panel.d.ts +156 -145
  212. package/types/testgorilla-tgo-ui-components-side-sheet.d.ts +98 -89
  213. package/types/testgorilla-tgo-ui-components-skeleton.d.ts +50 -33
  214. package/types/testgorilla-tgo-ui-components-slider.d.ts +278 -198
  215. package/types/testgorilla-tgo-ui-components-snackbar.d.ts +211 -159
  216. package/types/testgorilla-tgo-ui-components-spider-chart.d.ts +140 -121
  217. package/types/testgorilla-tgo-ui-components-spinner.d.ts +93 -72
  218. package/types/testgorilla-tgo-ui-components-stepper.d.ts +480 -338
  219. package/types/testgorilla-tgo-ui-components-table.d.ts +280 -233
  220. package/types/testgorilla-tgo-ui-components-tabs.d.ts +282 -183
  221. package/types/testgorilla-tgo-ui-components-tag.d.ts +266 -193
  222. package/types/testgorilla-tgo-ui-components-toggle.d.ts +180 -132
  223. package/types/testgorilla-tgo-ui-components-tooltip.d.ts +142 -105
  224. package/types/testgorilla-tgo-ui-components-universal-skills.d.ts +165 -144
  225. package/types/testgorilla-tgo-ui-components-validation-error.d.ts +70 -51
  226. package/types/testgorilla-tgo-ui-components-write-with-ai.d.ts +210 -133
  227. package/types/testgorilla-tgo-ui.d.ts +52 -45
@@ -1,117 +1,474 @@
1
- import * as i0 from '@angular/core';
2
- import { input, booleanAttribute, computed, output, viewChild, inject, ChangeDetectionStrategy, ViewEncapsulation, Component, NgModule } from '@angular/core';
3
- import { IconComponent } from '@testgorilla/tgo-ui/components/icon';
4
- import { OverflowMenuComponent } from '@testgorilla/tgo-ui/components/overflow-menu';
5
- import { TooltipPositionType, TooltipComponent } from '@testgorilla/tgo-ui/components/tooltip';
6
- import { CommonModule } from '@angular/common';
7
-
8
- /**
9
- * Media device control: an on/off button paired with a device dropdown, generic across microphones,
10
- * speakers and similar. The dropdown is `ui-overflow-menu`, so it behaves like every other menu.
11
- */
12
- class DeviceControlComponent {
13
- constructor() {
14
- /**
15
- * Shape of the control: `toggle` pairs an on/off button with the dropdown chevron; `menu` is a
16
- * single button that opens the dropdown. Default: 'toggle'.
17
- */
18
- this.variant = input('toggle', ...(ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []));
19
- this.iconName = input('', ...(ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []));
20
- /** Icon shown while the device is off. Only used by the toggle variant. */
21
- this.offIconName = input('', ...(ngDevMode ? [{ debugName: "offIconName" }] : /* istanbul ignore next */ []));
22
- this.isOn = input(true, { ...(ngDevMode ? { debugName: "isOn" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
23
- /** Plays the icon's activity animation, for example while a test sound runs. */
24
- this.isActive = input(false, { ...(ngDevMode ? { debugName: "isActive" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
25
- this.options = input([], ...(ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []));
26
- this.selectedValue = input('', ...(ngDevMode ? [{ debugName: "selectedValue" }] : /* istanbul ignore next */ []));
27
- /** Tooltip and accessible name of the main button while the device is on. Rendered by the toggle variant. */
28
- this.onTooltip = input.required(...(ngDevMode ? [{ debugName: "onTooltip" }] : /* istanbul ignore next */ []));
29
- /** Tooltip and accessible name of the main button while the device is off. Rendered by the toggle variant. */
30
- this.offTooltip = input.required(...(ngDevMode ? [{ debugName: "offTooltip" }] : /* istanbul ignore next */ []));
31
- /** Tooltip and accessible name of the button that opens the dropdown, which every variant renders. */
32
- this.menuTooltip = input.required(...(ngDevMode ? [{ debugName: "menuTooltip" }] : /* istanbul ignore next */ []));
33
- /** Shows the error badge, for example when the device cannot be opened. */
34
- this.hasError = input(false, { ...(ngDevMode ? { debugName: "hasError" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
35
- this.errorLabel = input('', ...(ngDevMode ? [{ debugName: "errorLabel" }] : /* istanbul ignore next */ []));
36
- /**
37
- * Defines the application theme. Defaults to dark, the primary use case for this control; the
38
- * light variant is available for reuse on light surfaces.
39
- */
40
- this.applicationTheme = input(undefined, ...(ngDevMode ? [{ debugName: "applicationTheme" }] : /* istanbul ignore next */ []));
41
- this.testId = input(null, ...(ngDevMode ? [{ debugName: "testId" }] : /* istanbul ignore next */ []));
42
- this.mainTestId = computed(() => (this.testId() ? `${this.testId()}-toggle` : 'device-control-main'), ...(ngDevMode ? [{ debugName: "mainTestId" }] : /* istanbul ignore next */ []));
43
- this.menuTestId = computed(() => (this.testId() ? `${this.testId()}-menu` : null), ...(ngDevMode ? [{ debugName: "menuTestId" }] : /* istanbul ignore next */ []));
44
- /** Emits when the main button is used to switch the device on or off, with the new state. */
45
- this.toggled = output();
46
- /**
47
- * Emits the value of the entry the user picked. An entry with an empty value is a placeholder,
48
- * not a selectable option: picking it closes the dropdown without emitting.
49
- */
50
- this.optionSelected = output();
51
- /** Emits when the dropdown opens, so the consumer can refresh the entries. */
52
- this.menuOpened = output();
53
- this.menuClosed = output();
54
- this.overflowMenu = viewChild(OverflowMenuComponent, ...(ngDevMode ? [{ debugName: "overflowMenu" }] : /* istanbul ignore next */ []));
55
- this.defaultAppTheme = inject('CANOPYUI_DEFAULT_APPLICATION_THEME', {
56
- optional: true,
57
- });
58
- this.theme = computed(() => this.applicationTheme() ?? this.defaultAppTheme ?? 'dark', ...(ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []));
59
- /** Open state of the dropdown, derived from the overflow menu so there is no mirror to drift. */
60
- this.isMenuOpen = computed(() => this.overflowMenu()?.isMenuOpened() ?? false, ...(ngDevMode ? [{ debugName: "isMenuOpen" }] : /* istanbul ignore next */ []));
61
- /** Tooltips sit above the control, which is anchored to the bottom of a call surface. */
62
- this.tooltipPosition = TooltipPositionType.TOP;
63
- /** The dropdown opens upwards, over the call surface the control sits at the bottom of. */
64
- this.menuConfig = {
65
- xPosition: 'after',
66
- yPosition: 'above',
67
- overlapTrigger: false,
68
- panelClass: 'ui-device-control-panel',
69
- };
70
- this.menuButtons = computed(() => this.options().map(option => ({
71
- label: option.label,
72
- value: option.value,
73
- isSelected: option.value === this.selectedValue(),
74
- })), ...(ngDevMode ? [{ debugName: "menuButtons" }] : /* istanbul ignore next */ []));
75
- this.mainTooltip = computed(() => (this.isOn() ? this.onTooltip() : this.offTooltip()), ...(ngDevMode ? [{ debugName: "mainTooltip" }] : /* istanbul ignore next */ []));
76
- this.currentIconName = computed(() => (this.isOn() ? this.iconName() : this.offIconName()), ...(ngDevMode ? [{ debugName: "currentIconName" }] : /* istanbul ignore next */ []));
77
- }
78
- toggleDevice() {
79
- this.closeMenu();
80
- this.toggled.emit(!this.isOn());
81
- }
82
- closeMenu() {
83
- this.overflowMenu()?.closeMenu();
84
- }
85
- selectOption(value) {
86
- this.optionSelected.emit(value);
87
- }
88
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DeviceControlComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
89
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "21.2.25", type: DeviceControlComponent, isStandalone: true, selector: "ui-device-control", inputs: { variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, iconName: { classPropertyName: "iconName", publicName: "iconName", isSignal: true, isRequired: false, transformFunction: null }, offIconName: { classPropertyName: "offIconName", publicName: "offIconName", isSignal: true, isRequired: false, transformFunction: null }, isOn: { classPropertyName: "isOn", publicName: "isOn", isSignal: true, isRequired: false, transformFunction: null }, isActive: { classPropertyName: "isActive", publicName: "isActive", isSignal: true, isRequired: false, transformFunction: null }, options: { classPropertyName: "options", publicName: "options", isSignal: true, isRequired: false, transformFunction: null }, selectedValue: { classPropertyName: "selectedValue", publicName: "selectedValue", isSignal: true, isRequired: false, transformFunction: null }, onTooltip: { classPropertyName: "onTooltip", publicName: "onTooltip", isSignal: true, isRequired: true, transformFunction: null }, offTooltip: { classPropertyName: "offTooltip", publicName: "offTooltip", isSignal: true, isRequired: true, transformFunction: null }, menuTooltip: { classPropertyName: "menuTooltip", publicName: "menuTooltip", isSignal: true, isRequired: true, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, errorLabel: { classPropertyName: "errorLabel", publicName: "errorLabel", isSignal: true, isRequired: false, transformFunction: null }, applicationTheme: { classPropertyName: "applicationTheme", publicName: "applicationTheme", isSignal: true, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { toggled: "toggled", optionSelected: "optionSelected", menuOpened: "menuOpened", menuClosed: "menuClosed" }, host: { properties: { "attr.theme": "theme()" }, classAttribute: "ui-device-control" }, viewQueries: [{ propertyName: "overflowMenu", first: true, predicate: OverflowMenuComponent, descendants: true, isSignal: true }], ngImport: i0, template: "@if (variant() === 'toggle') {\n <ui-tooltip [position]=\"tooltipPosition\" [message]=\"mainTooltip()\" [applicationTheme]=\"theme()\">\n <button\n type=\"button\"\n class=\"ui-device-control__main\"\n [attr.data-testid]=\"mainTestId()\"\n [class.ui-device-control__main--off]=\"!isOn()\"\n [class.ui-device-control__main--active]=\"isActive()\"\n [attr.aria-label]=\"mainTooltip()\"\n (click)=\"toggleDevice()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" [name]=\"currentIconName()\"></ui-icon>\n </button>\n </ui-tooltip>\n}\n\n<ui-tooltip [position]=\"tooltipPosition\" [message]=\"menuTooltip()\" [applicationTheme]=\"theme()\">\n <ui-overflow-menu\n data-testid=\"device-control-menu-toggle\"\n [testId]=\"menuTestId()\"\n selectionMode=\"single\"\n [buttons]=\"menuButtons()\"\n [isDynamicMenu]=\"true\"\n [menuConfig]=\"menuConfig\"\n [contentTemplateRef]=\"opener\"\n [applicationTheme]=\"theme()\"\n [ariaLabel]=\"menuTooltip()\"\n (selectItem)=\"selectOption($event)\"\n (menuOpened)=\"menuOpened.emit()\"\n (menuClosed)=\"menuClosed.emit()\"\n >\n <div menu-content class=\"ui-device-control__menu-footer\">\n <ng-content select=\"[uiDeviceControlMenuFooter]\"></ng-content>\n </div>\n </ui-overflow-menu>\n</ui-tooltip>\n\n<ng-template #opener>\n @if (variant() === 'menu') {\n <span\n class=\"ui-device-control__opener-icon\"\n [class.ui-device-control__opener-icon--active]=\"isActive()\"\n data-testid=\"device-control-opener-icon\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" [name]=\"iconName()\"></ui-icon>\n </span>\n }\n <span class=\"ui-device-control__opener-chevron\">\n <ui-icon\n size=\"16\"\n color=\"currentColor\"\n [name]=\"isMenuOpen() ? 'Arrow-chevron-up-in-line' : 'Arrow-chevron-down-in-line'\"\n ></ui-icon>\n </span>\n</ng-template>\n\n@if (hasError()) {\n <span class=\"ui-device-control__error\" role=\"img\" [attr.aria-label]=\"errorLabel()\" data-testid=\"device-control-error\">\n <ui-icon size=\"16\" color=\"currentColor\" name=\"Error-filled\"></ui-icon>\n </span>\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}.ui-device-control{--ui-device-control-surface: #242424;--ui-device-control-border: #ffffff;--ui-device-control-text: #ffffff;--ui-device-control-hover: #666666;--ui-device-control-pressed: #666666;--ui-device-control-focus-inner: #242424;--ui-device-control-focus-outer: #ffffff;position:relative;display:inline-flex;align-items:center;gap:4px;padding-right:8px;border:1px solid var(--ui-device-control-border);border-radius:999px;background-color:var(--ui-device-control-surface);color:var(--ui-device-control-text)}.ui-device-control ui-tooltip,.ui-device-control ui-overflow-menu,.ui-device-control .overflow-menu-container{display:flex}.ui-device-control .overflow-menu-opener,.ui-device-control .overflow-menu-opener.content-template{display:flex;align-items:center;justify-content:center;gap:4px;width:auto;height:40px;padding:0;border-radius:999px;color:inherit}.ui-device-control .overflow-menu-opener:hover,.ui-device-control .overflow-menu-opener.content-template:hover{background-color:var(--ui-device-control-hover)}.ui-device-control .overflow-menu-opener:active,.ui-device-control .overflow-menu-opener.content-template:active{background-color:var(--ui-device-control-pressed)}.ui-device-control .overflow-menu-opener:focus-visible,.ui-device-control .overflow-menu-opener.content-template:focus-visible{outline:none;animation:none;box-shadow:0 0 0 2px var(--ui-device-control-focus-inner),0 0 0 6px var(--ui-device-control-focus-outer)}.ui-device-control__main{display:flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:1px solid var(--ui-device-control-border);border-radius:999px;background:none;color:inherit;cursor:pointer}.ui-device-control__main:hover{background-color:var(--ui-device-control-hover)}.ui-device-control__main:active{background-color:var(--ui-device-control-pressed)}.ui-device-control__main:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-device-control-focus-inner),0 0 0 6px var(--ui-device-control-focus-outer)}.ui-device-control__main--off{border-color:transparent;background-color:#e02800;color:#fff}.ui-device-control__main--off:hover{background-color:#ff3003}.ui-device-control__main--off:active{background-color:#ff6e4f}.ui-device-control__main--active ui-icon{animation:ui-device-control-pulse .6s ease-in-out infinite}.ui-device-control__opener-icon{display:flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:1px solid var(--ui-device-control-border);border-radius:999px}.ui-device-control__opener-icon--active ui-icon{animation:ui-device-control-pulse .6s ease-in-out infinite}.ui-device-control__opener-chevron{display:flex;align-items:center;justify-content:center;width:24px;height:40px}.ui-device-control__error{position:absolute;top:-4px;right:-4px;display:flex;width:16px;height:16px;color:#e02800;pointer-events:none}.ui-device-control[theme=light]{--ui-device-control-surface: #ffffff;--ui-device-control-border: #242424;--ui-device-control-text: #242424;--ui-device-control-hover: #e9e9e9;--ui-device-control-pressed: #d3d3d3;--ui-device-control-focus-inner: #ffffff;--ui-device-control-focus-outer: #242424}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel{width:247px;max-width:calc(100vw - 32px);border-radius:10px;background-color:#fff;color:#242424;box-shadow:0 4px 16px #24242414}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-content{padding:0}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item{min-height:48px;height:48px;padding:0 16px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:hover,.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item[aria-checked=true]{background-color:#f4f4f4}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:active{background-color:#e9e9e9}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:focus-visible{outline:2px solid #0165fc;outline-offset:-2px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item-text{display:flex;align-items:center;gap:16px;width:100%;overflow:hidden;color:#242424;font-family:inherit;font-size:14px;line-height:20px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item-text .label{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .overflow-menu-selected-check{flex:0 0 16px;display:flex}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]{display:flex;align-items:center;gap:16px;width:100%;height:48px;padding:0 16px;border:0;background:none;color:inherit;font-size:14px;line-height:20px;text-align:left;cursor:pointer}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:hover{background-color:#f4f4f4}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:active{background-color:#e9e9e9}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:focus-visible{outline:2px solid #0165fc;outline-offset:-2px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem] span{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@keyframes ui-device-control-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.25)}}@media(prefers-reduced-motion:reduce){.ui-device-control__main--active ui-icon,.ui-device-control__opener-icon--active ui-icon{animation:none}}\n"], dependencies: [{ kind: "component", type: IconComponent, selector: "ui-icon", inputs: ["size", "cssClass", "name", "color", "filled", "toggleIconStyle", "applicationTheme", "useFullIconName"] }, { kind: "component", type: OverflowMenuComponent, selector: "ui-overflow-menu", inputs: ["buttons", "iconTrigger", "menuLabel", "applicationTheme", "ariaLabel", "testId", "ariaRequired", "describedby", "contentTemplateRef", "buttonVariant", "buttonSize", "menuConfig", "selectionMode", "menuAnchor", "shouldMatchAnchorWidth", "isDynamicMenu", "withRemovableOption"], outputs: ["selectItem", "menuOpened", "menuClosed"] }, { kind: "component", type: TooltipComponent, selector: "ui-tooltip", inputs: ["position", "disabled", "message", "applicationTheme", "labelForDefinition", "definitionTooltipSize", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
90
- }
91
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DeviceControlComponent, decorators: [{
92
- type: Component,
93
- args: [{ selector: 'ui-device-control', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
94
- class: 'ui-device-control',
95
- '[attr.theme]': 'theme()',
96
- }, imports: [IconComponent, OverflowMenuComponent, TooltipComponent], template: "@if (variant() === 'toggle') {\n <ui-tooltip [position]=\"tooltipPosition\" [message]=\"mainTooltip()\" [applicationTheme]=\"theme()\">\n <button\n type=\"button\"\n class=\"ui-device-control__main\"\n [attr.data-testid]=\"mainTestId()\"\n [class.ui-device-control__main--off]=\"!isOn()\"\n [class.ui-device-control__main--active]=\"isActive()\"\n [attr.aria-label]=\"mainTooltip()\"\n (click)=\"toggleDevice()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" [name]=\"currentIconName()\"></ui-icon>\n </button>\n </ui-tooltip>\n}\n\n<ui-tooltip [position]=\"tooltipPosition\" [message]=\"menuTooltip()\" [applicationTheme]=\"theme()\">\n <ui-overflow-menu\n data-testid=\"device-control-menu-toggle\"\n [testId]=\"menuTestId()\"\n selectionMode=\"single\"\n [buttons]=\"menuButtons()\"\n [isDynamicMenu]=\"true\"\n [menuConfig]=\"menuConfig\"\n [contentTemplateRef]=\"opener\"\n [applicationTheme]=\"theme()\"\n [ariaLabel]=\"menuTooltip()\"\n (selectItem)=\"selectOption($event)\"\n (menuOpened)=\"menuOpened.emit()\"\n (menuClosed)=\"menuClosed.emit()\"\n >\n <div menu-content class=\"ui-device-control__menu-footer\">\n <ng-content select=\"[uiDeviceControlMenuFooter]\"></ng-content>\n </div>\n </ui-overflow-menu>\n</ui-tooltip>\n\n<ng-template #opener>\n @if (variant() === 'menu') {\n <span\n class=\"ui-device-control__opener-icon\"\n [class.ui-device-control__opener-icon--active]=\"isActive()\"\n data-testid=\"device-control-opener-icon\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" [name]=\"iconName()\"></ui-icon>\n </span>\n }\n <span class=\"ui-device-control__opener-chevron\">\n <ui-icon\n size=\"16\"\n color=\"currentColor\"\n [name]=\"isMenuOpen() ? 'Arrow-chevron-up-in-line' : 'Arrow-chevron-down-in-line'\"\n ></ui-icon>\n </span>\n</ng-template>\n\n@if (hasError()) {\n <span class=\"ui-device-control__error\" role=\"img\" [attr.aria-label]=\"errorLabel()\" data-testid=\"device-control-error\">\n <ui-icon size=\"16\" color=\"currentColor\" name=\"Error-filled\"></ui-icon>\n </span>\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}.ui-device-control{--ui-device-control-surface: #242424;--ui-device-control-border: #ffffff;--ui-device-control-text: #ffffff;--ui-device-control-hover: #666666;--ui-device-control-pressed: #666666;--ui-device-control-focus-inner: #242424;--ui-device-control-focus-outer: #ffffff;position:relative;display:inline-flex;align-items:center;gap:4px;padding-right:8px;border:1px solid var(--ui-device-control-border);border-radius:999px;background-color:var(--ui-device-control-surface);color:var(--ui-device-control-text)}.ui-device-control ui-tooltip,.ui-device-control ui-overflow-menu,.ui-device-control .overflow-menu-container{display:flex}.ui-device-control .overflow-menu-opener,.ui-device-control .overflow-menu-opener.content-template{display:flex;align-items:center;justify-content:center;gap:4px;width:auto;height:40px;padding:0;border-radius:999px;color:inherit}.ui-device-control .overflow-menu-opener:hover,.ui-device-control .overflow-menu-opener.content-template:hover{background-color:var(--ui-device-control-hover)}.ui-device-control .overflow-menu-opener:active,.ui-device-control .overflow-menu-opener.content-template:active{background-color:var(--ui-device-control-pressed)}.ui-device-control .overflow-menu-opener:focus-visible,.ui-device-control .overflow-menu-opener.content-template:focus-visible{outline:none;animation:none;box-shadow:0 0 0 2px var(--ui-device-control-focus-inner),0 0 0 6px var(--ui-device-control-focus-outer)}.ui-device-control__main{display:flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:1px solid var(--ui-device-control-border);border-radius:999px;background:none;color:inherit;cursor:pointer}.ui-device-control__main:hover{background-color:var(--ui-device-control-hover)}.ui-device-control__main:active{background-color:var(--ui-device-control-pressed)}.ui-device-control__main:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-device-control-focus-inner),0 0 0 6px var(--ui-device-control-focus-outer)}.ui-device-control__main--off{border-color:transparent;background-color:#e02800;color:#fff}.ui-device-control__main--off:hover{background-color:#ff3003}.ui-device-control__main--off:active{background-color:#ff6e4f}.ui-device-control__main--active ui-icon{animation:ui-device-control-pulse .6s ease-in-out infinite}.ui-device-control__opener-icon{display:flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:1px solid var(--ui-device-control-border);border-radius:999px}.ui-device-control__opener-icon--active ui-icon{animation:ui-device-control-pulse .6s ease-in-out infinite}.ui-device-control__opener-chevron{display:flex;align-items:center;justify-content:center;width:24px;height:40px}.ui-device-control__error{position:absolute;top:-4px;right:-4px;display:flex;width:16px;height:16px;color:#e02800;pointer-events:none}.ui-device-control[theme=light]{--ui-device-control-surface: #ffffff;--ui-device-control-border: #242424;--ui-device-control-text: #242424;--ui-device-control-hover: #e9e9e9;--ui-device-control-pressed: #d3d3d3;--ui-device-control-focus-inner: #ffffff;--ui-device-control-focus-outer: #242424}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel{width:247px;max-width:calc(100vw - 32px);border-radius:10px;background-color:#fff;color:#242424;box-shadow:0 4px 16px #24242414}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-content{padding:0}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item{min-height:48px;height:48px;padding:0 16px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:hover,.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item[aria-checked=true]{background-color:#f4f4f4}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:active{background-color:#e9e9e9}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:focus-visible{outline:2px solid #0165fc;outline-offset:-2px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item-text{display:flex;align-items:center;gap:16px;width:100%;overflow:hidden;color:#242424;font-family:inherit;font-size:14px;line-height:20px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item-text .label{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .overflow-menu-selected-check{flex:0 0 16px;display:flex}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]{display:flex;align-items:center;gap:16px;width:100%;height:48px;padding:0 16px;border:0;background:none;color:inherit;font-size:14px;line-height:20px;text-align:left;cursor:pointer}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:hover{background-color:#f4f4f4}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:active{background-color:#e9e9e9}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:focus-visible{outline:2px solid #0165fc;outline-offset:-2px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem] span{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@keyframes ui-device-control-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.25)}}@media(prefers-reduced-motion:reduce){.ui-device-control__main--active ui-icon,.ui-device-control__opener-icon--active ui-icon{animation:none}}\n"] }]
97
- }], propDecorators: { variant: [{ type: i0.Input, args: [{ isSignal: true, alias: "variant", required: false }] }], iconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconName", required: false }] }], offIconName: [{ type: i0.Input, args: [{ isSignal: true, alias: "offIconName", required: false }] }], isOn: [{ type: i0.Input, args: [{ isSignal: true, alias: "isOn", required: false }] }], isActive: [{ type: i0.Input, args: [{ isSignal: true, alias: "isActive", required: false }] }], options: [{ type: i0.Input, args: [{ isSignal: true, alias: "options", required: false }] }], selectedValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedValue", required: false }] }], onTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "onTooltip", required: true }] }], offTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "offTooltip", required: true }] }], menuTooltip: [{ type: i0.Input, args: [{ isSignal: true, alias: "menuTooltip", required: true }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }], errorLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "errorLabel", required: false }] }], applicationTheme: [{ type: i0.Input, args: [{ isSignal: true, alias: "applicationTheme", required: false }] }], testId: [{ type: i0.Input, args: [{ isSignal: true, alias: "testId", required: false }] }], toggled: [{ type: i0.Output, args: ["toggled"] }], optionSelected: [{ type: i0.Output, args: ["optionSelected"] }], menuOpened: [{ type: i0.Output, args: ["menuOpened"] }], menuClosed: [{ type: i0.Output, args: ["menuClosed"] }], overflowMenu: [{ type: i0.ViewChild, args: [i0.forwardRef(() => OverflowMenuComponent), { isSignal: true }] }] } });
98
-
99
- class DeviceControlComponentModule {
100
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DeviceControlComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
101
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: DeviceControlComponentModule, imports: [CommonModule, DeviceControlComponent], exports: [DeviceControlComponent] }); }
102
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DeviceControlComponentModule, imports: [CommonModule, DeviceControlComponent] }); }
103
- }
104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: DeviceControlComponentModule, decorators: [{
105
- type: NgModule,
106
- args: [{
107
- imports: [CommonModule, DeviceControlComponent],
108
- exports: [DeviceControlComponent],
109
- }]
110
- }] });
111
-
112
- /**
113
- * Generated bundle index. Do not edit.
114
- */
115
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, NgModule, ViewEncapsulation, booleanAttribute, computed, inject, input, output, viewChild } from "@angular/core";
3
+ import { IconComponent } from "@testgorilla/tgo-ui/components/icon";
4
+ import { OverflowMenuComponent } from "@testgorilla/tgo-ui/components/overflow-menu";
5
+ import { TooltipComponent, TooltipPositionType } from "@testgorilla/tgo-ui/components/tooltip";
6
+ import { CommonModule } from "@angular/common";
7
+ var DeviceControlComponent = class DeviceControlComponent {
8
+ constructor() {
9
+ this.variant = input("toggle", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
10
+ this.iconName = input("", ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
11
+ this.offIconName = input("", ...ngDevMode ? [{ debugName: "offIconName" }] : /* istanbul ignore next */ []);
12
+ this.isOn = input(true, {
13
+ ...ngDevMode ? { debugName: "isOn" } : /* istanbul ignore next */ {},
14
+ transform: booleanAttribute
15
+ });
16
+ this.isActive = input(false, {
17
+ ...ngDevMode ? { debugName: "isActive" } : /* istanbul ignore next */ {},
18
+ transform: booleanAttribute
19
+ });
20
+ this.options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
21
+ this.selectedValue = input("", ...ngDevMode ? [{ debugName: "selectedValue" }] : /* istanbul ignore next */ []);
22
+ this.onTooltip = input.required(...ngDevMode ? [{ debugName: "onTooltip" }] : /* istanbul ignore next */ []);
23
+ this.offTooltip = input.required(...ngDevMode ? [{ debugName: "offTooltip" }] : /* istanbul ignore next */ []);
24
+ this.menuTooltip = input.required(...ngDevMode ? [{ debugName: "menuTooltip" }] : /* istanbul ignore next */ []);
25
+ this.hasError = input(false, {
26
+ ...ngDevMode ? { debugName: "hasError" } : /* istanbul ignore next */ {},
27
+ transform: booleanAttribute
28
+ });
29
+ this.errorLabel = input("", ...ngDevMode ? [{ debugName: "errorLabel" }] : /* istanbul ignore next */ []);
30
+ this.applicationTheme = input(void 0, ...ngDevMode ? [{ debugName: "applicationTheme" }] : /* istanbul ignore next */ []);
31
+ this.testId = input(null, ...ngDevMode ? [{ debugName: "testId" }] : /* istanbul ignore next */ []);
32
+ this.mainTestId = computed(() => this.testId() ? `${this.testId()}-toggle` : "device-control-main", ...ngDevMode ? [{ debugName: "mainTestId" }] : /* istanbul ignore next */ []);
33
+ this.menuTestId = computed(() => this.testId() ? `${this.testId()}-menu` : null, ...ngDevMode ? [{ debugName: "menuTestId" }] : /* istanbul ignore next */ []);
34
+ this.toggled = output();
35
+ this.optionSelected = output();
36
+ this.menuOpened = output();
37
+ this.menuClosed = output();
38
+ this.overflowMenu = viewChild(OverflowMenuComponent, ...ngDevMode ? [{ debugName: "overflowMenu" }] : /* istanbul ignore next */ []);
39
+ this.defaultAppTheme = inject("CANOPYUI_DEFAULT_APPLICATION_THEME", { optional: true });
40
+ this.theme = computed(() => this.applicationTheme() ?? this.defaultAppTheme ?? "dark", ...ngDevMode ? [{ debugName: "theme" }] : /* istanbul ignore next */ []);
41
+ this.isMenuOpen = computed(() => this.overflowMenu()?.isMenuOpened() ?? false, ...ngDevMode ? [{ debugName: "isMenuOpen" }] : /* istanbul ignore next */ []);
42
+ this.tooltipPosition = TooltipPositionType.TOP;
43
+ this.menuConfig = {
44
+ xPosition: "after",
45
+ yPosition: "above",
46
+ overlapTrigger: false,
47
+ panelClass: "ui-device-control-panel"
48
+ };
49
+ this.menuButtons = computed(() => this.options().map((option) => ({
50
+ label: option.label,
51
+ value: option.value,
52
+ isSelected: option.value === this.selectedValue()
53
+ })), ...ngDevMode ? [{ debugName: "menuButtons" }] : /* istanbul ignore next */ []);
54
+ this.mainTooltip = computed(() => this.isOn() ? this.onTooltip() : this.offTooltip(), ...ngDevMode ? [{ debugName: "mainTooltip" }] : /* istanbul ignore next */ []);
55
+ this.currentIconName = computed(() => this.isOn() ? this.iconName() : this.offIconName(), ...ngDevMode ? [{ debugName: "currentIconName" }] : /* istanbul ignore next */ []);
56
+ }
57
+ toggleDevice() {
58
+ this.closeMenu();
59
+ this.toggled.emit(!this.isOn());
60
+ }
61
+ closeMenu() {
62
+ this.overflowMenu()?.closeMenu();
63
+ }
64
+ selectOption(value) {
65
+ this.optionSelected.emit(value);
66
+ }
67
+ static {
68
+ this.ɵfac = i0.ɵɵngDeclareFactory({
69
+ minVersion: "12.0.0",
70
+ version: "22.2.4",
71
+ ngImport: i0,
72
+ type: DeviceControlComponent,
73
+ deps: [],
74
+ target: i0.ɵɵFactoryTarget.Component
75
+ });
76
+ }
77
+ static {
78
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
79
+ minVersion: "17.0.0",
80
+ version: "22.2.4",
81
+ type: DeviceControlComponent,
82
+ isStandalone: true,
83
+ selector: "ui-device-control",
84
+ inputs: {
85
+ variant: {
86
+ classPropertyName: "variant",
87
+ publicName: "variant",
88
+ isSignal: true,
89
+ isRequired: false,
90
+ transformFunction: null
91
+ },
92
+ iconName: {
93
+ classPropertyName: "iconName",
94
+ publicName: "iconName",
95
+ isSignal: true,
96
+ isRequired: false,
97
+ transformFunction: null
98
+ },
99
+ offIconName: {
100
+ classPropertyName: "offIconName",
101
+ publicName: "offIconName",
102
+ isSignal: true,
103
+ isRequired: false,
104
+ transformFunction: null
105
+ },
106
+ isOn: {
107
+ classPropertyName: "isOn",
108
+ publicName: "isOn",
109
+ isSignal: true,
110
+ isRequired: false,
111
+ transformFunction: null
112
+ },
113
+ isActive: {
114
+ classPropertyName: "isActive",
115
+ publicName: "isActive",
116
+ isSignal: true,
117
+ isRequired: false,
118
+ transformFunction: null
119
+ },
120
+ options: {
121
+ classPropertyName: "options",
122
+ publicName: "options",
123
+ isSignal: true,
124
+ isRequired: false,
125
+ transformFunction: null
126
+ },
127
+ selectedValue: {
128
+ classPropertyName: "selectedValue",
129
+ publicName: "selectedValue",
130
+ isSignal: true,
131
+ isRequired: false,
132
+ transformFunction: null
133
+ },
134
+ onTooltip: {
135
+ classPropertyName: "onTooltip",
136
+ publicName: "onTooltip",
137
+ isSignal: true,
138
+ isRequired: true,
139
+ transformFunction: null
140
+ },
141
+ offTooltip: {
142
+ classPropertyName: "offTooltip",
143
+ publicName: "offTooltip",
144
+ isSignal: true,
145
+ isRequired: true,
146
+ transformFunction: null
147
+ },
148
+ menuTooltip: {
149
+ classPropertyName: "menuTooltip",
150
+ publicName: "menuTooltip",
151
+ isSignal: true,
152
+ isRequired: true,
153
+ transformFunction: null
154
+ },
155
+ hasError: {
156
+ classPropertyName: "hasError",
157
+ publicName: "hasError",
158
+ isSignal: true,
159
+ isRequired: false,
160
+ transformFunction: null
161
+ },
162
+ errorLabel: {
163
+ classPropertyName: "errorLabel",
164
+ publicName: "errorLabel",
165
+ isSignal: true,
166
+ isRequired: false,
167
+ transformFunction: null
168
+ },
169
+ applicationTheme: {
170
+ classPropertyName: "applicationTheme",
171
+ publicName: "applicationTheme",
172
+ isSignal: true,
173
+ isRequired: false,
174
+ transformFunction: null
175
+ },
176
+ testId: {
177
+ classPropertyName: "testId",
178
+ publicName: "testId",
179
+ isSignal: true,
180
+ isRequired: false,
181
+ transformFunction: null
182
+ }
183
+ },
184
+ outputs: {
185
+ toggled: "toggled",
186
+ optionSelected: "optionSelected",
187
+ menuOpened: "menuOpened",
188
+ menuClosed: "menuClosed"
189
+ },
190
+ host: {
191
+ properties: { "attr.theme": "theme()" },
192
+ classAttribute: "ui-device-control"
193
+ },
194
+ viewQueries: [{
195
+ propertyName: "overflowMenu",
196
+ first: true,
197
+ predicate: OverflowMenuComponent,
198
+ descendants: true,
199
+ isSignal: true
200
+ }],
201
+ ngImport: i0,
202
+ template: "@if (variant() === 'toggle') {\n <ui-tooltip [position]=\"tooltipPosition\" [message]=\"mainTooltip()\" [applicationTheme]=\"theme()\">\n <button\n type=\"button\"\n class=\"ui-device-control__main\"\n [attr.data-testid]=\"mainTestId()\"\n [class.ui-device-control__main--off]=\"!isOn()\"\n [class.ui-device-control__main--active]=\"isActive()\"\n [attr.aria-label]=\"mainTooltip()\"\n (click)=\"toggleDevice()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" [name]=\"currentIconName()\"></ui-icon>\n </button>\n </ui-tooltip>\n}\n\n<ui-tooltip [position]=\"tooltipPosition\" [message]=\"menuTooltip()\" [applicationTheme]=\"theme()\">\n <ui-overflow-menu\n data-testid=\"device-control-menu-toggle\"\n [testId]=\"menuTestId()\"\n selectionMode=\"single\"\n [buttons]=\"menuButtons()\"\n [isDynamicMenu]=\"true\"\n [menuConfig]=\"menuConfig\"\n [contentTemplateRef]=\"opener\"\n [applicationTheme]=\"theme()\"\n [ariaLabel]=\"menuTooltip()\"\n (selectItem)=\"selectOption($event)\"\n (menuOpened)=\"menuOpened.emit()\"\n (menuClosed)=\"menuClosed.emit()\"\n >\n <div menu-content class=\"ui-device-control__menu-footer\">\n <ng-content select=\"[uiDeviceControlMenuFooter]\"></ng-content>\n </div>\n </ui-overflow-menu>\n</ui-tooltip>\n\n<ng-template #opener>\n @if (variant() === 'menu') {\n <span\n class=\"ui-device-control__opener-icon\"\n [class.ui-device-control__opener-icon--active]=\"isActive()\"\n data-testid=\"device-control-opener-icon\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" [name]=\"iconName()\"></ui-icon>\n </span>\n }\n <span class=\"ui-device-control__opener-chevron\">\n <ui-icon\n size=\"16\"\n color=\"currentColor\"\n [name]=\"isMenuOpen() ? 'Arrow-chevron-up-in-line' : 'Arrow-chevron-down-in-line'\"\n ></ui-icon>\n </span>\n</ng-template>\n\n@if (hasError()) {\n <span class=\"ui-device-control__error\" role=\"img\" [attr.aria-label]=\"errorLabel()\" data-testid=\"device-control-error\">\n <ui-icon size=\"16\" color=\"currentColor\" name=\"Error-filled\"></ui-icon>\n </span>\n}\n",
203
+ 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}.ui-device-control{--ui-device-control-surface: #242424;--ui-device-control-border: #ffffff;--ui-device-control-text: #ffffff;--ui-device-control-hover: #666666;--ui-device-control-pressed: #666666;--ui-device-control-focus-inner: #242424;--ui-device-control-focus-outer: #ffffff;position:relative;display:inline-flex;align-items:center;gap:4px;padding-right:8px;border:1px solid var(--ui-device-control-border);border-radius:999px;background-color:var(--ui-device-control-surface);color:var(--ui-device-control-text)}.ui-device-control ui-tooltip,.ui-device-control ui-overflow-menu,.ui-device-control .overflow-menu-container{display:flex}.ui-device-control .overflow-menu-opener,.ui-device-control .overflow-menu-opener.content-template{display:flex;align-items:center;justify-content:center;gap:4px;width:auto;height:40px;padding:0;border-radius:999px;color:inherit}.ui-device-control .overflow-menu-opener:hover,.ui-device-control .overflow-menu-opener.content-template:hover{background-color:var(--ui-device-control-hover)}.ui-device-control .overflow-menu-opener:active,.ui-device-control .overflow-menu-opener.content-template:active{background-color:var(--ui-device-control-pressed)}.ui-device-control .overflow-menu-opener:focus-visible,.ui-device-control .overflow-menu-opener.content-template:focus-visible{outline:none;animation:none;box-shadow:0 0 0 2px var(--ui-device-control-focus-inner),0 0 0 6px var(--ui-device-control-focus-outer)}.ui-device-control__main{display:flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:1px solid var(--ui-device-control-border);border-radius:999px;background:none;color:inherit;cursor:pointer}.ui-device-control__main:hover{background-color:var(--ui-device-control-hover)}.ui-device-control__main:active{background-color:var(--ui-device-control-pressed)}.ui-device-control__main:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-device-control-focus-inner),0 0 0 6px var(--ui-device-control-focus-outer)}.ui-device-control__main--off{border-color:transparent;background-color:#e02800;color:#fff}.ui-device-control__main--off:hover{background-color:#ff3003}.ui-device-control__main--off:active{background-color:#ff6e4f}.ui-device-control__main--active ui-icon{animation:ui-device-control-pulse .6s ease-in-out infinite}.ui-device-control__opener-icon{display:flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:1px solid var(--ui-device-control-border);border-radius:999px}.ui-device-control__opener-icon--active ui-icon{animation:ui-device-control-pulse .6s ease-in-out infinite}.ui-device-control__opener-chevron{display:flex;align-items:center;justify-content:center;width:24px;height:40px}.ui-device-control__error{position:absolute;top:-4px;right:-4px;display:flex;width:16px;height:16px;color:#e02800;pointer-events:none}.ui-device-control[theme=light]{--ui-device-control-surface: #ffffff;--ui-device-control-border: #242424;--ui-device-control-text: #242424;--ui-device-control-hover: #e9e9e9;--ui-device-control-pressed: #d3d3d3;--ui-device-control-focus-inner: #ffffff;--ui-device-control-focus-outer: #242424}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel{width:247px;max-width:calc(100vw - 32px);border-radius:10px;background-color:#fff;color:#242424;box-shadow:0 4px 16px #24242414}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-content{padding:0}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item{min-height:48px;height:48px;padding:0 16px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:hover,.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item[aria-checked=true]{background-color:#f4f4f4}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:active{background-color:#e9e9e9}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:focus-visible{outline:2px solid #0165fc;outline-offset:-2px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item-text{display:flex;align-items:center;gap:16px;width:100%;overflow:hidden;color:#242424;font-family:inherit;font-size:14px;line-height:20px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item-text .label{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .overflow-menu-selected-check{flex:0 0 16px;display:flex}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]{display:flex;align-items:center;gap:16px;width:100%;height:48px;padding:0 16px;border:0;background:none;color:inherit;font-size:14px;line-height:20px;text-align:left;cursor:pointer}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:hover{background-color:#f4f4f4}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:active{background-color:#e9e9e9}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:focus-visible{outline:2px solid #0165fc;outline-offset:-2px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem] span{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@keyframes ui-device-control-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.25)}}@media(prefers-reduced-motion:reduce){.ui-device-control__main--active ui-icon,.ui-device-control__opener-icon--active ui-icon{animation:none}}\n"],
204
+ dependencies: [
205
+ {
206
+ kind: "component",
207
+ type: IconComponent,
208
+ selector: "ui-icon",
209
+ inputs: [
210
+ "size",
211
+ "cssClass",
212
+ "name",
213
+ "color",
214
+ "filled",
215
+ "toggleIconStyle",
216
+ "applicationTheme",
217
+ "useFullIconName"
218
+ ]
219
+ },
220
+ {
221
+ kind: "component",
222
+ type: OverflowMenuComponent,
223
+ selector: "ui-overflow-menu",
224
+ inputs: [
225
+ "buttons",
226
+ "iconTrigger",
227
+ "menuLabel",
228
+ "applicationTheme",
229
+ "ariaLabel",
230
+ "testId",
231
+ "ariaRequired",
232
+ "describedby",
233
+ "contentTemplateRef",
234
+ "buttonVariant",
235
+ "buttonSize",
236
+ "menuConfig",
237
+ "selectionMode",
238
+ "menuAnchor",
239
+ "shouldMatchAnchorWidth",
240
+ "isDynamicMenu",
241
+ "withRemovableOption"
242
+ ],
243
+ outputs: [
244
+ "selectItem",
245
+ "menuOpened",
246
+ "menuClosed"
247
+ ]
248
+ },
249
+ {
250
+ kind: "component",
251
+ type: TooltipComponent,
252
+ selector: "ui-tooltip",
253
+ inputs: [
254
+ "position",
255
+ "disabled",
256
+ "message",
257
+ "applicationTheme",
258
+ "labelForDefinition",
259
+ "definitionTooltipSize",
260
+ "variant"
261
+ ]
262
+ }
263
+ ],
264
+ changeDetection: i0.ChangeDetectionStrategy.OnPush,
265
+ encapsulation: i0.ViewEncapsulation.None
266
+ });
267
+ }
268
+ };
269
+ i0.ɵɵngDeclareClassMetadata({
270
+ minVersion: "12.0.0",
271
+ version: "22.2.4",
272
+ ngImport: i0,
273
+ type: DeviceControlComponent,
274
+ decorators: [{
275
+ type: Component,
276
+ args: [{
277
+ selector: "ui-device-control",
278
+ encapsulation: ViewEncapsulation.None,
279
+ changeDetection: ChangeDetectionStrategy.OnPush,
280
+ host: {
281
+ class: "ui-device-control",
282
+ "[attr.theme]": "theme()"
283
+ },
284
+ imports: [
285
+ IconComponent,
286
+ OverflowMenuComponent,
287
+ TooltipComponent
288
+ ],
289
+ template: "@if (variant() === 'toggle') {\n <ui-tooltip [position]=\"tooltipPosition\" [message]=\"mainTooltip()\" [applicationTheme]=\"theme()\">\n <button\n type=\"button\"\n class=\"ui-device-control__main\"\n [attr.data-testid]=\"mainTestId()\"\n [class.ui-device-control__main--off]=\"!isOn()\"\n [class.ui-device-control__main--active]=\"isActive()\"\n [attr.aria-label]=\"mainTooltip()\"\n (click)=\"toggleDevice()\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" [name]=\"currentIconName()\"></ui-icon>\n </button>\n </ui-tooltip>\n}\n\n<ui-tooltip [position]=\"tooltipPosition\" [message]=\"menuTooltip()\" [applicationTheme]=\"theme()\">\n <ui-overflow-menu\n data-testid=\"device-control-menu-toggle\"\n [testId]=\"menuTestId()\"\n selectionMode=\"single\"\n [buttons]=\"menuButtons()\"\n [isDynamicMenu]=\"true\"\n [menuConfig]=\"menuConfig\"\n [contentTemplateRef]=\"opener\"\n [applicationTheme]=\"theme()\"\n [ariaLabel]=\"menuTooltip()\"\n (selectItem)=\"selectOption($event)\"\n (menuOpened)=\"menuOpened.emit()\"\n (menuClosed)=\"menuClosed.emit()\"\n >\n <div menu-content class=\"ui-device-control__menu-footer\">\n <ng-content select=\"[uiDeviceControlMenuFooter]\"></ng-content>\n </div>\n </ui-overflow-menu>\n</ui-tooltip>\n\n<ng-template #opener>\n @if (variant() === 'menu') {\n <span\n class=\"ui-device-control__opener-icon\"\n [class.ui-device-control__opener-icon--active]=\"isActive()\"\n data-testid=\"device-control-opener-icon\"\n >\n <ui-icon size=\"24\" color=\"currentColor\" [name]=\"iconName()\"></ui-icon>\n </span>\n }\n <span class=\"ui-device-control__opener-chevron\">\n <ui-icon\n size=\"16\"\n color=\"currentColor\"\n [name]=\"isMenuOpen() ? 'Arrow-chevron-up-in-line' : 'Arrow-chevron-down-in-line'\"\n ></ui-icon>\n </span>\n</ng-template>\n\n@if (hasError()) {\n <span class=\"ui-device-control__error\" role=\"img\" [attr.aria-label]=\"errorLabel()\" data-testid=\"device-control-error\">\n <ui-icon size=\"16\" color=\"currentColor\" name=\"Error-filled\"></ui-icon>\n </span>\n}\n",
290
+ 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}.ui-device-control{--ui-device-control-surface: #242424;--ui-device-control-border: #ffffff;--ui-device-control-text: #ffffff;--ui-device-control-hover: #666666;--ui-device-control-pressed: #666666;--ui-device-control-focus-inner: #242424;--ui-device-control-focus-outer: #ffffff;position:relative;display:inline-flex;align-items:center;gap:4px;padding-right:8px;border:1px solid var(--ui-device-control-border);border-radius:999px;background-color:var(--ui-device-control-surface);color:var(--ui-device-control-text)}.ui-device-control ui-tooltip,.ui-device-control ui-overflow-menu,.ui-device-control .overflow-menu-container{display:flex}.ui-device-control .overflow-menu-opener,.ui-device-control .overflow-menu-opener.content-template{display:flex;align-items:center;justify-content:center;gap:4px;width:auto;height:40px;padding:0;border-radius:999px;color:inherit}.ui-device-control .overflow-menu-opener:hover,.ui-device-control .overflow-menu-opener.content-template:hover{background-color:var(--ui-device-control-hover)}.ui-device-control .overflow-menu-opener:active,.ui-device-control .overflow-menu-opener.content-template:active{background-color:var(--ui-device-control-pressed)}.ui-device-control .overflow-menu-opener:focus-visible,.ui-device-control .overflow-menu-opener.content-template:focus-visible{outline:none;animation:none;box-shadow:0 0 0 2px var(--ui-device-control-focus-inner),0 0 0 6px var(--ui-device-control-focus-outer)}.ui-device-control__main{display:flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:1px solid var(--ui-device-control-border);border-radius:999px;background:none;color:inherit;cursor:pointer}.ui-device-control__main:hover{background-color:var(--ui-device-control-hover)}.ui-device-control__main:active{background-color:var(--ui-device-control-pressed)}.ui-device-control__main:focus-visible{outline:none;box-shadow:0 0 0 2px var(--ui-device-control-focus-inner),0 0 0 6px var(--ui-device-control-focus-outer)}.ui-device-control__main--off{border-color:transparent;background-color:#e02800;color:#fff}.ui-device-control__main--off:hover{background-color:#ff3003}.ui-device-control__main--off:active{background-color:#ff6e4f}.ui-device-control__main--active ui-icon{animation:ui-device-control-pulse .6s ease-in-out infinite}.ui-device-control__opener-icon{display:flex;align-items:center;justify-content:center;height:40px;padding:0 20px;border:1px solid var(--ui-device-control-border);border-radius:999px}.ui-device-control__opener-icon--active ui-icon{animation:ui-device-control-pulse .6s ease-in-out infinite}.ui-device-control__opener-chevron{display:flex;align-items:center;justify-content:center;width:24px;height:40px}.ui-device-control__error{position:absolute;top:-4px;right:-4px;display:flex;width:16px;height:16px;color:#e02800;pointer-events:none}.ui-device-control[theme=light]{--ui-device-control-surface: #ffffff;--ui-device-control-border: #242424;--ui-device-control-text: #242424;--ui-device-control-hover: #e9e9e9;--ui-device-control-pressed: #d3d3d3;--ui-device-control-focus-inner: #ffffff;--ui-device-control-focus-outer: #242424}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel{width:247px;max-width:calc(100vw - 32px);border-radius:10px;background-color:#fff;color:#242424;box-shadow:0 4px 16px #24242414}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-content{padding:0}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item{min-height:48px;height:48px;padding:0 16px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:hover,.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item[aria-checked=true]{background-color:#f4f4f4}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:active{background-color:#e9e9e9}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item:focus-visible{outline:2px solid #0165fc;outline-offset:-2px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item-text{display:flex;align-items:center;gap:16px;width:100%;overflow:hidden;color:#242424;font-family:inherit;font-size:14px;line-height:20px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .mat-mdc-menu-item-text .label{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel .overflow-menu-selected-check{flex:0 0 16px;display:flex}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]{display:flex;align-items:center;gap:16px;width:100%;height:48px;padding:0 16px;border:0;background:none;color:inherit;font-size:14px;line-height:20px;text-align:left;cursor:pointer}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:hover{background-color:#f4f4f4}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:active{background-color:#e9e9e9}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem]:focus-visible{outline:2px solid #0165fc;outline-offset:-2px}.mat-mdc-menu-panel.overflow-menu.ui-device-control-panel [uiDeviceControlFooterItem] span{flex:1 1 auto;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@keyframes ui-device-control-pulse{0%,to{transform:scale(1)}50%{transform:scale(1.25)}}@media(prefers-reduced-motion:reduce){.ui-device-control__main--active ui-icon,.ui-device-control__opener-icon--active ui-icon{animation:none}}\n"]
291
+ }]
292
+ }],
293
+ propDecorators: {
294
+ variant: [{
295
+ type: i0.Input,
296
+ args: [{
297
+ isSignal: true,
298
+ alias: "variant",
299
+ required: false
300
+ }]
301
+ }],
302
+ iconName: [{
303
+ type: i0.Input,
304
+ args: [{
305
+ isSignal: true,
306
+ alias: "iconName",
307
+ required: false
308
+ }]
309
+ }],
310
+ offIconName: [{
311
+ type: i0.Input,
312
+ args: [{
313
+ isSignal: true,
314
+ alias: "offIconName",
315
+ required: false
316
+ }]
317
+ }],
318
+ isOn: [{
319
+ type: i0.Input,
320
+ args: [{
321
+ isSignal: true,
322
+ alias: "isOn",
323
+ required: false
324
+ }]
325
+ }],
326
+ isActive: [{
327
+ type: i0.Input,
328
+ args: [{
329
+ isSignal: true,
330
+ alias: "isActive",
331
+ required: false
332
+ }]
333
+ }],
334
+ options: [{
335
+ type: i0.Input,
336
+ args: [{
337
+ isSignal: true,
338
+ alias: "options",
339
+ required: false
340
+ }]
341
+ }],
342
+ selectedValue: [{
343
+ type: i0.Input,
344
+ args: [{
345
+ isSignal: true,
346
+ alias: "selectedValue",
347
+ required: false
348
+ }]
349
+ }],
350
+ onTooltip: [{
351
+ type: i0.Input,
352
+ args: [{
353
+ isSignal: true,
354
+ alias: "onTooltip",
355
+ required: true
356
+ }]
357
+ }],
358
+ offTooltip: [{
359
+ type: i0.Input,
360
+ args: [{
361
+ isSignal: true,
362
+ alias: "offTooltip",
363
+ required: true
364
+ }]
365
+ }],
366
+ menuTooltip: [{
367
+ type: i0.Input,
368
+ args: [{
369
+ isSignal: true,
370
+ alias: "menuTooltip",
371
+ required: true
372
+ }]
373
+ }],
374
+ hasError: [{
375
+ type: i0.Input,
376
+ args: [{
377
+ isSignal: true,
378
+ alias: "hasError",
379
+ required: false
380
+ }]
381
+ }],
382
+ errorLabel: [{
383
+ type: i0.Input,
384
+ args: [{
385
+ isSignal: true,
386
+ alias: "errorLabel",
387
+ required: false
388
+ }]
389
+ }],
390
+ applicationTheme: [{
391
+ type: i0.Input,
392
+ args: [{
393
+ isSignal: true,
394
+ alias: "applicationTheme",
395
+ required: false
396
+ }]
397
+ }],
398
+ testId: [{
399
+ type: i0.Input,
400
+ args: [{
401
+ isSignal: true,
402
+ alias: "testId",
403
+ required: false
404
+ }]
405
+ }],
406
+ toggled: [{
407
+ type: i0.Output,
408
+ args: ["toggled"]
409
+ }],
410
+ optionSelected: [{
411
+ type: i0.Output,
412
+ args: ["optionSelected"]
413
+ }],
414
+ menuOpened: [{
415
+ type: i0.Output,
416
+ args: ["menuOpened"]
417
+ }],
418
+ menuClosed: [{
419
+ type: i0.Output,
420
+ args: ["menuClosed"]
421
+ }],
422
+ overflowMenu: [{
423
+ type: i0.ViewChild,
424
+ args: [i0.forwardRef(() => OverflowMenuComponent), { isSignal: true }]
425
+ }]
426
+ }
427
+ });
428
+ var DeviceControlComponentModule = class DeviceControlComponentModule {
429
+ static {
430
+ this.ɵfac = i0.ɵɵngDeclareFactory({
431
+ minVersion: "12.0.0",
432
+ version: "22.2.4",
433
+ ngImport: i0,
434
+ type: DeviceControlComponentModule,
435
+ deps: [],
436
+ target: i0.ɵɵFactoryTarget.NgModule
437
+ });
438
+ }
439
+ static {
440
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
441
+ minVersion: "14.0.0",
442
+ version: "22.2.4",
443
+ ngImport: i0,
444
+ type: DeviceControlComponentModule,
445
+ imports: [CommonModule, DeviceControlComponent],
446
+ exports: [DeviceControlComponent]
447
+ });
448
+ }
449
+ static {
450
+ this.ɵinj = i0.ɵɵngDeclareInjector({
451
+ minVersion: "12.0.0",
452
+ version: "22.2.4",
453
+ ngImport: i0,
454
+ type: DeviceControlComponentModule,
455
+ imports: [CommonModule, DeviceControlComponent]
456
+ });
457
+ }
458
+ };
459
+ i0.ɵɵngDeclareClassMetadata({
460
+ minVersion: "12.0.0",
461
+ version: "22.2.4",
462
+ ngImport: i0,
463
+ type: DeviceControlComponentModule,
464
+ decorators: [{
465
+ type: NgModule,
466
+ args: [{
467
+ imports: [CommonModule, DeviceControlComponent],
468
+ exports: [DeviceControlComponent]
469
+ }]
470
+ }]
471
+ });
116
472
  export { DeviceControlComponent, DeviceControlComponentModule };
117
- //# sourceMappingURL=testgorilla-tgo-ui-components-device-control.mjs.map
473
+
474
+ //# sourceMappingURL=testgorilla-tgo-ui-components-device-control.mjs.map