@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,85 +1,287 @@
1
- import * as i0 from '@angular/core';
2
- import { input, computed, output, signal, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
- import { CardComponent, CardComponentModule } from '@testgorilla/tgo-ui/components/card';
4
- import { CheckboxComponent, CheckboxComponentModule } from '@testgorilla/tgo-ui/components/checkbox';
5
- import { CommonModule } from '@angular/common';
6
-
7
- class SelectableCardComponent {
8
- constructor() {
9
- /**
10
- * Card size. Defaults to "medium".
11
- */
12
- this.size = input('medium', ...(ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []));
13
- /**
14
- * Card variant/design for selected state. Defaults to "default".
15
- */
16
- this.selectedVariant = input('state', ...(ngDevMode ? [{ debugName: "selectedVariant" }] : /* istanbul ignore next */ []));
17
- /**
18
- * Whether the card is selected (input from parent).
19
- */
20
- this.selected = input(false, ...(ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []));
21
- /**
22
- * Whether the checkbox is disabled.
23
- */
24
- this.isCheckboxDisabled = input(false, ...(ngDevMode ? [{ debugName: "isCheckboxDisabled" }] : /* istanbul ignore next */ []));
25
- /**
26
- * Whether the card is in an error state, which renders the checkbox in red.
27
- */
28
- this.hasError = input(false, ...(ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []));
29
- this.testId = input(null, ...(ngDevMode ? [{ debugName: "testId" }] : /* istanbul ignore next */ []));
30
- this.ariaLabel = input('', ...(ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []));
31
- this.checkboxTestId = computed(() => (this.testId() ? `${this.testId()}-checkbox` : null), ...(ngDevMode ? [{ debugName: "checkboxTestId" }] : /* istanbul ignore next */ []));
32
- /**
33
- * Event emitted when the card is selected, with the current selected state.
34
- */
35
- this.cardSelected = output();
36
- /**
37
- * Internal override for selected state (when user interacts).
38
- */
39
- this.internalSelectedOverride = signal(null, ...(ngDevMode ? [{ debugName: "internalSelectedOverride" }] : /* istanbul ignore next */ []));
40
- /**
41
- * Computed selected state that prioritizes user interaction over input.
42
- */
43
- this.isSelected = computed(() => {
44
- const override = this.internalSelectedOverride();
45
- return override ?? this.selected();
46
- }, ...(ngDevMode ? [{ debugName: "isSelected" }] : /* istanbul ignore next */ []));
47
- }
48
- /**
49
- * Handles card selection, toggles internal state and emits the new value.
50
- */
51
- handleSelect() {
52
- if (this.isCheckboxDisabled()) {
53
- return;
54
- }
55
- const newValue = !this.isSelected();
56
- this.internalSelectedOverride.set(newValue);
57
- this.cardSelected.emit(newValue);
58
- }
59
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SelectableCardComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
60
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "21.2.25", type: SelectableCardComponent, isStandalone: true, selector: "ui-selectable-card", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, selectedVariant: { classPropertyName: "selectedVariant", publicName: "selectedVariant", isSignal: true, isRequired: false, transformFunction: null }, selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: false, transformFunction: null }, isCheckboxDisabled: { classPropertyName: "isCheckboxDisabled", publicName: "isCheckboxDisabled", isSignal: true, isRequired: false, transformFunction: null }, hasError: { classPropertyName: "hasError", publicName: "hasError", isSignal: true, isRequired: false, transformFunction: null }, testId: { classPropertyName: "testId", publicName: "testId", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "ariaLabel", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { cardSelected: "cardSelected" }, ngImport: i0, template: "<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n [testId]=\"testId()\"\n>\n <ui-checkbox\n class=\"selectable-card-checkbox\"\n [checked]=\"isSelected()\"\n [disabled]=\"isCheckboxDisabled()\"\n [hasError]=\"hasError()\"\n [testId]=\"checkboxTestId()\"\n [ariaLabel]=\"ariaLabel()\"\n >\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n", styles: [".selectable-card .selectable-card-checkbox{display:block;margin-top:-11px;margin-left:-11px}\n"], dependencies: [{ kind: "component", type: CardComponent, selector: "ui-card", inputs: ["size", "sizeVariant", "variant", "applicationTheme", "errors", "errorsSize", "selected", "allowSelect", "allowFocus", "testId"], outputs: ["cardSelected"] }, { kind: "component", type: CheckboxComponent, selector: "ui-checkbox", inputs: ["disabled", "checked", "indeterminate", "companyColor", "name", "label", "multiple", "applicationTheme", "ariaLabel", "testId", "ariaRequired", "hasError", "hideBuiltInErrors", "hideLabelInErrors", "ariaLabelledby", "ariaDescribedby", "truncateText", "alignment", "tabIndex"], outputs: ["changed"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
61
- }
62
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SelectableCardComponent, decorators: [{
63
- type: Component,
64
- args: [{ selector: 'ui-selectable-card', changeDetection: ChangeDetectionStrategy.OnPush, imports: [CardComponent, CheckboxComponent], template: "<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n [testId]=\"testId()\"\n>\n <ui-checkbox\n class=\"selectable-card-checkbox\"\n [checked]=\"isSelected()\"\n [disabled]=\"isCheckboxDisabled()\"\n [hasError]=\"hasError()\"\n [testId]=\"checkboxTestId()\"\n [ariaLabel]=\"ariaLabel()\"\n >\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n", styles: [".selectable-card .selectable-card-checkbox{display:block;margin-top:-11px;margin-left:-11px}\n"] }]
65
- }], propDecorators: { size: [{ type: i0.Input, args: [{ isSignal: true, alias: "size", required: false }] }], selectedVariant: [{ type: i0.Input, args: [{ isSignal: true, alias: "selectedVariant", required: false }] }], selected: [{ type: i0.Input, args: [{ isSignal: true, alias: "selected", required: false }] }], isCheckboxDisabled: [{ type: i0.Input, args: [{ isSignal: true, alias: "isCheckboxDisabled", required: false }] }], hasError: [{ type: i0.Input, args: [{ isSignal: true, alias: "hasError", required: false }] }], testId: [{ type: i0.Input, args: [{ isSignal: true, alias: "testId", required: false }] }], ariaLabel: [{ type: i0.Input, args: [{ isSignal: true, alias: "ariaLabel", required: false }] }], cardSelected: [{ type: i0.Output, args: ["cardSelected"] }] } });
66
-
67
- class SelectableCardComponentModule {
68
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SelectableCardComponentModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
69
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "21.2.25", ngImport: i0, type: SelectableCardComponentModule, imports: [CommonModule, CardComponentModule, CheckboxComponentModule, SelectableCardComponent], exports: [SelectableCardComponent] }); }
70
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SelectableCardComponentModule, imports: [CommonModule, CardComponentModule, CheckboxComponentModule, SelectableCardComponent] }); }
71
- }
72
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.25", ngImport: i0, type: SelectableCardComponentModule, decorators: [{
73
- type: NgModule,
74
- args: [{
75
- imports: [CommonModule, CardComponentModule, CheckboxComponentModule, SelectableCardComponent],
76
- exports: [SelectableCardComponent],
77
- }]
78
- }] });
79
-
80
- /**
81
- * Generated bundle index. Do not edit.
82
- */
83
-
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, NgModule, computed, input, output, signal } from "@angular/core";
3
+ import { CardComponent, CardComponentModule } from "@testgorilla/tgo-ui/components/card";
4
+ import { CheckboxComponent, CheckboxComponentModule } from "@testgorilla/tgo-ui/components/checkbox";
5
+ import { CommonModule } from "@angular/common";
6
+ var SelectableCardComponent = class SelectableCardComponent {
7
+ constructor() {
8
+ this.size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
9
+ this.selectedVariant = input("state", ...ngDevMode ? [{ debugName: "selectedVariant" }] : /* istanbul ignore next */ []);
10
+ this.selected = input(false, ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
11
+ this.isCheckboxDisabled = input(false, ...ngDevMode ? [{ debugName: "isCheckboxDisabled" }] : /* istanbul ignore next */ []);
12
+ this.hasError = input(false, ...ngDevMode ? [{ debugName: "hasError" }] : /* istanbul ignore next */ []);
13
+ this.testId = input(null, ...ngDevMode ? [{ debugName: "testId" }] : /* istanbul ignore next */ []);
14
+ this.ariaLabel = input("", ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
15
+ this.checkboxTestId = computed(() => this.testId() ? `${this.testId()}-checkbox` : null, ...ngDevMode ? [{ debugName: "checkboxTestId" }] : /* istanbul ignore next */ []);
16
+ this.cardSelected = output();
17
+ this.internalSelectedOverride = signal(null, ...ngDevMode ? [{ debugName: "internalSelectedOverride" }] : /* istanbul ignore next */ []);
18
+ this.isSelected = computed(() => {
19
+ return this.internalSelectedOverride() ?? this.selected();
20
+ }, ...ngDevMode ? [{ debugName: "isSelected" }] : /* istanbul ignore next */ []);
21
+ }
22
+ handleSelect() {
23
+ if (this.isCheckboxDisabled()) return;
24
+ const newValue = !this.isSelected();
25
+ this.internalSelectedOverride.set(newValue);
26
+ this.cardSelected.emit(newValue);
27
+ }
28
+ static {
29
+ this.ɵfac = i0.ɵɵngDeclareFactory({
30
+ minVersion: "12.0.0",
31
+ version: "22.2.4",
32
+ ngImport: i0,
33
+ type: SelectableCardComponent,
34
+ deps: [],
35
+ target: i0.ɵɵFactoryTarget.Component
36
+ });
37
+ }
38
+ static {
39
+ this.ɵcmp = i0.ɵɵngDeclareComponent({
40
+ minVersion: "17.1.0",
41
+ version: "22.2.4",
42
+ type: SelectableCardComponent,
43
+ isStandalone: true,
44
+ selector: "ui-selectable-card",
45
+ inputs: {
46
+ size: {
47
+ classPropertyName: "size",
48
+ publicName: "size",
49
+ isSignal: true,
50
+ isRequired: false,
51
+ transformFunction: null
52
+ },
53
+ selectedVariant: {
54
+ classPropertyName: "selectedVariant",
55
+ publicName: "selectedVariant",
56
+ isSignal: true,
57
+ isRequired: false,
58
+ transformFunction: null
59
+ },
60
+ selected: {
61
+ classPropertyName: "selected",
62
+ publicName: "selected",
63
+ isSignal: true,
64
+ isRequired: false,
65
+ transformFunction: null
66
+ },
67
+ isCheckboxDisabled: {
68
+ classPropertyName: "isCheckboxDisabled",
69
+ publicName: "isCheckboxDisabled",
70
+ isSignal: true,
71
+ isRequired: false,
72
+ transformFunction: null
73
+ },
74
+ hasError: {
75
+ classPropertyName: "hasError",
76
+ publicName: "hasError",
77
+ isSignal: true,
78
+ isRequired: false,
79
+ transformFunction: null
80
+ },
81
+ testId: {
82
+ classPropertyName: "testId",
83
+ publicName: "testId",
84
+ isSignal: true,
85
+ isRequired: false,
86
+ transformFunction: null
87
+ },
88
+ ariaLabel: {
89
+ classPropertyName: "ariaLabel",
90
+ publicName: "ariaLabel",
91
+ isSignal: true,
92
+ isRequired: false,
93
+ transformFunction: null
94
+ }
95
+ },
96
+ outputs: { cardSelected: "cardSelected" },
97
+ ngImport: i0,
98
+ template: "<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n [testId]=\"testId()\"\n>\n <ui-checkbox\n class=\"selectable-card-checkbox\"\n [checked]=\"isSelected()\"\n [disabled]=\"isCheckboxDisabled()\"\n [hasError]=\"hasError()\"\n [testId]=\"checkboxTestId()\"\n [ariaLabel]=\"ariaLabel()\"\n >\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n",
99
+ styles: [".selectable-card .selectable-card-checkbox{display:block;margin-top:-11px;margin-left:-11px}\n"],
100
+ dependencies: [{
101
+ kind: "component",
102
+ type: CardComponent,
103
+ selector: "ui-card",
104
+ inputs: [
105
+ "size",
106
+ "sizeVariant",
107
+ "variant",
108
+ "applicationTheme",
109
+ "errors",
110
+ "errorsSize",
111
+ "selected",
112
+ "allowSelect",
113
+ "allowFocus",
114
+ "testId"
115
+ ],
116
+ outputs: ["cardSelected"]
117
+ }, {
118
+ kind: "component",
119
+ type: CheckboxComponent,
120
+ selector: "ui-checkbox",
121
+ inputs: [
122
+ "disabled",
123
+ "checked",
124
+ "indeterminate",
125
+ "companyColor",
126
+ "name",
127
+ "label",
128
+ "multiple",
129
+ "applicationTheme",
130
+ "ariaLabel",
131
+ "testId",
132
+ "ariaRequired",
133
+ "hasError",
134
+ "hideBuiltInErrors",
135
+ "hideLabelInErrors",
136
+ "ariaLabelledby",
137
+ "ariaDescribedby",
138
+ "truncateText",
139
+ "alignment",
140
+ "tabIndex"
141
+ ],
142
+ outputs: ["changed"]
143
+ }],
144
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
145
+ });
146
+ }
147
+ };
148
+ i0.ɵɵngDeclareClassMetadata({
149
+ minVersion: "12.0.0",
150
+ version: "22.2.4",
151
+ ngImport: i0,
152
+ type: SelectableCardComponent,
153
+ decorators: [{
154
+ type: Component,
155
+ args: [{
156
+ selector: "ui-selectable-card",
157
+ changeDetection: ChangeDetectionStrategy.OnPush,
158
+ imports: [CardComponent, CheckboxComponent],
159
+ template: "<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n [testId]=\"testId()\"\n>\n <ui-checkbox\n class=\"selectable-card-checkbox\"\n [checked]=\"isSelected()\"\n [disabled]=\"isCheckboxDisabled()\"\n [hasError]=\"hasError()\"\n [testId]=\"checkboxTestId()\"\n [ariaLabel]=\"ariaLabel()\"\n >\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n",
160
+ styles: [".selectable-card .selectable-card-checkbox{display:block;margin-top:-11px;margin-left:-11px}\n"]
161
+ }]
162
+ }],
163
+ propDecorators: {
164
+ size: [{
165
+ type: i0.Input,
166
+ args: [{
167
+ isSignal: true,
168
+ alias: "size",
169
+ required: false
170
+ }]
171
+ }],
172
+ selectedVariant: [{
173
+ type: i0.Input,
174
+ args: [{
175
+ isSignal: true,
176
+ alias: "selectedVariant",
177
+ required: false
178
+ }]
179
+ }],
180
+ selected: [{
181
+ type: i0.Input,
182
+ args: [{
183
+ isSignal: true,
184
+ alias: "selected",
185
+ required: false
186
+ }]
187
+ }],
188
+ isCheckboxDisabled: [{
189
+ type: i0.Input,
190
+ args: [{
191
+ isSignal: true,
192
+ alias: "isCheckboxDisabled",
193
+ required: false
194
+ }]
195
+ }],
196
+ hasError: [{
197
+ type: i0.Input,
198
+ args: [{
199
+ isSignal: true,
200
+ alias: "hasError",
201
+ required: false
202
+ }]
203
+ }],
204
+ testId: [{
205
+ type: i0.Input,
206
+ args: [{
207
+ isSignal: true,
208
+ alias: "testId",
209
+ required: false
210
+ }]
211
+ }],
212
+ ariaLabel: [{
213
+ type: i0.Input,
214
+ args: [{
215
+ isSignal: true,
216
+ alias: "ariaLabel",
217
+ required: false
218
+ }]
219
+ }],
220
+ cardSelected: [{
221
+ type: i0.Output,
222
+ args: ["cardSelected"]
223
+ }]
224
+ }
225
+ });
226
+ var SelectableCardComponentModule = class SelectableCardComponentModule {
227
+ static {
228
+ this.ɵfac = i0.ɵɵngDeclareFactory({
229
+ minVersion: "12.0.0",
230
+ version: "22.2.4",
231
+ ngImport: i0,
232
+ type: SelectableCardComponentModule,
233
+ deps: [],
234
+ target: i0.ɵɵFactoryTarget.NgModule
235
+ });
236
+ }
237
+ static {
238
+ this.ɵmod = i0.ɵɵngDeclareNgModule({
239
+ minVersion: "14.0.0",
240
+ version: "22.2.4",
241
+ ngImport: i0,
242
+ type: SelectableCardComponentModule,
243
+ imports: [
244
+ CommonModule,
245
+ CardComponentModule,
246
+ CheckboxComponentModule,
247
+ SelectableCardComponent
248
+ ],
249
+ exports: [SelectableCardComponent]
250
+ });
251
+ }
252
+ static {
253
+ this.ɵinj = i0.ɵɵngDeclareInjector({
254
+ minVersion: "12.0.0",
255
+ version: "22.2.4",
256
+ ngImport: i0,
257
+ type: SelectableCardComponentModule,
258
+ imports: [
259
+ CommonModule,
260
+ CardComponentModule,
261
+ CheckboxComponentModule,
262
+ SelectableCardComponent
263
+ ]
264
+ });
265
+ }
266
+ };
267
+ i0.ɵɵngDeclareClassMetadata({
268
+ minVersion: "12.0.0",
269
+ version: "22.2.4",
270
+ ngImport: i0,
271
+ type: SelectableCardComponentModule,
272
+ decorators: [{
273
+ type: NgModule,
274
+ args: [{
275
+ imports: [
276
+ CommonModule,
277
+ CardComponentModule,
278
+ CheckboxComponentModule,
279
+ SelectableCardComponent
280
+ ],
281
+ exports: [SelectableCardComponent]
282
+ }]
283
+ }]
284
+ });
84
285
  export { SelectableCardComponent, SelectableCardComponentModule };
85
- //# sourceMappingURL=testgorilla-tgo-ui-components-selectable-card.mjs.map
286
+
287
+ //# sourceMappingURL=testgorilla-tgo-ui-components-selectable-card.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"testgorilla-tgo-ui-components-selectable-card.mjs","sources":["../../../components/selectable-card/selectable-card.component.ts","../../../components/selectable-card/selectable-card.component.html","../../../components/selectable-card/selectable-card.component.module.ts","../../../components/selectable-card/testgorilla-tgo-ui-components-selectable-card.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output, signal } from '@angular/core';\n\nimport { CardSize, CardVariant, CardComponent } from '@testgorilla/tgo-ui/components/card';\nimport { CheckboxComponent } from '@testgorilla/tgo-ui/components/checkbox';\n\n@Component({\n selector: 'ui-selectable-card',\n templateUrl: './selectable-card.component.html',\n styleUrls: ['./selectable-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CardComponent, CheckboxComponent],\n})\nexport class SelectableCardComponent {\n /**\n * Card size. Defaults to \"medium\".\n */\n size = input<CardSize>('medium');\n\n /**\n * Card variant/design for selected state. Defaults to \"default\".\n */\n selectedVariant = input<CardVariant>('state');\n\n /**\n * Whether the card is selected (input from parent).\n */\n selected = input<boolean>(false);\n\n /**\n * Whether the checkbox is disabled.\n */\n isCheckboxDisabled = input<boolean>(false);\n\n /**\n * Whether the card is in an error state, which renders the checkbox in red.\n */\n hasError = input<boolean>(false);\n\n testId = input<string | null>(null);\n\n ariaLabel = input<string>('');\n\n protected readonly checkboxTestId = computed(() => (this.testId() ? `${this.testId()}-checkbox` : null));\n\n /**\n * Event emitted when the card is selected, with the current selected state.\n */\n cardSelected = output<boolean>();\n\n /**\n * Internal override for selected state (when user interacts).\n */\n private readonly internalSelectedOverride = signal<boolean | null>(null);\n\n /**\n * Computed selected state that prioritizes user interaction over input.\n */\n isSelected = computed(() => {\n const override = this.internalSelectedOverride();\n return override ?? this.selected();\n });\n\n /**\n * Handles card selection, toggles internal state and emits the new value.\n */\n handleSelect(): void {\n if (this.isCheckboxDisabled()) {\n return;\n }\n\n const newValue = !this.isSelected();\n this.internalSelectedOverride.set(newValue);\n this.cardSelected.emit(newValue);\n }\n}\n","<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n [testId]=\"testId()\"\n>\n <ui-checkbox\n class=\"selectable-card-checkbox\"\n [checked]=\"isSelected()\"\n [disabled]=\"isCheckboxDisabled()\"\n [hasError]=\"hasError()\"\n [testId]=\"checkboxTestId()\"\n [ariaLabel]=\"ariaLabel()\"\n >\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CardComponentModule } from '@testgorilla/tgo-ui/components/card';\nimport { CheckboxComponentModule } from '@testgorilla/tgo-ui/components/checkbox';\n\nimport { SelectableCardComponent } from './selectable-card.component';\n\n@NgModule({\n imports: [CommonModule, CardComponentModule, CheckboxComponentModule, SelectableCardComponent],\n exports: [SelectableCardComponent],\n})\nexport class SelectableCardComponentModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;MAYa,uBAAuB,CAAA;AAPpC,IAAA,WAAA,GAAA;AAQE;;AAEG;AACH,QAAA,IAAA,CAAA,IAAI,GAAG,KAAK,CAAW,QAAQ,2EAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,eAAe,GAAG,KAAK,CAAc,OAAO,sFAAC;AAE7C;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;AAEhC;;AAEG;AACH,QAAA,IAAA,CAAA,kBAAkB,GAAG,KAAK,CAAU,KAAK,yFAAC;AAE1C;;AAEG;AACH,QAAA,IAAA,CAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,+EAAC;AAEhC,QAAA,IAAA,CAAA,MAAM,GAAG,KAAK,CAAgB,IAAI,6EAAC;AAEnC,QAAA,I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,CAAA;kBAJzC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,OAAO,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,uBAAuB,CAAC;oBAC9F,OAAO,EAAE,CAAC,uBAAuB,CAAC;AACnC,iBAAA;;;ACXD;;AAEG;;"}
1
+ {"version":3,"file":"testgorilla-tgo-ui-components-selectable-card.mjs","names":[],"sources":["../../../components/selectable-card/selectable-card.component.ts","../../../components/selectable-card/selectable-card.component.html","../../../components/selectable-card/selectable-card.component.module.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, computed, input, output, signal } from '@angular/core';\n\nimport { CardSize, CardVariant, CardComponent } from '@testgorilla/tgo-ui/components/card';\nimport { CheckboxComponent } from '@testgorilla/tgo-ui/components/checkbox';\n\n@Component({\n selector: 'ui-selectable-card',\n templateUrl: './selectable-card.component.html',\n styleUrls: ['./selectable-card.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [CardComponent, CheckboxComponent],\n})\nexport class SelectableCardComponent {\n /**\n * Card size. Defaults to \"medium\".\n */\n size = input<CardSize>('medium');\n\n /**\n * Card variant/design for selected state. Defaults to \"default\".\n */\n selectedVariant = input<CardVariant>('state');\n\n /**\n * Whether the card is selected (input from parent).\n */\n selected = input<boolean>(false);\n\n /**\n * Whether the checkbox is disabled.\n */\n isCheckboxDisabled = input<boolean>(false);\n\n /**\n * Whether the card is in an error state, which renders the checkbox in red.\n */\n hasError = input<boolean>(false);\n\n testId = input<string | null>(null);\n\n ariaLabel = input<string>('');\n\n protected readonly checkboxTestId = computed(() => (this.testId() ? `${this.testId()}-checkbox` : null));\n\n /**\n * Event emitted when the card is selected, with the current selected state.\n */\n cardSelected = output<boolean>();\n\n /**\n * Internal override for selected state (when user interacts).\n */\n private readonly internalSelectedOverride = signal<boolean | null>(null);\n\n /**\n * Computed selected state that prioritizes user interaction over input.\n */\n isSelected = computed(() => {\n const override = this.internalSelectedOverride();\n return override ?? this.selected();\n });\n\n /**\n * Handles card selection, toggles internal state and emits the new value.\n */\n handleSelect(): void {\n if (this.isCheckboxDisabled()) {\n return;\n }\n\n const newValue = !this.isSelected();\n this.internalSelectedOverride.set(newValue);\n this.cardSelected.emit(newValue);\n }\n}\n","<ui-card\n class=\"selectable-card\"\n [size]=\"size()\"\n [selected]=\"isSelected()\"\n [allowSelect]=\"!isCheckboxDisabled()\"\n [allowFocus]=\"false\"\n [variant]=\"isCheckboxDisabled() ? 'default' : isSelected() && selectedVariant() ? selectedVariant() : 'state'\"\n (cardSelected)=\"handleSelect()\"\n [testId]=\"testId()\"\n>\n <ui-checkbox\n class=\"selectable-card-checkbox\"\n [checked]=\"isSelected()\"\n [disabled]=\"isCheckboxDisabled()\"\n [hasError]=\"hasError()\"\n [testId]=\"checkboxTestId()\"\n [ariaLabel]=\"ariaLabel()\"\n >\n <div checkbox-label>\n <ng-content select=\"[ui-selectable-card-label]\"></ng-content>\n </div>\n </ui-checkbox>\n <ng-content select=\"[ui-selectable-card-content]\"></ng-content>\n</ui-card>\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\n\nimport { CardComponentModule } from '@testgorilla/tgo-ui/components/card';\nimport { CheckboxComponentModule } from '@testgorilla/tgo-ui/components/checkbox';\n\nimport { SelectableCardComponent } from './selectable-card.component';\n\n@NgModule({\n imports: [CommonModule, CardComponentModule, CheckboxComponentModule, SelectableCardComponent],\n exports: [SelectableCardComponent],\n})\nexport class SelectableCardComponentModule {}\n"],"mappings":";;;;;AAYA,IAAa,0BAAb,MAAa,wBAAuB;CAPpC,cAAA;EAWE,KAAA,OAAO,MAAgB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;EAKhC,KAAA,kBAAkB,MAAmB,SAAQ,GAAA,YAAA,CAAA,EAAA,WAAA,kBAAA,CAAA,+BAAA,CAAA,CAAA;EAK7C,KAAA,WAAW,MAAe,OAAM,GAAA,YAAA,CAAA,EA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