@tectra-ng/ui 0.0.0-stage → 0.1.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 (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,986 @@
1
+ import { CdkConnectedOverlay, CdkOverlayOrigin } from "@angular/cdk/overlay";
2
+ import { DOCUMENT, NgTemplateOutlet } from "@angular/common";
3
+ import * as i0 from "@angular/core";
4
+ import { ChangeDetectionStrategy, Component, DestroyRef, Injector, booleanAttribute, computed, forwardRef, inject, input, model, output, signal, viewChild } from "@angular/core";
5
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
6
+ import { TxTypeahead, 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 { injectTranslations } from "@tectra-ng/core/i18n";
10
+ import { TxOverlayAnchor, TxOverlayInsets, TxOverlayRoom, placementFromPosition, txAnimateEnter, txAnimateLeave, txPositions, txScrollStrategy, watchOrigin } from "@tectra-ng/core/overlay";
11
+ import { optionalBoolean } from "@tectra-ng/core/utils";
12
+ import { TxIcon } from "@tectra-ng/icons";
13
+ import { toStyleObject } from "@tectra-ng/themes";
14
+ import { foldText } from "@tectra-ng/ui/select";
15
+ function walkTree(nodes, visit, parent = null) {
16
+ for (const node of nodes) {
17
+ visit(node, parent);
18
+ walkTree(node.children ?? [], visit, node);
19
+ }
20
+ }
21
+ function findNode(nodes, key) {
22
+ let found = null;
23
+ walkTree(nodes, (node) => {
24
+ if (!found && node.key === key) found = node;
25
+ });
26
+ return found;
27
+ }
28
+ function descendantKeys(node) {
29
+ const keys = [];
30
+ walkTree(node.children ?? [], (child) => {
31
+ if (!child.disabled) keys.push(child.key);
32
+ });
33
+ return keys;
34
+ }
35
+ function parentMap(nodes) {
36
+ const parents = /* @__PURE__ */ new Map();
37
+ walkTree(nodes, (node, parent) => parents.set(node.key, parent));
38
+ return parents;
39
+ }
40
+ function normalizeChecked(nodes, keys) {
41
+ const checked = new Set(keys);
42
+ const settle = (node) => {
43
+ const children = (node.children ?? []).filter((child) => !child.disabled);
44
+ if (!children.length) return checked.has(node.key);
45
+ const all = children.map(settle).every(Boolean);
46
+ if (all) checked.add(node.key);
47
+ else checked.delete(node.key);
48
+ return all;
49
+ };
50
+ nodes.forEach(settle);
51
+ const order = [];
52
+ walkTree(nodes, (node) => checked.has(node.key) && order.push(node.key));
53
+ return order;
54
+ }
55
+ var TxTreeSelect = class TxTreeSelect extends TxFormControlBase {
56
+ options = input([], ...ngDevMode ? [{ debugName: "options" }] : /* istanbul ignore next */ []);
57
+ selectionMode = input("single", ...ngDevMode ? [{ debugName: "selectionMode" }] : /* istanbul ignore next */ []);
58
+ display = input("comma", ...ngDevMode ? [{ debugName: "display" }] : /* istanbul ignore next */ []);
59
+ expandedKeys = model([], ...ngDevMode ? [{ debugName: "expandedKeys" }] : /* istanbul ignore next */ []);
60
+ filter = input(false, {
61
+ ...ngDevMode ? { debugName: "filter" } : /* istanbul ignore next */ {},
62
+ transform: booleanAttribute
63
+ });
64
+ filterPlaceholder = input(void 0, ...ngDevMode ? [{ debugName: "filterPlaceholder" }] : /* istanbul ignore next */ []);
65
+ placeholder = input("", ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
66
+ showClear = input(false, {
67
+ ...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
68
+ transform: booleanAttribute
69
+ });
70
+ emptyMessage = input(void 0, ...ngDevMode ? [{ debugName: "emptyMessage" }] : /* istanbul ignore next */ []);
71
+ scrollHeight = input(void 0, ...ngDevMode ? [{ debugName: "scrollHeight" }] : /* istanbul ignore next */ []);
72
+ inputId = input(void 0, ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
73
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
74
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
75
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
76
+ variant = input("outlined", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
77
+ invalid = input(void 0, {
78
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
79
+ transform: optionalBoolean
80
+ });
81
+ readonly = input(false, {
82
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
83
+ transform: booleanAttribute
84
+ });
85
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
86
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
87
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
88
+ unstyled = input(void 0, {
89
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
90
+ transform: optionalBoolean
91
+ });
92
+ changed = output();
93
+ opened = output();
94
+ closed = output();
95
+ box = viewChild.required("box", ...ngDevMode ? [{ debugName: "box" }] : /* istanbul ignore next */ []);
96
+ trigger = viewChild.required("trigger", ...ngDevMode ? [{ debugName: "trigger" }] : /* istanbul ignore next */ []);
97
+ panel = viewChild("panel", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
98
+ filterInput = viewChild("filterInput", ...ngDevMode ? [{ debugName: "filterInput" }] : /* istanbul ignore next */ []);
99
+ document = inject(DOCUMENT);
100
+ injector = inject(Injector);
101
+ overlayInsets = inject(TxOverlayInsets);
102
+ typeahead = new TxTypeahead();
103
+ stopWatching = null;
104
+ hasEntered = false;
105
+ cleanup = inject(DestroyRef).onDestroy(() => this.stopWatching?.());
106
+ translations = injectTranslations();
107
+ isInvalid = injectFieldInvalid(this.invalid);
108
+ isUnstyled = injectUnstyled(this.unstyled);
109
+ passThrough = injectPassThrough("treeSelect", this, this.pt, this.ptOptions);
110
+ room = new TxOverlayRoom(txPositions("bottom-start", 4));
111
+ connectedOverlay = viewChild(CdkConnectedOverlay, ...ngDevMode ? [{ debugName: "connectedOverlay" }] : /* istanbul ignore next */ []);
112
+ positions = this.room.positions;
113
+ scrollStrategy = txScrollStrategy(this.injector);
114
+ viewportMargin = this.room.viewportMargin;
115
+ treeId = uniqueId("tx-tree");
116
+ isOpen = signal(false, ...ngDevMode ? [{ debugName: "isOpen" }] : /* istanbul ignore next */ []);
117
+ isPanelMounted = signal(false, ...ngDevMode ? [{ debugName: "isPanelMounted" }] : /* istanbul ignore next */ []);
118
+ placement = signal("bottom-start", ...ngDevMode ? [{ debugName: "placement" }] : /* istanbul ignore next */ []);
119
+ panelWidth = signal(0, ...ngDevMode ? [{ debugName: "panelWidth" }] : /* istanbul ignore next */ []);
120
+ query = signal("", ...ngDevMode ? [{ debugName: "query" }] : /* istanbul ignore next */ []);
121
+ activeKey = signal(null, ...ngDevMode ? [{ debugName: "activeKey" }] : /* istanbul ignore next */ []);
122
+ multiple = computed(() => this.selectionMode() !== "single", ...ngDevMode ? [{ debugName: "multiple" }] : /* istanbul ignore next */ []);
123
+ selectedKeys = computed(() => {
124
+ const value = this.value();
125
+ if (Array.isArray(value)) return value;
126
+ return value === null || value === void 0 || value === "" ? [] : [value];
127
+ }, ...ngDevMode ? [{ debugName: "selectedKeys" }] : /* istanbul ignore next */ []);
128
+ parents = computed(() => parentMap(this.options()), ...ngDevMode ? [{ debugName: "parents" }] : /* istanbul ignore next */ []);
129
+ selectedNodes = computed(() => this.selectedKeys().map((key) => findNode(this.options(), key)).filter((node) => !!node).filter((node) => this.selectionMode() !== "checkbox" || !this.parentChecked(node)), ...ngDevMode ? [{ debugName: "selectedNodes" }] : /* istanbul ignore next */ []);
130
+ branches = computed(() => {
131
+ const query = foldText(this.query().trim());
132
+ const expanded = new Set(this.expandedKeys());
133
+ const selected = new Set(this.selectedKeys());
134
+ const matches = (node) => foldText(node.label).includes(query) || (node.children ?? []).some((child) => matches(child));
135
+ const build = (nodes, level, parent, shown) => {
136
+ const visible = query && !shown ? nodes.filter(matches) : nodes;
137
+ return visible.map((node, index) => {
138
+ const children = node.children ?? [];
139
+ const own = !!query && foldText(node.label).includes(query);
140
+ const open = query ? children.some((child) => matches(child)) || own && children.length > 0 && expanded.has(node.key) : expanded.has(node.key);
141
+ const checkable = children.filter((child) => !child.disabled);
142
+ const checkedChildren = checkable.filter((child) => this.isChecked(child, selected)).length;
143
+ const row = {
144
+ id: `${this.treeId}-${node.key}`,
145
+ node,
146
+ level: level + 1,
147
+ parent,
148
+ setSize: visible.length,
149
+ posInSet: index + 1,
150
+ hasChildren: children.length > 0,
151
+ expanded: children.length > 0 && open,
152
+ checked: selected.has(node.key),
153
+ partial: this.selectionMode() === "checkbox" && !selected.has(node.key) && (checkedChildren > 0 || checkable.some((child) => this.hasCheckedDescendant(child, selected))),
154
+ selectable: !node.disabled && node.selectable !== false
155
+ };
156
+ return {
157
+ row,
158
+ children: build(children, level + 1, row, shown || own)
159
+ };
160
+ });
161
+ };
162
+ return build(this.options(), 0, null, false);
163
+ }, ...ngDevMode ? [{ debugName: "branches" }] : /* istanbul ignore next */ []);
164
+ rows = computed(() => {
165
+ const rows = [];
166
+ const walk = (branches) => branches.forEach((branch) => {
167
+ rows.push(branch.row);
168
+ if (branch.row.expanded) walk(branch.children);
169
+ });
170
+ walk(this.branches());
171
+ return rows;
172
+ }, ...ngDevMode ? [{ debugName: "rows" }] : /* istanbul ignore next */ []);
173
+ mounted = signal(/* @__PURE__ */ new Set(), ...ngDevMode ? [{ debugName: "mounted" }] : /* istanbul ignore next */ []);
174
+ activeRow = computed(() => this.rows().find((row) => row.node.key === this.activeKey()) ?? null, ...ngDevMode ? [{ debugName: "activeRow" }] : /* istanbul ignore next */ []);
175
+ activeId = computed(() => this.isOpen() ? this.activeRow()?.id ?? null : null, ...ngDevMode ? [{ debugName: "activeId" }] : /* istanbul ignore next */ []);
176
+ canClear = computed(() => this.showClear() && this.selectedKeys().length > 0 && !this.disabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "canClear" }] : /* istanbul ignore next */ []);
177
+ commaText = computed(() => this.selectedNodes().map((node) => node.label).join(", "), ...ngDevMode ? [{ debugName: "commaText" }] : /* istanbul ignore next */ []);
178
+ emptyText = computed(() => this.emptyMessage() ?? this.translations().emptyMessage, ...ngDevMode ? [{ debugName: "emptyText" }] : /* istanbul ignore next */ []);
179
+ tokenStyle = computed(() => toStyleObject(this.dt(), "--tx-select"), ...ngDevMode ? [{ debugName: "tokenStyle" }] : /* istanbul ignore next */ []);
180
+ hostStyle = computed(() => ({
181
+ ...this.tokenStyle(),
182
+ ...this.passThrough().root?.style
183
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
184
+ panelStyle = computed(() => ({
185
+ ...this.tokenStyle(),
186
+ ...this.passThrough().panel?.style
187
+ }), ...ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []);
188
+ open() {
189
+ if (this.disabled() || this.readonly() || this.isOpen()) return;
190
+ this.panelWidth.set(this.box().nativeElement.offsetWidth);
191
+ this.revealSelected();
192
+ this.mounted.set(new Set(this.expandedKeys()));
193
+ this.activeKey.set(this.selectedKeys().find((key) => this.rows().some((row) => row.node.key === key)) ?? this.rows()[0]?.node.key ?? null);
194
+ this.isOpen.set(true);
195
+ this.hasEntered = false;
196
+ this.isPanelMounted.set(true);
197
+ this.room.open(this.overlayInsets.measure());
198
+ this.stopWatching = watchOrigin(this.box().nativeElement, this.overlayInsets, {
199
+ insetsChange: (insets) => this.room.follow(insets, this.box().nativeElement, this.panel()?.nativeElement, this.connectedOverlay(), this.injector),
200
+ containerScroll: () => this.close()
201
+ });
202
+ this.opened.emit();
203
+ }
204
+ close() {
205
+ if (!this.isOpen()) return;
206
+ this.isOpen.set(false);
207
+ this.stopWatching?.();
208
+ this.stopWatching = null;
209
+ this.markTouched();
210
+ this.closed.emit();
211
+ const panel = this.panel()?.nativeElement;
212
+ (panel ? txAnimateLeave(panel, this.placement()) : Promise.resolve()).then(() => {
213
+ if (!this.isOpen()) this.isPanelMounted.set(false);
214
+ });
215
+ }
216
+ toggle() {
217
+ if (this.isOpen()) this.close();
218
+ else this.open();
219
+ }
220
+ onBoxClick(event) {
221
+ if (!event.target.closest(".tx-select__clear, .tx-select__chip-remove")) {
222
+ this.toggle();
223
+ this.trigger().nativeElement.focus();
224
+ }
225
+ }
226
+ onAttach() {
227
+ this.filterInput()?.nativeElement.focus();
228
+ }
229
+ onPositionChange(change) {
230
+ this.placement.set(placementFromPosition(change.connectionPair) ?? "bottom-start");
231
+ const panel = this.panel()?.nativeElement;
232
+ if (!this.hasEntered && this.room.fit(this.box().nativeElement, panel, this.connectedOverlay(), this.injector)) return;
233
+ if (!this.hasEntered && panel) {
234
+ this.hasEntered = true;
235
+ txAnimateEnter(panel, this.placement());
236
+ this.scrollActive();
237
+ }
238
+ }
239
+ onOutsideClick(event) {
240
+ if (!this.box().nativeElement.contains(event.target)) this.close();
241
+ }
242
+ onPanelMousedown(event) {
243
+ if (!event.target.closest("input")) event.preventDefault();
244
+ }
245
+ onFilter(event) {
246
+ this.query.set(event.target.value);
247
+ this.activeKey.set(this.rows().find((row) => row.selectable)?.node.key ?? this.rows()[0]?.node.key ?? null);
248
+ }
249
+ onRowClick(row, event) {
250
+ if (event.target.closest(".tx-tree-select__toggler")) {
251
+ this.toggleExpanded(row);
252
+ return;
253
+ }
254
+ this.activeKey.set(row.node.key);
255
+ this.pick(row);
256
+ }
257
+ toggleExpanded(row) {
258
+ if (!row.hasChildren) return;
259
+ const keys = new Set(this.expandedKeys());
260
+ if (row.expanded) keys.delete(row.node.key);
261
+ else keys.add(row.node.key);
262
+ if (!row.expanded) this.mounted.update((mounted) => /* @__PURE__ */ new Set([...mounted, row.node.key]));
263
+ this.expandedKeys.set([...keys]);
264
+ }
265
+ onKeydown(event) {
266
+ if (this.readonly()) return;
267
+ const typing = event.target.classList.contains("tx-select__filter-input");
268
+ if (!this.isOpen()) {
269
+ if ([
270
+ "Enter",
271
+ " ",
272
+ "ArrowDown",
273
+ "ArrowUp"
274
+ ].includes(event.key)) {
275
+ event.preventDefault();
276
+ this.open();
277
+ } else if (event.key === "Backspace" && this.display() === "chip" && this.multiple()) {
278
+ const last = this.selectedNodes().at(-1);
279
+ if (last) {
280
+ event.preventDefault();
281
+ this.removeNode(last, event);
282
+ }
283
+ }
284
+ return;
285
+ }
286
+ const rows = this.rows();
287
+ const index = rows.findIndex((row) => row.node.key === this.activeKey());
288
+ const row = rows[index];
289
+ const move = (next) => {
290
+ const target = rows[Math.max(0, Math.min(rows.length - 1, next))];
291
+ if (target) {
292
+ this.activeKey.set(target.node.key);
293
+ this.scrollActive();
294
+ }
295
+ };
296
+ switch (event.key) {
297
+ case "Escape":
298
+ event.preventDefault();
299
+ this.close();
300
+ this.trigger().nativeElement.focus();
301
+ return;
302
+ case "Tab":
303
+ this.close();
304
+ return;
305
+ case "ArrowDown":
306
+ event.preventDefault();
307
+ move(index + 1);
308
+ return;
309
+ case "ArrowUp":
310
+ event.preventDefault();
311
+ move(index - 1);
312
+ return;
313
+ case "PageDown":
314
+ event.preventDefault();
315
+ move(index + 10);
316
+ return;
317
+ case "PageUp":
318
+ event.preventDefault();
319
+ move(index - 10);
320
+ return;
321
+ case "ArrowRight":
322
+ if (typing || !row) return;
323
+ event.preventDefault();
324
+ if (row.hasChildren && !row.expanded) this.toggleExpanded(row);
325
+ else if (row.expanded) move(index + 1);
326
+ return;
327
+ case "ArrowLeft":
328
+ if (typing || !row) return;
329
+ event.preventDefault();
330
+ if (row.expanded) this.toggleExpanded(row);
331
+ else if (row.parent) {
332
+ this.activeKey.set(row.parent.node.key);
333
+ this.scrollActive();
334
+ }
335
+ return;
336
+ case "Home":
337
+ case "End":
338
+ if (!typing) {
339
+ event.preventDefault();
340
+ move(event.key === "Home" ? 0 : rows.length - 1);
341
+ }
342
+ return;
343
+ case "Enter":
344
+ event.preventDefault();
345
+ if (row) this.pick(row);
346
+ return;
347
+ }
348
+ if (event.key === " " && !typing) {
349
+ event.preventDefault();
350
+ if (row) this.pick(row);
351
+ return;
352
+ }
353
+ if (!typing && event.key.length === 1 && !event.ctrlKey && !event.metaKey && !event.altKey) {
354
+ const found = this.typeahead.search(event.key, rows.map((entry) => entry.node.label), index);
355
+ if (found !== null) move(found);
356
+ }
357
+ }
358
+ clear() {
359
+ this.commit(null, null);
360
+ this.trigger().nativeElement.focus();
361
+ }
362
+ removeNode(node, event) {
363
+ event.stopPropagation();
364
+ if (this.disabled() || this.readonly()) return;
365
+ if (this.selectionMode() === "checkbox") this.check(node, false);
366
+ else this.commit(this.selectedKeys().filter((key) => key !== node.key), node);
367
+ }
368
+ checkState(row) {
369
+ return row.checked ? "true" : row.partial ? "mixed" : "false";
370
+ }
371
+ pick(row) {
372
+ if (!row.selectable) {
373
+ if (row.hasChildren) this.toggleExpanded(row);
374
+ return;
375
+ }
376
+ switch (this.selectionMode()) {
377
+ case "single":
378
+ this.commit(row.node.key, row.node);
379
+ this.close();
380
+ this.trigger().nativeElement.focus();
381
+ return;
382
+ case "multiple":
383
+ this.commit(row.checked ? this.selectedKeys().filter((key) => key !== row.node.key) : [...this.selectedKeys(), row.node.key], row.node);
384
+ return;
385
+ default: this.check(row.node, !row.checked);
386
+ }
387
+ }
388
+ check(node, checked) {
389
+ const keys = new Set(this.selectedKeys());
390
+ const affected = [node.key, ...descendantKeys(node)];
391
+ if (checked) affected.forEach((key) => keys.add(key));
392
+ else {
393
+ affected.forEach((key) => keys.delete(key));
394
+ let parent = this.parents().get(node.key) ?? null;
395
+ while (parent) {
396
+ keys.delete(parent.key);
397
+ parent = this.parents().get(parent.key) ?? null;
398
+ }
399
+ }
400
+ this.commit(normalizeChecked(this.options(), [...keys]), node);
401
+ }
402
+ commit(value, node) {
403
+ const next = this.multiple() ? Array.isArray(value) ? value : value ? [value] : [] : value;
404
+ this.updateValue(next);
405
+ this.changed.emit({
406
+ value: next,
407
+ node
408
+ });
409
+ }
410
+ isChecked(node, selected) {
411
+ return selected.has(node.key);
412
+ }
413
+ hasCheckedDescendant(node, selected) {
414
+ return (node.children ?? []).some((child) => selected.has(child.key) || this.hasCheckedDescendant(child, selected));
415
+ }
416
+ parentChecked(node) {
417
+ const parent = this.parents().get(node.key);
418
+ return !!parent && this.selectedKeys().includes(parent.key);
419
+ }
420
+ revealSelected() {
421
+ const keys = new Set(this.expandedKeys());
422
+ const size = keys.size;
423
+ for (const key of this.selectedKeys()) {
424
+ let parent = this.parents().get(key) ?? null;
425
+ while (parent) {
426
+ keys.add(parent.key);
427
+ parent = this.parents().get(parent.key) ?? null;
428
+ }
429
+ }
430
+ if (keys.size !== size) this.expandedKeys.set([...keys]);
431
+ }
432
+ scrollActive() {
433
+ const id = this.activeId();
434
+ queueMicrotask(() => id ? this.document.getElementById(id)?.scrollIntoView?.({ block: "nearest" }) : void 0);
435
+ }
436
+ static ɵfac = i0.ɵɵngDeclareFactory({
437
+ minVersion: "12.0.0",
438
+ version: "22.2.3",
439
+ ngImport: i0,
440
+ type: TxTreeSelect,
441
+ deps: null,
442
+ target: i0.ɵɵFactoryTarget.Component
443
+ });
444
+ static ɵcmp = i0.ɵɵngDeclareComponent({
445
+ minVersion: "17.0.0",
446
+ version: "22.2.3",
447
+ type: TxTreeSelect,
448
+ isStandalone: true,
449
+ selector: "tx-tree-select",
450
+ inputs: {
451
+ options: {
452
+ classPropertyName: "options",
453
+ publicName: "options",
454
+ isSignal: true,
455
+ isRequired: false,
456
+ transformFunction: null
457
+ },
458
+ selectionMode: {
459
+ classPropertyName: "selectionMode",
460
+ publicName: "selectionMode",
461
+ isSignal: true,
462
+ isRequired: false,
463
+ transformFunction: null
464
+ },
465
+ display: {
466
+ classPropertyName: "display",
467
+ publicName: "display",
468
+ isSignal: true,
469
+ isRequired: false,
470
+ transformFunction: null
471
+ },
472
+ expandedKeys: {
473
+ classPropertyName: "expandedKeys",
474
+ publicName: "expandedKeys",
475
+ isSignal: true,
476
+ isRequired: false,
477
+ transformFunction: null
478
+ },
479
+ filter: {
480
+ classPropertyName: "filter",
481
+ publicName: "filter",
482
+ isSignal: true,
483
+ isRequired: false,
484
+ transformFunction: null
485
+ },
486
+ filterPlaceholder: {
487
+ classPropertyName: "filterPlaceholder",
488
+ publicName: "filterPlaceholder",
489
+ isSignal: true,
490
+ isRequired: false,
491
+ transformFunction: null
492
+ },
493
+ placeholder: {
494
+ classPropertyName: "placeholder",
495
+ publicName: "placeholder",
496
+ isSignal: true,
497
+ isRequired: false,
498
+ transformFunction: null
499
+ },
500
+ showClear: {
501
+ classPropertyName: "showClear",
502
+ publicName: "showClear",
503
+ isSignal: true,
504
+ isRequired: false,
505
+ transformFunction: null
506
+ },
507
+ emptyMessage: {
508
+ classPropertyName: "emptyMessage",
509
+ publicName: "emptyMessage",
510
+ isSignal: true,
511
+ isRequired: false,
512
+ transformFunction: null
513
+ },
514
+ scrollHeight: {
515
+ classPropertyName: "scrollHeight",
516
+ publicName: "scrollHeight",
517
+ isSignal: true,
518
+ isRequired: false,
519
+ transformFunction: null
520
+ },
521
+ inputId: {
522
+ classPropertyName: "inputId",
523
+ publicName: "inputId",
524
+ isSignal: true,
525
+ isRequired: false,
526
+ transformFunction: null
527
+ },
528
+ ariaLabel: {
529
+ classPropertyName: "ariaLabel",
530
+ publicName: "ariaLabel",
531
+ isSignal: true,
532
+ isRequired: false,
533
+ transformFunction: null
534
+ },
535
+ ariaLabelledBy: {
536
+ classPropertyName: "ariaLabelledBy",
537
+ publicName: "ariaLabelledBy",
538
+ isSignal: true,
539
+ isRequired: false,
540
+ transformFunction: null
541
+ },
542
+ size: {
543
+ classPropertyName: "size",
544
+ publicName: "size",
545
+ isSignal: true,
546
+ isRequired: false,
547
+ transformFunction: null
548
+ },
549
+ variant: {
550
+ classPropertyName: "variant",
551
+ publicName: "variant",
552
+ isSignal: true,
553
+ isRequired: false,
554
+ transformFunction: null
555
+ },
556
+ invalid: {
557
+ classPropertyName: "invalid",
558
+ publicName: "invalid",
559
+ isSignal: true,
560
+ isRequired: false,
561
+ transformFunction: null
562
+ },
563
+ readonly: {
564
+ classPropertyName: "readonly",
565
+ publicName: "readonly",
566
+ isSignal: true,
567
+ isRequired: false,
568
+ transformFunction: null
569
+ },
570
+ dt: {
571
+ classPropertyName: "dt",
572
+ publicName: "dt",
573
+ isSignal: true,
574
+ isRequired: false,
575
+ transformFunction: null
576
+ },
577
+ pt: {
578
+ classPropertyName: "pt",
579
+ publicName: "pt",
580
+ isSignal: true,
581
+ isRequired: false,
582
+ transformFunction: null
583
+ },
584
+ ptOptions: {
585
+ classPropertyName: "ptOptions",
586
+ publicName: "ptOptions",
587
+ isSignal: true,
588
+ isRequired: false,
589
+ transformFunction: null
590
+ },
591
+ unstyled: {
592
+ classPropertyName: "unstyled",
593
+ publicName: "unstyled",
594
+ isSignal: true,
595
+ isRequired: false,
596
+ transformFunction: null
597
+ }
598
+ },
599
+ outputs: {
600
+ expandedKeys: "expandedKeysChange",
601
+ changed: "changed",
602
+ opened: "opened",
603
+ closed: "closed"
604
+ },
605
+ host: {
606
+ properties: {
607
+ "class": "passThrough().root?.class",
608
+ "style": "hostStyle()",
609
+ "attr.data-styled": "!isUnstyled() || null",
610
+ "attr.data-size": "size()",
611
+ "attr.data-variant": "variant()",
612
+ "class.tx-tree-select--open": "isOpen()",
613
+ "class.tx-tree-select--disabled": "disabled()",
614
+ "class.tx-tree-select--invalid": "isInvalid()",
615
+ "class.tx-tree-select--readonly": "readonly()",
616
+ "class.tx-tree-select--filled": "selectedKeys().length > 0"
617
+ },
618
+ classAttribute: "tx-tree-select"
619
+ },
620
+ providers: [{
621
+ provide: NG_VALUE_ACCESSOR,
622
+ useExisting: forwardRef(() => TxTreeSelect),
623
+ multi: true
624
+ }],
625
+ viewQueries: [
626
+ {
627
+ propertyName: "box",
628
+ first: true,
629
+ predicate: ["box"],
630
+ descendants: true,
631
+ isSignal: true
632
+ },
633
+ {
634
+ propertyName: "trigger",
635
+ first: true,
636
+ predicate: ["trigger"],
637
+ descendants: true,
638
+ isSignal: true
639
+ },
640
+ {
641
+ propertyName: "panel",
642
+ first: true,
643
+ predicate: ["panel"],
644
+ descendants: true,
645
+ isSignal: true
646
+ },
647
+ {
648
+ propertyName: "filterInput",
649
+ first: true,
650
+ predicate: ["filterInput"],
651
+ descendants: true,
652
+ isSignal: true
653
+ },
654
+ {
655
+ propertyName: "connectedOverlay",
656
+ first: true,
657
+ predicate: CdkConnectedOverlay,
658
+ descendants: true,
659
+ isSignal: true
660
+ }
661
+ ],
662
+ usesInheritance: true,
663
+ ngImport: i0,
664
+ template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- the combobox inside the box takes focus and keys; the box only widens the click area -->\n<div\n #box\n #origin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"tx-select__box\"\n [class]=\"passThrough().box?.class\"\n [style]=\"passThrough().box?.style\"\n (click)=\"onBoxClick($event)\"\n>\n <button\n #trigger\n type=\"button\"\n role=\"combobox\"\n class=\"tx-select__trigger\"\n aria-haspopup=\"tree\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? (ariaLabelledBy() || inputId() ? null : placeholder() || null)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"treeId\"\n [attr.aria-activedescendant]=\"filter() ? null : activeId()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [disabled]=\"disabled()\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (!selectedNodes().length) {\n <span class=\"tx-select__value tx-select__value--placeholder\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{\n placeholder()\n }}</span>\n } @else if (multiple() && display() === 'chip') {\n <span class=\"tx-select__value tx-select__chips\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">\n @for (node of selectedNodes(); track node.key) {\n <span class=\"tx-select__chip\" [class]=\"passThrough().chip?.class\" [style]=\"passThrough().chip?.style\">\n <span class=\"tx-select__chip-label\">{{ node.label }}</span>\n @if (!disabled() && !readonly()) {\n <span class=\"tx-select__chip-remove\" aria-hidden=\"true\" (click)=\"removeNode(node, $event)\">\n <tx-icon [name]=\"'times'\" />\n </span>\n }\n </span>\n }\n </span>\n } @else {\n <span class=\"tx-select__value\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{ commaText() }}</span>\n }\n </button>\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-select__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n <span class=\"tx-select__dropdown\" aria-hidden=\"true\" [class]=\"passThrough().dropdown?.class\" [style]=\"passThrough().dropdown?.style\">\n <tx-icon class=\"tx-select__chevron\" [name]=\"'chevron-down'\" />\n </span>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n txOverlayAnchor\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isPanelMounted()\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayViewportMargin]=\"viewportMargin()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n [cdkConnectedOverlayWidth]=\"panelWidth()\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (attach)=\"onAttach()\"\n (positionChange)=\"onPositionChange($event)\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"tx-select__panel\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"panelStyle()\"\n (mousedown)=\"onPanelMousedown($event)\"\n >\n @if (filter()) {\n <div class=\"tx-select__filter\" [class]=\"passThrough().filter?.class\" [style]=\"passThrough().filter?.style\">\n <span class=\"tx-select__filter-field\">\n <input\n #filterInput\n type=\"text\"\n autocomplete=\"off\"\n class=\"tx-select__filter-input\"\n role=\"searchbox\"\n [class]=\"passThrough().filterInput?.class\"\n [style]=\"passThrough().filterInput?.style\"\n [attr.aria-label]=\"filterPlaceholder() ?? translations().searchPlaceholder\"\n [attr.aria-controls]=\"treeId\"\n [attr.aria-activedescendant]=\"activeId()\"\n [placeholder]=\"filterPlaceholder() ?? translations().searchPlaceholder\"\n [value]=\"query()\"\n (input)=\"onFilter($event)\"\n (keydown)=\"onKeydown($event)\"\n />\n <tx-icon class=\"tx-select__filter-icon\" [name]=\"'search'\" />\n </span>\n </div>\n }\n @if (rows().length) {\n <div\n class=\"tx-tree-select__tree\"\n role=\"tree\"\n [id]=\"treeId\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [style.max-height]=\"scrollHeight() ?? null\"\n [class]=\"passThrough().tree?.class\"\n [style]=\"passThrough().tree?.style\"\n >\n <ng-container [ngTemplateOutlet]=\"branch\" [ngTemplateOutletContext]=\"{ $implicit: branches() }\" />\n </div>\n } @else {\n <div class=\"tx-tree-select__tree tx-tree-select__tree--empty\" role=\"tree\" [id]=\"treeId\" [attr.aria-label]=\"ariaLabel() || placeholder() || null\">\n <div class=\"tx-select__empty tx-tree-select__empty\" role=\"presentation\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">\n {{ emptyText() }}\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #branch let-branches>\n @for (item of branches; track item.row.id) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- tree items use aria-activedescendant: focus and keys stay on the field -->\n <div\n role=\"treeitem\"\n class=\"tx-tree-select__node\"\n [id]=\"item.row.id\"\n [style.--tx-tree-level]=\"item.row.level - 1\"\n [class.tx-tree-select__node--active]=\"item.row.node.key === activeKey()\"\n [class.tx-tree-select__node--selected]=\"item.row.checked && selectionMode() !== 'checkbox'\"\n [class.tx-tree-select__node--disabled]=\"!item.row.selectable\"\n [attr.aria-level]=\"item.row.level\"\n [attr.aria-setsize]=\"item.row.setSize\"\n [attr.aria-posinset]=\"item.row.posInSet\"\n [attr.aria-expanded]=\"item.row.hasChildren ? item.row.expanded : null\"\n [attr.aria-selected]=\"selectionMode() === 'checkbox' ? null : item.row.checked\"\n [attr.aria-checked]=\"selectionMode() === 'checkbox' ? checkState(item.row) : null\"\n [attr.aria-disabled]=\"!item.row.selectable || null\"\n [attr.aria-owns]=\"item.children.length ? item.row.id + '-group' : null\"\n [class]=\"passThrough().node?.class\"\n [style]=\"passThrough().node?.style\"\n (mouseenter)=\"activeKey.set(item.row.node.key)\"\n (click)=\"onRowClick(item.row, $event)\"\n >\n <span\n class=\"tx-tree-select__toggler\"\n aria-hidden=\"true\"\n [class.tx-tree-select__toggler--leaf]=\"!item.row.hasChildren\"\n [class]=\"passThrough().toggler?.class\"\n [style]=\"passThrough().toggler?.style\"\n >\n @if (item.row.hasChildren) {\n <tx-icon class=\"tx-tree-select__chevron\" [class.tx-tree-select__chevron--open]=\"item.row.expanded\" [name]=\"'chevron-right'\" />\n }\n </span>\n @if (selectionMode() === 'checkbox') {\n <span class=\"tx-select__checkbox tx-tree-select__checkbox\" aria-hidden=\"true\">\n @if (item.row.checked) {\n <tx-icon [name]=\"'check'\" />\n } @else if (item.row.partial) {\n <tx-icon [name]=\"'minus'\" />\n }\n </span>\n }\n @if (item.row.node.icon; as icon) {\n <tx-icon class=\"tx-tree-select__icon\" [name]=\"icon\" />\n }\n <span class=\"tx-tree-select__label\">{{ item.row.node.label }}</span>\n </div>\n @if (item.children.length) {\n <div\n role=\"group\"\n class=\"tx-tree-select__children\"\n [id]=\"item.row.id + '-group'\"\n [class.tx-tree-select__children--open]=\"item.row.expanded\"\n [attr.inert]=\"item.row.expanded ? null : ''\"\n >\n <div class=\"tx-tree-select__children-inner\">\n @if (item.row.expanded || mounted().has(item.row.node.key)) {\n <ng-container [ngTemplateOutlet]=\"branch\" [ngTemplateOutletContext]=\"{ $implicit: item.children }\" />\n }\n </div>\n </div>\n }\n }\n</ng-template>\n",
665
+ styles: [":host{display:block;width:100%}.tx-select__box{display:flex;align-items:center;cursor:pointer}.tx-select__trigger{flex:1 1 auto;min-width:0}.tx-select__value{display:block;min-height:1lh;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-select__dropdown{display:inline-flex}:host(.tx-tree-select--disabled) .tx-select__box{cursor:not-allowed}:host(.tx-tree-select--readonly) .tx-select__box{cursor:default}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-select__box{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);--_px: var(--tx-form-field-padding-x);--_py: var(--tx-form-field-padding-y);gap:var(--tx-select-gap);width:100%;padding-inline-end:0}:host([data-styled])[data-variant=filled] .tx-select__box{background:var(--tx-form-field-filled-background)}:host([data-styled]):not(.tx-tree-select--disabled,.tx-tree-select--readonly) .tx-select__box:not(:has(.tx-select__trigger:focus)):hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled])[data-variant=filled]:not(.tx-tree-select--disabled,.tx-tree-select--readonly) .tx-select__box:not(:has(.tx-select__trigger:focus)):hover{background:var(--tx-form-field-filled-hover-background)}:host([data-styled]) .tx-select__box:has(.tx-select__trigger:focus){border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled])[data-variant=filled] .tx-select__box:has(.tx-select__trigger:focus){background:var(--tx-form-field-filled-focus-background)}:host([data-styled]).tx-tree-select--readonly .tx-select__box,:host([data-styled]).tx-tree-select--readonly .tx-select__box:hover{background:var(--tx-form-field-readonly-background);cursor:default;border-color:var(--tx-form-field-border-color)}:host([data-styled]).tx-tree-select--invalid .tx-select__box{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-tree-select--invalid .tx-select__box:has(.tx-select__trigger:focus){border-color:var(--tx-form-field-invalid-border-color);box-shadow:var(--tx-form-field-invalid-focus-ring-shadow)}:host([data-styled]).tx-tree-select--disabled .tx-select__box{background:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-select__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height);--_px: var(--tx-form-field-sm-padding-x);--_py: var(--tx-form-field-sm-padding-y);padding-inline-end:0}:host([data-styled])[data-size=large] .tx-select__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height);--_px: var(--tx-form-field-lg-padding-x);--_py: var(--tx-form-field-lg-padding-y);padding-inline-end:0}:host([data-styled]) .tx-select__trigger{padding:0;padding-inline-end:var(--_px);border:none;outline:none;background:transparent;color:inherit;font:inherit;line-height:inherit;text-align:left;cursor:inherit}:host([data-styled]) .tx-select__input{cursor:text}:host([data-styled]) .tx-select__input::placeholder{color:var(--tx-form-field-placeholder-color)}:host([data-styled]) .tx-select__input:disabled{cursor:not-allowed}:host([data-styled]).tx-tree-select--invalid .tx-select__input::placeholder{color:var(--tx-form-field-invalid-placeholder-color)}:host([data-styled]) .tx-select__value--placeholder{color:var(--tx-form-field-placeholder-color)}:host([data-styled])[data-variant=filled] .tx-select__value--placeholder,:host([data-styled])[data-variant=filled] .tx-select__input::placeholder{color:var(--tx-form-field-filled-placeholder-color)}:host([data-styled]).tx-tree-select--invalid .tx-select__value--placeholder{color:var(--tx-form-field-invalid-placeholder-color)}:host([data-styled]) .tx-select__clear{display:grid;flex:none;place-items:center;width:var(--tx-select-clear-size);height:var(--tx-select-clear-size);padding:0;border:none;border-radius:var(--tx-radius-full);background:none;color:var(--tx-select-dropdown-color);font-size:var(--tx-select-clear-size);cursor:pointer;transition:color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-select__clear:hover{color:var(--tx-form-field-color)}:host([data-styled]) .tx-select__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-select__dropdown{flex:none;align-items:center;align-self:stretch;justify-content:center;width:var(--tx-select-dropdown-width);color:var(--tx-select-dropdown-color)}:host([data-styled]) .tx-select__spinner{animation:tx-select-spin .8s linear infinite}@keyframes tx-select-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-select__spinner{animation-duration:2.4s}}.tx-select__panel{box-sizing:border-box;width:100%}.tx-select__panel[data-styled]{overflow:hidden;border:1px solid var(--tx-select-overlay-border-color);border-radius:var(--tx-select-overlay-border-radius);background:var(--tx-select-overlay-background);box-shadow:var(--tx-select-overlay-shadow);color:var(--tx-select-option-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height)}.tx-select__panel[data-styled] .tx-select__header{padding:var(--tx-select-header-padding)}.tx-select__panel[data-styled] .tx-select__footer{padding:var(--tx-select-footer-padding)}.tx-select__panel[data-styled] .tx-select__filter{display:flex;align-items:center;gap:var(--tx-select-filter-gap);padding:var(--tx-select-filter-padding)}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-field{position:relative;display:flex;flex:1 1 auto;align-items:center;min-width:0}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-input{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);width:100%;min-width:0;padding-inline-end:calc(var(--tx-form-field-padding-x) + 1em + var(--tx-select-filter-icon-inset))}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-input:hover{border-color:var(--tx-form-field-hover-border-color)}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-input:focus{border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-input::placeholder{color:var(--tx-form-field-placeholder-color)}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-icon{position:absolute;right:var(--tx-select-filter-icon-inset);color:var(--tx-form-field-icon-color);pointer-events:none}.tx-select__chips{display:flex;flex-wrap:wrap;align-items:center}.tx-select__chip{display:inline-flex;align-items:center;max-width:100%}.tx-select__chip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([data-styled]) .tx-select__chips{gap:var(--tx-select-chip-gap);margin-block:calc((1lh - var(--tx-select-chip-font-size) * 1.5 - 2 * var(--tx-select-chip-padding-y)) / 2);white-space:normal}:host([data-styled]) .tx-select__chip{gap:var(--tx-select-chip-gap);padding:var(--tx-select-chip-padding-y) var(--tx-select-chip-padding-end) var(--tx-select-chip-padding-y) var(--tx-select-chip-padding-start);border-radius:var(--tx-select-chip-border-radius);background:var(--tx-select-chip-background);color:var(--tx-select-chip-color);font-size:var(--tx-select-chip-font-size);line-height:1.5}:host([data-styled]) .tx-select__chip-remove{transition:color var(--tx-motion-duration) var(--tx-motion-easing);font-size:var(--tx-select-chip-remove-size);display:inline-grid;place-items:center;border-radius:var(--tx-radius-full);color:var(--tx-select-chip-remove-color);cursor:pointer}:host([data-styled]) .tx-select__chip-remove:hover{color:var(--tx-select-chip-remove-hover-color)}.tx-tree-select__tree{overflow-y:auto}.tx-tree-select__node{display:flex;align-items:center;cursor:pointer}.tx-tree-select__node--disabled{cursor:default}.tx-tree-select__toggler{display:inline-grid;flex:none;place-items:center}.tx-tree-select__label{flex:1 1 auto;min-width:0}.tx-tree-select__children{display:grid;grid-template-rows:0fr}.tx-tree-select__children--open{grid-template-rows:1fr}.tx-tree-select__children-inner{min-height:0;overflow:hidden}.tx-tree-select__children:not(.tx-tree-select__children--open)>.tx-tree-select__children-inner{visibility:hidden}.tx-select__panel[data-styled] .tx-tree-select__tree{max-height:var(--tx-select-list-max-height);padding:calc(var(--tx-select-list-padding) - var(--tx-select-list-gap)) var(--tx-select-list-padding) var(--tx-select-list-padding)}.tx-select__panel[data-styled] .tx-tree-select__tree--empty{padding:var(--tx-select-list-padding)}.tx-select__panel[data-styled] .tx-tree-select__children{transition:grid-template-rows calc(var(--tx-motion-duration) * 1.6) cubic-bezier(.2,0,0,1)}.tx-select__panel[data-styled] .tx-tree-select__children:not(.tx-tree-select__children--open)>.tx-tree-select__children-inner{transition:visibility 0s linear calc(var(--tx-motion-duration) * 1.6)}.tx-select__panel[data-styled] .tx-tree-select__node{margin-top:var(--tx-select-list-gap);gap:var(--tx-tree-gap);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),color var(--tx-motion-duration) var(--tx-motion-easing);padding:var(--tx-select-option-padding);padding-inline-start:calc(var(--tx-tree-level, 0) * var(--tx-tree-indent) + 4px);border-radius:var(--tx-select-option-border-radius);color:var(--tx-select-option-color)}.tx-select__panel[data-styled] .tx-tree-select__node--active{background:var(--tx-select-option-focus-background)}.tx-select__panel[data-styled] .tx-tree-select__node--selected{background:var(--tx-select-option-selected-background);color:var(--tx-select-option-selected-color);font-weight:var(--tx-select-option-selected-font-weight)}.tx-select__panel[data-styled] .tx-tree-select__node--selected.tx-tree-select__node--active{background:var(--tx-select-option-selected-focus-background);color:var(--tx-select-option-selected-focus-color)}.tx-select__panel[data-styled] .tx-tree-select__node--disabled{color:var(--tx-select-option-disabled-color)}.tx-select__panel[data-styled] .tx-tree-select__toggler{transition:background-color var(--tx-motion-duration) var(--tx-motion-easing);width:var(--tx-tree-toggler-size);height:var(--tx-tree-toggler-size);border-radius:var(--tx-radius-sm);color:var(--tx-tree-toggler-color)}.tx-select__panel[data-styled] .tx-tree-select__toggler:not(.tx-tree-select__toggler--leaf):hover{background:var(--tx-tree-toggler-hover-background)}.tx-select__panel[data-styled] .tx-tree-select__icon{color:var(--tx-tree-icon-color)}.tx-select__panel[data-styled] .tx-tree-select__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-select__panel[data-styled] .tx-tree-select__checkbox{transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),border-color var(--tx-motion-duration) var(--tx-motion-easing);display:inline-grid;flex:none;place-items:center;box-sizing:border-box;width:var(--tx-select-checkbox-size);height:var(--tx-select-checkbox-size);border:1px solid var(--tx-select-checkbox-border-color);border-radius:var(--tx-select-checkbox-border-radius);background:var(--tx-select-checkbox-background);color:var(--tx-select-checkbox-checked-color);font-size:var(--tx-select-checkbox-icon-size)}.tx-select__panel[data-styled] .tx-tree-select__node[aria-checked=true] .tx-tree-select__checkbox,.tx-select__panel[data-styled] .tx-tree-select__node[aria-checked=mixed] .tx-tree-select__checkbox{border-color:var(--tx-select-checkbox-checked-background);background:var(--tx-select-checkbox-checked-background)}.tx-select__panel[data-styled] .tx-select__empty{padding:var(--tx-select-empty-padding);color:var(--tx-select-empty-color)}.tx-select__panel[data-styled] .tx-tree-select__chevron{transition:transform var(--tx-motion-duration) var(--tx-motion-easing)}.tx-select__panel[data-styled] .tx-tree-select__chevron--open{transform:rotate(90deg)}@media(prefers-reduced-motion:reduce){.tx-select__panel[data-styled] .tx-tree-select__chevron,.tx-select__panel[data-styled] .tx-tree-select__children,.tx-select__panel[data-styled] .tx-tree-select__children-inner{transition:none}}\n"],
666
+ dependencies: [
667
+ {
668
+ kind: "directive",
669
+ type: CdkOverlayOrigin,
670
+ selector: "[cdk-overlay-origin], [overlay-origin], [cdkOverlayOrigin]",
671
+ exportAs: ["cdkOverlayOrigin"]
672
+ },
673
+ {
674
+ kind: "directive",
675
+ type: CdkConnectedOverlay,
676
+ selector: "[cdk-connected-overlay], [connected-overlay], [cdkConnectedOverlay]",
677
+ inputs: [
678
+ "cdkConnectedOverlayOrigin",
679
+ "cdkConnectedOverlayPositions",
680
+ "cdkConnectedOverlayPositionStrategy",
681
+ "cdkConnectedOverlayOffsetX",
682
+ "cdkConnectedOverlayOffsetY",
683
+ "cdkConnectedOverlayWidth",
684
+ "cdkConnectedOverlayHeight",
685
+ "cdkConnectedOverlayMinWidth",
686
+ "cdkConnectedOverlayMinHeight",
687
+ "cdkConnectedOverlayBackdropClass",
688
+ "cdkConnectedOverlayPanelClass",
689
+ "cdkConnectedOverlayViewportMargin",
690
+ "cdkConnectedOverlayScrollStrategy",
691
+ "cdkConnectedOverlayOpen",
692
+ "cdkConnectedOverlayDisableClose",
693
+ "cdkConnectedOverlayTransformOriginOn",
694
+ "cdkConnectedOverlayHasBackdrop",
695
+ "cdkConnectedOverlayLockPosition",
696
+ "cdkConnectedOverlayFlexibleDimensions",
697
+ "cdkConnectedOverlayGrowAfterOpen",
698
+ "cdkConnectedOverlayPush",
699
+ "cdkConnectedOverlayDisposeOnNavigation",
700
+ "cdkConnectedOverlayUsePopover",
701
+ "cdkConnectedOverlayMatchWidth",
702
+ "cdkConnectedOverlay"
703
+ ],
704
+ outputs: [
705
+ "backdropClick",
706
+ "positionChange",
707
+ "attach",
708
+ "detach",
709
+ "overlayKeydown",
710
+ "overlayOutsideClick"
711
+ ],
712
+ exportAs: ["cdkConnectedOverlay"]
713
+ },
714
+ {
715
+ kind: "directive",
716
+ type: TxOverlayAnchor,
717
+ selector: "[cdkConnectedOverlay][txOverlayAnchor]"
718
+ },
719
+ {
720
+ kind: "directive",
721
+ type: NgTemplateOutlet,
722
+ selector: "[ngTemplateOutlet]",
723
+ inputs: [
724
+ "ngTemplateOutletContext",
725
+ "ngTemplateOutlet",
726
+ "ngTemplateOutletInjector"
727
+ ]
728
+ },
729
+ {
730
+ kind: "component",
731
+ type: TxIcon,
732
+ selector: "tx-icon",
733
+ inputs: ["name"]
734
+ }
735
+ ],
736
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
737
+ });
738
+ };
739
+ i0.ɵɵngDeclareClassMetadata({
740
+ minVersion: "12.0.0",
741
+ version: "22.2.3",
742
+ ngImport: i0,
743
+ type: TxTreeSelect,
744
+ decorators: [{
745
+ type: Component,
746
+ args: [{
747
+ selector: "tx-tree-select",
748
+ imports: [
749
+ CdkOverlayOrigin,
750
+ CdkConnectedOverlay,
751
+ TxOverlayAnchor,
752
+ NgTemplateOutlet,
753
+ TxIcon
754
+ ],
755
+ changeDetection: ChangeDetectionStrategy.OnPush,
756
+ providers: [{
757
+ provide: NG_VALUE_ACCESSOR,
758
+ useExisting: forwardRef(() => TxTreeSelect),
759
+ multi: true
760
+ }],
761
+ host: {
762
+ class: "tx-tree-select",
763
+ "[class]": "passThrough().root?.class",
764
+ "[style]": "hostStyle()",
765
+ "[attr.data-styled]": "!isUnstyled() || null",
766
+ "[attr.data-size]": "size()",
767
+ "[attr.data-variant]": "variant()",
768
+ "[class.tx-tree-select--open]": "isOpen()",
769
+ "[class.tx-tree-select--disabled]": "disabled()",
770
+ "[class.tx-tree-select--invalid]": "isInvalid()",
771
+ "[class.tx-tree-select--readonly]": "readonly()",
772
+ "[class.tx-tree-select--filled]": "selectedKeys().length > 0"
773
+ },
774
+ template: "<!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- the combobox inside the box takes focus and keys; the box only widens the click area -->\n<div\n #box\n #origin=\"cdkOverlayOrigin\"\n cdkOverlayOrigin\n class=\"tx-select__box\"\n [class]=\"passThrough().box?.class\"\n [style]=\"passThrough().box?.style\"\n (click)=\"onBoxClick($event)\"\n>\n <button\n #trigger\n type=\"button\"\n role=\"combobox\"\n class=\"tx-select__trigger\"\n aria-haspopup=\"tree\"\n [class]=\"passThrough().trigger?.class\"\n [style]=\"passThrough().trigger?.style\"\n [attr.id]=\"inputId() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? (ariaLabelledBy() || inputId() ? null : placeholder() || null)\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-expanded]=\"isOpen()\"\n [attr.aria-controls]=\"treeId\"\n [attr.aria-activedescendant]=\"filter() ? null : activeId()\"\n [attr.aria-invalid]=\"isInvalid() || null\"\n [attr.aria-readonly]=\"readonly() || null\"\n [disabled]=\"disabled()\"\n (keydown)=\"onKeydown($event)\"\n >\n @if (!selectedNodes().length) {\n <span class=\"tx-select__value tx-select__value--placeholder\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{\n placeholder()\n }}</span>\n } @else if (multiple() && display() === 'chip') {\n <span class=\"tx-select__value tx-select__chips\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">\n @for (node of selectedNodes(); track node.key) {\n <span class=\"tx-select__chip\" [class]=\"passThrough().chip?.class\" [style]=\"passThrough().chip?.style\">\n <span class=\"tx-select__chip-label\">{{ node.label }}</span>\n @if (!disabled() && !readonly()) {\n <span class=\"tx-select__chip-remove\" aria-hidden=\"true\" (click)=\"removeNode(node, $event)\">\n <tx-icon [name]=\"'times'\" />\n </span>\n }\n </span>\n }\n </span>\n } @else {\n <span class=\"tx-select__value\" [class]=\"passThrough().value?.class\" [style]=\"passThrough().value?.style\">{{ commaText() }}</span>\n }\n </button>\n @if (canClear()) {\n <button\n type=\"button\"\n class=\"tx-select__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n <span class=\"tx-select__dropdown\" aria-hidden=\"true\" [class]=\"passThrough().dropdown?.class\" [style]=\"passThrough().dropdown?.style\">\n <tx-icon class=\"tx-select__chevron\" [name]=\"'chevron-down'\" />\n </span>\n</div>\n\n<ng-template\n cdkConnectedOverlay\n txOverlayAnchor\n [cdkConnectedOverlayOrigin]=\"origin\"\n [cdkConnectedOverlayOpen]=\"isPanelMounted()\"\n [cdkConnectedOverlayPositions]=\"positions()\"\n [cdkConnectedOverlayScrollStrategy]=\"scrollStrategy\"\n [cdkConnectedOverlayViewportMargin]=\"viewportMargin()\"\n [cdkConnectedOverlayDisableClose]=\"true\"\n [cdkConnectedOverlayWidth]=\"panelWidth()\"\n (overlayOutsideClick)=\"onOutsideClick($event)\"\n (attach)=\"onAttach()\"\n (positionChange)=\"onPositionChange($event)\"\n (detach)=\"close()\"\n>\n <div\n #panel\n class=\"tx-select__panel\"\n [attr.data-styled]=\"!isUnstyled() || null\"\n [class]=\"passThrough().panel?.class\"\n [style]=\"panelStyle()\"\n (mousedown)=\"onPanelMousedown($event)\"\n >\n @if (filter()) {\n <div class=\"tx-select__filter\" [class]=\"passThrough().filter?.class\" [style]=\"passThrough().filter?.style\">\n <span class=\"tx-select__filter-field\">\n <input\n #filterInput\n type=\"text\"\n autocomplete=\"off\"\n class=\"tx-select__filter-input\"\n role=\"searchbox\"\n [class]=\"passThrough().filterInput?.class\"\n [style]=\"passThrough().filterInput?.style\"\n [attr.aria-label]=\"filterPlaceholder() ?? translations().searchPlaceholder\"\n [attr.aria-controls]=\"treeId\"\n [attr.aria-activedescendant]=\"activeId()\"\n [placeholder]=\"filterPlaceholder() ?? translations().searchPlaceholder\"\n [value]=\"query()\"\n (input)=\"onFilter($event)\"\n (keydown)=\"onKeydown($event)\"\n />\n <tx-icon class=\"tx-select__filter-icon\" [name]=\"'search'\" />\n </span>\n </div>\n }\n @if (rows().length) {\n <div\n class=\"tx-tree-select__tree\"\n role=\"tree\"\n [id]=\"treeId\"\n [attr.aria-multiselectable]=\"multiple() || null\"\n [attr.aria-label]=\"ariaLabel() || placeholder() || null\"\n [style.max-height]=\"scrollHeight() ?? null\"\n [class]=\"passThrough().tree?.class\"\n [style]=\"passThrough().tree?.style\"\n >\n <ng-container [ngTemplateOutlet]=\"branch\" [ngTemplateOutletContext]=\"{ $implicit: branches() }\" />\n </div>\n } @else {\n <div class=\"tx-tree-select__tree tx-tree-select__tree--empty\" role=\"tree\" [id]=\"treeId\" [attr.aria-label]=\"ariaLabel() || placeholder() || null\">\n <div class=\"tx-select__empty tx-tree-select__empty\" role=\"presentation\" [class]=\"passThrough().empty?.class\" [style]=\"passThrough().empty?.style\">\n {{ emptyText() }}\n </div>\n </div>\n }\n </div>\n</ng-template>\n\n<ng-template #branch let-branches>\n @for (item of branches; track item.row.id) {\n <!-- eslint-disable-next-line @angular-eslint/template/click-events-have-key-events, @angular-eslint/template/interactive-supports-focus -- tree items use aria-activedescendant: focus and keys stay on the field -->\n <div\n role=\"treeitem\"\n class=\"tx-tree-select__node\"\n [id]=\"item.row.id\"\n [style.--tx-tree-level]=\"item.row.level - 1\"\n [class.tx-tree-select__node--active]=\"item.row.node.key === activeKey()\"\n [class.tx-tree-select__node--selected]=\"item.row.checked && selectionMode() !== 'checkbox'\"\n [class.tx-tree-select__node--disabled]=\"!item.row.selectable\"\n [attr.aria-level]=\"item.row.level\"\n [attr.aria-setsize]=\"item.row.setSize\"\n [attr.aria-posinset]=\"item.row.posInSet\"\n [attr.aria-expanded]=\"item.row.hasChildren ? item.row.expanded : null\"\n [attr.aria-selected]=\"selectionMode() === 'checkbox' ? null : item.row.checked\"\n [attr.aria-checked]=\"selectionMode() === 'checkbox' ? checkState(item.row) : null\"\n [attr.aria-disabled]=\"!item.row.selectable || null\"\n [attr.aria-owns]=\"item.children.length ? item.row.id + '-group' : null\"\n [class]=\"passThrough().node?.class\"\n [style]=\"passThrough().node?.style\"\n (mouseenter)=\"activeKey.set(item.row.node.key)\"\n (click)=\"onRowClick(item.row, $event)\"\n >\n <span\n class=\"tx-tree-select__toggler\"\n aria-hidden=\"true\"\n [class.tx-tree-select__toggler--leaf]=\"!item.row.hasChildren\"\n [class]=\"passThrough().toggler?.class\"\n [style]=\"passThrough().toggler?.style\"\n >\n @if (item.row.hasChildren) {\n <tx-icon class=\"tx-tree-select__chevron\" [class.tx-tree-select__chevron--open]=\"item.row.expanded\" [name]=\"'chevron-right'\" />\n }\n </span>\n @if (selectionMode() === 'checkbox') {\n <span class=\"tx-select__checkbox tx-tree-select__checkbox\" aria-hidden=\"true\">\n @if (item.row.checked) {\n <tx-icon [name]=\"'check'\" />\n } @else if (item.row.partial) {\n <tx-icon [name]=\"'minus'\" />\n }\n </span>\n }\n @if (item.row.node.icon; as icon) {\n <tx-icon class=\"tx-tree-select__icon\" [name]=\"icon\" />\n }\n <span class=\"tx-tree-select__label\">{{ item.row.node.label }}</span>\n </div>\n @if (item.children.length) {\n <div\n role=\"group\"\n class=\"tx-tree-select__children\"\n [id]=\"item.row.id + '-group'\"\n [class.tx-tree-select__children--open]=\"item.row.expanded\"\n [attr.inert]=\"item.row.expanded ? null : ''\"\n >\n <div class=\"tx-tree-select__children-inner\">\n @if (item.row.expanded || mounted().has(item.row.node.key)) {\n <ng-container [ngTemplateOutlet]=\"branch\" [ngTemplateOutletContext]=\"{ $implicit: item.children }\" />\n }\n </div>\n </div>\n }\n }\n</ng-template>\n",
775
+ styles: [":host{display:block;width:100%}.tx-select__box{display:flex;align-items:center;cursor:pointer}.tx-select__trigger{flex:1 1 auto;min-width:0}.tx-select__value{display:block;min-height:1lh;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-select__dropdown{display:inline-flex}:host(.tx-tree-select--disabled) .tx-select__box{cursor:not-allowed}:host(.tx-tree-select--readonly) .tx-select__box{cursor:default}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-select__box{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);--_px: var(--tx-form-field-padding-x);--_py: var(--tx-form-field-padding-y);gap:var(--tx-select-gap);width:100%;padding-inline-end:0}:host([data-styled])[data-variant=filled] .tx-select__box{background:var(--tx-form-field-filled-background)}:host([data-styled]):not(.tx-tree-select--disabled,.tx-tree-select--readonly) .tx-select__box:not(:has(.tx-select__trigger:focus)):hover{border-color:var(--tx-form-field-hover-border-color)}:host([data-styled])[data-variant=filled]:not(.tx-tree-select--disabled,.tx-tree-select--readonly) .tx-select__box:not(:has(.tx-select__trigger:focus)):hover{background:var(--tx-form-field-filled-hover-background)}:host([data-styled]) .tx-select__box:has(.tx-select__trigger:focus){border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}:host([data-styled])[data-variant=filled] .tx-select__box:has(.tx-select__trigger:focus){background:var(--tx-form-field-filled-focus-background)}:host([data-styled]).tx-tree-select--readonly .tx-select__box,:host([data-styled]).tx-tree-select--readonly .tx-select__box:hover{background:var(--tx-form-field-readonly-background);cursor:default;border-color:var(--tx-form-field-border-color)}:host([data-styled]).tx-tree-select--invalid .tx-select__box{border-color:var(--tx-form-field-invalid-border-color)}:host([data-styled]).tx-tree-select--invalid .tx-select__box:has(.tx-select__trigger:focus){border-color:var(--tx-form-field-invalid-border-color);box-shadow:var(--tx-form-field-invalid-focus-ring-shadow)}:host([data-styled]).tx-tree-select--disabled .tx-select__box{background:var(--tx-form-field-disabled-background);box-shadow:none;color:var(--tx-form-field-disabled-color);cursor:not-allowed}:host([data-styled])[data-size=small] .tx-select__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-sm-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-sm-padding-y));padding-inline:calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-sm-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-sm-font-size);line-height:var(--tx-form-field-sm-line-height);--_px: var(--tx-form-field-sm-padding-x);--_py: var(--tx-form-field-sm-padding-y);padding-inline-end:0}:host([data-styled])[data-size=large] .tx-select__box{padding-top:var(--tx-field-padding-top, var(--tx-form-field-lg-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-lg-padding-y));padding-inline:calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-lg-padding-x) + var(--tx-field-inset-end, 0px));font-size:var(--tx-form-field-lg-font-size);line-height:var(--tx-form-field-lg-line-height);--_px: var(--tx-form-field-lg-padding-x);--_py: var(--tx-form-field-lg-padding-y);padding-inline-end:0}:host([data-styled]) .tx-select__trigger{padding:0;padding-inline-end:var(--_px);border:none;outline:none;background:transparent;color:inherit;font:inherit;line-height:inherit;text-align:left;cursor:inherit}:host([data-styled]) .tx-select__input{cursor:text}:host([data-styled]) .tx-select__input::placeholder{color:var(--tx-form-field-placeholder-color)}:host([data-styled]) .tx-select__input:disabled{cursor:not-allowed}:host([data-styled]).tx-tree-select--invalid .tx-select__input::placeholder{color:var(--tx-form-field-invalid-placeholder-color)}:host([data-styled]) .tx-select__value--placeholder{color:var(--tx-form-field-placeholder-color)}:host([data-styled])[data-variant=filled] .tx-select__value--placeholder,:host([data-styled])[data-variant=filled] .tx-select__input::placeholder{color:var(--tx-form-field-filled-placeholder-color)}:host([data-styled]).tx-tree-select--invalid .tx-select__value--placeholder{color:var(--tx-form-field-invalid-placeholder-color)}:host([data-styled]) .tx-select__clear{display:grid;flex:none;place-items:center;width:var(--tx-select-clear-size);height:var(--tx-select-clear-size);padding:0;border:none;border-radius:var(--tx-radius-full);background:none;color:var(--tx-select-dropdown-color);font-size:var(--tx-select-clear-size);cursor:pointer;transition:color var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-select__clear:hover{color:var(--tx-form-field-color)}:host([data-styled]) .tx-select__clear:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-select__dropdown{flex:none;align-items:center;align-self:stretch;justify-content:center;width:var(--tx-select-dropdown-width);color:var(--tx-select-dropdown-color)}:host([data-styled]) .tx-select__spinner{animation:tx-select-spin .8s linear infinite}@keyframes tx-select-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-select__spinner{animation-duration:2.4s}}.tx-select__panel{box-sizing:border-box;width:100%}.tx-select__panel[data-styled]{overflow:hidden;border:1px solid var(--tx-select-overlay-border-color);border-radius:var(--tx-select-overlay-border-radius);background:var(--tx-select-overlay-background);box-shadow:var(--tx-select-overlay-shadow);color:var(--tx-select-option-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height)}.tx-select__panel[data-styled] .tx-select__header{padding:var(--tx-select-header-padding)}.tx-select__panel[data-styled] .tx-select__footer{padding:var(--tx-select-footer-padding)}.tx-select__panel[data-styled] .tx-select__filter{display:flex;align-items:center;gap:var(--tx-select-filter-gap);padding:var(--tx-select-filter-padding)}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-field{position:relative;display:flex;flex:1 1 auto;align-items:center;min-width:0}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-input{box-sizing:border-box;padding-top:var(--tx-field-padding-top, var(--tx-form-field-padding-y));padding-bottom:var(--tx-field-padding-bottom, var(--tx-form-field-padding-y));padding-inline:calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-start, 0px)) calc(var(--tx-form-field-padding-x) + var(--tx-field-inset-end, 0px));border:1px solid var(--tx-form-field-border-color);border-radius:var(--tx-form-field-border-radius);outline:none;background:var(--tx-form-field-background);box-shadow:var(--tx-form-field-shadow);color:var(--tx-form-field-color);font-family:var(--tx-font-family);font-size:var(--tx-form-field-font-size);line-height:var(--tx-form-field-line-height);transition:background-color var(--tx-form-field-transition-duration),border-color var(--tx-form-field-transition-duration),box-shadow var(--tx-form-field-transition-duration);width:100%;min-width:0;padding-inline-end:calc(var(--tx-form-field-padding-x) + 1em + var(--tx-select-filter-icon-inset))}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-input:hover{border-color:var(--tx-form-field-hover-border-color)}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-input:focus{border-color:var(--tx-form-field-focus-border-color);box-shadow:var(--tx-form-field-focus-ring-shadow)}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-input::placeholder{color:var(--tx-form-field-placeholder-color)}.tx-select__panel[data-styled] .tx-select__filter .tx-select__filter-icon{position:absolute;right:var(--tx-select-filter-icon-inset);color:var(--tx-form-field-icon-color);pointer-events:none}.tx-select__chips{display:flex;flex-wrap:wrap;align-items:center}.tx-select__chip{display:inline-flex;align-items:center;max-width:100%}.tx-select__chip-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}:host([data-styled]) .tx-select__chips{gap:var(--tx-select-chip-gap);margin-block:calc((1lh - var(--tx-select-chip-font-size) * 1.5 - 2 * var(--tx-select-chip-padding-y)) / 2);white-space:normal}:host([data-styled]) .tx-select__chip{gap:var(--tx-select-chip-gap);padding:var(--tx-select-chip-padding-y) var(--tx-select-chip-padding-end) var(--tx-select-chip-padding-y) var(--tx-select-chip-padding-start);border-radius:var(--tx-select-chip-border-radius);background:var(--tx-select-chip-background);color:var(--tx-select-chip-color);font-size:var(--tx-select-chip-font-size);line-height:1.5}:host([data-styled]) .tx-select__chip-remove{transition:color var(--tx-motion-duration) var(--tx-motion-easing);font-size:var(--tx-select-chip-remove-size);display:inline-grid;place-items:center;border-radius:var(--tx-radius-full);color:var(--tx-select-chip-remove-color);cursor:pointer}:host([data-styled]) .tx-select__chip-remove:hover{color:var(--tx-select-chip-remove-hover-color)}.tx-tree-select__tree{overflow-y:auto}.tx-tree-select__node{display:flex;align-items:center;cursor:pointer}.tx-tree-select__node--disabled{cursor:default}.tx-tree-select__toggler{display:inline-grid;flex:none;place-items:center}.tx-tree-select__label{flex:1 1 auto;min-width:0}.tx-tree-select__children{display:grid;grid-template-rows:0fr}.tx-tree-select__children--open{grid-template-rows:1fr}.tx-tree-select__children-inner{min-height:0;overflow:hidden}.tx-tree-select__children:not(.tx-tree-select__children--open)>.tx-tree-select__children-inner{visibility:hidden}.tx-select__panel[data-styled] .tx-tree-select__tree{max-height:var(--tx-select-list-max-height);padding:calc(var(--tx-select-list-padding) - var(--tx-select-list-gap)) var(--tx-select-list-padding) var(--tx-select-list-padding)}.tx-select__panel[data-styled] .tx-tree-select__tree--empty{padding:var(--tx-select-list-padding)}.tx-select__panel[data-styled] .tx-tree-select__children{transition:grid-template-rows calc(var(--tx-motion-duration) * 1.6) cubic-bezier(.2,0,0,1)}.tx-select__panel[data-styled] .tx-tree-select__children:not(.tx-tree-select__children--open)>.tx-tree-select__children-inner{transition:visibility 0s linear calc(var(--tx-motion-duration) * 1.6)}.tx-select__panel[data-styled] .tx-tree-select__node{margin-top:var(--tx-select-list-gap);gap:var(--tx-tree-gap);transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),color var(--tx-motion-duration) var(--tx-motion-easing);padding:var(--tx-select-option-padding);padding-inline-start:calc(var(--tx-tree-level, 0) * var(--tx-tree-indent) + 4px);border-radius:var(--tx-select-option-border-radius);color:var(--tx-select-option-color)}.tx-select__panel[data-styled] .tx-tree-select__node--active{background:var(--tx-select-option-focus-background)}.tx-select__panel[data-styled] .tx-tree-select__node--selected{background:var(--tx-select-option-selected-background);color:var(--tx-select-option-selected-color);font-weight:var(--tx-select-option-selected-font-weight)}.tx-select__panel[data-styled] .tx-tree-select__node--selected.tx-tree-select__node--active{background:var(--tx-select-option-selected-focus-background);color:var(--tx-select-option-selected-focus-color)}.tx-select__panel[data-styled] .tx-tree-select__node--disabled{color:var(--tx-select-option-disabled-color)}.tx-select__panel[data-styled] .tx-tree-select__toggler{transition:background-color var(--tx-motion-duration) var(--tx-motion-easing);width:var(--tx-tree-toggler-size);height:var(--tx-tree-toggler-size);border-radius:var(--tx-radius-sm);color:var(--tx-tree-toggler-color)}.tx-select__panel[data-styled] .tx-tree-select__toggler:not(.tx-tree-select__toggler--leaf):hover{background:var(--tx-tree-toggler-hover-background)}.tx-select__panel[data-styled] .tx-tree-select__icon{color:var(--tx-tree-icon-color)}.tx-select__panel[data-styled] .tx-tree-select__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.tx-select__panel[data-styled] .tx-tree-select__checkbox{transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),border-color var(--tx-motion-duration) var(--tx-motion-easing);display:inline-grid;flex:none;place-items:center;box-sizing:border-box;width:var(--tx-select-checkbox-size);height:var(--tx-select-checkbox-size);border:1px solid var(--tx-select-checkbox-border-color);border-radius:var(--tx-select-checkbox-border-radius);background:var(--tx-select-checkbox-background);color:var(--tx-select-checkbox-checked-color);font-size:var(--tx-select-checkbox-icon-size)}.tx-select__panel[data-styled] .tx-tree-select__node[aria-checked=true] .tx-tree-select__checkbox,.tx-select__panel[data-styled] .tx-tree-select__node[aria-checked=mixed] .tx-tree-select__checkbox{border-color:var(--tx-select-checkbox-checked-background);background:var(--tx-select-checkbox-checked-background)}.tx-select__panel[data-styled] .tx-select__empty{padding:var(--tx-select-empty-padding);color:var(--tx-select-empty-color)}.tx-select__panel[data-styled] .tx-tree-select__chevron{transition:transform var(--tx-motion-duration) var(--tx-motion-easing)}.tx-select__panel[data-styled] .tx-tree-select__chevron--open{transform:rotate(90deg)}@media(prefers-reduced-motion:reduce){.tx-select__panel[data-styled] .tx-tree-select__chevron,.tx-select__panel[data-styled] .tx-tree-select__children,.tx-select__panel[data-styled] .tx-tree-select__children-inner{transition:none}}\n"]
776
+ }]
777
+ }],
778
+ propDecorators: {
779
+ options: [{
780
+ type: i0.Input,
781
+ args: [{
782
+ isSignal: true,
783
+ alias: "options",
784
+ required: false
785
+ }]
786
+ }],
787
+ selectionMode: [{
788
+ type: i0.Input,
789
+ args: [{
790
+ isSignal: true,
791
+ alias: "selectionMode",
792
+ required: false
793
+ }]
794
+ }],
795
+ display: [{
796
+ type: i0.Input,
797
+ args: [{
798
+ isSignal: true,
799
+ alias: "display",
800
+ required: false
801
+ }]
802
+ }],
803
+ expandedKeys: [{
804
+ type: i0.Input,
805
+ args: [{
806
+ isSignal: true,
807
+ alias: "expandedKeys",
808
+ required: false
809
+ }]
810
+ }, {
811
+ type: i0.Output,
812
+ args: ["expandedKeysChange"]
813
+ }],
814
+ filter: [{
815
+ type: i0.Input,
816
+ args: [{
817
+ isSignal: true,
818
+ alias: "filter",
819
+ required: false
820
+ }]
821
+ }],
822
+ filterPlaceholder: [{
823
+ type: i0.Input,
824
+ args: [{
825
+ isSignal: true,
826
+ alias: "filterPlaceholder",
827
+ required: false
828
+ }]
829
+ }],
830
+ placeholder: [{
831
+ type: i0.Input,
832
+ args: [{
833
+ isSignal: true,
834
+ alias: "placeholder",
835
+ required: false
836
+ }]
837
+ }],
838
+ showClear: [{
839
+ type: i0.Input,
840
+ args: [{
841
+ isSignal: true,
842
+ alias: "showClear",
843
+ required: false
844
+ }]
845
+ }],
846
+ emptyMessage: [{
847
+ type: i0.Input,
848
+ args: [{
849
+ isSignal: true,
850
+ alias: "emptyMessage",
851
+ required: false
852
+ }]
853
+ }],
854
+ scrollHeight: [{
855
+ type: i0.Input,
856
+ args: [{
857
+ isSignal: true,
858
+ alias: "scrollHeight",
859
+ required: false
860
+ }]
861
+ }],
862
+ inputId: [{
863
+ type: i0.Input,
864
+ args: [{
865
+ isSignal: true,
866
+ alias: "inputId",
867
+ required: false
868
+ }]
869
+ }],
870
+ ariaLabel: [{
871
+ type: i0.Input,
872
+ args: [{
873
+ isSignal: true,
874
+ alias: "ariaLabel",
875
+ required: false
876
+ }]
877
+ }],
878
+ ariaLabelledBy: [{
879
+ type: i0.Input,
880
+ args: [{
881
+ isSignal: true,
882
+ alias: "ariaLabelledBy",
883
+ required: false
884
+ }]
885
+ }],
886
+ size: [{
887
+ type: i0.Input,
888
+ args: [{
889
+ isSignal: true,
890
+ alias: "size",
891
+ required: false
892
+ }]
893
+ }],
894
+ variant: [{
895
+ type: i0.Input,
896
+ args: [{
897
+ isSignal: true,
898
+ alias: "variant",
899
+ required: false
900
+ }]
901
+ }],
902
+ invalid: [{
903
+ type: i0.Input,
904
+ args: [{
905
+ isSignal: true,
906
+ alias: "invalid",
907
+ required: false
908
+ }]
909
+ }],
910
+ readonly: [{
911
+ type: i0.Input,
912
+ args: [{
913
+ isSignal: true,
914
+ alias: "readonly",
915
+ required: false
916
+ }]
917
+ }],
918
+ dt: [{
919
+ type: i0.Input,
920
+ args: [{
921
+ isSignal: true,
922
+ alias: "dt",
923
+ required: false
924
+ }]
925
+ }],
926
+ pt: [{
927
+ type: i0.Input,
928
+ args: [{
929
+ isSignal: true,
930
+ alias: "pt",
931
+ required: false
932
+ }]
933
+ }],
934
+ ptOptions: [{
935
+ type: i0.Input,
936
+ args: [{
937
+ isSignal: true,
938
+ alias: "ptOptions",
939
+ required: false
940
+ }]
941
+ }],
942
+ unstyled: [{
943
+ type: i0.Input,
944
+ args: [{
945
+ isSignal: true,
946
+ alias: "unstyled",
947
+ required: false
948
+ }]
949
+ }],
950
+ changed: [{
951
+ type: i0.Output,
952
+ args: ["changed"]
953
+ }],
954
+ opened: [{
955
+ type: i0.Output,
956
+ args: ["opened"]
957
+ }],
958
+ closed: [{
959
+ type: i0.Output,
960
+ args: ["closed"]
961
+ }],
962
+ box: [{
963
+ type: i0.ViewChild,
964
+ args: ["box", { isSignal: true }]
965
+ }],
966
+ trigger: [{
967
+ type: i0.ViewChild,
968
+ args: ["trigger", { isSignal: true }]
969
+ }],
970
+ panel: [{
971
+ type: i0.ViewChild,
972
+ args: ["panel", { isSignal: true }]
973
+ }],
974
+ filterInput: [{
975
+ type: i0.ViewChild,
976
+ args: ["filterInput", { isSignal: true }]
977
+ }],
978
+ connectedOverlay: [{
979
+ type: i0.ViewChild,
980
+ args: [i0.forwardRef(() => CdkConnectedOverlay), { isSignal: true }]
981
+ }]
982
+ }
983
+ });
984
+ export { TxTreeSelect, descendantKeys, findNode, normalizeChecked, parentMap, walkTree };
985
+
986
+ //# sourceMappingURL=tectra-ng-ui-tree-select.mjs.map