@tectra-ng/ui 0.0.0-stage → 0.1.1

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 (317) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -2
  3. package/amount/README.md +28 -0
  4. package/autocomplete/README.md +82 -0
  5. package/avatar/README.md +43 -0
  6. package/badge/README.md +19 -0
  7. package/button/README.md +46 -0
  8. package/button-group/README.md +8 -0
  9. package/card/README.md +30 -0
  10. package/cascade-select/README.md +49 -0
  11. package/checkbox/README.md +64 -0
  12. package/chip/README.md +38 -0
  13. package/chips-input/README.md +47 -0
  14. package/color-picker/README.md +43 -0
  15. package/confirm/README.md +46 -0
  16. package/country/README.md +23 -0
  17. package/country-select/README.md +39 -0
  18. package/dialog/README.md +84 -0
  19. package/divider/README.md +24 -0
  20. package/drawer/README.md +54 -0
  21. package/email-suggestion/README.md +20 -0
  22. package/fesm2022/tectra-ng-ui-amount.mjs +415 -0
  23. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -0
  24. package/fesm2022/tectra-ng-ui-autocomplete.mjs +730 -0
  25. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-ui-avatar.mjs +670 -0
  27. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-badge.mjs +191 -0
  29. package/fesm2022/tectra-ng-ui-badge.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-ui-button-group.mjs +50 -0
  31. package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-ui-button.mjs +725 -0
  33. package/fesm2022/tectra-ng-ui-button.mjs.map +1 -0
  34. package/fesm2022/tectra-ng-ui-card.mjs +210 -0
  35. package/fesm2022/tectra-ng-ui-card.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-ui-cascade-select.mjs +887 -0
  37. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -0
  38. package/fesm2022/tectra-ng-ui-checkbox.mjs +1150 -0
  39. package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -0
  40. package/fesm2022/tectra-ng-ui-chip.mjs +344 -0
  41. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -0
  42. package/fesm2022/tectra-ng-ui-chips-input.mjs +649 -0
  43. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -0
  44. package/fesm2022/tectra-ng-ui-color-picker.mjs +828 -0
  45. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-ui-confirm.mjs +489 -0
  47. package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-ui-country-select.mjs +545 -0
  49. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -0
  50. package/fesm2022/tectra-ng-ui-country.mjs +313 -0
  51. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -0
  52. package/fesm2022/tectra-ng-ui-dialog.mjs +1539 -0
  53. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -0
  54. package/fesm2022/tectra-ng-ui-divider.mjs +194 -0
  55. package/fesm2022/tectra-ng-ui-divider.mjs.map +1 -0
  56. package/fesm2022/tectra-ng-ui-drawer.mjs +540 -0
  57. package/fesm2022/tectra-ng-ui-drawer.mjs.map +1 -0
  58. package/fesm2022/tectra-ng-ui-email-suggestion.mjs +341 -0
  59. package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -0
  60. package/fesm2022/tectra-ng-ui-field.mjs +492 -0
  61. package/fesm2022/tectra-ng-ui-field.mjs.map +1 -0
  62. package/fesm2022/tectra-ng-ui-fieldset.mjs +258 -0
  63. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -0
  64. package/fesm2022/tectra-ng-ui-highlight-text.mjs +246 -0
  65. package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -0
  66. package/fesm2022/tectra-ng-ui-icon-field.mjs +478 -0
  67. package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -0
  68. package/fesm2022/tectra-ng-ui-input-group.mjs +113 -0
  69. package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -0
  70. package/fesm2022/tectra-ng-ui-input-mask.mjs +413 -0
  71. package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -0
  72. package/fesm2022/tectra-ng-ui-input-number.mjs +1045 -0
  73. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -0
  74. package/fesm2022/tectra-ng-ui-input-otp.mjs +553 -0
  75. package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -0
  76. package/fesm2022/tectra-ng-ui-input.mjs +260 -0
  77. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -0
  78. package/fesm2022/tectra-ng-ui-key-filter.mjs +185 -0
  79. package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -0
  80. package/fesm2022/tectra-ng-ui-knob.mjs +630 -0
  81. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -0
  82. package/fesm2022/tectra-ng-ui-label.mjs +271 -0
  83. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -0
  84. package/fesm2022/tectra-ng-ui-link.mjs +699 -0
  85. package/fesm2022/tectra-ng-ui-link.mjs.map +1 -0
  86. package/fesm2022/tectra-ng-ui-listbox.mjs +484 -0
  87. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -0
  88. package/fesm2022/tectra-ng-ui-mention-textarea.mjs +717 -0
  89. package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -0
  90. package/fesm2022/tectra-ng-ui-menu.mjs +1484 -0
  91. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -0
  92. package/fesm2022/tectra-ng-ui-message.mjs +975 -0
  93. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -0
  94. package/fesm2022/tectra-ng-ui-multiselect.mjs +569 -0
  95. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -0
  96. package/fesm2022/tectra-ng-ui-overlay-badge.mjs +345 -0
  97. package/fesm2022/tectra-ng-ui-overlay-badge.mjs.map +1 -0
  98. package/fesm2022/tectra-ng-ui-paginator.mjs +849 -0
  99. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -0
  100. package/fesm2022/tectra-ng-ui-panel.mjs +317 -0
  101. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -0
  102. package/fesm2022/tectra-ng-ui-password-generator.mjs +292 -0
  103. package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -0
  104. package/fesm2022/tectra-ng-ui-password.mjs +871 -0
  105. package/fesm2022/tectra-ng-ui-password.mjs.map +1 -0
  106. package/fesm2022/tectra-ng-ui-pill.mjs +361 -0
  107. package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -0
  108. package/fesm2022/tectra-ng-ui-popover.mjs +742 -0
  109. package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -0
  110. package/fesm2022/tectra-ng-ui-progress-bar.mjs +440 -0
  111. package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -0
  112. package/fesm2022/tectra-ng-ui-progress-spinner.mjs +265 -0
  113. package/fesm2022/tectra-ng-ui-progress-spinner.mjs.map +1 -0
  114. package/fesm2022/tectra-ng-ui-radio-button.mjs +817 -0
  115. package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -0
  116. package/fesm2022/tectra-ng-ui-rating.mjs +584 -0
  117. package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -0
  118. package/fesm2022/tectra-ng-ui-select.mjs +2478 -0
  119. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -0
  120. package/fesm2022/tectra-ng-ui-skeleton.mjs +548 -0
  121. package/fesm2022/tectra-ng-ui-skeleton.mjs.map +1 -0
  122. package/fesm2022/tectra-ng-ui-slider.mjs +630 -0
  123. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -0
  124. package/fesm2022/tectra-ng-ui-speed-dial.mjs +669 -0
  125. package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -0
  126. package/fesm2022/tectra-ng-ui-split-button.mjs +614 -0
  127. package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -0
  128. package/fesm2022/tectra-ng-ui-status-icon.mjs +295 -0
  129. package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -0
  130. package/fesm2022/tectra-ng-ui-table.mjs +5997 -0
  131. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -0
  132. package/fesm2022/tectra-ng-ui-tag.mjs +422 -0
  133. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -0
  134. package/fesm2022/tectra-ng-ui-textarea.mjs +482 -0
  135. package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -0
  136. package/fesm2022/tectra-ng-ui-toast.mjs +668 -0
  137. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -0
  138. package/fesm2022/tectra-ng-ui-toggle-button.mjs +416 -0
  139. package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -0
  140. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +560 -0
  141. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -0
  142. package/fesm2022/tectra-ng-ui-tooltip.mjs +835 -0
  143. package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -0
  144. package/fesm2022/tectra-ng-ui-tree-select.mjs +986 -0
  145. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -0
  146. package/fesm2022/tectra-ng-ui.mjs +4 -0
  147. package/fesm2022/tectra-ng-ui.mjs.map +1 -0
  148. package/field/README.md +43 -0
  149. package/fieldset/README.md +36 -0
  150. package/highlight-text/README.md +20 -0
  151. package/icon-field/README.md +30 -0
  152. package/input/README.md +22 -0
  153. package/input-group/README.md +21 -0
  154. package/input-mask/README.md +30 -0
  155. package/input-number/README.md +61 -0
  156. package/input-otp/README.md +44 -0
  157. package/key-filter/README.md +31 -0
  158. package/knob/README.md +50 -0
  159. package/label/README.md +29 -0
  160. package/link/README.md +47 -0
  161. package/listbox/README.md +68 -0
  162. package/mention-textarea/README.md +47 -0
  163. package/menu/README.md +65 -0
  164. package/message/README.md +58 -0
  165. package/multiselect/README.md +85 -0
  166. package/overlay-badge/README.md +30 -0
  167. package/package.json +301 -3
  168. package/paginator/README.md +60 -0
  169. package/panel/README.md +45 -0
  170. package/password/README.md +60 -0
  171. package/password-generator/README.md +34 -0
  172. package/pill/README.md +42 -0
  173. package/popover/README.md +67 -0
  174. package/progress-bar/README.md +32 -0
  175. package/progress-spinner/README.md +22 -0
  176. package/radio-button/README.md +54 -0
  177. package/rating/README.md +49 -0
  178. package/select/README.md +78 -0
  179. package/skeleton/README.md +27 -0
  180. package/slider/README.md +48 -0
  181. package/speed-dial/README.md +49 -0
  182. package/split-button/README.md +45 -0
  183. package/status-icon/README.md +22 -0
  184. package/table/README.md +178 -0
  185. package/tag/README.md +42 -0
  186. package/textarea/README.md +37 -0
  187. package/toast/README.md +52 -0
  188. package/toggle-button/README.md +34 -0
  189. package/toggle-switch/README.md +49 -0
  190. package/tooltip/README.md +60 -0
  191. package/tree-select/README.md +49 -0
  192. package/types/tectra-ng-ui-amount.d.ts +135 -0
  193. package/types/tectra-ng-ui-amount.d.ts.map +1 -0
  194. package/types/tectra-ng-ui-autocomplete.d.ts +250 -0
  195. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -0
  196. package/types/tectra-ng-ui-avatar.d.ts +289 -0
  197. package/types/tectra-ng-ui-avatar.d.ts.map +1 -0
  198. package/types/tectra-ng-ui-badge.d.ts +119 -0
  199. package/types/tectra-ng-ui-badge.d.ts.map +1 -0
  200. package/types/tectra-ng-ui-button-group.d.ts +6 -0
  201. package/types/tectra-ng-ui-button-group.d.ts.map +1 -0
  202. package/types/tectra-ng-ui-button.d.ts +466 -0
  203. package/types/tectra-ng-ui-button.d.ts.map +1 -0
  204. package/types/tectra-ng-ui-card.d.ts +71 -0
  205. package/types/tectra-ng-ui-card.d.ts.map +1 -0
  206. package/types/tectra-ng-ui-cascade-select.d.ts +244 -0
  207. package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -0
  208. package/types/tectra-ng-ui-checkbox.d.ts +450 -0
  209. package/types/tectra-ng-ui-checkbox.d.ts.map +1 -0
  210. package/types/tectra-ng-ui-chip.d.ts +106 -0
  211. package/types/tectra-ng-ui-chip.d.ts.map +1 -0
  212. package/types/tectra-ng-ui-chips-input.d.ts +187 -0
  213. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -0
  214. package/types/tectra-ng-ui-color-picker.d.ts +237 -0
  215. package/types/tectra-ng-ui-color-picker.d.ts.map +1 -0
  216. package/types/tectra-ng-ui-confirm.d.ts +80 -0
  217. package/types/tectra-ng-ui-confirm.d.ts.map +1 -0
  218. package/types/tectra-ng-ui-country-select.d.ts +235 -0
  219. package/types/tectra-ng-ui-country-select.d.ts.map +1 -0
  220. package/types/tectra-ng-ui-country.d.ts +105 -0
  221. package/types/tectra-ng-ui-country.d.ts.map +1 -0
  222. package/types/tectra-ng-ui-dialog.d.ts +453 -0
  223. package/types/tectra-ng-ui-dialog.d.ts.map +1 -0
  224. package/types/tectra-ng-ui-divider.d.ts +70 -0
  225. package/types/tectra-ng-ui-divider.d.ts.map +1 -0
  226. package/types/tectra-ng-ui-drawer.d.ts +188 -0
  227. package/types/tectra-ng-ui-drawer.d.ts.map +1 -0
  228. package/types/tectra-ng-ui-email-suggestion.d.ts +84 -0
  229. package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -0
  230. package/types/tectra-ng-ui-field.d.ts +139 -0
  231. package/types/tectra-ng-ui-field.d.ts.map +1 -0
  232. package/types/tectra-ng-ui-fieldset.d.ts +74 -0
  233. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -0
  234. package/types/tectra-ng-ui-highlight-text.d.ts +75 -0
  235. package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -0
  236. package/types/tectra-ng-ui-icon-field.d.ts +77 -0
  237. package/types/tectra-ng-ui-icon-field.d.ts.map +1 -0
  238. package/types/tectra-ng-ui-input-group.d.ts +18 -0
  239. package/types/tectra-ng-ui-input-group.d.ts.map +1 -0
  240. package/types/tectra-ng-ui-input-mask.d.ts +91 -0
  241. package/types/tectra-ng-ui-input-mask.d.ts.map +1 -0
  242. package/types/tectra-ng-ui-input-number.d.ts +326 -0
  243. package/types/tectra-ng-ui-input-number.d.ts.map +1 -0
  244. package/types/tectra-ng-ui-input-otp.d.ts +173 -0
  245. package/types/tectra-ng-ui-input-otp.d.ts.map +1 -0
  246. package/types/tectra-ng-ui-input.d.ts +113 -0
  247. package/types/tectra-ng-ui-input.d.ts.map +1 -0
  248. package/types/tectra-ng-ui-key-filter.d.ts +43 -0
  249. package/types/tectra-ng-ui-key-filter.d.ts.map +1 -0
  250. package/types/tectra-ng-ui-knob.d.ts +207 -0
  251. package/types/tectra-ng-ui-knob.d.ts.map +1 -0
  252. package/types/tectra-ng-ui-label.d.ts +53 -0
  253. package/types/tectra-ng-ui-label.d.ts.map +1 -0
  254. package/types/tectra-ng-ui-link.d.ts +223 -0
  255. package/types/tectra-ng-ui-link.d.ts.map +1 -0
  256. package/types/tectra-ng-ui-listbox.d.ts +131 -0
  257. package/types/tectra-ng-ui-listbox.d.ts.map +1 -0
  258. package/types/tectra-ng-ui-mention-textarea.d.ts +169 -0
  259. package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -0
  260. package/types/tectra-ng-ui-menu.d.ts +512 -0
  261. package/types/tectra-ng-ui-menu.d.ts.map +1 -0
  262. package/types/tectra-ng-ui-message.d.ts +390 -0
  263. package/types/tectra-ng-ui-message.d.ts.map +1 -0
  264. package/types/tectra-ng-ui-multiselect.d.ts +216 -0
  265. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -0
  266. package/types/tectra-ng-ui-overlay-badge.d.ts +104 -0
  267. package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -0
  268. package/types/tectra-ng-ui-paginator.d.ts +293 -0
  269. package/types/tectra-ng-ui-paginator.d.ts.map +1 -0
  270. package/types/tectra-ng-ui-panel.d.ts +133 -0
  271. package/types/tectra-ng-ui-panel.d.ts.map +1 -0
  272. package/types/tectra-ng-ui-password-generator.d.ts +80 -0
  273. package/types/tectra-ng-ui-password-generator.d.ts.map +1 -0
  274. package/types/tectra-ng-ui-password.d.ts +271 -0
  275. package/types/tectra-ng-ui-password.d.ts.map +1 -0
  276. package/types/tectra-ng-ui-pill.d.ts +167 -0
  277. package/types/tectra-ng-ui-pill.d.ts.map +1 -0
  278. package/types/tectra-ng-ui-popover.d.ts +244 -0
  279. package/types/tectra-ng-ui-popover.d.ts.map +1 -0
  280. package/types/tectra-ng-ui-progress-bar.d.ts +151 -0
  281. package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -0
  282. package/types/tectra-ng-ui-progress-spinner.d.ts +95 -0
  283. package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -0
  284. package/types/tectra-ng-ui-radio-button.d.ts +380 -0
  285. package/types/tectra-ng-ui-radio-button.d.ts.map +1 -0
  286. package/types/tectra-ng-ui-rating.d.ts +195 -0
  287. package/types/tectra-ng-ui-rating.d.ts.map +1 -0
  288. package/types/tectra-ng-ui-select.d.ts +761 -0
  289. package/types/tectra-ng-ui-select.d.ts.map +1 -0
  290. package/types/tectra-ng-ui-skeleton.d.ts +182 -0
  291. package/types/tectra-ng-ui-skeleton.d.ts.map +1 -0
  292. package/types/tectra-ng-ui-slider.d.ts +220 -0
  293. package/types/tectra-ng-ui-slider.d.ts.map +1 -0
  294. package/types/tectra-ng-ui-speed-dial.d.ts +175 -0
  295. package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -0
  296. package/types/tectra-ng-ui-split-button.d.ts +139 -0
  297. package/types/tectra-ng-ui-split-button.d.ts.map +1 -0
  298. package/types/tectra-ng-ui-status-icon.d.ts +105 -0
  299. package/types/tectra-ng-ui-status-icon.d.ts.map +1 -0
  300. package/types/tectra-ng-ui-table.d.ts +1301 -0
  301. package/types/tectra-ng-ui-table.d.ts.map +1 -0
  302. package/types/tectra-ng-ui-tag.d.ts +157 -0
  303. package/types/tectra-ng-ui-tag.d.ts.map +1 -0
  304. package/types/tectra-ng-ui-textarea.d.ts +146 -0
  305. package/types/tectra-ng-ui-textarea.d.ts.map +1 -0
  306. package/types/tectra-ng-ui-toast.d.ts +268 -0
  307. package/types/tectra-ng-ui-toast.d.ts.map +1 -0
  308. package/types/tectra-ng-ui-toggle-button.d.ts +184 -0
  309. package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -0
  310. package/types/tectra-ng-ui-toggle-switch.d.ts +226 -0
  311. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -0
  312. package/types/tectra-ng-ui-tooltip.d.ts +275 -0
  313. package/types/tectra-ng-ui-tooltip.d.ts.map +1 -0
  314. package/types/tectra-ng-ui-tree-select.d.ts +339 -0
  315. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -0
  316. package/types/tectra-ng-ui.d.ts +2 -0
  317. package/types/tectra-ng-ui.d.ts.map +1 -0
@@ -0,0 +1,1150 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, Directive, InjectionToken, TemplateRef, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, model, output, signal, viewChild } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import * as i1 from "@angular/forms";
5
+ import { FormsModule, NG_VALUE_ACCESSOR } from "@angular/forms";
6
+ import { uniqueId } from "@tectra-ng/core/a11y";
7
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
8
+ import { TxFormControlBase, injectFieldInvalid } from "@tectra-ng/core/forms";
9
+ import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
10
+ import { TxIcon, TxIconRegistry } from "@tectra-ng/icons";
11
+ import { toStyleObject } from "@tectra-ng/themes";
12
+ import { injectTranslations } from "@tectra-ng/core/i18n";
13
+ const TX_CHECKBOX_GROUP = new InjectionToken("TX_CHECKBOX_GROUP");
14
+ var TxCheckboxIconTemplate = class TxCheckboxIconTemplate {
15
+ templateRef = inject(TemplateRef);
16
+ static ɵfac = i0.ɵɵngDeclareFactory({
17
+ minVersion: "12.0.0",
18
+ version: "22.2.3",
19
+ ngImport: i0,
20
+ type: TxCheckboxIconTemplate,
21
+ deps: [],
22
+ target: i0.ɵɵFactoryTarget.Directive
23
+ });
24
+ static ɵdir = i0.ɵɵngDeclareDirective({
25
+ minVersion: "14.0.0",
26
+ version: "22.2.3",
27
+ type: TxCheckboxIconTemplate,
28
+ isStandalone: true,
29
+ selector: "ng-template[txCheckboxIcon]",
30
+ ngImport: i0
31
+ });
32
+ };
33
+ i0.ɵɵngDeclareClassMetadata({
34
+ minVersion: "12.0.0",
35
+ version: "22.2.3",
36
+ ngImport: i0,
37
+ type: TxCheckboxIconTemplate,
38
+ decorators: [{
39
+ type: Directive,
40
+ args: [{ selector: "ng-template[txCheckboxIcon]" }]
41
+ }]
42
+ });
43
+ var TxCheckbox = class TxCheckbox extends TxFormControlBase {
44
+ txIconRegistry = inject(TxIconRegistry);
45
+ group = inject(TX_CHECKBOX_GROUP, { optional: true });
46
+ generatedId = uniqueId("tx-checkbox");
47
+ label = input(void 0, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
48
+ description = input(void 0, ...ngDevMode ? [{ debugName: "description" }] : /* istanbul ignore next */ []);
49
+ optionValue = input(void 0, {
50
+ ...ngDevMode ? { debugName: "optionValue" } : /* istanbul ignore next */ {},
51
+ alias: "value"
52
+ });
53
+ binary = input(void 0, {
54
+ ...ngDevMode ? { debugName: "binary" } : /* istanbul ignore next */ {},
55
+ transform: optionalBoolean
56
+ });
57
+ trueValue = input(true, ...ngDevMode ? [{ debugName: "trueValue" }] : /* istanbul ignore next */ []);
58
+ falseValue = input(false, ...ngDevMode ? [{ debugName: "falseValue" }] : /* istanbul ignore next */ []);
59
+ indeterminate = model(false, ...ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []);
60
+ icon = input("check", ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
61
+ indeterminateIcon = input("minus", ...ngDevMode ? [{ debugName: "indeterminateIcon" }] : /* istanbul ignore next */ []);
62
+ size = input(void 0, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
63
+ variant = input(void 0, ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
64
+ tile = input(false, {
65
+ ...ngDevMode ? { debugName: "tile" } : /* istanbul ignore next */ {},
66
+ transform: booleanAttribute
67
+ });
68
+ invalid = input(void 0, {
69
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
70
+ transform: optionalBoolean
71
+ });
72
+ disabledInput = input(false, {
73
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
74
+ alias: "disabled",
75
+ transform: booleanAttribute
76
+ });
77
+ readonly = input(false, {
78
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
79
+ transform: booleanAttribute
80
+ });
81
+ required = input(false, {
82
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
83
+ transform: booleanAttribute
84
+ });
85
+ name = input(void 0, ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
86
+ inputId = input(void 0, ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
87
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
88
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
89
+ tabindex = input(void 0, {
90
+ ...ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {},
91
+ transform: optionalNumber
92
+ });
93
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
94
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
95
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
96
+ unstyled = input(void 0, {
97
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
98
+ transform: optionalBoolean
99
+ });
100
+ changed = output();
101
+ iconTemplate = contentChild(TxCheckboxIconTemplate, ...ngDevMode ? [{ debugName: "iconTemplate" }] : /* istanbul ignore next */ []);
102
+ inputRef = viewChild.required("input", ...ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []);
103
+ isUnstyled = injectUnstyled(this.unstyled);
104
+ passThrough = injectPassThrough("checkbox", this, this.pt, this.ptOptions);
105
+ ownInvalid = injectFieldInvalid(this.invalid);
106
+ inGroup = computed(() => !!this.group && this.optionValue() !== void 0, ...ngDevMode ? [{ debugName: "inGroup" }] : /* istanbul ignore next */ []);
107
+ isBinary = computed(() => this.binary() ?? this.optionValue() === void 0, ...ngDevMode ? [{ debugName: "isBinary" }] : /* istanbul ignore next */ []);
108
+ resolvedId = computed(() => this.inputId() ?? this.generatedId, ...ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []);
109
+ descriptionId = `${this.generatedId}-description`;
110
+ resolvedName = computed(() => this.name() ?? this.group?.name(), ...ngDevMode ? [{ debugName: "resolvedName" }] : /* istanbul ignore next */ []);
111
+ resolvedSize = computed(() => this.size() ?? this.group?.size() ?? "medium", ...ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []);
112
+ resolvedVariant = computed(() => this.variant() ?? this.group?.variant() ?? "outlined", ...ngDevMode ? [{ debugName: "resolvedVariant" }] : /* istanbul ignore next */ []);
113
+ isDisabled = computed(() => this.disabled() || this.disabledInput() || !!this.group?.isDisabled(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
114
+ isInvalid = computed(() => this.ownInvalid() || this.inGroup() && !!this.group?.isInvalid(), ...ngDevMode ? [{ debugName: "isInvalid" }] : /* istanbul ignore next */ []);
115
+ checked = computed(() => {
116
+ if (this.inGroup()) return !!this.group?.isChecked(this.optionValue());
117
+ const model = this.value();
118
+ if (this.isBinary()) return model === this.trueValue();
119
+ return Array.isArray(model) && model.includes(this.optionValue());
120
+ }, ...ngDevMode ? [{ debugName: "checked" }] : /* istanbul ignore next */ []);
121
+ iconName = computed(() => {
122
+ const icon = this.indeterminate() && !this.checked() ? this.indeterminateIcon() : this.icon();
123
+ return this.txIconRegistry.has(icon) ? icon : null;
124
+ }, ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
125
+ iconClass = computed(() => this.indeterminate() && !this.checked() ? this.indeterminateIcon() : this.icon(), ...ngDevMode ? [{ debugName: "iconClass" }] : /* istanbul ignore next */ []);
126
+ hostStyle = computed(() => ({
127
+ ...toStyleObject(this.dt(), "--tx-checkbox"),
128
+ ...this.passThrough().root?.style
129
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
130
+ constructor() {
131
+ super();
132
+ effect((onCleanup) => {
133
+ const value = this.optionValue();
134
+ if (this.group && value !== void 0) onCleanup(this.group.register(value));
135
+ });
136
+ }
137
+ focus() {
138
+ this.inputRef().nativeElement.focus();
139
+ }
140
+ onInputClick(event) {
141
+ if (this.readonly()) event.preventDefault();
142
+ }
143
+ onInputChange(event) {
144
+ const next = event.target.checked;
145
+ this.indeterminate.set(false);
146
+ if (this.inGroup()) {
147
+ this.group?.toggle(this.optionValue(), next);
148
+ this.changed.emit({
149
+ checked: next,
150
+ value: this.optionValue(),
151
+ originalEvent: event
152
+ });
153
+ return;
154
+ }
155
+ let model;
156
+ if (this.isBinary()) model = next ? this.trueValue() : this.falseValue();
157
+ else {
158
+ const current = Array.isArray(this.value()) ? this.value() : [];
159
+ model = next ? [...current.filter((item) => item !== this.optionValue()), this.optionValue()] : current.filter((item) => item !== this.optionValue());
160
+ }
161
+ this.updateValue(model);
162
+ this.changed.emit({
163
+ checked: next,
164
+ value: model,
165
+ originalEvent: event
166
+ });
167
+ }
168
+ onBlur() {
169
+ this.markTouched();
170
+ this.group?.touch();
171
+ }
172
+ onHostClick(event) {
173
+ if (!this.tile() || this.isDisabled()) return;
174
+ if (!event.target.closest("label, input, a, button")) this.inputRef().nativeElement.click();
175
+ }
176
+ static ɵfac = i0.ɵɵngDeclareFactory({
177
+ minVersion: "12.0.0",
178
+ version: "22.2.3",
179
+ ngImport: i0,
180
+ type: TxCheckbox,
181
+ deps: [],
182
+ target: i0.ɵɵFactoryTarget.Component
183
+ });
184
+ static ɵcmp = i0.ɵɵngDeclareComponent({
185
+ minVersion: "17.0.0",
186
+ version: "22.2.3",
187
+ type: TxCheckbox,
188
+ isStandalone: true,
189
+ selector: "tx-checkbox",
190
+ inputs: {
191
+ label: {
192
+ classPropertyName: "label",
193
+ publicName: "label",
194
+ isSignal: true,
195
+ isRequired: false,
196
+ transformFunction: null
197
+ },
198
+ description: {
199
+ classPropertyName: "description",
200
+ publicName: "description",
201
+ isSignal: true,
202
+ isRequired: false,
203
+ transformFunction: null
204
+ },
205
+ optionValue: {
206
+ classPropertyName: "optionValue",
207
+ publicName: "value",
208
+ isSignal: true,
209
+ isRequired: false,
210
+ transformFunction: null
211
+ },
212
+ binary: {
213
+ classPropertyName: "binary",
214
+ publicName: "binary",
215
+ isSignal: true,
216
+ isRequired: false,
217
+ transformFunction: null
218
+ },
219
+ trueValue: {
220
+ classPropertyName: "trueValue",
221
+ publicName: "trueValue",
222
+ isSignal: true,
223
+ isRequired: false,
224
+ transformFunction: null
225
+ },
226
+ falseValue: {
227
+ classPropertyName: "falseValue",
228
+ publicName: "falseValue",
229
+ isSignal: true,
230
+ isRequired: false,
231
+ transformFunction: null
232
+ },
233
+ indeterminate: {
234
+ classPropertyName: "indeterminate",
235
+ publicName: "indeterminate",
236
+ isSignal: true,
237
+ isRequired: false,
238
+ transformFunction: null
239
+ },
240
+ icon: {
241
+ classPropertyName: "icon",
242
+ publicName: "icon",
243
+ isSignal: true,
244
+ isRequired: false,
245
+ transformFunction: null
246
+ },
247
+ indeterminateIcon: {
248
+ classPropertyName: "indeterminateIcon",
249
+ publicName: "indeterminateIcon",
250
+ isSignal: true,
251
+ isRequired: false,
252
+ transformFunction: null
253
+ },
254
+ size: {
255
+ classPropertyName: "size",
256
+ publicName: "size",
257
+ isSignal: true,
258
+ isRequired: false,
259
+ transformFunction: null
260
+ },
261
+ variant: {
262
+ classPropertyName: "variant",
263
+ publicName: "variant",
264
+ isSignal: true,
265
+ isRequired: false,
266
+ transformFunction: null
267
+ },
268
+ tile: {
269
+ classPropertyName: "tile",
270
+ publicName: "tile",
271
+ isSignal: true,
272
+ isRequired: false,
273
+ transformFunction: null
274
+ },
275
+ invalid: {
276
+ classPropertyName: "invalid",
277
+ publicName: "invalid",
278
+ isSignal: true,
279
+ isRequired: false,
280
+ transformFunction: null
281
+ },
282
+ disabledInput: {
283
+ classPropertyName: "disabledInput",
284
+ publicName: "disabled",
285
+ isSignal: true,
286
+ isRequired: false,
287
+ transformFunction: null
288
+ },
289
+ readonly: {
290
+ classPropertyName: "readonly",
291
+ publicName: "readonly",
292
+ isSignal: true,
293
+ isRequired: false,
294
+ transformFunction: null
295
+ },
296
+ required: {
297
+ classPropertyName: "required",
298
+ publicName: "required",
299
+ isSignal: true,
300
+ isRequired: false,
301
+ transformFunction: null
302
+ },
303
+ name: {
304
+ classPropertyName: "name",
305
+ publicName: "name",
306
+ isSignal: true,
307
+ isRequired: false,
308
+ transformFunction: null
309
+ },
310
+ inputId: {
311
+ classPropertyName: "inputId",
312
+ publicName: "inputId",
313
+ isSignal: true,
314
+ isRequired: false,
315
+ transformFunction: null
316
+ },
317
+ ariaLabel: {
318
+ classPropertyName: "ariaLabel",
319
+ publicName: "ariaLabel",
320
+ isSignal: true,
321
+ isRequired: false,
322
+ transformFunction: null
323
+ },
324
+ ariaLabelledBy: {
325
+ classPropertyName: "ariaLabelledBy",
326
+ publicName: "ariaLabelledBy",
327
+ isSignal: true,
328
+ isRequired: false,
329
+ transformFunction: null
330
+ },
331
+ tabindex: {
332
+ classPropertyName: "tabindex",
333
+ publicName: "tabindex",
334
+ isSignal: true,
335
+ isRequired: false,
336
+ transformFunction: null
337
+ },
338
+ dt: {
339
+ classPropertyName: "dt",
340
+ publicName: "dt",
341
+ isSignal: true,
342
+ isRequired: false,
343
+ transformFunction: null
344
+ },
345
+ pt: {
346
+ classPropertyName: "pt",
347
+ publicName: "pt",
348
+ isSignal: true,
349
+ isRequired: false,
350
+ transformFunction: null
351
+ },
352
+ ptOptions: {
353
+ classPropertyName: "ptOptions",
354
+ publicName: "ptOptions",
355
+ isSignal: true,
356
+ isRequired: false,
357
+ transformFunction: null
358
+ },
359
+ unstyled: {
360
+ classPropertyName: "unstyled",
361
+ publicName: "unstyled",
362
+ isSignal: true,
363
+ isRequired: false,
364
+ transformFunction: null
365
+ }
366
+ },
367
+ outputs: {
368
+ indeterminate: "indeterminateChange",
369
+ changed: "changed"
370
+ },
371
+ host: {
372
+ listeners: { "click": "onHostClick($event)" },
373
+ properties: {
374
+ "class": "passThrough().root?.class",
375
+ "style": "hostStyle()",
376
+ "attr.data-styled": "!isUnstyled() || null",
377
+ "attr.data-size": "resolvedSize()",
378
+ "attr.data-variant": "resolvedVariant()",
379
+ "class.tx-checkbox--checked": "checked()",
380
+ "class.tx-checkbox--indeterminate": "indeterminate() && !checked()",
381
+ "class.tx-checkbox--disabled": "isDisabled()",
382
+ "class.tx-checkbox--readonly": "readonly()",
383
+ "class.tx-checkbox--invalid": "isInvalid()",
384
+ "class.tx-checkbox--tile": "tile()"
385
+ },
386
+ classAttribute: "tx-checkbox"
387
+ },
388
+ providers: [{
389
+ provide: NG_VALUE_ACCESSOR,
390
+ useExisting: forwardRef(() => TxCheckbox),
391
+ multi: true
392
+ }],
393
+ queries: [{
394
+ propertyName: "iconTemplate",
395
+ first: true,
396
+ predicate: TxCheckboxIconTemplate,
397
+ descendants: true,
398
+ isSignal: true
399
+ }],
400
+ viewQueries: [{
401
+ propertyName: "inputRef",
402
+ first: true,
403
+ predicate: ["input"],
404
+ descendants: true,
405
+ isSignal: true
406
+ }],
407
+ usesInheritance: true,
408
+ ngImport: i0,
409
+ template: "<span class=\"tx-checkbox__box\" [class]=\"passThrough().box?.class\" [style]=\"passThrough().box?.style\">\n <input\n #input\n type=\"checkbox\"\n class=\"tx-checkbox__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate() && !checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.name]=\"resolvedName() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-checkbox__indicator\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: checked(), indeterminate: indeterminate() && !checked() }\" />\n } @else if (checked() || indeterminate()) {\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"iconClass()\"></span>\n }\n }\n </span>\n</span>\n<span class=\"tx-checkbox__text\">\n <label class=\"tx-checkbox__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >{{ label() }}<ng-content\n /></label>\n @if (description()) {\n <span class=\"tx-checkbox__description\" [id]=\"descriptionId\" [class]=\"passThrough().description?.class\" [style]=\"passThrough().description?.style\">{{\n description()\n }}</span>\n }\n</span>\n",
410
+ styles: [":host{display:inline-flex;align-items:flex-start;vertical-align:top}:host([data-styled]){--_size: var(--tx-checkbox-size);--_icon-size: var(--tx-checkbox-icon-size);--_label-font-size: var(--tx-checkbox-label-font-size);gap:var(--tx-checkbox-gap);font-family:var(--tx-font-family)}:host([data-styled][data-size=small]){--_size: var(--tx-checkbox-sm-size);--_icon-size: var(--tx-checkbox-sm-icon-size);--_label-font-size: var(--tx-checkbox-sm-label-font-size)}:host([data-styled][data-size=large]){--_size: var(--tx-checkbox-lg-size);--_icon-size: var(--tx-checkbox-lg-icon-size);--_label-font-size: var(--tx-checkbox-lg-label-font-size)}.tx-checkbox__box{position:relative;display:inline-flex;flex-shrink:0}.tx-checkbox__input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.tx-checkbox__input:disabled{cursor:not-allowed}:host([data-styled]) .tx-checkbox__box{margin-top:calc((var(--_label-font-size) * 1.5 - var(--_size)) / 2)}:host([data-styled]) .tx-checkbox__indicator{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--_size);height:var(--_size);border:var(--tx-checkbox-border-width) solid var(--tx-checkbox-border-color);border-radius:var(--tx-checkbox-border-radius);background:var(--tx-checkbox-background);color:var(--tx-checkbox-icon-color);font-size:var(--_icon-size);transition:background-color var(--tx-checkbox-transition-duration),border-color var(--tx-checkbox-transition-duration)}:host([data-styled]) .tx-checkbox__indicator tx-icon{--tx-icon-stroke-width: 3}:host([data-styled][data-variant=filled]) .tx-checkbox__indicator{background:var(--tx-checkbox-filled-background)}:host([data-styled]:not(.tx-checkbox--disabled):not(.tx-checkbox--readonly)) .tx-checkbox__input:hover+.tx-checkbox__indicator{border-color:var(--tx-checkbox-hover-border-color)}:host([data-styled].tx-checkbox--checked) .tx-checkbox__indicator,:host([data-styled].tx-checkbox--indeterminate) .tx-checkbox__indicator{border-color:var(--tx-checkbox-checked-border-color);background:var(--tx-checkbox-checked-background)}:host([data-styled].tx-checkbox--checked:not(.tx-checkbox--disabled):not(.tx-checkbox--readonly)) .tx-checkbox__input:hover+.tx-checkbox__indicator,:host([data-styled].tx-checkbox--indeterminate:not(.tx-checkbox--disabled):not(.tx-checkbox--readonly)) .tx-checkbox__input:hover+.tx-checkbox__indicator{border-color:var(--tx-checkbox-checked-hover-border-color);background:var(--tx-checkbox-checked-hover-background)}:host([data-styled].tx-checkbox--invalid) .tx-checkbox__indicator{border-color:var(--tx-checkbox-invalid-border-color)}:host([data-styled]) .tx-checkbox__input:focus-visible+.tx-checkbox__indicator{outline:var(--tx-checkbox-focus-ring-width) solid var(--tx-checkbox-focus-ring-color);outline-offset:var(--tx-checkbox-focus-ring-offset)}:host([data-styled].tx-checkbox--disabled) .tx-checkbox__indicator{border-color:var(--tx-checkbox-disabled-border-color);background:var(--tx-checkbox-disabled-background)}:host([data-styled].tx-checkbox--disabled) .tx-checkbox__label{color:var(--tx-checkbox-disabled-label-color);cursor:not-allowed}:host([data-styled].tx-checkbox--disabled.tx-checkbox--checked) .tx-checkbox__indicator,:host([data-styled].tx-checkbox--disabled.tx-checkbox--indeterminate) .tx-checkbox__indicator{border-color:var(--tx-checkbox-disabled-checked-background);background:var(--tx-checkbox-disabled-checked-background);color:var(--tx-checkbox-disabled-icon-color)}:host(.tx-checkbox--readonly) .tx-checkbox__input,:host(.tx-checkbox--readonly) .tx-checkbox__label{cursor:default}.tx-checkbox__text{display:flex;flex-direction:column;min-width:0}.tx-checkbox__label:empty{display:none}:host([data-styled]) .tx-checkbox__label{color:var(--tx-checkbox-label-color);font-size:var(--_label-font-size);font-weight:var(--tx-checkbox-label-font-weight);line-height:1.5;cursor:pointer}:host([data-styled]) .tx-checkbox__description{color:var(--tx-checkbox-description-color);font-size:var(--tx-checkbox-description-font-size);line-height:1.45}:host([data-styled].tx-checkbox--tile){box-sizing:border-box;gap:var(--tx-checkbox-tile-gap);padding:var(--tx-checkbox-tile-padding);border:1px solid var(--tx-checkbox-tile-border-color);border-radius:var(--tx-checkbox-tile-border-radius);background:var(--tx-checkbox-tile-background);cursor:pointer;transition:border-color var(--tx-checkbox-transition-duration),background-color var(--tx-checkbox-transition-duration)}:host([data-styled].tx-checkbox--tile) .tx-checkbox__label{font-weight:var(--tx-checkbox-tile-label-font-weight)}:host([data-styled].tx-checkbox--tile:not(.tx-checkbox--disabled):hover){border-color:var(--tx-checkbox-tile-hover-border-color)}:host([data-styled].tx-checkbox--tile.tx-checkbox--checked){border-color:var(--tx-checkbox-tile-checked-border-color);background:var(--tx-checkbox-tile-checked-background)}:host([data-styled].tx-checkbox--tile.tx-checkbox--disabled){cursor:not-allowed}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-checkbox__indicator,:host([data-styled].tx-checkbox--tile){transition:none}}\n"],
411
+ dependencies: [{
412
+ kind: "directive",
413
+ type: NgTemplateOutlet,
414
+ selector: "[ngTemplateOutlet]",
415
+ inputs: [
416
+ "ngTemplateOutletContext",
417
+ "ngTemplateOutlet",
418
+ "ngTemplateOutletInjector"
419
+ ]
420
+ }, {
421
+ kind: "component",
422
+ type: TxIcon,
423
+ selector: "tx-icon",
424
+ inputs: ["name"]
425
+ }],
426
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
427
+ });
428
+ };
429
+ i0.ɵɵngDeclareClassMetadata({
430
+ minVersion: "12.0.0",
431
+ version: "22.2.3",
432
+ ngImport: i0,
433
+ type: TxCheckbox,
434
+ decorators: [{
435
+ type: Component,
436
+ args: [{
437
+ selector: "tx-checkbox",
438
+ imports: [NgTemplateOutlet, TxIcon],
439
+ changeDetection: ChangeDetectionStrategy.OnPush,
440
+ providers: [{
441
+ provide: NG_VALUE_ACCESSOR,
442
+ useExisting: forwardRef(() => TxCheckbox),
443
+ multi: true
444
+ }],
445
+ host: {
446
+ class: "tx-checkbox",
447
+ "[class]": "passThrough().root?.class",
448
+ "[style]": "hostStyle()",
449
+ "[attr.data-styled]": "!isUnstyled() || null",
450
+ "[attr.data-size]": "resolvedSize()",
451
+ "[attr.data-variant]": "resolvedVariant()",
452
+ "[class.tx-checkbox--checked]": "checked()",
453
+ "[class.tx-checkbox--indeterminate]": "indeterminate() && !checked()",
454
+ "[class.tx-checkbox--disabled]": "isDisabled()",
455
+ "[class.tx-checkbox--readonly]": "readonly()",
456
+ "[class.tx-checkbox--invalid]": "isInvalid()",
457
+ "[class.tx-checkbox--tile]": "tile()",
458
+ "(click)": "onHostClick($event)"
459
+ },
460
+ template: "<span class=\"tx-checkbox__box\" [class]=\"passThrough().box?.class\" [style]=\"passThrough().box?.style\">\n <input\n #input\n type=\"checkbox\"\n class=\"tx-checkbox__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [id]=\"resolvedId()\"\n [checked]=\"checked()\"\n [indeterminate]=\"indeterminate() && !checked()\"\n [disabled]=\"isDisabled()\"\n [required]=\"required()\"\n [attr.name]=\"resolvedName() ?? null\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"description() ? descriptionId : null\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n (click)=\"onInputClick($event)\"\n (change)=\"onInputChange($event)\"\n (blur)=\"onBlur()\"\n />\n <span class=\"tx-checkbox__indicator\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"{ $implicit: checked(), indeterminate: indeterminate() && !checked() }\" />\n } @else if (checked() || indeterminate()) {\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"iconClass()\"></span>\n }\n }\n </span>\n</span>\n<span class=\"tx-checkbox__text\">\n <label class=\"tx-checkbox__label\" [for]=\"resolvedId()\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\"\n >{{ label() }}<ng-content\n /></label>\n @if (description()) {\n <span class=\"tx-checkbox__description\" [id]=\"descriptionId\" [class]=\"passThrough().description?.class\" [style]=\"passThrough().description?.style\">{{\n description()\n }}</span>\n }\n</span>\n",
461
+ styles: [":host{display:inline-flex;align-items:flex-start;vertical-align:top}:host([data-styled]){--_size: var(--tx-checkbox-size);--_icon-size: var(--tx-checkbox-icon-size);--_label-font-size: var(--tx-checkbox-label-font-size);gap:var(--tx-checkbox-gap);font-family:var(--tx-font-family)}:host([data-styled][data-size=small]){--_size: var(--tx-checkbox-sm-size);--_icon-size: var(--tx-checkbox-sm-icon-size);--_label-font-size: var(--tx-checkbox-sm-label-font-size)}:host([data-styled][data-size=large]){--_size: var(--tx-checkbox-lg-size);--_icon-size: var(--tx-checkbox-lg-icon-size);--_label-font-size: var(--tx-checkbox-lg-label-font-size)}.tx-checkbox__box{position:relative;display:inline-flex;flex-shrink:0}.tx-checkbox__input{position:absolute;inset:0;z-index:1;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}.tx-checkbox__input:disabled{cursor:not-allowed}:host([data-styled]) .tx-checkbox__box{margin-top:calc((var(--_label-font-size) * 1.5 - var(--_size)) / 2)}:host([data-styled]) .tx-checkbox__indicator{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:var(--_size);height:var(--_size);border:var(--tx-checkbox-border-width) solid var(--tx-checkbox-border-color);border-radius:var(--tx-checkbox-border-radius);background:var(--tx-checkbox-background);color:var(--tx-checkbox-icon-color);font-size:var(--_icon-size);transition:background-color var(--tx-checkbox-transition-duration),border-color var(--tx-checkbox-transition-duration)}:host([data-styled]) .tx-checkbox__indicator tx-icon{--tx-icon-stroke-width: 3}:host([data-styled][data-variant=filled]) .tx-checkbox__indicator{background:var(--tx-checkbox-filled-background)}:host([data-styled]:not(.tx-checkbox--disabled):not(.tx-checkbox--readonly)) .tx-checkbox__input:hover+.tx-checkbox__indicator{border-color:var(--tx-checkbox-hover-border-color)}:host([data-styled].tx-checkbox--checked) .tx-checkbox__indicator,:host([data-styled].tx-checkbox--indeterminate) .tx-checkbox__indicator{border-color:var(--tx-checkbox-checked-border-color);background:var(--tx-checkbox-checked-background)}:host([data-styled].tx-checkbox--checked:not(.tx-checkbox--disabled):not(.tx-checkbox--readonly)) .tx-checkbox__input:hover+.tx-checkbox__indicator,:host([data-styled].tx-checkbox--indeterminate:not(.tx-checkbox--disabled):not(.tx-checkbox--readonly)) .tx-checkbox__input:hover+.tx-checkbox__indicator{border-color:var(--tx-checkbox-checked-hover-border-color);background:var(--tx-checkbox-checked-hover-background)}:host([data-styled].tx-checkbox--invalid) .tx-checkbox__indicator{border-color:var(--tx-checkbox-invalid-border-color)}:host([data-styled]) .tx-checkbox__input:focus-visible+.tx-checkbox__indicator{outline:var(--tx-checkbox-focus-ring-width) solid var(--tx-checkbox-focus-ring-color);outline-offset:var(--tx-checkbox-focus-ring-offset)}:host([data-styled].tx-checkbox--disabled) .tx-checkbox__indicator{border-color:var(--tx-checkbox-disabled-border-color);background:var(--tx-checkbox-disabled-background)}:host([data-styled].tx-checkbox--disabled) .tx-checkbox__label{color:var(--tx-checkbox-disabled-label-color);cursor:not-allowed}:host([data-styled].tx-checkbox--disabled.tx-checkbox--checked) .tx-checkbox__indicator,:host([data-styled].tx-checkbox--disabled.tx-checkbox--indeterminate) .tx-checkbox__indicator{border-color:var(--tx-checkbox-disabled-checked-background);background:var(--tx-checkbox-disabled-checked-background);color:var(--tx-checkbox-disabled-icon-color)}:host(.tx-checkbox--readonly) .tx-checkbox__input,:host(.tx-checkbox--readonly) .tx-checkbox__label{cursor:default}.tx-checkbox__text{display:flex;flex-direction:column;min-width:0}.tx-checkbox__label:empty{display:none}:host([data-styled]) .tx-checkbox__label{color:var(--tx-checkbox-label-color);font-size:var(--_label-font-size);font-weight:var(--tx-checkbox-label-font-weight);line-height:1.5;cursor:pointer}:host([data-styled]) .tx-checkbox__description{color:var(--tx-checkbox-description-color);font-size:var(--tx-checkbox-description-font-size);line-height:1.45}:host([data-styled].tx-checkbox--tile){box-sizing:border-box;gap:var(--tx-checkbox-tile-gap);padding:var(--tx-checkbox-tile-padding);border:1px solid var(--tx-checkbox-tile-border-color);border-radius:var(--tx-checkbox-tile-border-radius);background:var(--tx-checkbox-tile-background);cursor:pointer;transition:border-color var(--tx-checkbox-transition-duration),background-color var(--tx-checkbox-transition-duration)}:host([data-styled].tx-checkbox--tile) .tx-checkbox__label{font-weight:var(--tx-checkbox-tile-label-font-weight)}:host([data-styled].tx-checkbox--tile:not(.tx-checkbox--disabled):hover){border-color:var(--tx-checkbox-tile-hover-border-color)}:host([data-styled].tx-checkbox--tile.tx-checkbox--checked){border-color:var(--tx-checkbox-tile-checked-border-color);background:var(--tx-checkbox-tile-checked-background)}:host([data-styled].tx-checkbox--tile.tx-checkbox--disabled){cursor:not-allowed}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-checkbox__indicator,:host([data-styled].tx-checkbox--tile){transition:none}}\n"]
462
+ }]
463
+ }],
464
+ ctorParameters: () => [],
465
+ propDecorators: {
466
+ label: [{
467
+ type: i0.Input,
468
+ args: [{
469
+ isSignal: true,
470
+ alias: "label",
471
+ required: false
472
+ }]
473
+ }],
474
+ description: [{
475
+ type: i0.Input,
476
+ args: [{
477
+ isSignal: true,
478
+ alias: "description",
479
+ required: false
480
+ }]
481
+ }],
482
+ optionValue: [{
483
+ type: i0.Input,
484
+ args: [{
485
+ isSignal: true,
486
+ alias: "value",
487
+ required: false
488
+ }]
489
+ }],
490
+ binary: [{
491
+ type: i0.Input,
492
+ args: [{
493
+ isSignal: true,
494
+ alias: "binary",
495
+ required: false
496
+ }]
497
+ }],
498
+ trueValue: [{
499
+ type: i0.Input,
500
+ args: [{
501
+ isSignal: true,
502
+ alias: "trueValue",
503
+ required: false
504
+ }]
505
+ }],
506
+ falseValue: [{
507
+ type: i0.Input,
508
+ args: [{
509
+ isSignal: true,
510
+ alias: "falseValue",
511
+ required: false
512
+ }]
513
+ }],
514
+ indeterminate: [{
515
+ type: i0.Input,
516
+ args: [{
517
+ isSignal: true,
518
+ alias: "indeterminate",
519
+ required: false
520
+ }]
521
+ }, {
522
+ type: i0.Output,
523
+ args: ["indeterminateChange"]
524
+ }],
525
+ icon: [{
526
+ type: i0.Input,
527
+ args: [{
528
+ isSignal: true,
529
+ alias: "icon",
530
+ required: false
531
+ }]
532
+ }],
533
+ indeterminateIcon: [{
534
+ type: i0.Input,
535
+ args: [{
536
+ isSignal: true,
537
+ alias: "indeterminateIcon",
538
+ required: false
539
+ }]
540
+ }],
541
+ size: [{
542
+ type: i0.Input,
543
+ args: [{
544
+ isSignal: true,
545
+ alias: "size",
546
+ required: false
547
+ }]
548
+ }],
549
+ variant: [{
550
+ type: i0.Input,
551
+ args: [{
552
+ isSignal: true,
553
+ alias: "variant",
554
+ required: false
555
+ }]
556
+ }],
557
+ tile: [{
558
+ type: i0.Input,
559
+ args: [{
560
+ isSignal: true,
561
+ alias: "tile",
562
+ required: false
563
+ }]
564
+ }],
565
+ invalid: [{
566
+ type: i0.Input,
567
+ args: [{
568
+ isSignal: true,
569
+ alias: "invalid",
570
+ required: false
571
+ }]
572
+ }],
573
+ disabledInput: [{
574
+ type: i0.Input,
575
+ args: [{
576
+ isSignal: true,
577
+ alias: "disabled",
578
+ required: false
579
+ }]
580
+ }],
581
+ readonly: [{
582
+ type: i0.Input,
583
+ args: [{
584
+ isSignal: true,
585
+ alias: "readonly",
586
+ required: false
587
+ }]
588
+ }],
589
+ required: [{
590
+ type: i0.Input,
591
+ args: [{
592
+ isSignal: true,
593
+ alias: "required",
594
+ required: false
595
+ }]
596
+ }],
597
+ name: [{
598
+ type: i0.Input,
599
+ args: [{
600
+ isSignal: true,
601
+ alias: "name",
602
+ required: false
603
+ }]
604
+ }],
605
+ inputId: [{
606
+ type: i0.Input,
607
+ args: [{
608
+ isSignal: true,
609
+ alias: "inputId",
610
+ required: false
611
+ }]
612
+ }],
613
+ ariaLabel: [{
614
+ type: i0.Input,
615
+ args: [{
616
+ isSignal: true,
617
+ alias: "ariaLabel",
618
+ required: false
619
+ }]
620
+ }],
621
+ ariaLabelledBy: [{
622
+ type: i0.Input,
623
+ args: [{
624
+ isSignal: true,
625
+ alias: "ariaLabelledBy",
626
+ required: false
627
+ }]
628
+ }],
629
+ tabindex: [{
630
+ type: i0.Input,
631
+ args: [{
632
+ isSignal: true,
633
+ alias: "tabindex",
634
+ required: false
635
+ }]
636
+ }],
637
+ dt: [{
638
+ type: i0.Input,
639
+ args: [{
640
+ isSignal: true,
641
+ alias: "dt",
642
+ required: false
643
+ }]
644
+ }],
645
+ pt: [{
646
+ type: i0.Input,
647
+ args: [{
648
+ isSignal: true,
649
+ alias: "pt",
650
+ required: false
651
+ }]
652
+ }],
653
+ ptOptions: [{
654
+ type: i0.Input,
655
+ args: [{
656
+ isSignal: true,
657
+ alias: "ptOptions",
658
+ required: false
659
+ }]
660
+ }],
661
+ unstyled: [{
662
+ type: i0.Input,
663
+ args: [{
664
+ isSignal: true,
665
+ alias: "unstyled",
666
+ required: false
667
+ }]
668
+ }],
669
+ changed: [{
670
+ type: i0.Output,
671
+ args: ["changed"]
672
+ }],
673
+ iconTemplate: [{
674
+ type: i0.ContentChild,
675
+ args: [i0.forwardRef(() => TxCheckboxIconTemplate), { isSignal: true }]
676
+ }],
677
+ inputRef: [{
678
+ type: i0.ViewChild,
679
+ args: ["input", { isSignal: true }]
680
+ }]
681
+ }
682
+ });
683
+ var TxCheckboxGroup = class TxCheckboxGroup extends TxFormControlBase {
684
+ registered = signal([], ...ngDevMode ? [{ debugName: "registered" }] : /* istanbul ignore next */ []);
685
+ selectAll = input(false, {
686
+ ...ngDevMode ? { debugName: "selectAll" } : /* istanbul ignore next */ {},
687
+ transform: booleanAttribute
688
+ });
689
+ selectAllLabel = input(void 0, ...ngDevMode ? [{ debugName: "selectAllLabel" }] : /* istanbul ignore next */ []);
690
+ orientation = input("vertical", ...ngDevMode ? [{ debugName: "orientation" }] : /* istanbul ignore next */ []);
691
+ name = input(void 0, ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
692
+ size = input(void 0, ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
693
+ variant = input(void 0, ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
694
+ invalid = input(void 0, {
695
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
696
+ transform: optionalBoolean
697
+ });
698
+ disabledInput = input(false, {
699
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
700
+ alias: "disabled",
701
+ transform: booleanAttribute
702
+ });
703
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
704
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
705
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
706
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
707
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
708
+ unstyled = input(void 0, {
709
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
710
+ transform: optionalBoolean
711
+ });
712
+ changed = output();
713
+ translations = injectTranslations();
714
+ isUnstyled = injectUnstyled(this.unstyled);
715
+ passThrough = injectPassThrough("checkboxGroup", this, this.pt, this.ptOptions);
716
+ isInvalid = injectFieldInvalid(this.invalid);
717
+ isDisabled = computed(() => this.disabled() || this.disabledInput(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
718
+ selected = computed(() => Array.isArray(this.value()) ? this.value() : [], ...ngDevMode ? [{ debugName: "selected" }] : /* istanbul ignore next */ []);
719
+ isAll = computed(() => this.registered().length > 0 && this.registered().every((item) => this.selected().includes(item)), ...ngDevMode ? [{ debugName: "isAll" }] : /* istanbul ignore next */ []);
720
+ isPartial = computed(() => !this.isAll() && this.registered().some((item) => this.selected().includes(item)), ...ngDevMode ? [{ debugName: "isPartial" }] : /* istanbul ignore next */ []);
721
+ hostStyle = computed(() => ({
722
+ ...toStyleObject(this.dt(), "--tx-checkbox"),
723
+ ...this.passThrough().root?.style
724
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
725
+ context = {
726
+ name: this.name,
727
+ isDisabled: this.isDisabled,
728
+ isInvalid: this.isInvalid,
729
+ size: this.size,
730
+ variant: this.variant,
731
+ isChecked: (value) => this.selected().includes(value),
732
+ toggle: (value, checked) => this.toggle(value, checked),
733
+ register: (value) => {
734
+ this.registered.update((items) => [...items, value]);
735
+ return () => this.registered.update((items) => items.filter((item) => item !== value));
736
+ },
737
+ touch: () => this.markTouched()
738
+ };
739
+ toggleAll(checked) {
740
+ const order = this.registered();
741
+ const rest = this.selected().filter((item) => !order.includes(item));
742
+ this.commit(checked ? [...rest, ...order] : rest);
743
+ }
744
+ toggle(value, checked) {
745
+ const without = this.selected().filter((item) => item !== value);
746
+ this.commit(checked ? [...without, value] : without);
747
+ }
748
+ commit(next) {
749
+ this.updateValue(next);
750
+ this.changed.emit(next);
751
+ }
752
+ static ɵfac = i0.ɵɵngDeclareFactory({
753
+ minVersion: "12.0.0",
754
+ version: "22.2.3",
755
+ ngImport: i0,
756
+ type: TxCheckboxGroup,
757
+ deps: null,
758
+ target: i0.ɵɵFactoryTarget.Component
759
+ });
760
+ static ɵcmp = i0.ɵɵngDeclareComponent({
761
+ minVersion: "17.0.0",
762
+ version: "22.2.3",
763
+ type: TxCheckboxGroup,
764
+ isStandalone: true,
765
+ selector: "tx-checkbox-group",
766
+ inputs: {
767
+ selectAll: {
768
+ classPropertyName: "selectAll",
769
+ publicName: "selectAll",
770
+ isSignal: true,
771
+ isRequired: false,
772
+ transformFunction: null
773
+ },
774
+ selectAllLabel: {
775
+ classPropertyName: "selectAllLabel",
776
+ publicName: "selectAllLabel",
777
+ isSignal: true,
778
+ isRequired: false,
779
+ transformFunction: null
780
+ },
781
+ orientation: {
782
+ classPropertyName: "orientation",
783
+ publicName: "orientation",
784
+ isSignal: true,
785
+ isRequired: false,
786
+ transformFunction: null
787
+ },
788
+ name: {
789
+ classPropertyName: "name",
790
+ publicName: "name",
791
+ isSignal: true,
792
+ isRequired: false,
793
+ transformFunction: null
794
+ },
795
+ size: {
796
+ classPropertyName: "size",
797
+ publicName: "size",
798
+ isSignal: true,
799
+ isRequired: false,
800
+ transformFunction: null
801
+ },
802
+ variant: {
803
+ classPropertyName: "variant",
804
+ publicName: "variant",
805
+ isSignal: true,
806
+ isRequired: false,
807
+ transformFunction: null
808
+ },
809
+ invalid: {
810
+ classPropertyName: "invalid",
811
+ publicName: "invalid",
812
+ isSignal: true,
813
+ isRequired: false,
814
+ transformFunction: null
815
+ },
816
+ disabledInput: {
817
+ classPropertyName: "disabledInput",
818
+ publicName: "disabled",
819
+ isSignal: true,
820
+ isRequired: false,
821
+ transformFunction: null
822
+ },
823
+ ariaLabel: {
824
+ classPropertyName: "ariaLabel",
825
+ publicName: "ariaLabel",
826
+ isSignal: true,
827
+ isRequired: false,
828
+ transformFunction: null
829
+ },
830
+ ariaLabelledBy: {
831
+ classPropertyName: "ariaLabelledBy",
832
+ publicName: "ariaLabelledBy",
833
+ isSignal: true,
834
+ isRequired: false,
835
+ transformFunction: null
836
+ },
837
+ dt: {
838
+ classPropertyName: "dt",
839
+ publicName: "dt",
840
+ isSignal: true,
841
+ isRequired: false,
842
+ transformFunction: null
843
+ },
844
+ pt: {
845
+ classPropertyName: "pt",
846
+ publicName: "pt",
847
+ isSignal: true,
848
+ isRequired: false,
849
+ transformFunction: null
850
+ },
851
+ ptOptions: {
852
+ classPropertyName: "ptOptions",
853
+ publicName: "ptOptions",
854
+ isSignal: true,
855
+ isRequired: false,
856
+ transformFunction: null
857
+ },
858
+ unstyled: {
859
+ classPropertyName: "unstyled",
860
+ publicName: "unstyled",
861
+ isSignal: true,
862
+ isRequired: false,
863
+ transformFunction: null
864
+ }
865
+ },
866
+ outputs: { changed: "changed" },
867
+ host: {
868
+ attributes: { "role": "group" },
869
+ properties: {
870
+ "class": "passThrough().root?.class",
871
+ "style": "hostStyle()",
872
+ "attr.data-styled": "!isUnstyled() || null",
873
+ "attr.data-orientation": "orientation()",
874
+ "attr.aria-label": "ariaLabel() ?? null",
875
+ "attr.aria-labelledby": "ariaLabelledBy() ?? null",
876
+ "attr.aria-invalid": "isInvalid() || null"
877
+ },
878
+ classAttribute: "tx-checkbox-group"
879
+ },
880
+ providers: [{
881
+ provide: NG_VALUE_ACCESSOR,
882
+ useExisting: forwardRef(() => TxCheckboxGroup),
883
+ multi: true
884
+ }, {
885
+ provide: TX_CHECKBOX_GROUP,
886
+ useFactory: () => inject(TxCheckboxGroup).context
887
+ }],
888
+ usesInheritance: true,
889
+ ngImport: i0,
890
+ template: `
891
+ @if (selectAll()) {
892
+ <tx-checkbox
893
+ class="tx-checkbox-group__select-all"
894
+ [class]="passThrough().selectAll?.class"
895
+ [style]="passThrough().selectAll?.style"
896
+ [label]="selectAllLabel() ?? translations().selectAll"
897
+ [binary]="true"
898
+ [indeterminate]="isPartial()"
899
+ [disabled]="isDisabled()"
900
+ [size]="size()"
901
+ [variant]="variant()"
902
+ [unstyled]="unstyled()"
903
+ [ngModel]="isAll()"
904
+ [ngModelOptions]="{ standalone: true }"
905
+ (ngModelChange)="toggleAll($event)"
906
+ />
907
+ }
908
+ <div class="tx-checkbox-group__items" [class]="passThrough().items?.class" [style]="passThrough().items?.style">
909
+ <ng-content />
910
+ </div>
911
+ `,
912
+ isInline: true,
913
+ styles: [":host{display:block}:host([data-styled]) .tx-checkbox-group__items{display:flex;flex-direction:column;align-items:flex-start;gap:var(--tx-checkbox-group-gap)}:host([data-styled][data-orientation=\"horizontal\"]) .tx-checkbox-group__items{flex-direction:row;flex-wrap:wrap;column-gap:var(--tx-checkbox-group-horizontal-gap)}:host([data-styled]) .tx-checkbox-group__select-all{margin-bottom:var(--tx-checkbox-group-select-all-gap)}\n"],
914
+ dependencies: [
915
+ {
916
+ kind: "component",
917
+ type: TxCheckbox,
918
+ selector: "tx-checkbox",
919
+ inputs: [
920
+ "label",
921
+ "description",
922
+ "value",
923
+ "binary",
924
+ "trueValue",
925
+ "falseValue",
926
+ "indeterminate",
927
+ "icon",
928
+ "indeterminateIcon",
929
+ "size",
930
+ "variant",
931
+ "tile",
932
+ "invalid",
933
+ "disabled",
934
+ "readonly",
935
+ "required",
936
+ "name",
937
+ "inputId",
938
+ "ariaLabel",
939
+ "ariaLabelledBy",
940
+ "tabindex",
941
+ "dt",
942
+ "pt",
943
+ "ptOptions",
944
+ "unstyled"
945
+ ],
946
+ outputs: ["indeterminateChange", "changed"]
947
+ },
948
+ {
949
+ kind: "ngmodule",
950
+ type: FormsModule
951
+ },
952
+ {
953
+ kind: "directive",
954
+ type: i1.NgControlStatus,
955
+ selector: "[formControlName],[ngModel],[formControl]"
956
+ },
957
+ {
958
+ kind: "directive",
959
+ type: i1.NgModel,
960
+ selector: "[ngModel]:not([formControlName]):not([formControl])",
961
+ inputs: [
962
+ "name",
963
+ "disabled",
964
+ "ngModel",
965
+ "ngModelOptions"
966
+ ],
967
+ outputs: ["ngModelChange"],
968
+ exportAs: ["ngModel"]
969
+ }
970
+ ],
971
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
972
+ });
973
+ };
974
+ i0.ɵɵngDeclareClassMetadata({
975
+ minVersion: "12.0.0",
976
+ version: "22.2.3",
977
+ ngImport: i0,
978
+ type: TxCheckboxGroup,
979
+ decorators: [{
980
+ type: Component,
981
+ args: [{
982
+ selector: "tx-checkbox-group",
983
+ imports: [TxCheckbox, FormsModule],
984
+ template: `
985
+ @if (selectAll()) {
986
+ <tx-checkbox
987
+ class="tx-checkbox-group__select-all"
988
+ [class]="passThrough().selectAll?.class"
989
+ [style]="passThrough().selectAll?.style"
990
+ [label]="selectAllLabel() ?? translations().selectAll"
991
+ [binary]="true"
992
+ [indeterminate]="isPartial()"
993
+ [disabled]="isDisabled()"
994
+ [size]="size()"
995
+ [variant]="variant()"
996
+ [unstyled]="unstyled()"
997
+ [ngModel]="isAll()"
998
+ [ngModelOptions]="{ standalone: true }"
999
+ (ngModelChange)="toggleAll($event)"
1000
+ />
1001
+ }
1002
+ <div class="tx-checkbox-group__items" [class]="passThrough().items?.class" [style]="passThrough().items?.style">
1003
+ <ng-content />
1004
+ </div>
1005
+ `,
1006
+ changeDetection: ChangeDetectionStrategy.OnPush,
1007
+ providers: [{
1008
+ provide: NG_VALUE_ACCESSOR,
1009
+ useExisting: forwardRef(() => TxCheckboxGroup),
1010
+ multi: true
1011
+ }, {
1012
+ provide: TX_CHECKBOX_GROUP,
1013
+ useFactory: () => inject(TxCheckboxGroup).context
1014
+ }],
1015
+ host: {
1016
+ class: "tx-checkbox-group",
1017
+ role: "group",
1018
+ "[class]": "passThrough().root?.class",
1019
+ "[style]": "hostStyle()",
1020
+ "[attr.data-styled]": "!isUnstyled() || null",
1021
+ "[attr.data-orientation]": "orientation()",
1022
+ "[attr.aria-label]": "ariaLabel() ?? null",
1023
+ "[attr.aria-labelledby]": "ariaLabelledBy() ?? null",
1024
+ "[attr.aria-invalid]": "isInvalid() || null"
1025
+ },
1026
+ styles: [":host{display:block}:host([data-styled]) .tx-checkbox-group__items{display:flex;flex-direction:column;align-items:flex-start;gap:var(--tx-checkbox-group-gap)}:host([data-styled][data-orientation=\"horizontal\"]) .tx-checkbox-group__items{flex-direction:row;flex-wrap:wrap;column-gap:var(--tx-checkbox-group-horizontal-gap)}:host([data-styled]) .tx-checkbox-group__select-all{margin-bottom:var(--tx-checkbox-group-select-all-gap)}\n"]
1027
+ }]
1028
+ }],
1029
+ propDecorators: {
1030
+ selectAll: [{
1031
+ type: i0.Input,
1032
+ args: [{
1033
+ isSignal: true,
1034
+ alias: "selectAll",
1035
+ required: false
1036
+ }]
1037
+ }],
1038
+ selectAllLabel: [{
1039
+ type: i0.Input,
1040
+ args: [{
1041
+ isSignal: true,
1042
+ alias: "selectAllLabel",
1043
+ required: false
1044
+ }]
1045
+ }],
1046
+ orientation: [{
1047
+ type: i0.Input,
1048
+ args: [{
1049
+ isSignal: true,
1050
+ alias: "orientation",
1051
+ required: false
1052
+ }]
1053
+ }],
1054
+ name: [{
1055
+ type: i0.Input,
1056
+ args: [{
1057
+ isSignal: true,
1058
+ alias: "name",
1059
+ required: false
1060
+ }]
1061
+ }],
1062
+ size: [{
1063
+ type: i0.Input,
1064
+ args: [{
1065
+ isSignal: true,
1066
+ alias: "size",
1067
+ required: false
1068
+ }]
1069
+ }],
1070
+ variant: [{
1071
+ type: i0.Input,
1072
+ args: [{
1073
+ isSignal: true,
1074
+ alias: "variant",
1075
+ required: false
1076
+ }]
1077
+ }],
1078
+ invalid: [{
1079
+ type: i0.Input,
1080
+ args: [{
1081
+ isSignal: true,
1082
+ alias: "invalid",
1083
+ required: false
1084
+ }]
1085
+ }],
1086
+ disabledInput: [{
1087
+ type: i0.Input,
1088
+ args: [{
1089
+ isSignal: true,
1090
+ alias: "disabled",
1091
+ required: false
1092
+ }]
1093
+ }],
1094
+ ariaLabel: [{
1095
+ type: i0.Input,
1096
+ args: [{
1097
+ isSignal: true,
1098
+ alias: "ariaLabel",
1099
+ required: false
1100
+ }]
1101
+ }],
1102
+ ariaLabelledBy: [{
1103
+ type: i0.Input,
1104
+ args: [{
1105
+ isSignal: true,
1106
+ alias: "ariaLabelledBy",
1107
+ required: false
1108
+ }]
1109
+ }],
1110
+ dt: [{
1111
+ type: i0.Input,
1112
+ args: [{
1113
+ isSignal: true,
1114
+ alias: "dt",
1115
+ required: false
1116
+ }]
1117
+ }],
1118
+ pt: [{
1119
+ type: i0.Input,
1120
+ args: [{
1121
+ isSignal: true,
1122
+ alias: "pt",
1123
+ required: false
1124
+ }]
1125
+ }],
1126
+ ptOptions: [{
1127
+ type: i0.Input,
1128
+ args: [{
1129
+ isSignal: true,
1130
+ alias: "ptOptions",
1131
+ required: false
1132
+ }]
1133
+ }],
1134
+ unstyled: [{
1135
+ type: i0.Input,
1136
+ args: [{
1137
+ isSignal: true,
1138
+ alias: "unstyled",
1139
+ required: false
1140
+ }]
1141
+ }],
1142
+ changed: [{
1143
+ type: i0.Output,
1144
+ args: ["changed"]
1145
+ }]
1146
+ }
1147
+ });
1148
+ export { TX_CHECKBOX_GROUP, TxCheckbox, TxCheckboxGroup, TxCheckboxIconTemplate };
1149
+
1150
+ //# sourceMappingURL=tectra-ng-ui-checkbox.mjs.map