@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,1539 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, Directive, ElementRef, Injectable, InjectionToken, Injector, TemplateRef, ViewContainerRef, booleanAttribute, computed, effect, inject, input, model, output, signal, untracked, viewChild } from "@angular/core";
3
+ import { ReplaySubject, Subject, firstValueFrom, isObservable } from "rxjs";
4
+ import { tabbableElements, uniqueId } from "@tectra-ng/core/a11y";
5
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
6
+ import { injectTranslations } from "@tectra-ng/core/i18n";
7
+ import { optionalBoolean } from "@tectra-ng/core/utils";
8
+ import { TxButton } from "@tectra-ng/ui/button";
9
+ import { FocusTrapFactory, InteractivityChecker } from "@angular/cdk/a11y";
10
+ import { CdkPortalOutlet, ComponentPortal, TemplatePortal } from "@angular/cdk/portal";
11
+ import { toStyleObject } from "@tectra-ng/themes";
12
+ import { createBlockScrollStrategy, createGlobalPositionStrategy, createNoopScrollStrategy, createOverlayRef } from "@angular/cdk/overlay";
13
+ const TX_DIALOG_DATA = new InjectionToken("TX_DIALOG_DATA");
14
+ const TX_DIALOG_CURRENT = new InjectionToken("TX_DIALOG_CURRENT");
15
+ var TxDialogRef = class {
16
+ id;
17
+ config;
18
+ closedSubject = new Subject();
19
+ openedSubject = new ReplaySubject(1);
20
+ maximizedState = signal(false, ...ngDevMode ? [{ debugName: "maximizedState" }] : /* istanbul ignore next */ []);
21
+ titleIdState = signal(null, ...ngDevMode ? [{ debugName: "titleIdState" }] : /* istanbul ignore next */ []);
22
+ host = null;
23
+ closing = false;
24
+ guarding = false;
25
+ closed = this.closedSubject.asObservable();
26
+ afterOpened = this.openedSubject.asObservable();
27
+ maximized = this.maximizedState.asReadonly();
28
+ titleId = this.titleIdState.asReadonly();
29
+ componentInstance = null;
30
+ constructor(id, config) {
31
+ this.id = id;
32
+ this.config = config;
33
+ }
34
+ get isClosing() {
35
+ return this.closing;
36
+ }
37
+ async close(result) {
38
+ if (this.closing || this.guarding) return false;
39
+ const guard = this.config.canClose;
40
+ if (guard) {
41
+ this.guarding = true;
42
+ const answer = guard(result);
43
+ if (!await Promise.resolve(isObservable(answer) ? firstValueFrom(answer, { defaultValue: false }) : answer).finally(() => this.guarding = false) || this.closing) return false;
44
+ }
45
+ this.closing = true;
46
+ await this.host?.leave();
47
+ this.host?.dispose();
48
+ this.closedSubject.next(result);
49
+ this.closedSubject.complete();
50
+ return true;
51
+ }
52
+ toggleMaximize() {
53
+ this.maximizedState.update((maximized) => !maximized);
54
+ }
55
+ maximize() {
56
+ this.maximizedState.set(true);
57
+ }
58
+ restore() {
59
+ this.maximizedState.set(false);
60
+ }
61
+ updateSize(width, height) {
62
+ this.host?.updateSize(width, height);
63
+ }
64
+ dragFrom(event) {
65
+ this.host?.dragFrom(event);
66
+ }
67
+ registerTitle(id) {
68
+ this.titleIdState.set(id);
69
+ return () => {
70
+ if (this.titleIdState() === id) this.titleIdState.set(null);
71
+ };
72
+ }
73
+ attachHost(host) {
74
+ this.host = host;
75
+ }
76
+ markOpened() {
77
+ this.openedSubject.next();
78
+ this.openedSubject.complete();
79
+ }
80
+ };
81
+ function injectCurrentDialog() {
82
+ const current = inject(TX_DIALOG_CURRENT, { optional: true });
83
+ const ref = inject(TxDialogRef, { optional: true });
84
+ return current ?? signal(ref).asReadonly();
85
+ }
86
+ function injectDialogData() {
87
+ return inject(TX_DIALOG_DATA);
88
+ }
89
+ function injectDialogRef() {
90
+ return inject(TxDialogRef);
91
+ }
92
+ function injectPartStyling() {
93
+ const ref = injectCurrentDialog();
94
+ return injectUnstyled(computed(() => ref()?.config.unstyled));
95
+ }
96
+ var TxDialogTitle = class TxDialogTitle {
97
+ ref = injectCurrentDialog();
98
+ id = inject(ElementRef).nativeElement.id || uniqueId("tx-dialog-title");
99
+ constructor() {
100
+ effect((onCleanup) => {
101
+ const ref = this.ref();
102
+ if (ref) onCleanup(ref.registerTitle(this.id));
103
+ });
104
+ }
105
+ static ɵfac = i0.ɵɵngDeclareFactory({
106
+ minVersion: "12.0.0",
107
+ version: "22.2.3",
108
+ ngImport: i0,
109
+ type: TxDialogTitle,
110
+ deps: [],
111
+ target: i0.ɵɵFactoryTarget.Directive
112
+ });
113
+ static ɵdir = i0.ɵɵngDeclareDirective({
114
+ minVersion: "14.0.0",
115
+ version: "22.2.3",
116
+ type: TxDialogTitle,
117
+ isStandalone: true,
118
+ selector: "[txDialogTitle]",
119
+ host: {
120
+ properties: { "id": "id" },
121
+ classAttribute: "tx-dialog-header__title"
122
+ },
123
+ ngImport: i0
124
+ });
125
+ };
126
+ i0.ɵɵngDeclareClassMetadata({
127
+ minVersion: "12.0.0",
128
+ version: "22.2.3",
129
+ ngImport: i0,
130
+ type: TxDialogTitle,
131
+ decorators: [{
132
+ type: Directive,
133
+ args: [{
134
+ selector: "[txDialogTitle]",
135
+ host: {
136
+ class: "tx-dialog-header__title",
137
+ "[id]": "id"
138
+ }
139
+ }]
140
+ }],
141
+ ctorParameters: () => []
142
+ });
143
+ var TxDialogHeader = class TxDialogHeader {
144
+ ref = injectCurrentDialog();
145
+ title = input(void 0, ...ngDevMode ? [{ debugName: "title" }] : /* istanbul ignore next */ []);
146
+ subtitle = input(void 0, ...ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []);
147
+ closeButton = input(void 0, {
148
+ ...ngDevMode ? { debugName: "closeButton" } : /* istanbul ignore next */ {},
149
+ transform: optionalBoolean
150
+ });
151
+ maximizeButton = input(void 0, {
152
+ ...ngDevMode ? { debugName: "maximizeButton" } : /* istanbul ignore next */ {},
153
+ transform: optionalBoolean
154
+ });
155
+ translations = injectTranslations();
156
+ isUnstyled = injectPartStyling();
157
+ passThrough = injectPassThrough("dialog", this, signal(void 0), signal(void 0));
158
+ titleId = uniqueId("tx-dialog-title");
159
+ draggable = computed(() => Boolean(this.ref()?.config.draggable), ...ngDevMode ? [{ debugName: "draggable" }] : /* istanbul ignore next */ []);
160
+ inDrawer = computed(() => Boolean(this.ref()?.config.drawer), ...ngDevMode ? [{ debugName: "inDrawer" }] : /* istanbul ignore next */ []);
161
+ showClose = computed(() => this.closeButton() ?? this.ref()?.config.closable ?? true, ...ngDevMode ? [{ debugName: "showClose" }] : /* istanbul ignore next */ []);
162
+ showMaximize = computed(() => this.maximizeButton() ?? this.ref()?.config.maximizable ?? false, ...ngDevMode ? [{ debugName: "showMaximize" }] : /* istanbul ignore next */ []);
163
+ constructor() {
164
+ effect((onCleanup) => {
165
+ const ref = this.ref();
166
+ if (this.title() && ref) onCleanup(ref.registerTitle(this.titleId));
167
+ });
168
+ }
169
+ static ɵfac = i0.ɵɵngDeclareFactory({
170
+ minVersion: "12.0.0",
171
+ version: "22.2.3",
172
+ ngImport: i0,
173
+ type: TxDialogHeader,
174
+ deps: [],
175
+ target: i0.ɵɵFactoryTarget.Component
176
+ });
177
+ static ɵcmp = i0.ɵɵngDeclareComponent({
178
+ minVersion: "17.0.0",
179
+ version: "22.2.3",
180
+ type: TxDialogHeader,
181
+ isStandalone: true,
182
+ selector: "tx-dialog-header",
183
+ inputs: {
184
+ title: {
185
+ classPropertyName: "title",
186
+ publicName: "title",
187
+ isSignal: true,
188
+ isRequired: false,
189
+ transformFunction: null
190
+ },
191
+ subtitle: {
192
+ classPropertyName: "subtitle",
193
+ publicName: "subtitle",
194
+ isSignal: true,
195
+ isRequired: false,
196
+ transformFunction: null
197
+ },
198
+ closeButton: {
199
+ classPropertyName: "closeButton",
200
+ publicName: "closeButton",
201
+ isSignal: true,
202
+ isRequired: false,
203
+ transformFunction: null
204
+ },
205
+ maximizeButton: {
206
+ classPropertyName: "maximizeButton",
207
+ publicName: "maximizeButton",
208
+ isSignal: true,
209
+ isRequired: false,
210
+ transformFunction: null
211
+ }
212
+ },
213
+ host: {
214
+ listeners: { "pointerdown": "ref()?.dragFrom($event)" },
215
+ properties: {
216
+ "class": "passThrough().header?.class",
217
+ "style": "passThrough().header?.style",
218
+ "attr.data-styled": "!isUnstyled() || null",
219
+ "class.tx-dialog-header--draggable": "draggable()",
220
+ "class.tx-dialog-header--drawer": "inDrawer()"
221
+ },
222
+ classAttribute: "tx-dialog-header"
223
+ },
224
+ ngImport: i0,
225
+ template: `
226
+ <div class="tx-dialog-header__text">
227
+ @if (title()) {
228
+ <h2 class="tx-dialog-header__title" [id]="titleId" [class]="passThrough().title?.class" [style]="passThrough().title?.style">{{ title() }}</h2>
229
+ }
230
+ <ng-content select="[txDialogTitle]" />
231
+ @if (subtitle()) {
232
+ <p class="tx-dialog-header__subtitle" [class]="passThrough().subtitle?.class" [style]="passThrough().subtitle?.style">{{ subtitle() }}</p>
233
+ }
234
+ <ng-content />
235
+ </div>
236
+ @if (showMaximize() || showClose()) {
237
+ <div class="tx-dialog-header__buttons">
238
+ @if (showMaximize()) {
239
+ <button
240
+ txButton
241
+ type="button"
242
+ class="tx-dialog-header__button"
243
+ severity="secondary"
244
+ [class]="passThrough().headerButton?.class"
245
+ [style]="passThrough().headerButton?.style"
246
+ [icon]="ref()?.maximized() ? 'window-minimize' : 'window-maximize'"
247
+ [text]="inDrawer()"
248
+ [rounded]="inDrawer()"
249
+ [unstyled]="isUnstyled()"
250
+ [attr.aria-label]="ref()?.maximized() ? translations().restore : translations().maximize"
251
+ (click)="ref()?.toggleMaximize()"
252
+ ></button>
253
+ }
254
+ @if (showClose()) {
255
+ <button
256
+ txButton
257
+ type="button"
258
+ class="tx-dialog-header__button"
259
+ icon="times"
260
+ severity="secondary"
261
+ [class]="passThrough().headerButton?.class"
262
+ [style]="passThrough().headerButton?.style"
263
+ [text]="inDrawer()"
264
+ [rounded]="inDrawer()"
265
+ [unstyled]="isUnstyled()"
266
+ [attr.aria-label]="translations().close"
267
+ (click)="ref()?.close()"
268
+ ></button>
269
+ }
270
+ </div>
271
+ }
272
+ `,
273
+ isInline: true,
274
+ styles: [":host{display:block}:host(.tx-dialog-header){display:flex;flex:none;align-items:center}:host(.tx-dialog-header--draggable){cursor:move;touch-action:none}.tx-dialog-header__text{flex:1;min-width:0}.tx-dialog-header__buttons{display:flex;flex:none}:host(.tx-dialog-content){flex:1 1 auto;min-height:0;overflow:auto}:host(.tx-dialog-footer){display:flex;flex:none;flex-wrap:wrap}:host([data-styled].tx-dialog-header){justify-content:space-between;gap:var(--tx-dialog-header-gap);padding:var(--tx-dialog-header-padding)}:host([data-styled].tx-dialog-header) .tx-dialog-header__title,:host([data-styled].tx-dialog-header) ::ng-deep .tx-dialog-header__title{display:flex;margin:0;font-size:var(--tx-dialog-title-font-size);font-weight:var(--tx-dialog-title-font-weight);line-height:inherit;letter-spacing:normal}:host([data-styled].tx-dialog-header) .tx-dialog-header__subtitle{margin:2px 0 0;color:var(--tx-dialog-subtitle-color);font-size:var(--tx-dialog-subtitle-font-size)}:host([data-styled].tx-dialog-header) .tx-dialog-header__buttons{gap:var(--tx-dialog-header-gap)}:host([data-styled].tx-dialog-header--drawer){padding:var(--tx-dialog-drawer-header-padding);border-bottom:1px solid var(--tx-dialog-drawer-divider-color)}:host([data-styled].tx-dialog-header--drawer) .tx-dialog-header__title,:host([data-styled].tx-dialog-header--drawer) ::ng-deep .tx-dialog-header__title{font-size:var(--tx-dialog-drawer-title-font-size)}:host([data-styled].tx-dialog-content){padding:var(--tx-dialog-content-padding)}:host([data-styled].tx-dialog-content:last-child){padding-bottom:var(--tx-dialog-content-last-padding-bottom)}:host([data-styled].tx-dialog-content--drawer),:host([data-styled].tx-dialog-content--drawer:last-child){padding:var(--tx-dialog-drawer-content-padding)}:host([data-styled].tx-dialog-footer){gap:var(--tx-dialog-footer-gap);padding:var(--tx-dialog-footer-padding)}:host([data-styled].tx-dialog-footer:not(.tx-dialog-footer--drawer)) ::ng-deep>*{flex:1 1 0}:host([data-styled].tx-dialog-footer--drawer){justify-content:flex-end;padding:var(--tx-dialog-drawer-footer-padding);border-top:1px solid var(--tx-dialog-drawer-divider-color);background:var(--tx-dialog-drawer-background)}\n"],
275
+ dependencies: [{
276
+ kind: "component",
277
+ type: TxButton,
278
+ selector: "button[txButton], a[txButton]",
279
+ inputs: [
280
+ "label",
281
+ "severity",
282
+ "size",
283
+ "variant",
284
+ "outlined",
285
+ "text",
286
+ "link",
287
+ "rounded",
288
+ "raised",
289
+ "plain",
290
+ "fluid",
291
+ "disabled",
292
+ "tabindex",
293
+ "icon",
294
+ "iconPos",
295
+ "iconOnly",
296
+ "loading",
297
+ "loadingIcon",
298
+ "badge",
299
+ "badgeSeverity",
300
+ "dt",
301
+ "pt",
302
+ "ptOptions",
303
+ "unstyled"
304
+ ]
305
+ }],
306
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
307
+ });
308
+ };
309
+ i0.ɵɵngDeclareClassMetadata({
310
+ minVersion: "12.0.0",
311
+ version: "22.2.3",
312
+ ngImport: i0,
313
+ type: TxDialogHeader,
314
+ decorators: [{
315
+ type: Component,
316
+ args: [{
317
+ selector: "tx-dialog-header",
318
+ imports: [TxButton],
319
+ template: `
320
+ <div class="tx-dialog-header__text">
321
+ @if (title()) {
322
+ <h2 class="tx-dialog-header__title" [id]="titleId" [class]="passThrough().title?.class" [style]="passThrough().title?.style">{{ title() }}</h2>
323
+ }
324
+ <ng-content select="[txDialogTitle]" />
325
+ @if (subtitle()) {
326
+ <p class="tx-dialog-header__subtitle" [class]="passThrough().subtitle?.class" [style]="passThrough().subtitle?.style">{{ subtitle() }}</p>
327
+ }
328
+ <ng-content />
329
+ </div>
330
+ @if (showMaximize() || showClose()) {
331
+ <div class="tx-dialog-header__buttons">
332
+ @if (showMaximize()) {
333
+ <button
334
+ txButton
335
+ type="button"
336
+ class="tx-dialog-header__button"
337
+ severity="secondary"
338
+ [class]="passThrough().headerButton?.class"
339
+ [style]="passThrough().headerButton?.style"
340
+ [icon]="ref()?.maximized() ? 'window-minimize' : 'window-maximize'"
341
+ [text]="inDrawer()"
342
+ [rounded]="inDrawer()"
343
+ [unstyled]="isUnstyled()"
344
+ [attr.aria-label]="ref()?.maximized() ? translations().restore : translations().maximize"
345
+ (click)="ref()?.toggleMaximize()"
346
+ ></button>
347
+ }
348
+ @if (showClose()) {
349
+ <button
350
+ txButton
351
+ type="button"
352
+ class="tx-dialog-header__button"
353
+ icon="times"
354
+ severity="secondary"
355
+ [class]="passThrough().headerButton?.class"
356
+ [style]="passThrough().headerButton?.style"
357
+ [text]="inDrawer()"
358
+ [rounded]="inDrawer()"
359
+ [unstyled]="isUnstyled()"
360
+ [attr.aria-label]="translations().close"
361
+ (click)="ref()?.close()"
362
+ ></button>
363
+ }
364
+ </div>
365
+ }
366
+ `,
367
+ changeDetection: ChangeDetectionStrategy.OnPush,
368
+ host: {
369
+ class: "tx-dialog-header",
370
+ "[class]": "passThrough().header?.class",
371
+ "[style]": "passThrough().header?.style",
372
+ "[attr.data-styled]": "!isUnstyled() || null",
373
+ "[class.tx-dialog-header--draggable]": "draggable()",
374
+ "[class.tx-dialog-header--drawer]": "inDrawer()",
375
+ "(pointerdown)": "ref()?.dragFrom($event)"
376
+ },
377
+ styles: [":host{display:block}:host(.tx-dialog-header){display:flex;flex:none;align-items:center}:host(.tx-dialog-header--draggable){cursor:move;touch-action:none}.tx-dialog-header__text{flex:1;min-width:0}.tx-dialog-header__buttons{display:flex;flex:none}:host(.tx-dialog-content){flex:1 1 auto;min-height:0;overflow:auto}:host(.tx-dialog-footer){display:flex;flex:none;flex-wrap:wrap}:host([data-styled].tx-dialog-header){justify-content:space-between;gap:var(--tx-dialog-header-gap);padding:var(--tx-dialog-header-padding)}:host([data-styled].tx-dialog-header) .tx-dialog-header__title,:host([data-styled].tx-dialog-header) ::ng-deep .tx-dialog-header__title{display:flex;margin:0;font-size:var(--tx-dialog-title-font-size);font-weight:var(--tx-dialog-title-font-weight);line-height:inherit;letter-spacing:normal}:host([data-styled].tx-dialog-header) .tx-dialog-header__subtitle{margin:2px 0 0;color:var(--tx-dialog-subtitle-color);font-size:var(--tx-dialog-subtitle-font-size)}:host([data-styled].tx-dialog-header) .tx-dialog-header__buttons{gap:var(--tx-dialog-header-gap)}:host([data-styled].tx-dialog-header--drawer){padding:var(--tx-dialog-drawer-header-padding);border-bottom:1px solid var(--tx-dialog-drawer-divider-color)}:host([data-styled].tx-dialog-header--drawer) .tx-dialog-header__title,:host([data-styled].tx-dialog-header--drawer) ::ng-deep .tx-dialog-header__title{font-size:var(--tx-dialog-drawer-title-font-size)}:host([data-styled].tx-dialog-content){padding:var(--tx-dialog-content-padding)}:host([data-styled].tx-dialog-content:last-child){padding-bottom:var(--tx-dialog-content-last-padding-bottom)}:host([data-styled].tx-dialog-content--drawer),:host([data-styled].tx-dialog-content--drawer:last-child){padding:var(--tx-dialog-drawer-content-padding)}:host([data-styled].tx-dialog-footer){gap:var(--tx-dialog-footer-gap);padding:var(--tx-dialog-footer-padding)}:host([data-styled].tx-dialog-footer:not(.tx-dialog-footer--drawer)) ::ng-deep>*{flex:1 1 0}:host([data-styled].tx-dialog-footer--drawer){justify-content:flex-end;padding:var(--tx-dialog-drawer-footer-padding);border-top:1px solid var(--tx-dialog-drawer-divider-color);background:var(--tx-dialog-drawer-background)}\n"]
378
+ }]
379
+ }],
380
+ ctorParameters: () => [],
381
+ propDecorators: {
382
+ title: [{
383
+ type: i0.Input,
384
+ args: [{
385
+ isSignal: true,
386
+ alias: "title",
387
+ required: false
388
+ }]
389
+ }],
390
+ subtitle: [{
391
+ type: i0.Input,
392
+ args: [{
393
+ isSignal: true,
394
+ alias: "subtitle",
395
+ required: false
396
+ }]
397
+ }],
398
+ closeButton: [{
399
+ type: i0.Input,
400
+ args: [{
401
+ isSignal: true,
402
+ alias: "closeButton",
403
+ required: false
404
+ }]
405
+ }],
406
+ maximizeButton: [{
407
+ type: i0.Input,
408
+ args: [{
409
+ isSignal: true,
410
+ alias: "maximizeButton",
411
+ required: false
412
+ }]
413
+ }]
414
+ }
415
+ });
416
+ var TxDialogContent = class TxDialogContent {
417
+ ref = injectCurrentDialog();
418
+ inDrawer = computed(() => Boolean(this.ref()?.config.drawer), ...ngDevMode ? [{ debugName: "inDrawer" }] : /* istanbul ignore next */ []);
419
+ isUnstyled = injectPartStyling();
420
+ passThrough = injectPassThrough("dialog", this, signal(void 0), signal(void 0));
421
+ static ɵfac = i0.ɵɵngDeclareFactory({
422
+ minVersion: "12.0.0",
423
+ version: "22.2.3",
424
+ ngImport: i0,
425
+ type: TxDialogContent,
426
+ deps: [],
427
+ target: i0.ɵɵFactoryTarget.Component
428
+ });
429
+ static ɵcmp = i0.ɵɵngDeclareComponent({
430
+ minVersion: "14.0.0",
431
+ version: "22.2.3",
432
+ type: TxDialogContent,
433
+ isStandalone: true,
434
+ selector: "tx-dialog-content",
435
+ host: {
436
+ properties: {
437
+ "class": "passThrough().content?.class",
438
+ "class.tx-dialog-content--drawer": "inDrawer()",
439
+ "style": "passThrough().content?.style",
440
+ "attr.data-styled": "!isUnstyled() || null"
441
+ },
442
+ classAttribute: "tx-dialog-content"
443
+ },
444
+ ngImport: i0,
445
+ template: "<ng-content />",
446
+ isInline: true,
447
+ styles: [":host{display:block}:host(.tx-dialog-header){display:flex;flex:none;align-items:center}:host(.tx-dialog-header--draggable){cursor:move;touch-action:none}.tx-dialog-header__text{flex:1;min-width:0}.tx-dialog-header__buttons{display:flex;flex:none}:host(.tx-dialog-content){flex:1 1 auto;min-height:0;overflow:auto}:host(.tx-dialog-footer){display:flex;flex:none;flex-wrap:wrap}:host([data-styled].tx-dialog-header){justify-content:space-between;gap:var(--tx-dialog-header-gap);padding:var(--tx-dialog-header-padding)}:host([data-styled].tx-dialog-header) .tx-dialog-header__title,:host([data-styled].tx-dialog-header) ::ng-deep .tx-dialog-header__title{display:flex;margin:0;font-size:var(--tx-dialog-title-font-size);font-weight:var(--tx-dialog-title-font-weight);line-height:inherit;letter-spacing:normal}:host([data-styled].tx-dialog-header) .tx-dialog-header__subtitle{margin:2px 0 0;color:var(--tx-dialog-subtitle-color);font-size:var(--tx-dialog-subtitle-font-size)}:host([data-styled].tx-dialog-header) .tx-dialog-header__buttons{gap:var(--tx-dialog-header-gap)}:host([data-styled].tx-dialog-header--drawer){padding:var(--tx-dialog-drawer-header-padding);border-bottom:1px solid var(--tx-dialog-drawer-divider-color)}:host([data-styled].tx-dialog-header--drawer) .tx-dialog-header__title,:host([data-styled].tx-dialog-header--drawer) ::ng-deep .tx-dialog-header__title{font-size:var(--tx-dialog-drawer-title-font-size)}:host([data-styled].tx-dialog-content){padding:var(--tx-dialog-content-padding)}:host([data-styled].tx-dialog-content:last-child){padding-bottom:var(--tx-dialog-content-last-padding-bottom)}:host([data-styled].tx-dialog-content--drawer),:host([data-styled].tx-dialog-content--drawer:last-child){padding:var(--tx-dialog-drawer-content-padding)}:host([data-styled].tx-dialog-footer){gap:var(--tx-dialog-footer-gap);padding:var(--tx-dialog-footer-padding)}:host([data-styled].tx-dialog-footer:not(.tx-dialog-footer--drawer)) ::ng-deep>*{flex:1 1 0}:host([data-styled].tx-dialog-footer--drawer){justify-content:flex-end;padding:var(--tx-dialog-drawer-footer-padding);border-top:1px solid var(--tx-dialog-drawer-divider-color);background:var(--tx-dialog-drawer-background)}\n"],
448
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
449
+ });
450
+ };
451
+ i0.ɵɵngDeclareClassMetadata({
452
+ minVersion: "12.0.0",
453
+ version: "22.2.3",
454
+ ngImport: i0,
455
+ type: TxDialogContent,
456
+ decorators: [{
457
+ type: Component,
458
+ args: [{
459
+ selector: "tx-dialog-content",
460
+ template: "<ng-content />",
461
+ changeDetection: ChangeDetectionStrategy.OnPush,
462
+ host: {
463
+ class: "tx-dialog-content",
464
+ "[class]": "passThrough().content?.class",
465
+ "[class.tx-dialog-content--drawer]": "inDrawer()",
466
+ "[style]": "passThrough().content?.style",
467
+ "[attr.data-styled]": "!isUnstyled() || null"
468
+ },
469
+ styles: [":host{display:block}:host(.tx-dialog-header){display:flex;flex:none;align-items:center}:host(.tx-dialog-header--draggable){cursor:move;touch-action:none}.tx-dialog-header__text{flex:1;min-width:0}.tx-dialog-header__buttons{display:flex;flex:none}:host(.tx-dialog-content){flex:1 1 auto;min-height:0;overflow:auto}:host(.tx-dialog-footer){display:flex;flex:none;flex-wrap:wrap}:host([data-styled].tx-dialog-header){justify-content:space-between;gap:var(--tx-dialog-header-gap);padding:var(--tx-dialog-header-padding)}:host([data-styled].tx-dialog-header) .tx-dialog-header__title,:host([data-styled].tx-dialog-header) ::ng-deep .tx-dialog-header__title{display:flex;margin:0;font-size:var(--tx-dialog-title-font-size);font-weight:var(--tx-dialog-title-font-weight);line-height:inherit;letter-spacing:normal}:host([data-styled].tx-dialog-header) .tx-dialog-header__subtitle{margin:2px 0 0;color:var(--tx-dialog-subtitle-color);font-size:var(--tx-dialog-subtitle-font-size)}:host([data-styled].tx-dialog-header) .tx-dialog-header__buttons{gap:var(--tx-dialog-header-gap)}:host([data-styled].tx-dialog-header--drawer){padding:var(--tx-dialog-drawer-header-padding);border-bottom:1px solid var(--tx-dialog-drawer-divider-color)}:host([data-styled].tx-dialog-header--drawer) .tx-dialog-header__title,:host([data-styled].tx-dialog-header--drawer) ::ng-deep .tx-dialog-header__title{font-size:var(--tx-dialog-drawer-title-font-size)}:host([data-styled].tx-dialog-content){padding:var(--tx-dialog-content-padding)}:host([data-styled].tx-dialog-content:last-child){padding-bottom:var(--tx-dialog-content-last-padding-bottom)}:host([data-styled].tx-dialog-content--drawer),:host([data-styled].tx-dialog-content--drawer:last-child){padding:var(--tx-dialog-drawer-content-padding)}:host([data-styled].tx-dialog-footer){gap:var(--tx-dialog-footer-gap);padding:var(--tx-dialog-footer-padding)}:host([data-styled].tx-dialog-footer:not(.tx-dialog-footer--drawer)) ::ng-deep>*{flex:1 1 0}:host([data-styled].tx-dialog-footer--drawer){justify-content:flex-end;padding:var(--tx-dialog-drawer-footer-padding);border-top:1px solid var(--tx-dialog-drawer-divider-color);background:var(--tx-dialog-drawer-background)}\n"]
470
+ }]
471
+ }]
472
+ });
473
+ var TxDialogFooter = class TxDialogFooter {
474
+ ref = injectCurrentDialog();
475
+ inDrawer = computed(() => Boolean(this.ref()?.config.drawer), ...ngDevMode ? [{ debugName: "inDrawer" }] : /* istanbul ignore next */ []);
476
+ isUnstyled = injectPartStyling();
477
+ passThrough = injectPassThrough("dialog", this, signal(void 0), signal(void 0));
478
+ static ɵfac = i0.ɵɵngDeclareFactory({
479
+ minVersion: "12.0.0",
480
+ version: "22.2.3",
481
+ ngImport: i0,
482
+ type: TxDialogFooter,
483
+ deps: [],
484
+ target: i0.ɵɵFactoryTarget.Component
485
+ });
486
+ static ɵcmp = i0.ɵɵngDeclareComponent({
487
+ minVersion: "14.0.0",
488
+ version: "22.2.3",
489
+ type: TxDialogFooter,
490
+ isStandalone: true,
491
+ selector: "tx-dialog-footer",
492
+ host: {
493
+ properties: {
494
+ "class": "passThrough().footer?.class",
495
+ "class.tx-dialog-footer--drawer": "inDrawer()",
496
+ "style": "passThrough().footer?.style",
497
+ "attr.data-styled": "!isUnstyled() || null"
498
+ },
499
+ classAttribute: "tx-dialog-footer"
500
+ },
501
+ ngImport: i0,
502
+ template: "<ng-content />",
503
+ isInline: true,
504
+ styles: [":host{display:block}:host(.tx-dialog-header){display:flex;flex:none;align-items:center}:host(.tx-dialog-header--draggable){cursor:move;touch-action:none}.tx-dialog-header__text{flex:1;min-width:0}.tx-dialog-header__buttons{display:flex;flex:none}:host(.tx-dialog-content){flex:1 1 auto;min-height:0;overflow:auto}:host(.tx-dialog-footer){display:flex;flex:none;flex-wrap:wrap}:host([data-styled].tx-dialog-header){justify-content:space-between;gap:var(--tx-dialog-header-gap);padding:var(--tx-dialog-header-padding)}:host([data-styled].tx-dialog-header) .tx-dialog-header__title,:host([data-styled].tx-dialog-header) ::ng-deep .tx-dialog-header__title{display:flex;margin:0;font-size:var(--tx-dialog-title-font-size);font-weight:var(--tx-dialog-title-font-weight);line-height:inherit;letter-spacing:normal}:host([data-styled].tx-dialog-header) .tx-dialog-header__subtitle{margin:2px 0 0;color:var(--tx-dialog-subtitle-color);font-size:var(--tx-dialog-subtitle-font-size)}:host([data-styled].tx-dialog-header) .tx-dialog-header__buttons{gap:var(--tx-dialog-header-gap)}:host([data-styled].tx-dialog-header--drawer){padding:var(--tx-dialog-drawer-header-padding);border-bottom:1px solid var(--tx-dialog-drawer-divider-color)}:host([data-styled].tx-dialog-header--drawer) .tx-dialog-header__title,:host([data-styled].tx-dialog-header--drawer) ::ng-deep .tx-dialog-header__title{font-size:var(--tx-dialog-drawer-title-font-size)}:host([data-styled].tx-dialog-content){padding:var(--tx-dialog-content-padding)}:host([data-styled].tx-dialog-content:last-child){padding-bottom:var(--tx-dialog-content-last-padding-bottom)}:host([data-styled].tx-dialog-content--drawer),:host([data-styled].tx-dialog-content--drawer:last-child){padding:var(--tx-dialog-drawer-content-padding)}:host([data-styled].tx-dialog-footer){gap:var(--tx-dialog-footer-gap);padding:var(--tx-dialog-footer-padding)}:host([data-styled].tx-dialog-footer:not(.tx-dialog-footer--drawer)) ::ng-deep>*{flex:1 1 0}:host([data-styled].tx-dialog-footer--drawer){justify-content:flex-end;padding:var(--tx-dialog-drawer-footer-padding);border-top:1px solid var(--tx-dialog-drawer-divider-color);background:var(--tx-dialog-drawer-background)}\n"],
505
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
506
+ });
507
+ };
508
+ i0.ɵɵngDeclareClassMetadata({
509
+ minVersion: "12.0.0",
510
+ version: "22.2.3",
511
+ ngImport: i0,
512
+ type: TxDialogFooter,
513
+ decorators: [{
514
+ type: Component,
515
+ args: [{
516
+ selector: "tx-dialog-footer",
517
+ template: "<ng-content />",
518
+ changeDetection: ChangeDetectionStrategy.OnPush,
519
+ host: {
520
+ class: "tx-dialog-footer",
521
+ "[class]": "passThrough().footer?.class",
522
+ "[class.tx-dialog-footer--drawer]": "inDrawer()",
523
+ "[style]": "passThrough().footer?.style",
524
+ "[attr.data-styled]": "!isUnstyled() || null"
525
+ },
526
+ styles: [":host{display:block}:host(.tx-dialog-header){display:flex;flex:none;align-items:center}:host(.tx-dialog-header--draggable){cursor:move;touch-action:none}.tx-dialog-header__text{flex:1;min-width:0}.tx-dialog-header__buttons{display:flex;flex:none}:host(.tx-dialog-content){flex:1 1 auto;min-height:0;overflow:auto}:host(.tx-dialog-footer){display:flex;flex:none;flex-wrap:wrap}:host([data-styled].tx-dialog-header){justify-content:space-between;gap:var(--tx-dialog-header-gap);padding:var(--tx-dialog-header-padding)}:host([data-styled].tx-dialog-header) .tx-dialog-header__title,:host([data-styled].tx-dialog-header) ::ng-deep .tx-dialog-header__title{display:flex;margin:0;font-size:var(--tx-dialog-title-font-size);font-weight:var(--tx-dialog-title-font-weight);line-height:inherit;letter-spacing:normal}:host([data-styled].tx-dialog-header) .tx-dialog-header__subtitle{margin:2px 0 0;color:var(--tx-dialog-subtitle-color);font-size:var(--tx-dialog-subtitle-font-size)}:host([data-styled].tx-dialog-header) .tx-dialog-header__buttons{gap:var(--tx-dialog-header-gap)}:host([data-styled].tx-dialog-header--drawer){padding:var(--tx-dialog-drawer-header-padding);border-bottom:1px solid var(--tx-dialog-drawer-divider-color)}:host([data-styled].tx-dialog-header--drawer) .tx-dialog-header__title,:host([data-styled].tx-dialog-header--drawer) ::ng-deep .tx-dialog-header__title{font-size:var(--tx-dialog-drawer-title-font-size)}:host([data-styled].tx-dialog-content){padding:var(--tx-dialog-content-padding)}:host([data-styled].tx-dialog-content:last-child){padding-bottom:var(--tx-dialog-content-last-padding-bottom)}:host([data-styled].tx-dialog-content--drawer),:host([data-styled].tx-dialog-content--drawer:last-child){padding:var(--tx-dialog-drawer-content-padding)}:host([data-styled].tx-dialog-footer){gap:var(--tx-dialog-footer-gap);padding:var(--tx-dialog-footer-padding)}:host([data-styled].tx-dialog-footer:not(.tx-dialog-footer--drawer)) ::ng-deep>*{flex:1 1 0}:host([data-styled].tx-dialog-footer--drawer){justify-content:flex-end;padding:var(--tx-dialog-drawer-footer-padding);border-top:1px solid var(--tx-dialog-drawer-divider-color);background:var(--tx-dialog-drawer-background)}\n"]
527
+ }]
528
+ }]
529
+ });
530
+ var TxDialogClose = class TxDialogClose {
531
+ ref = injectCurrentDialog();
532
+ txDialogClose = input(void 0, ...ngDevMode ? [{ debugName: "txDialogClose" }] : /* istanbul ignore next */ []);
533
+ close() {
534
+ this.ref()?.close(this.txDialogClose());
535
+ }
536
+ static ɵfac = i0.ɵɵngDeclareFactory({
537
+ minVersion: "12.0.0",
538
+ version: "22.2.3",
539
+ ngImport: i0,
540
+ type: TxDialogClose,
541
+ deps: [],
542
+ target: i0.ɵɵFactoryTarget.Directive
543
+ });
544
+ static ɵdir = i0.ɵɵngDeclareDirective({
545
+ minVersion: "17.1.0",
546
+ version: "22.2.3",
547
+ type: TxDialogClose,
548
+ isStandalone: true,
549
+ selector: "[txDialogClose]",
550
+ inputs: { txDialogClose: {
551
+ classPropertyName: "txDialogClose",
552
+ publicName: "txDialogClose",
553
+ isSignal: true,
554
+ isRequired: false,
555
+ transformFunction: null
556
+ } },
557
+ host: { listeners: { "click": "close()" } },
558
+ ngImport: i0
559
+ });
560
+ };
561
+ i0.ɵɵngDeclareClassMetadata({
562
+ minVersion: "12.0.0",
563
+ version: "22.2.3",
564
+ ngImport: i0,
565
+ type: TxDialogClose,
566
+ decorators: [{
567
+ type: Directive,
568
+ args: [{
569
+ selector: "[txDialogClose]",
570
+ host: { "(click)": "close()" }
571
+ }]
572
+ }],
573
+ propDecorators: { txDialogClose: [{
574
+ type: i0.Input,
575
+ args: [{
576
+ isSignal: true,
577
+ alias: "txDialogClose",
578
+ required: false
579
+ }]
580
+ }] }
581
+ });
582
+ const FIELDS = [
583
+ ".tx-dialog-content",
584
+ ".tx-dialog-footer",
585
+ ".tx-dialog-header"
586
+ ];
587
+ const LEAVE_LIMIT = 400;
588
+ const DEFAULT_BREAKPOINTS = {
589
+ "960px": "500px",
590
+ "640px": "90vw"
591
+ };
592
+ var TxDialogContainer = class TxDialogContainer {
593
+ ref = inject(TxDialogRef);
594
+ document = inject(DOCUMENT);
595
+ checker = inject(InteractivityChecker);
596
+ focusTrapFactory = inject(FocusTrapFactory);
597
+ viewContainerRef = inject(ViewContainerRef);
598
+ host = inject(ElementRef);
599
+ focusTrap = null;
600
+ config = this.ref.config;
601
+ outlet = viewChild.required(CdkPortalOutlet, ...ngDevMode ? [{ debugName: "outlet" }] : /* istanbul ignore next */ []);
602
+ panel = viewChild.required("panel", ...ngDevMode ? [{ debugName: "panel" }] : /* istanbul ignore next */ []);
603
+ modal = this.config.modal !== false;
604
+ role = this.config.role ?? "dialog";
605
+ size = this.config.size ?? "medium";
606
+ position = this.config.position ?? "center";
607
+ drawer = this.config.drawer ?? null;
608
+ isUnstyled = injectUnstyled(signal(this.config.unstyled));
609
+ passThrough = injectPassThrough("dialog", this, signal(void 0), signal(void 0));
610
+ leaving = signal(false, ...ngDevMode ? [{ debugName: "leaving" }] : /* istanbul ignore next */ []);
611
+ dragging = signal(false, ...ngDevMode ? [{ debugName: "dragging" }] : /* istanbul ignore next */ []);
612
+ offset = signal({
613
+ x: 0,
614
+ y: 0
615
+ }, ...ngDevMode ? [{ debugName: "offset" }] : /* istanbul ignore next */ []);
616
+ sizeOverride = signal({}, ...ngDevMode ? [{ debugName: "sizeOverride" }] : /* istanbul ignore next */ []);
617
+ breakpointWidth = signal(null, ...ngDevMode ? [{ debugName: "breakpointWidth" }] : /* istanbul ignore next */ []);
618
+ labelledBy = computed(() => this.config.ariaLabelledBy ?? (this.config.ariaLabel ? null : this.ref.titleId()), ...ngDevMode ? [{ debugName: "labelledBy" }] : /* istanbul ignore next */ []);
619
+ rootClass = computed(() => [this.passThrough().root?.class, ...[this.config.panelClass ?? []].flat()].filter(Boolean).join(" "), ...ngDevMode ? [{ debugName: "rootClass" }] : /* istanbul ignore next */ []);
620
+ panelStyle = computed(() => {
621
+ const maximized = this.ref.maximized();
622
+ const override = this.sizeOverride();
623
+ const { x, y } = this.offset();
624
+ const style = {};
625
+ const width = maximized ? "100%" : override.width ?? this.breakpointWidth() ?? this.config.width;
626
+ const height = maximized ? "100%" : override.height ?? this.config.height;
627
+ if (width) style["width"] = width;
628
+ if (height) style["height"] = height;
629
+ if (!maximized) {
630
+ Object.assign(style, Object.fromEntries([
631
+ ["min-width", this.config.minWidth],
632
+ ["max-width", this.config.maxWidth],
633
+ ["max-height", this.config.maxHeight]
634
+ ].filter(([, value]) => value)));
635
+ if (x || y) style["translate"] = `${x}px ${y}px`;
636
+ }
637
+ return {
638
+ ...style,
639
+ ...this.passThrough().root?.style
640
+ };
641
+ }, ...ngDevMode ? [{ debugName: "panelStyle" }] : /* istanbul ignore next */ []);
642
+ hostStyle = computed(() => {
643
+ const drawerSize = this.config.drawerSize ?? "medium";
644
+ const presets = {
645
+ small: "var(--tx-dialog-drawer-sm)",
646
+ medium: "var(--tx-dialog-drawer-md)",
647
+ large: "var(--tx-dialog-drawer-lg)",
648
+ full: "100%"
649
+ };
650
+ return {
651
+ ...toStyleObject(this.config.dt, "--tx-dialog"),
652
+ ...this.drawer ? { "--_drawer-size": presets[drawerSize] ?? drawerSize } : {}
653
+ };
654
+ }, ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
655
+ constructor() {
656
+ this.watchBreakpoints();
657
+ inject(DestroyRef).onDestroy(() => this.focusTrap?.destroy());
658
+ }
659
+ attach(content, injector, data) {
660
+ if (content instanceof TemplateRef) {
661
+ const context = {
662
+ $implicit: data,
663
+ close: (result) => void this.ref.close(result)
664
+ };
665
+ this.outlet().attachTemplatePortal(new TemplatePortal(content, this.viewContainerRef, context, injector));
666
+ return null;
667
+ }
668
+ const componentRef = this.outlet().attachComponentPortal(new ComponentPortal(content, this.config.viewContainerRef ?? null, injector));
669
+ const body = componentRef.location.nativeElement;
670
+ body.classList.add("tx-dialog__body");
671
+ body.style.display = "contents";
672
+ for (const [name, value] of Object.entries(this.config.inputs ?? {})) componentRef.setInput(name, value);
673
+ return componentRef;
674
+ }
675
+ enter() {
676
+ const panel = this.panel().nativeElement;
677
+ this.focusTrap = this.focusTrapFactory.create(panel);
678
+ const autoFocus = this.config.autoFocus ?? "first";
679
+ if (autoFocus === "none") return;
680
+ ((autoFocus === "first" ? FIELDS.map((selector) => panel.querySelector(selector)).map((part) => part ? tabbableElements(part, this.checker)[0] : void 0).find(Boolean) : autoFocus === "dialog" ? void 0 : panel.querySelector(autoFocus)) ?? panel).focus({ preventScroll: true });
681
+ }
682
+ leave() {
683
+ this.leaving.set(true);
684
+ this.host.nativeElement.classList.add("tx-dialog-container--leaving");
685
+ const panel = this.panel().nativeElement;
686
+ const animations = [panel, panel.parentElement?.querySelector(":scope > .tx-dialog-mask")].flatMap((element) => element && typeof element.getAnimations === "function" ? element.getAnimations() : []);
687
+ const finished = Promise.all(animations.map((animation) => animation.finished.catch(() => void 0))).then(() => void 0);
688
+ return animations.length ? Promise.race([finished, new Promise((resolve) => setTimeout(resolve, LEAVE_LIMIT))]) : finished;
689
+ }
690
+ updateSize(width, height) {
691
+ this.sizeOverride.set({
692
+ width,
693
+ height
694
+ });
695
+ }
696
+ onMaskClick() {
697
+ if (this.config.dismissableMask ?? this.config.closable ?? true) this.ref.close();
698
+ }
699
+ dragFrom(event) {
700
+ if (!this.config.draggable || this.ref.maximized() || event.button !== 0) return;
701
+ if (event.target.closest("button, a, input, select, textarea, [contenteditable]")) return;
702
+ event.preventDefault();
703
+ const panel = this.panel().nativeElement.getBoundingClientRect();
704
+ const view = this.document.documentElement;
705
+ const origin = {
706
+ pointerX: event.clientX,
707
+ pointerY: event.clientY,
708
+ ...this.offset()
709
+ };
710
+ const move = (moveEvent) => {
711
+ const dx = Math.min(Math.max(moveEvent.clientX - origin.pointerX, -panel.left), view.clientWidth - panel.right);
712
+ const dy = Math.min(Math.max(moveEvent.clientY - origin.pointerY, -panel.top), view.clientHeight - panel.bottom);
713
+ this.offset.set({
714
+ x: origin.x + dx,
715
+ y: origin.y + dy
716
+ });
717
+ };
718
+ const stop = () => {
719
+ this.dragging.set(false);
720
+ this.document.removeEventListener("pointermove", move);
721
+ this.document.removeEventListener("pointerup", stop);
722
+ };
723
+ this.dragging.set(true);
724
+ this.document.addEventListener("pointermove", move);
725
+ this.document.addEventListener("pointerup", stop);
726
+ }
727
+ watchBreakpoints() {
728
+ const view = this.document.defaultView;
729
+ const fitsDefaults = !this.drawer && this.size !== "fullscreen";
730
+ const entries = Object.entries(this.config.breakpoints ?? (fitsDefaults ? DEFAULT_BREAKPOINTS : {})).map(([max, width]) => ({
731
+ query: view?.matchMedia?.(`(max-width: ${max})`),
732
+ max: parseFloat(max),
733
+ width
734
+ })).sort((a, b) => a.max - b.max);
735
+ if (!entries.length || !entries[0].query) return;
736
+ const pick = () => this.breakpointWidth.set(entries.find((entry) => entry.query?.matches)?.width ?? null);
737
+ pick();
738
+ entries.forEach((entry) => entry.query?.addEventListener("change", pick));
739
+ inject(DestroyRef).onDestroy(() => entries.forEach((entry) => entry.query?.removeEventListener("change", pick)));
740
+ }
741
+ static ɵfac = i0.ɵɵngDeclareFactory({
742
+ minVersion: "12.0.0",
743
+ version: "22.2.3",
744
+ ngImport: i0,
745
+ type: TxDialogContainer,
746
+ deps: [],
747
+ target: i0.ɵɵFactoryTarget.Component
748
+ });
749
+ static ɵcmp = i0.ɵɵngDeclareComponent({
750
+ minVersion: "17.0.0",
751
+ version: "22.2.3",
752
+ type: TxDialogContainer,
753
+ isStandalone: true,
754
+ selector: "tx-dialog-container",
755
+ host: {
756
+ properties: {
757
+ "style": "hostStyle()",
758
+ "attr.data-styled": "!isUnstyled() || null",
759
+ "attr.data-position": "drawer ? null : position",
760
+ "attr.data-drawer": "drawer",
761
+ "class.tx-dialog-container--modal": "modal",
762
+ "class.tx-dialog-container--leaving": "leaving()",
763
+ "class.tx-dialog-container--maximized": "ref.maximized()"
764
+ },
765
+ classAttribute: "tx-dialog-container"
766
+ },
767
+ viewQueries: [{
768
+ propertyName: "outlet",
769
+ first: true,
770
+ predicate: CdkPortalOutlet,
771
+ descendants: true,
772
+ isSignal: true
773
+ }, {
774
+ propertyName: "panel",
775
+ first: true,
776
+ predicate: ["panel"],
777
+ descendants: true,
778
+ isSignal: true
779
+ }],
780
+ ngImport: i0,
781
+ template: "@if (modal) {\n <div class=\"tx-dialog-mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"onMaskClick()\"></div>\n}\n<div\n #panel\n class=\"tx-dialog\"\n tabindex=\"-1\"\n [class]=\"rootClass()\"\n [style]=\"panelStyle()\"\n [class.tx-dialog--maximized]=\"ref.maximized()\"\n [class.tx-dialog--dragging]=\"dragging()\"\n [attr.role]=\"role\"\n [attr.aria-modal]=\"modal || null\"\n [attr.aria-label]=\"config.ariaLabel ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"config.ariaDescribedBy ?? null\"\n [attr.data-size]=\"drawer ? null : size\"\n>\n <ng-template cdkPortalOutlet />\n</div>\n",
782
+ styles: [":host{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none}:host(.tx-dialog-container--modal){pointer-events:auto}:host([data-position^=top]){align-items:flex-start}:host([data-position^=bottom]){align-items:flex-end}:host([data-position$=left]){justify-content:flex-start}:host([data-position$=right]){justify-content:flex-end}:host([data-drawer=left]){align-items:stretch;justify-content:flex-start}:host([data-drawer=right]){align-items:stretch;justify-content:flex-end}:host([data-drawer=top]){flex-direction:column;align-items:stretch;justify-content:flex-start}:host([data-drawer=bottom]){flex-direction:column;align-items:stretch;justify-content:flex-end}.tx-dialog-mask{position:absolute;inset:0}.tx-dialog{position:relative;display:flex;flex-direction:column;box-sizing:border-box;max-width:100%;max-height:100%;min-height:0;outline:none;pointer-events:auto}:host([data-drawer=left]) .tx-dialog,:host([data-drawer=right]) .tx-dialog{height:100%}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-dialog-mask{background:var(--tx-dialog-mask-background);animation:tx-dialog-fade-in var(--tx-dialog-enter-duration) ease-out}:host([data-styled]) .tx-dialog{--_width: var(--tx-dialog-md-width);width:var(--_width);max-height:var(--tx-dialog-max-height);overflow:hidden;border:var(--tx-dialog-border-width) solid var(--tx-dialog-border-color);border-radius:var(--tx-dialog-border-radius);background:var(--tx-dialog-background);color:var(--tx-dialog-color);font-size:var(--tx-dialog-font-size);line-height:var(--tx-dialog-line-height);box-shadow:var(--tx-dialog-shadow);animation:tx-dialog-in var(--tx-dialog-enter-duration) cubic-bezier(0,0,.2,1);transition:width var(--tx-dialog-enter-duration) cubic-bezier(.2,0,0,1),height var(--tx-dialog-enter-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-dialog:focus-visible{outline:var(--tx-dialog-focus-ring-width) solid var(--tx-dialog-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-dialog[data-size=small]{--_width: var(--tx-dialog-sm-width)}:host([data-styled]) .tx-dialog[data-size=large]{--_width: var(--tx-dialog-lg-width)}:host([data-styled]) .tx-dialog[data-size=xlarge]{--_width: var(--tx-dialog-xl-width)}:host([data-styled]) .tx-dialog[data-size=fullscreen]{--_width: 100%;height:100%;max-height:none;border-radius:0}:host([data-styled]) .tx-dialog--dragging{transition:none;-webkit-user-select:none;user-select:none}:host([data-styled]:not([data-position=center])) .tx-dialog{margin:var(--tx-dialog-position-margin)}:host([data-styled].tx-dialog-container--maximized) .tx-dialog{max-height:none;margin:0;border-radius:0}:host([data-styled][data-drawer]) .tx-dialog{max-height:none;margin:0;border-radius:0;background:var(--tx-dialog-drawer-background);animation-name:tx-drawer-in}:host([data-styled][data-drawer=right]) .tx-dialog{border-start-start-radius:var(--tx-dialog-border-radius);border-end-start-radius:var(--tx-dialog-border-radius)}:host([data-styled][data-drawer=left]) .tx-dialog{border-start-end-radius:var(--tx-dialog-border-radius);border-end-end-radius:var(--tx-dialog-border-radius)}:host([data-styled][data-drawer=top]) .tx-dialog{border-end-start-radius:var(--tx-dialog-border-radius);border-end-end-radius:var(--tx-dialog-border-radius)}:host([data-styled][data-drawer=bottom]) .tx-dialog{border-start-start-radius:var(--tx-dialog-border-radius);border-start-end-radius:var(--tx-dialog-border-radius)}:host([data-styled][data-drawer=left]) .tx-dialog,:host([data-styled][data-drawer=right]) .tx-dialog{width:100%}@media(width>=640px){:host([data-styled][data-drawer=left]) .tx-dialog,:host([data-styled][data-drawer=right]) .tx-dialog{width:var(--_drawer-size)}}:host([data-styled][data-drawer=top]) .tx-dialog,:host([data-styled][data-drawer=bottom]) .tx-dialog{width:100%;height:var(--_drawer-size)}:host([data-styled][data-drawer=left]) .tx-dialog{--_from: -100% 0;border-width:0 var(--tx-dialog-border-width) 0 0}:host([data-styled][data-drawer=right]) .tx-dialog{--_from: 100% 0;border-width:0 0 0 var(--tx-dialog-border-width)}:host([data-styled][data-drawer=top]) .tx-dialog{--_from: 0 -100%;border-width:0 0 var(--tx-dialog-border-width)}:host([data-styled][data-drawer=bottom]) .tx-dialog{--_from: 0 100%;border-width:var(--tx-dialog-border-width) 0 0}:host([data-styled].tx-dialog-container--leaving) .tx-dialog-mask{animation:tx-dialog-fade-out var(--tx-dialog-leave-duration) ease-in forwards}:host([data-styled].tx-dialog-container--leaving) .tx-dialog{animation:tx-dialog-out var(--tx-dialog-leave-duration) ease-in forwards}:host([data-styled][data-drawer].tx-dialog-container--leaving) .tx-dialog{animation-name:tx-drawer-out}@keyframes tx-dialog-fade-in{0%{opacity:0}}@keyframes tx-dialog-fade-out{to{opacity:0}}@keyframes tx-dialog-in{0%{opacity:0;scale:.7}}@keyframes tx-dialog-out{to{opacity:0;scale:.7}}@keyframes tx-drawer-in{0%{translate:var(--_from)}}@keyframes tx-drawer-out{to{translate:var(--_from)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-dialog,:host([data-styled]) .tx-dialog-mask{transition:none;animation:none}:host([data-styled].tx-dialog-container--leaving) .tx-dialog,:host([data-styled].tx-dialog-container--leaving) .tx-dialog-mask{animation:none}:host([data-styled][data-drawer]) .tx-dialog,:host([data-styled][data-drawer].tx-dialog-container--leaving) .tx-dialog{animation:none}}\n"],
783
+ dependencies: [{
784
+ kind: "directive",
785
+ type: CdkPortalOutlet,
786
+ selector: "[cdkPortalOutlet]",
787
+ inputs: ["cdkPortalOutlet"],
788
+ outputs: ["attached"],
789
+ exportAs: ["cdkPortalOutlet"]
790
+ }],
791
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
792
+ });
793
+ };
794
+ i0.ɵɵngDeclareClassMetadata({
795
+ minVersion: "12.0.0",
796
+ version: "22.2.3",
797
+ ngImport: i0,
798
+ type: TxDialogContainer,
799
+ decorators: [{
800
+ type: Component,
801
+ args: [{
802
+ selector: "tx-dialog-container",
803
+ imports: [CdkPortalOutlet],
804
+ changeDetection: ChangeDetectionStrategy.OnPush,
805
+ host: {
806
+ class: "tx-dialog-container",
807
+ "[style]": "hostStyle()",
808
+ "[attr.data-styled]": "!isUnstyled() || null",
809
+ "[attr.data-position]": "drawer ? null : position",
810
+ "[attr.data-drawer]": "drawer",
811
+ "[class.tx-dialog-container--modal]": "modal",
812
+ "[class.tx-dialog-container--leaving]": "leaving()",
813
+ "[class.tx-dialog-container--maximized]": "ref.maximized()"
814
+ },
815
+ template: "@if (modal) {\n <div class=\"tx-dialog-mask\" aria-hidden=\"true\" [class]=\"passThrough().mask?.class\" [style]=\"passThrough().mask?.style\" (click)=\"onMaskClick()\"></div>\n}\n<div\n #panel\n class=\"tx-dialog\"\n tabindex=\"-1\"\n [class]=\"rootClass()\"\n [style]=\"panelStyle()\"\n [class.tx-dialog--maximized]=\"ref.maximized()\"\n [class.tx-dialog--dragging]=\"dragging()\"\n [attr.role]=\"role\"\n [attr.aria-modal]=\"modal || null\"\n [attr.aria-label]=\"config.ariaLabel ?? null\"\n [attr.aria-labelledby]=\"labelledBy()\"\n [attr.aria-describedby]=\"config.ariaDescribedBy ?? null\"\n [attr.data-size]=\"drawer ? null : size\"\n>\n <ng-template cdkPortalOutlet />\n</div>\n",
816
+ styles: [":host{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;box-sizing:border-box;pointer-events:none}:host(.tx-dialog-container--modal){pointer-events:auto}:host([data-position^=top]){align-items:flex-start}:host([data-position^=bottom]){align-items:flex-end}:host([data-position$=left]){justify-content:flex-start}:host([data-position$=right]){justify-content:flex-end}:host([data-drawer=left]){align-items:stretch;justify-content:flex-start}:host([data-drawer=right]){align-items:stretch;justify-content:flex-end}:host([data-drawer=top]){flex-direction:column;align-items:stretch;justify-content:flex-start}:host([data-drawer=bottom]){flex-direction:column;align-items:stretch;justify-content:flex-end}.tx-dialog-mask{position:absolute;inset:0}.tx-dialog{position:relative;display:flex;flex-direction:column;box-sizing:border-box;max-width:100%;max-height:100%;min-height:0;outline:none;pointer-events:auto}:host([data-drawer=left]) .tx-dialog,:host([data-drawer=right]) .tx-dialog{height:100%}:host([data-styled]){font-family:var(--tx-font-family)}:host([data-styled]) .tx-dialog-mask{background:var(--tx-dialog-mask-background);animation:tx-dialog-fade-in var(--tx-dialog-enter-duration) ease-out}:host([data-styled]) .tx-dialog{--_width: var(--tx-dialog-md-width);width:var(--_width);max-height:var(--tx-dialog-max-height);overflow:hidden;border:var(--tx-dialog-border-width) solid var(--tx-dialog-border-color);border-radius:var(--tx-dialog-border-radius);background:var(--tx-dialog-background);color:var(--tx-dialog-color);font-size:var(--tx-dialog-font-size);line-height:var(--tx-dialog-line-height);box-shadow:var(--tx-dialog-shadow);animation:tx-dialog-in var(--tx-dialog-enter-duration) cubic-bezier(0,0,.2,1);transition:width var(--tx-dialog-enter-duration) cubic-bezier(.2,0,0,1),height var(--tx-dialog-enter-duration) cubic-bezier(.2,0,0,1)}:host([data-styled]) .tx-dialog:focus-visible{outline:var(--tx-dialog-focus-ring-width) solid var(--tx-dialog-focus-ring-color);outline-offset:2px}:host([data-styled]) .tx-dialog[data-size=small]{--_width: var(--tx-dialog-sm-width)}:host([data-styled]) .tx-dialog[data-size=large]{--_width: var(--tx-dialog-lg-width)}:host([data-styled]) .tx-dialog[data-size=xlarge]{--_width: var(--tx-dialog-xl-width)}:host([data-styled]) .tx-dialog[data-size=fullscreen]{--_width: 100%;height:100%;max-height:none;border-radius:0}:host([data-styled]) .tx-dialog--dragging{transition:none;-webkit-user-select:none;user-select:none}:host([data-styled]:not([data-position=center])) .tx-dialog{margin:var(--tx-dialog-position-margin)}:host([data-styled].tx-dialog-container--maximized) .tx-dialog{max-height:none;margin:0;border-radius:0}:host([data-styled][data-drawer]) .tx-dialog{max-height:none;margin:0;border-radius:0;background:var(--tx-dialog-drawer-background);animation-name:tx-drawer-in}:host([data-styled][data-drawer=right]) .tx-dialog{border-start-start-radius:var(--tx-dialog-border-radius);border-end-start-radius:var(--tx-dialog-border-radius)}:host([data-styled][data-drawer=left]) .tx-dialog{border-start-end-radius:var(--tx-dialog-border-radius);border-end-end-radius:var(--tx-dialog-border-radius)}:host([data-styled][data-drawer=top]) .tx-dialog{border-end-start-radius:var(--tx-dialog-border-radius);border-end-end-radius:var(--tx-dialog-border-radius)}:host([data-styled][data-drawer=bottom]) .tx-dialog{border-start-start-radius:var(--tx-dialog-border-radius);border-start-end-radius:var(--tx-dialog-border-radius)}:host([data-styled][data-drawer=left]) .tx-dialog,:host([data-styled][data-drawer=right]) .tx-dialog{width:100%}@media(width>=640px){:host([data-styled][data-drawer=left]) .tx-dialog,:host([data-styled][data-drawer=right]) .tx-dialog{width:var(--_drawer-size)}}:host([data-styled][data-drawer=top]) .tx-dialog,:host([data-styled][data-drawer=bottom]) .tx-dialog{width:100%;height:var(--_drawer-size)}:host([data-styled][data-drawer=left]) .tx-dialog{--_from: -100% 0;border-width:0 var(--tx-dialog-border-width) 0 0}:host([data-styled][data-drawer=right]) .tx-dialog{--_from: 100% 0;border-width:0 0 0 var(--tx-dialog-border-width)}:host([data-styled][data-drawer=top]) .tx-dialog{--_from: 0 -100%;border-width:0 0 var(--tx-dialog-border-width)}:host([data-styled][data-drawer=bottom]) .tx-dialog{--_from: 0 100%;border-width:var(--tx-dialog-border-width) 0 0}:host([data-styled].tx-dialog-container--leaving) .tx-dialog-mask{animation:tx-dialog-fade-out var(--tx-dialog-leave-duration) ease-in forwards}:host([data-styled].tx-dialog-container--leaving) .tx-dialog{animation:tx-dialog-out var(--tx-dialog-leave-duration) ease-in forwards}:host([data-styled][data-drawer].tx-dialog-container--leaving) .tx-dialog{animation-name:tx-drawer-out}@keyframes tx-dialog-fade-in{0%{opacity:0}}@keyframes tx-dialog-fade-out{to{opacity:0}}@keyframes tx-dialog-in{0%{opacity:0;scale:.7}}@keyframes tx-dialog-out{to{opacity:0;scale:.7}}@keyframes tx-drawer-in{0%{translate:var(--_from)}}@keyframes tx-drawer-out{to{translate:var(--_from)}}@media(prefers-reduced-motion:reduce){:host([data-styled]) .tx-dialog,:host([data-styled]) .tx-dialog-mask{transition:none;animation:none}:host([data-styled].tx-dialog-container--leaving) .tx-dialog,:host([data-styled].tx-dialog-container--leaving) .tx-dialog-mask{animation:none}:host([data-styled][data-drawer]) .tx-dialog,:host([data-styled][data-drawer].tx-dialog-container--leaving) .tx-dialog{animation:none}}\n"]
817
+ }]
818
+ }],
819
+ ctorParameters: () => [],
820
+ propDecorators: {
821
+ outlet: [{
822
+ type: i0.ViewChild,
823
+ args: [i0.forwardRef(() => CdkPortalOutlet), { isSignal: true }]
824
+ }],
825
+ panel: [{
826
+ type: i0.ViewChild,
827
+ args: ["panel", { isSignal: true }]
828
+ }]
829
+ }
830
+ });
831
+ var TxDialogService = class TxDialogService {
832
+ injector = inject(Injector);
833
+ document = inject(DOCUMENT);
834
+ dialogs = signal([], ...ngDevMode ? [{ debugName: "dialogs" }] : /* istanbul ignore next */ []);
835
+ openDialogs = this.dialogs.asReadonly();
836
+ open(content, config = {}) {
837
+ const parent = config.injector ?? config.viewContainerRef?.injector ?? this.injector;
838
+ const previousFocus = this.document.activeElement;
839
+ const modal = config.modal !== false;
840
+ const overlayRef = createOverlayRef(parent, {
841
+ positionStrategy: createGlobalPositionStrategy(parent).top("0").left("0"),
842
+ scrollStrategy: modal && config.blockScroll !== false ? createBlockScrollStrategy(parent) : createNoopScrollStrategy(),
843
+ width: "100%",
844
+ height: "100%",
845
+ panelClass: "tx-dialog-pane",
846
+ usePopover: false,
847
+ disposeOnNavigation: true
848
+ });
849
+ overlayRef.hostElement.style.zIndex = "var(--tx-layer-modal)";
850
+ const ref = new TxDialogRef(uniqueId("tx-dialog"), config);
851
+ const injector = Injector.create({
852
+ parent,
853
+ providers: [
854
+ {
855
+ provide: TxDialogRef,
856
+ useValue: ref
857
+ },
858
+ {
859
+ provide: TX_DIALOG_DATA,
860
+ useValue: config.data
861
+ },
862
+ {
863
+ provide: TX_DIALOG_CURRENT,
864
+ useValue: signal(ref)
865
+ }
866
+ ]
867
+ });
868
+ const container = overlayRef.attach(new ComponentPortal(TxDialogContainer, null, injector));
869
+ if (!modal) {
870
+ overlayRef.overlayElement.style.pointerEvents = "none";
871
+ overlayRef.hostElement.style.pointerEvents = "none";
872
+ }
873
+ container.changeDetectorRef.detectChanges();
874
+ ref.componentInstance = container.instance.attach(content, injector, config.data)?.instance ?? null;
875
+ container.changeDetectorRef.detectChanges();
876
+ ref.attachHost({
877
+ leave: () => container.instance.leave(),
878
+ dispose: () => {
879
+ overlayRef.dispose();
880
+ this.dialogs.update((dialogs) => dialogs.filter((dialog) => dialog !== ref));
881
+ if (config.restoreFocus !== false && previousFocus?.isConnected) previousFocus.focus({ preventScroll: true });
882
+ },
883
+ updateSize: (width, height) => container.instance.updateSize(width, height),
884
+ dragFrom: (event) => container.instance.dragFrom(event)
885
+ });
886
+ overlayRef.keydownEvents().subscribe((event) => {
887
+ if (event.key === "Escape" && (config.closeOnEscape ?? config.closable ?? true)) {
888
+ event.preventDefault();
889
+ ref.close();
890
+ }
891
+ });
892
+ overlayRef.detachments().subscribe(() => {
893
+ if (!ref.isClosing) ref.close();
894
+ });
895
+ this.dialogs.update((dialogs) => [...dialogs, ref]);
896
+ container.instance.enter();
897
+ ref.markOpened();
898
+ return ref;
899
+ }
900
+ closeAll() {
901
+ [...this.dialogs()].reverse().forEach((dialog) => void dialog.close());
902
+ }
903
+ static ɵfac = i0.ɵɵngDeclareFactory({
904
+ minVersion: "12.0.0",
905
+ version: "22.2.3",
906
+ ngImport: i0,
907
+ type: TxDialogService,
908
+ deps: [],
909
+ target: i0.ɵɵFactoryTarget.Injectable
910
+ });
911
+ static ɵprov = i0.ɵɵngDeclareInjectable({
912
+ minVersion: "12.0.0",
913
+ version: "22.2.3",
914
+ ngImport: i0,
915
+ type: TxDialogService,
916
+ providedIn: "root"
917
+ });
918
+ };
919
+ i0.ɵɵngDeclareClassMetadata({
920
+ minVersion: "12.0.0",
921
+ version: "22.2.3",
922
+ ngImport: i0,
923
+ type: TxDialogService,
924
+ decorators: [{
925
+ type: Injectable,
926
+ args: [{ providedIn: "root" }]
927
+ }]
928
+ });
929
+ var TxDialog = class TxDialog {
930
+ dialogs = inject(TxDialogService);
931
+ injector = inject(Injector);
932
+ current = inject(TX_DIALOG_CURRENT);
933
+ destroyed = false;
934
+ visible = model(false, ...ngDevMode ? [{ debugName: "visible" }] : /* istanbul ignore next */ []);
935
+ header = input(void 0, ...ngDevMode ? [{ debugName: "header" }] : /* istanbul ignore next */ []);
936
+ subtitle = input(void 0, ...ngDevMode ? [{ debugName: "subtitle" }] : /* istanbul ignore next */ []);
937
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
938
+ width = input(void 0, ...ngDevMode ? [{ debugName: "width" }] : /* istanbul ignore next */ []);
939
+ height = input(void 0, ...ngDevMode ? [{ debugName: "height" }] : /* istanbul ignore next */ []);
940
+ breakpoints = input(void 0, ...ngDevMode ? [{ debugName: "breakpoints" }] : /* istanbul ignore next */ []);
941
+ position = input("center", ...ngDevMode ? [{ debugName: "position" }] : /* istanbul ignore next */ []);
942
+ drawer = input(void 0, ...ngDevMode ? [{ debugName: "drawer" }] : /* istanbul ignore next */ []);
943
+ drawerSize = input("medium", ...ngDevMode ? [{ debugName: "drawerSize" }] : /* istanbul ignore next */ []);
944
+ modal = input(true, {
945
+ ...ngDevMode ? { debugName: "modal" } : /* istanbul ignore next */ {},
946
+ transform: booleanAttribute
947
+ });
948
+ closable = input(true, {
949
+ ...ngDevMode ? { debugName: "closable" } : /* istanbul ignore next */ {},
950
+ transform: booleanAttribute
951
+ });
952
+ closeOnEscape = input(void 0, {
953
+ ...ngDevMode ? { debugName: "closeOnEscape" } : /* istanbul ignore next */ {},
954
+ transform: optionalBoolean
955
+ });
956
+ dismissableMask = input(void 0, {
957
+ ...ngDevMode ? { debugName: "dismissableMask" } : /* istanbul ignore next */ {},
958
+ transform: optionalBoolean
959
+ });
960
+ blockScroll = input(true, {
961
+ ...ngDevMode ? { debugName: "blockScroll" } : /* istanbul ignore next */ {},
962
+ transform: booleanAttribute
963
+ });
964
+ draggable = input(false, {
965
+ ...ngDevMode ? { debugName: "draggable" } : /* istanbul ignore next */ {},
966
+ transform: booleanAttribute
967
+ });
968
+ maximizable = input(false, {
969
+ ...ngDevMode ? { debugName: "maximizable" } : /* istanbul ignore next */ {},
970
+ transform: booleanAttribute
971
+ });
972
+ autoFocus = input("first", ...ngDevMode ? [{ debugName: "autoFocus" }] : /* istanbul ignore next */ []);
973
+ restoreFocus = input(true, {
974
+ ...ngDevMode ? { debugName: "restoreFocus" } : /* istanbul ignore next */ {},
975
+ transform: booleanAttribute
976
+ });
977
+ role = input("dialog", ...ngDevMode ? [{ debugName: "role" }] : /* istanbul ignore next */ []);
978
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
979
+ panelClass = input(void 0, ...ngDevMode ? [{ debugName: "panelClass" }] : /* istanbul ignore next */ []);
980
+ canClose = input(void 0, ...ngDevMode ? [{ debugName: "canClose" }] : /* istanbul ignore next */ []);
981
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
982
+ unstyled = input(void 0, {
983
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
984
+ transform: optionalBoolean
985
+ });
986
+ opened = output();
987
+ closed = output();
988
+ body = viewChild.required("body", ...ngDevMode ? [{ debugName: "body" }] : /* istanbul ignore next */ []);
989
+ constructor() {
990
+ effect(() => {
991
+ const wanted = this.visible();
992
+ untracked(() => {
993
+ if (wanted && !this.current()) this.open();
994
+ else if (!wanted && this.current()) this.current()?.close();
995
+ });
996
+ });
997
+ inject(DestroyRef).onDestroy(() => {
998
+ this.destroyed = true;
999
+ this.current()?.close();
1000
+ });
1001
+ }
1002
+ close() {
1003
+ this.current()?.close();
1004
+ }
1005
+ open() {
1006
+ const guard = this.canClose();
1007
+ const ref = this.dialogs.open(this.body(), {
1008
+ injector: this.injector,
1009
+ size: this.size(),
1010
+ width: this.width(),
1011
+ height: this.height(),
1012
+ breakpoints: this.breakpoints(),
1013
+ position: this.position(),
1014
+ drawer: this.drawer(),
1015
+ drawerSize: this.drawerSize(),
1016
+ modal: this.modal(),
1017
+ closable: this.closable(),
1018
+ closeOnEscape: this.closeOnEscape(),
1019
+ dismissableMask: this.dismissableMask(),
1020
+ blockScroll: this.blockScroll(),
1021
+ draggable: this.draggable(),
1022
+ maximizable: this.maximizable(),
1023
+ autoFocus: this.autoFocus(),
1024
+ restoreFocus: this.restoreFocus(),
1025
+ role: this.role(),
1026
+ ariaLabel: this.ariaLabel(),
1027
+ panelClass: this.panelClass(),
1028
+ canClose: guard ? () => guard() : void 0,
1029
+ dt: this.dt(),
1030
+ unstyled: this.unstyled()
1031
+ });
1032
+ this.current.set(ref);
1033
+ this.opened.emit();
1034
+ ref.closed.subscribe(() => {
1035
+ this.current.set(null);
1036
+ if (!this.destroyed) {
1037
+ this.visible.set(false);
1038
+ this.closed.emit();
1039
+ }
1040
+ });
1041
+ }
1042
+ static ɵfac = i0.ɵɵngDeclareFactory({
1043
+ minVersion: "12.0.0",
1044
+ version: "22.2.3",
1045
+ ngImport: i0,
1046
+ type: TxDialog,
1047
+ deps: [],
1048
+ target: i0.ɵɵFactoryTarget.Component
1049
+ });
1050
+ static ɵcmp = i0.ɵɵngDeclareComponent({
1051
+ minVersion: "17.0.0",
1052
+ version: "22.2.3",
1053
+ type: TxDialog,
1054
+ isStandalone: true,
1055
+ selector: "tx-dialog",
1056
+ inputs: {
1057
+ visible: {
1058
+ classPropertyName: "visible",
1059
+ publicName: "visible",
1060
+ isSignal: true,
1061
+ isRequired: false,
1062
+ transformFunction: null
1063
+ },
1064
+ header: {
1065
+ classPropertyName: "header",
1066
+ publicName: "header",
1067
+ isSignal: true,
1068
+ isRequired: false,
1069
+ transformFunction: null
1070
+ },
1071
+ subtitle: {
1072
+ classPropertyName: "subtitle",
1073
+ publicName: "subtitle",
1074
+ isSignal: true,
1075
+ isRequired: false,
1076
+ transformFunction: null
1077
+ },
1078
+ size: {
1079
+ classPropertyName: "size",
1080
+ publicName: "size",
1081
+ isSignal: true,
1082
+ isRequired: false,
1083
+ transformFunction: null
1084
+ },
1085
+ width: {
1086
+ classPropertyName: "width",
1087
+ publicName: "width",
1088
+ isSignal: true,
1089
+ isRequired: false,
1090
+ transformFunction: null
1091
+ },
1092
+ height: {
1093
+ classPropertyName: "height",
1094
+ publicName: "height",
1095
+ isSignal: true,
1096
+ isRequired: false,
1097
+ transformFunction: null
1098
+ },
1099
+ breakpoints: {
1100
+ classPropertyName: "breakpoints",
1101
+ publicName: "breakpoints",
1102
+ isSignal: true,
1103
+ isRequired: false,
1104
+ transformFunction: null
1105
+ },
1106
+ position: {
1107
+ classPropertyName: "position",
1108
+ publicName: "position",
1109
+ isSignal: true,
1110
+ isRequired: false,
1111
+ transformFunction: null
1112
+ },
1113
+ drawer: {
1114
+ classPropertyName: "drawer",
1115
+ publicName: "drawer",
1116
+ isSignal: true,
1117
+ isRequired: false,
1118
+ transformFunction: null
1119
+ },
1120
+ drawerSize: {
1121
+ classPropertyName: "drawerSize",
1122
+ publicName: "drawerSize",
1123
+ isSignal: true,
1124
+ isRequired: false,
1125
+ transformFunction: null
1126
+ },
1127
+ modal: {
1128
+ classPropertyName: "modal",
1129
+ publicName: "modal",
1130
+ isSignal: true,
1131
+ isRequired: false,
1132
+ transformFunction: null
1133
+ },
1134
+ closable: {
1135
+ classPropertyName: "closable",
1136
+ publicName: "closable",
1137
+ isSignal: true,
1138
+ isRequired: false,
1139
+ transformFunction: null
1140
+ },
1141
+ closeOnEscape: {
1142
+ classPropertyName: "closeOnEscape",
1143
+ publicName: "closeOnEscape",
1144
+ isSignal: true,
1145
+ isRequired: false,
1146
+ transformFunction: null
1147
+ },
1148
+ dismissableMask: {
1149
+ classPropertyName: "dismissableMask",
1150
+ publicName: "dismissableMask",
1151
+ isSignal: true,
1152
+ isRequired: false,
1153
+ transformFunction: null
1154
+ },
1155
+ blockScroll: {
1156
+ classPropertyName: "blockScroll",
1157
+ publicName: "blockScroll",
1158
+ isSignal: true,
1159
+ isRequired: false,
1160
+ transformFunction: null
1161
+ },
1162
+ draggable: {
1163
+ classPropertyName: "draggable",
1164
+ publicName: "draggable",
1165
+ isSignal: true,
1166
+ isRequired: false,
1167
+ transformFunction: null
1168
+ },
1169
+ maximizable: {
1170
+ classPropertyName: "maximizable",
1171
+ publicName: "maximizable",
1172
+ isSignal: true,
1173
+ isRequired: false,
1174
+ transformFunction: null
1175
+ },
1176
+ autoFocus: {
1177
+ classPropertyName: "autoFocus",
1178
+ publicName: "autoFocus",
1179
+ isSignal: true,
1180
+ isRequired: false,
1181
+ transformFunction: null
1182
+ },
1183
+ restoreFocus: {
1184
+ classPropertyName: "restoreFocus",
1185
+ publicName: "restoreFocus",
1186
+ isSignal: true,
1187
+ isRequired: false,
1188
+ transformFunction: null
1189
+ },
1190
+ role: {
1191
+ classPropertyName: "role",
1192
+ publicName: "role",
1193
+ isSignal: true,
1194
+ isRequired: false,
1195
+ transformFunction: null
1196
+ },
1197
+ ariaLabel: {
1198
+ classPropertyName: "ariaLabel",
1199
+ publicName: "ariaLabel",
1200
+ isSignal: true,
1201
+ isRequired: false,
1202
+ transformFunction: null
1203
+ },
1204
+ panelClass: {
1205
+ classPropertyName: "panelClass",
1206
+ publicName: "panelClass",
1207
+ isSignal: true,
1208
+ isRequired: false,
1209
+ transformFunction: null
1210
+ },
1211
+ canClose: {
1212
+ classPropertyName: "canClose",
1213
+ publicName: "canClose",
1214
+ isSignal: true,
1215
+ isRequired: false,
1216
+ transformFunction: null
1217
+ },
1218
+ dt: {
1219
+ classPropertyName: "dt",
1220
+ publicName: "dt",
1221
+ isSignal: true,
1222
+ isRequired: false,
1223
+ transformFunction: null
1224
+ },
1225
+ unstyled: {
1226
+ classPropertyName: "unstyled",
1227
+ publicName: "unstyled",
1228
+ isSignal: true,
1229
+ isRequired: false,
1230
+ transformFunction: null
1231
+ }
1232
+ },
1233
+ outputs: {
1234
+ visible: "visibleChange",
1235
+ opened: "opened",
1236
+ closed: "closed"
1237
+ },
1238
+ host: {
1239
+ styleAttribute: "display: contents",
1240
+ classAttribute: "tx-dialog-host"
1241
+ },
1242
+ providers: [{
1243
+ provide: TX_DIALOG_CURRENT,
1244
+ useFactory: () => signal(null)
1245
+ }],
1246
+ viewQueries: [{
1247
+ propertyName: "body",
1248
+ first: true,
1249
+ predicate: ["body"],
1250
+ descendants: true,
1251
+ isSignal: true
1252
+ }],
1253
+ ngImport: i0,
1254
+ template: `
1255
+ <ng-template #body>
1256
+ @if (header()) {
1257
+ <tx-dialog-header [title]="header()" [subtitle]="subtitle()" />
1258
+ }
1259
+ <ng-content select="tx-dialog-header" />
1260
+ <tx-dialog-content>
1261
+ <ng-content />
1262
+ </tx-dialog-content>
1263
+ <ng-content select="tx-dialog-footer" />
1264
+ </ng-template>
1265
+ `,
1266
+ isInline: true,
1267
+ dependencies: [{
1268
+ kind: "component",
1269
+ type: TxDialogHeader,
1270
+ selector: "tx-dialog-header",
1271
+ inputs: [
1272
+ "title",
1273
+ "subtitle",
1274
+ "closeButton",
1275
+ "maximizeButton"
1276
+ ]
1277
+ }, {
1278
+ kind: "component",
1279
+ type: TxDialogContent,
1280
+ selector: "tx-dialog-content"
1281
+ }],
1282
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
1283
+ });
1284
+ };
1285
+ i0.ɵɵngDeclareClassMetadata({
1286
+ minVersion: "12.0.0",
1287
+ version: "22.2.3",
1288
+ ngImport: i0,
1289
+ type: TxDialog,
1290
+ decorators: [{
1291
+ type: Component,
1292
+ args: [{
1293
+ selector: "tx-dialog",
1294
+ imports: [TxDialogHeader, TxDialogContent],
1295
+ template: `
1296
+ <ng-template #body>
1297
+ @if (header()) {
1298
+ <tx-dialog-header [title]="header()" [subtitle]="subtitle()" />
1299
+ }
1300
+ <ng-content select="tx-dialog-header" />
1301
+ <tx-dialog-content>
1302
+ <ng-content />
1303
+ </tx-dialog-content>
1304
+ <ng-content select="tx-dialog-footer" />
1305
+ </ng-template>
1306
+ `,
1307
+ changeDetection: ChangeDetectionStrategy.OnPush,
1308
+ providers: [{
1309
+ provide: TX_DIALOG_CURRENT,
1310
+ useFactory: () => signal(null)
1311
+ }],
1312
+ host: {
1313
+ class: "tx-dialog-host",
1314
+ style: "display: contents"
1315
+ }
1316
+ }]
1317
+ }],
1318
+ ctorParameters: () => [],
1319
+ propDecorators: {
1320
+ visible: [{
1321
+ type: i0.Input,
1322
+ args: [{
1323
+ isSignal: true,
1324
+ alias: "visible",
1325
+ required: false
1326
+ }]
1327
+ }, {
1328
+ type: i0.Output,
1329
+ args: ["visibleChange"]
1330
+ }],
1331
+ header: [{
1332
+ type: i0.Input,
1333
+ args: [{
1334
+ isSignal: true,
1335
+ alias: "header",
1336
+ required: false
1337
+ }]
1338
+ }],
1339
+ subtitle: [{
1340
+ type: i0.Input,
1341
+ args: [{
1342
+ isSignal: true,
1343
+ alias: "subtitle",
1344
+ required: false
1345
+ }]
1346
+ }],
1347
+ size: [{
1348
+ type: i0.Input,
1349
+ args: [{
1350
+ isSignal: true,
1351
+ alias: "size",
1352
+ required: false
1353
+ }]
1354
+ }],
1355
+ width: [{
1356
+ type: i0.Input,
1357
+ args: [{
1358
+ isSignal: true,
1359
+ alias: "width",
1360
+ required: false
1361
+ }]
1362
+ }],
1363
+ height: [{
1364
+ type: i0.Input,
1365
+ args: [{
1366
+ isSignal: true,
1367
+ alias: "height",
1368
+ required: false
1369
+ }]
1370
+ }],
1371
+ breakpoints: [{
1372
+ type: i0.Input,
1373
+ args: [{
1374
+ isSignal: true,
1375
+ alias: "breakpoints",
1376
+ required: false
1377
+ }]
1378
+ }],
1379
+ position: [{
1380
+ type: i0.Input,
1381
+ args: [{
1382
+ isSignal: true,
1383
+ alias: "position",
1384
+ required: false
1385
+ }]
1386
+ }],
1387
+ drawer: [{
1388
+ type: i0.Input,
1389
+ args: [{
1390
+ isSignal: true,
1391
+ alias: "drawer",
1392
+ required: false
1393
+ }]
1394
+ }],
1395
+ drawerSize: [{
1396
+ type: i0.Input,
1397
+ args: [{
1398
+ isSignal: true,
1399
+ alias: "drawerSize",
1400
+ required: false
1401
+ }]
1402
+ }],
1403
+ modal: [{
1404
+ type: i0.Input,
1405
+ args: [{
1406
+ isSignal: true,
1407
+ alias: "modal",
1408
+ required: false
1409
+ }]
1410
+ }],
1411
+ closable: [{
1412
+ type: i0.Input,
1413
+ args: [{
1414
+ isSignal: true,
1415
+ alias: "closable",
1416
+ required: false
1417
+ }]
1418
+ }],
1419
+ closeOnEscape: [{
1420
+ type: i0.Input,
1421
+ args: [{
1422
+ isSignal: true,
1423
+ alias: "closeOnEscape",
1424
+ required: false
1425
+ }]
1426
+ }],
1427
+ dismissableMask: [{
1428
+ type: i0.Input,
1429
+ args: [{
1430
+ isSignal: true,
1431
+ alias: "dismissableMask",
1432
+ required: false
1433
+ }]
1434
+ }],
1435
+ blockScroll: [{
1436
+ type: i0.Input,
1437
+ args: [{
1438
+ isSignal: true,
1439
+ alias: "blockScroll",
1440
+ required: false
1441
+ }]
1442
+ }],
1443
+ draggable: [{
1444
+ type: i0.Input,
1445
+ args: [{
1446
+ isSignal: true,
1447
+ alias: "draggable",
1448
+ required: false
1449
+ }]
1450
+ }],
1451
+ maximizable: [{
1452
+ type: i0.Input,
1453
+ args: [{
1454
+ isSignal: true,
1455
+ alias: "maximizable",
1456
+ required: false
1457
+ }]
1458
+ }],
1459
+ autoFocus: [{
1460
+ type: i0.Input,
1461
+ args: [{
1462
+ isSignal: true,
1463
+ alias: "autoFocus",
1464
+ required: false
1465
+ }]
1466
+ }],
1467
+ restoreFocus: [{
1468
+ type: i0.Input,
1469
+ args: [{
1470
+ isSignal: true,
1471
+ alias: "restoreFocus",
1472
+ required: false
1473
+ }]
1474
+ }],
1475
+ role: [{
1476
+ type: i0.Input,
1477
+ args: [{
1478
+ isSignal: true,
1479
+ alias: "role",
1480
+ required: false
1481
+ }]
1482
+ }],
1483
+ ariaLabel: [{
1484
+ type: i0.Input,
1485
+ args: [{
1486
+ isSignal: true,
1487
+ alias: "ariaLabel",
1488
+ required: false
1489
+ }]
1490
+ }],
1491
+ panelClass: [{
1492
+ type: i0.Input,
1493
+ args: [{
1494
+ isSignal: true,
1495
+ alias: "panelClass",
1496
+ required: false
1497
+ }]
1498
+ }],
1499
+ canClose: [{
1500
+ type: i0.Input,
1501
+ args: [{
1502
+ isSignal: true,
1503
+ alias: "canClose",
1504
+ required: false
1505
+ }]
1506
+ }],
1507
+ dt: [{
1508
+ type: i0.Input,
1509
+ args: [{
1510
+ isSignal: true,
1511
+ alias: "dt",
1512
+ required: false
1513
+ }]
1514
+ }],
1515
+ unstyled: [{
1516
+ type: i0.Input,
1517
+ args: [{
1518
+ isSignal: true,
1519
+ alias: "unstyled",
1520
+ required: false
1521
+ }]
1522
+ }],
1523
+ opened: [{
1524
+ type: i0.Output,
1525
+ args: ["opened"]
1526
+ }],
1527
+ closed: [{
1528
+ type: i0.Output,
1529
+ args: ["closed"]
1530
+ }],
1531
+ body: [{
1532
+ type: i0.ViewChild,
1533
+ args: ["body", { isSignal: true }]
1534
+ }]
1535
+ }
1536
+ });
1537
+ export { TX_DIALOG_CURRENT, TX_DIALOG_DATA, TxDialog, TxDialogClose, TxDialogContainer, TxDialogContent, TxDialogFooter, TxDialogHeader, TxDialogRef, TxDialogService, TxDialogTitle, injectCurrentDialog, injectDialogData, injectDialogRef };
1538
+
1539
+ //# sourceMappingURL=tectra-ng-ui-dialog.mjs.map