@tectra-ng/ui 0.0.0-stage → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -2
  3. package/amount/README.md +28 -0
  4. package/autocomplete/README.md +82 -0
  5. package/avatar/README.md +43 -0
  6. package/badge/README.md +19 -0
  7. package/button/README.md +46 -0
  8. package/button-group/README.md +8 -0
  9. package/card/README.md +30 -0
  10. package/cascade-select/README.md +49 -0
  11. package/checkbox/README.md +64 -0
  12. package/chip/README.md +38 -0
  13. package/chips-input/README.md +47 -0
  14. package/color-picker/README.md +43 -0
  15. package/confirm/README.md +46 -0
  16. package/country/README.md +23 -0
  17. package/country-select/README.md +39 -0
  18. package/dialog/README.md +84 -0
  19. package/divider/README.md +24 -0
  20. package/drawer/README.md +54 -0
  21. package/email-suggestion/README.md +20 -0
  22. package/fesm2022/tectra-ng-ui-amount.mjs +415 -0
  23. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -0
  24. package/fesm2022/tectra-ng-ui-autocomplete.mjs +730 -0
  25. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-ui-avatar.mjs +670 -0
  27. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-badge.mjs +191 -0
  29. package/fesm2022/tectra-ng-ui-badge.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-ui-button-group.mjs +50 -0
  31. package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-ui-button.mjs +725 -0
  33. package/fesm2022/tectra-ng-ui-button.mjs.map +1 -0
  34. package/fesm2022/tectra-ng-ui-card.mjs +210 -0
  35. package/fesm2022/tectra-ng-ui-card.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-ui-cascade-select.mjs +887 -0
  37. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -0
  38. package/fesm2022/tectra-ng-ui-checkbox.mjs +1150 -0
  39. package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -0
  40. package/fesm2022/tectra-ng-ui-chip.mjs +344 -0
  41. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -0
  42. package/fesm2022/tectra-ng-ui-chips-input.mjs +649 -0
  43. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -0
  44. package/fesm2022/tectra-ng-ui-color-picker.mjs +828 -0
  45. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-ui-confirm.mjs +489 -0
  47. package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-ui-country-select.mjs +545 -0
  49. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -0
  50. package/fesm2022/tectra-ng-ui-country.mjs +313 -0
  51. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -0
  52. package/fesm2022/tectra-ng-ui-dialog.mjs +1539 -0
  53. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -0
  54. package/fesm2022/tectra-ng-ui-divider.mjs +194 -0
  55. package/fesm2022/tectra-ng-ui-divider.mjs.map +1 -0
  56. package/fesm2022/tectra-ng-ui-drawer.mjs +540 -0
  57. package/fesm2022/tectra-ng-ui-drawer.mjs.map +1 -0
  58. package/fesm2022/tectra-ng-ui-email-suggestion.mjs +341 -0
  59. package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -0
  60. package/fesm2022/tectra-ng-ui-field.mjs +492 -0
  61. package/fesm2022/tectra-ng-ui-field.mjs.map +1 -0
  62. package/fesm2022/tectra-ng-ui-fieldset.mjs +258 -0
  63. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -0
  64. package/fesm2022/tectra-ng-ui-highlight-text.mjs +246 -0
  65. package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -0
  66. package/fesm2022/tectra-ng-ui-icon-field.mjs +478 -0
  67. package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -0
  68. package/fesm2022/tectra-ng-ui-input-group.mjs +113 -0
  69. package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -0
  70. package/fesm2022/tectra-ng-ui-input-mask.mjs +413 -0
  71. package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -0
  72. package/fesm2022/tectra-ng-ui-input-number.mjs +1045 -0
  73. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -0
  74. package/fesm2022/tectra-ng-ui-input-otp.mjs +553 -0
  75. package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -0
  76. package/fesm2022/tectra-ng-ui-input.mjs +260 -0
  77. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -0
  78. package/fesm2022/tectra-ng-ui-key-filter.mjs +185 -0
  79. package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -0
  80. package/fesm2022/tectra-ng-ui-knob.mjs +630 -0
  81. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -0
  82. package/fesm2022/tectra-ng-ui-label.mjs +271 -0
  83. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -0
  84. package/fesm2022/tectra-ng-ui-link.mjs +699 -0
  85. package/fesm2022/tectra-ng-ui-link.mjs.map +1 -0
  86. package/fesm2022/tectra-ng-ui-listbox.mjs +484 -0
  87. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -0
  88. package/fesm2022/tectra-ng-ui-mention-textarea.mjs +717 -0
  89. package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -0
  90. package/fesm2022/tectra-ng-ui-menu.mjs +1484 -0
  91. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -0
  92. package/fesm2022/tectra-ng-ui-message.mjs +975 -0
  93. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -0
  94. package/fesm2022/tectra-ng-ui-multiselect.mjs +569 -0
  95. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -0
  96. package/fesm2022/tectra-ng-ui-overlay-badge.mjs +345 -0
  97. package/fesm2022/tectra-ng-ui-overlay-badge.mjs.map +1 -0
  98. package/fesm2022/tectra-ng-ui-paginator.mjs +849 -0
  99. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -0
  100. package/fesm2022/tectra-ng-ui-panel.mjs +317 -0
  101. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -0
  102. package/fesm2022/tectra-ng-ui-password-generator.mjs +292 -0
  103. package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -0
  104. package/fesm2022/tectra-ng-ui-password.mjs +871 -0
  105. package/fesm2022/tectra-ng-ui-password.mjs.map +1 -0
  106. package/fesm2022/tectra-ng-ui-pill.mjs +361 -0
  107. package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -0
  108. package/fesm2022/tectra-ng-ui-popover.mjs +742 -0
  109. package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -0
  110. package/fesm2022/tectra-ng-ui-progress-bar.mjs +440 -0
  111. package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -0
  112. package/fesm2022/tectra-ng-ui-progress-spinner.mjs +265 -0
  113. package/fesm2022/tectra-ng-ui-progress-spinner.mjs.map +1 -0
  114. package/fesm2022/tectra-ng-ui-radio-button.mjs +817 -0
  115. package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -0
  116. package/fesm2022/tectra-ng-ui-rating.mjs +584 -0
  117. package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -0
  118. package/fesm2022/tectra-ng-ui-select.mjs +2478 -0
  119. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -0
  120. package/fesm2022/tectra-ng-ui-skeleton.mjs +548 -0
  121. package/fesm2022/tectra-ng-ui-skeleton.mjs.map +1 -0
  122. package/fesm2022/tectra-ng-ui-slider.mjs +630 -0
  123. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -0
  124. package/fesm2022/tectra-ng-ui-speed-dial.mjs +669 -0
  125. package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -0
  126. package/fesm2022/tectra-ng-ui-split-button.mjs +614 -0
  127. package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -0
  128. package/fesm2022/tectra-ng-ui-status-icon.mjs +295 -0
  129. package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -0
  130. package/fesm2022/tectra-ng-ui-table.mjs +5997 -0
  131. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -0
  132. package/fesm2022/tectra-ng-ui-tag.mjs +422 -0
  133. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -0
  134. package/fesm2022/tectra-ng-ui-textarea.mjs +482 -0
  135. package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -0
  136. package/fesm2022/tectra-ng-ui-toast.mjs +668 -0
  137. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -0
  138. package/fesm2022/tectra-ng-ui-toggle-button.mjs +416 -0
  139. package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -0
  140. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +560 -0
  141. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -0
  142. package/fesm2022/tectra-ng-ui-tooltip.mjs +835 -0
  143. package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -0
  144. package/fesm2022/tectra-ng-ui-tree-select.mjs +986 -0
  145. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -0
  146. package/fesm2022/tectra-ng-ui.mjs +4 -0
  147. package/fesm2022/tectra-ng-ui.mjs.map +1 -0
  148. package/field/README.md +43 -0
  149. package/fieldset/README.md +36 -0
  150. package/highlight-text/README.md +20 -0
  151. package/icon-field/README.md +30 -0
  152. package/input/README.md +22 -0
  153. package/input-group/README.md +21 -0
  154. package/input-mask/README.md +30 -0
  155. package/input-number/README.md +61 -0
  156. package/input-otp/README.md +44 -0
  157. package/key-filter/README.md +31 -0
  158. package/knob/README.md +50 -0
  159. package/label/README.md +29 -0
  160. package/link/README.md +47 -0
  161. package/listbox/README.md +68 -0
  162. package/mention-textarea/README.md +47 -0
  163. package/menu/README.md +65 -0
  164. package/message/README.md +58 -0
  165. package/multiselect/README.md +85 -0
  166. package/overlay-badge/README.md +30 -0
  167. package/package.json +301 -3
  168. package/paginator/README.md +60 -0
  169. package/panel/README.md +45 -0
  170. package/password/README.md +60 -0
  171. package/password-generator/README.md +34 -0
  172. package/pill/README.md +42 -0
  173. package/popover/README.md +67 -0
  174. package/progress-bar/README.md +32 -0
  175. package/progress-spinner/README.md +22 -0
  176. package/radio-button/README.md +54 -0
  177. package/rating/README.md +49 -0
  178. package/select/README.md +78 -0
  179. package/skeleton/README.md +27 -0
  180. package/slider/README.md +48 -0
  181. package/speed-dial/README.md +49 -0
  182. package/split-button/README.md +45 -0
  183. package/status-icon/README.md +22 -0
  184. package/table/README.md +178 -0
  185. package/tag/README.md +42 -0
  186. package/textarea/README.md +37 -0
  187. package/toast/README.md +52 -0
  188. package/toggle-button/README.md +34 -0
  189. package/toggle-switch/README.md +49 -0
  190. package/tooltip/README.md +60 -0
  191. package/tree-select/README.md +49 -0
  192. package/types/tectra-ng-ui-amount.d.ts +135 -0
  193. package/types/tectra-ng-ui-amount.d.ts.map +1 -0
  194. package/types/tectra-ng-ui-autocomplete.d.ts +250 -0
  195. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -0
  196. package/types/tectra-ng-ui-avatar.d.ts +289 -0
  197. package/types/tectra-ng-ui-avatar.d.ts.map +1 -0
  198. package/types/tectra-ng-ui-badge.d.ts +119 -0
  199. package/types/tectra-ng-ui-badge.d.ts.map +1 -0
  200. package/types/tectra-ng-ui-button-group.d.ts +6 -0
  201. package/types/tectra-ng-ui-button-group.d.ts.map +1 -0
  202. package/types/tectra-ng-ui-button.d.ts +466 -0
  203. package/types/tectra-ng-ui-button.d.ts.map +1 -0
  204. package/types/tectra-ng-ui-card.d.ts +71 -0
  205. package/types/tectra-ng-ui-card.d.ts.map +1 -0
  206. package/types/tectra-ng-ui-cascade-select.d.ts +244 -0
  207. package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -0
  208. package/types/tectra-ng-ui-checkbox.d.ts +450 -0
  209. package/types/tectra-ng-ui-checkbox.d.ts.map +1 -0
  210. package/types/tectra-ng-ui-chip.d.ts +106 -0
  211. package/types/tectra-ng-ui-chip.d.ts.map +1 -0
  212. package/types/tectra-ng-ui-chips-input.d.ts +187 -0
  213. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -0
  214. package/types/tectra-ng-ui-color-picker.d.ts +237 -0
  215. package/types/tectra-ng-ui-color-picker.d.ts.map +1 -0
  216. package/types/tectra-ng-ui-confirm.d.ts +80 -0
  217. package/types/tectra-ng-ui-confirm.d.ts.map +1 -0
  218. package/types/tectra-ng-ui-country-select.d.ts +235 -0
  219. package/types/tectra-ng-ui-country-select.d.ts.map +1 -0
  220. package/types/tectra-ng-ui-country.d.ts +105 -0
  221. package/types/tectra-ng-ui-country.d.ts.map +1 -0
  222. package/types/tectra-ng-ui-dialog.d.ts +453 -0
  223. package/types/tectra-ng-ui-dialog.d.ts.map +1 -0
  224. package/types/tectra-ng-ui-divider.d.ts +70 -0
  225. package/types/tectra-ng-ui-divider.d.ts.map +1 -0
  226. package/types/tectra-ng-ui-drawer.d.ts +188 -0
  227. package/types/tectra-ng-ui-drawer.d.ts.map +1 -0
  228. package/types/tectra-ng-ui-email-suggestion.d.ts +84 -0
  229. package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -0
  230. package/types/tectra-ng-ui-field.d.ts +139 -0
  231. package/types/tectra-ng-ui-field.d.ts.map +1 -0
  232. package/types/tectra-ng-ui-fieldset.d.ts +74 -0
  233. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -0
  234. package/types/tectra-ng-ui-highlight-text.d.ts +75 -0
  235. package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -0
  236. package/types/tectra-ng-ui-icon-field.d.ts +77 -0
  237. package/types/tectra-ng-ui-icon-field.d.ts.map +1 -0
  238. package/types/tectra-ng-ui-input-group.d.ts +18 -0
  239. package/types/tectra-ng-ui-input-group.d.ts.map +1 -0
  240. package/types/tectra-ng-ui-input-mask.d.ts +91 -0
  241. package/types/tectra-ng-ui-input-mask.d.ts.map +1 -0
  242. package/types/tectra-ng-ui-input-number.d.ts +326 -0
  243. package/types/tectra-ng-ui-input-number.d.ts.map +1 -0
  244. package/types/tectra-ng-ui-input-otp.d.ts +173 -0
  245. package/types/tectra-ng-ui-input-otp.d.ts.map +1 -0
  246. package/types/tectra-ng-ui-input.d.ts +113 -0
  247. package/types/tectra-ng-ui-input.d.ts.map +1 -0
  248. package/types/tectra-ng-ui-key-filter.d.ts +43 -0
  249. package/types/tectra-ng-ui-key-filter.d.ts.map +1 -0
  250. package/types/tectra-ng-ui-knob.d.ts +207 -0
  251. package/types/tectra-ng-ui-knob.d.ts.map +1 -0
  252. package/types/tectra-ng-ui-label.d.ts +53 -0
  253. package/types/tectra-ng-ui-label.d.ts.map +1 -0
  254. package/types/tectra-ng-ui-link.d.ts +223 -0
  255. package/types/tectra-ng-ui-link.d.ts.map +1 -0
  256. package/types/tectra-ng-ui-listbox.d.ts +131 -0
  257. package/types/tectra-ng-ui-listbox.d.ts.map +1 -0
  258. package/types/tectra-ng-ui-mention-textarea.d.ts +169 -0
  259. package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -0
  260. package/types/tectra-ng-ui-menu.d.ts +512 -0
  261. package/types/tectra-ng-ui-menu.d.ts.map +1 -0
  262. package/types/tectra-ng-ui-message.d.ts +390 -0
  263. package/types/tectra-ng-ui-message.d.ts.map +1 -0
  264. package/types/tectra-ng-ui-multiselect.d.ts +216 -0
  265. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -0
  266. package/types/tectra-ng-ui-overlay-badge.d.ts +104 -0
  267. package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -0
  268. package/types/tectra-ng-ui-paginator.d.ts +293 -0
  269. package/types/tectra-ng-ui-paginator.d.ts.map +1 -0
  270. package/types/tectra-ng-ui-panel.d.ts +133 -0
  271. package/types/tectra-ng-ui-panel.d.ts.map +1 -0
  272. package/types/tectra-ng-ui-password-generator.d.ts +80 -0
  273. package/types/tectra-ng-ui-password-generator.d.ts.map +1 -0
  274. package/types/tectra-ng-ui-password.d.ts +271 -0
  275. package/types/tectra-ng-ui-password.d.ts.map +1 -0
  276. package/types/tectra-ng-ui-pill.d.ts +167 -0
  277. package/types/tectra-ng-ui-pill.d.ts.map +1 -0
  278. package/types/tectra-ng-ui-popover.d.ts +244 -0
  279. package/types/tectra-ng-ui-popover.d.ts.map +1 -0
  280. package/types/tectra-ng-ui-progress-bar.d.ts +151 -0
  281. package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -0
  282. package/types/tectra-ng-ui-progress-spinner.d.ts +95 -0
  283. package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -0
  284. package/types/tectra-ng-ui-radio-button.d.ts +380 -0
  285. package/types/tectra-ng-ui-radio-button.d.ts.map +1 -0
  286. package/types/tectra-ng-ui-rating.d.ts +195 -0
  287. package/types/tectra-ng-ui-rating.d.ts.map +1 -0
  288. package/types/tectra-ng-ui-select.d.ts +761 -0
  289. package/types/tectra-ng-ui-select.d.ts.map +1 -0
  290. package/types/tectra-ng-ui-skeleton.d.ts +182 -0
  291. package/types/tectra-ng-ui-skeleton.d.ts.map +1 -0
  292. package/types/tectra-ng-ui-slider.d.ts +220 -0
  293. package/types/tectra-ng-ui-slider.d.ts.map +1 -0
  294. package/types/tectra-ng-ui-speed-dial.d.ts +175 -0
  295. package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -0
  296. package/types/tectra-ng-ui-split-button.d.ts +139 -0
  297. package/types/tectra-ng-ui-split-button.d.ts.map +1 -0
  298. package/types/tectra-ng-ui-status-icon.d.ts +105 -0
  299. package/types/tectra-ng-ui-status-icon.d.ts.map +1 -0
  300. package/types/tectra-ng-ui-table.d.ts +1301 -0
  301. package/types/tectra-ng-ui-table.d.ts.map +1 -0
  302. package/types/tectra-ng-ui-tag.d.ts +157 -0
  303. package/types/tectra-ng-ui-tag.d.ts.map +1 -0
  304. package/types/tectra-ng-ui-textarea.d.ts +146 -0
  305. package/types/tectra-ng-ui-textarea.d.ts.map +1 -0
  306. package/types/tectra-ng-ui-toast.d.ts +268 -0
  307. package/types/tectra-ng-ui-toast.d.ts.map +1 -0
  308. package/types/tectra-ng-ui-toggle-button.d.ts +184 -0
  309. package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -0
  310. package/types/tectra-ng-ui-toggle-switch.d.ts +226 -0
  311. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -0
  312. package/types/tectra-ng-ui-tooltip.d.ts +275 -0
  313. package/types/tectra-ng-ui-tooltip.d.ts.map +1 -0
  314. package/types/tectra-ng-ui-tree-select.d.ts +339 -0
  315. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -0
  316. package/types/tectra-ng-ui.d.ts +2 -0
  317. package/types/tectra-ng-ui.d.ts.map +1 -0
@@ -0,0 +1,871 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DestroyRef, Directive, TemplateRef, ViewContainerRef, booleanAttribute, computed, contentChild, effect, forwardRef, inject, input, output, signal, viewChild } from "@angular/core";
3
+ import { NgTemplateOutlet } from "@angular/common";
4
+ import { NG_VALUE_ACCESSOR } from "@angular/forms";
5
+ import { uniqueId } from "@tectra-ng/core/a11y";
6
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
7
+ import { injectFluid } from "@tectra-ng/core/fluid";
8
+ import { TxFormControlBase, injectFieldInvalid } from "@tectra-ng/core/forms";
9
+ import { injectTranslations } from "@tectra-ng/core/i18n";
10
+ import { TxOverlay } from "@tectra-ng/core/overlay";
11
+ import { optionalBoolean, optionalNumber } from "@tectra-ng/core/utils";
12
+ import { TxIcon } from "@tectra-ng/icons";
13
+ import { toStyleObject } from "@tectra-ng/themes";
14
+ import { TxInput } from "@tectra-ng/ui/input";
15
+ var TxPasswordHeaderTemplate = class TxPasswordHeaderTemplate {
16
+ templateRef = inject(TemplateRef);
17
+ static ɵfac = i0.ɵɵngDeclareFactory({
18
+ minVersion: "12.0.0",
19
+ version: "22.2.3",
20
+ ngImport: i0,
21
+ type: TxPasswordHeaderTemplate,
22
+ deps: [],
23
+ target: i0.ɵɵFactoryTarget.Directive
24
+ });
25
+ static ɵdir = i0.ɵɵngDeclareDirective({
26
+ minVersion: "14.0.0",
27
+ version: "22.2.3",
28
+ type: TxPasswordHeaderTemplate,
29
+ isStandalone: true,
30
+ selector: "ng-template[txPasswordHeader]",
31
+ ngImport: i0
32
+ });
33
+ };
34
+ i0.ɵɵngDeclareClassMetadata({
35
+ minVersion: "12.0.0",
36
+ version: "22.2.3",
37
+ ngImport: i0,
38
+ type: TxPasswordHeaderTemplate,
39
+ decorators: [{
40
+ type: Directive,
41
+ args: [{ selector: "ng-template[txPasswordHeader]" }]
42
+ }]
43
+ });
44
+ var TxPasswordContentTemplate = class TxPasswordContentTemplate {
45
+ templateRef = inject(TemplateRef);
46
+ static ɵfac = i0.ɵɵngDeclareFactory({
47
+ minVersion: "12.0.0",
48
+ version: "22.2.3",
49
+ ngImport: i0,
50
+ type: TxPasswordContentTemplate,
51
+ deps: [],
52
+ target: i0.ɵɵFactoryTarget.Directive
53
+ });
54
+ static ɵdir = i0.ɵɵngDeclareDirective({
55
+ minVersion: "14.0.0",
56
+ version: "22.2.3",
57
+ type: TxPasswordContentTemplate,
58
+ isStandalone: true,
59
+ selector: "ng-template[txPasswordContent]",
60
+ ngImport: i0
61
+ });
62
+ };
63
+ i0.ɵɵngDeclareClassMetadata({
64
+ minVersion: "12.0.0",
65
+ version: "22.2.3",
66
+ ngImport: i0,
67
+ type: TxPasswordContentTemplate,
68
+ decorators: [{
69
+ type: Directive,
70
+ args: [{ selector: "ng-template[txPasswordContent]" }]
71
+ }]
72
+ });
73
+ var TxPasswordFooterTemplate = class TxPasswordFooterTemplate {
74
+ templateRef = inject(TemplateRef);
75
+ static ɵfac = i0.ɵɵngDeclareFactory({
76
+ minVersion: "12.0.0",
77
+ version: "22.2.3",
78
+ ngImport: i0,
79
+ type: TxPasswordFooterTemplate,
80
+ deps: [],
81
+ target: i0.ɵɵFactoryTarget.Directive
82
+ });
83
+ static ɵdir = i0.ɵɵngDeclareDirective({
84
+ minVersion: "14.0.0",
85
+ version: "22.2.3",
86
+ type: TxPasswordFooterTemplate,
87
+ isStandalone: true,
88
+ selector: "ng-template[txPasswordFooter]",
89
+ ngImport: i0
90
+ });
91
+ };
92
+ i0.ɵɵngDeclareClassMetadata({
93
+ minVersion: "12.0.0",
94
+ version: "22.2.3",
95
+ ngImport: i0,
96
+ type: TxPasswordFooterTemplate,
97
+ decorators: [{
98
+ type: Directive,
99
+ args: [{ selector: "ng-template[txPasswordFooter]" }]
100
+ }]
101
+ });
102
+ const MEDIUM = "^(((?=.*[a-z])(?=.*[A-Z]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[A-Z])(?=.*[0-9])))(?=.{6,})";
103
+ const STRONG = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.{8,})";
104
+ var TxPassword = class TxPassword extends TxFormControlBase {
105
+ overlay = inject(TxOverlay);
106
+ viewContainerRef = inject(ViewContainerRef);
107
+ generatedId = uniqueId("tx-password");
108
+ panelRef = null;
109
+ feedback = input(false, {
110
+ ...ngDevMode ? { debugName: "feedback" } : /* istanbul ignore next */ {},
111
+ transform: booleanAttribute
112
+ });
113
+ toggleMask = input(false, {
114
+ ...ngDevMode ? { debugName: "toggleMask" } : /* istanbul ignore next */ {},
115
+ transform: booleanAttribute
116
+ });
117
+ showClear = input(false, {
118
+ ...ngDevMode ? { debugName: "showClear" } : /* istanbul ignore next */ {},
119
+ transform: booleanAttribute
120
+ });
121
+ placeholder = input(void 0, ...ngDevMode ? [{ debugName: "placeholder" }] : /* istanbul ignore next */ []);
122
+ promptLabel = input(void 0, ...ngDevMode ? [{ debugName: "promptLabel" }] : /* istanbul ignore next */ []);
123
+ weakLabel = input(void 0, ...ngDevMode ? [{ debugName: "weakLabel" }] : /* istanbul ignore next */ []);
124
+ mediumLabel = input(void 0, ...ngDevMode ? [{ debugName: "mediumLabel" }] : /* istanbul ignore next */ []);
125
+ strongLabel = input(void 0, ...ngDevMode ? [{ debugName: "strongLabel" }] : /* istanbul ignore next */ []);
126
+ mediumRegex = input(MEDIUM, ...ngDevMode ? [{ debugName: "mediumRegex" }] : /* istanbul ignore next */ []);
127
+ strongRegex = input(STRONG, ...ngDevMode ? [{ debugName: "strongRegex" }] : /* istanbul ignore next */ []);
128
+ autocomplete = input("current-password", ...ngDevMode ? [{ debugName: "autocomplete" }] : /* istanbul ignore next */ []);
129
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
130
+ variant = input("outlined", ...ngDevMode ? [{ debugName: "variant" }] : /* istanbul ignore next */ []);
131
+ fluid = input(void 0, {
132
+ ...ngDevMode ? { debugName: "fluid" } : /* istanbul ignore next */ {},
133
+ transform: optionalBoolean
134
+ });
135
+ invalid = input(void 0, {
136
+ ...ngDevMode ? { debugName: "invalid" } : /* istanbul ignore next */ {},
137
+ transform: optionalBoolean
138
+ });
139
+ disabledInput = input(false, {
140
+ ...ngDevMode ? { debugName: "disabledInput" } : /* istanbul ignore next */ {},
141
+ alias: "disabled",
142
+ transform: booleanAttribute
143
+ });
144
+ readonly = input(false, {
145
+ ...ngDevMode ? { debugName: "readonly" } : /* istanbul ignore next */ {},
146
+ transform: booleanAttribute
147
+ });
148
+ required = input(false, {
149
+ ...ngDevMode ? { debugName: "required" } : /* istanbul ignore next */ {},
150
+ transform: booleanAttribute
151
+ });
152
+ maxlength = input(void 0, {
153
+ ...ngDevMode ? { debugName: "maxlength" } : /* istanbul ignore next */ {},
154
+ transform: optionalNumber
155
+ });
156
+ name = input(void 0, ...ngDevMode ? [{ debugName: "name" }] : /* istanbul ignore next */ []);
157
+ inputId = input(void 0, ...ngDevMode ? [{ debugName: "inputId" }] : /* istanbul ignore next */ []);
158
+ ariaLabel = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabel" }] : /* istanbul ignore next */ []);
159
+ ariaLabelledBy = input(void 0, ...ngDevMode ? [{ debugName: "ariaLabelledBy" }] : /* istanbul ignore next */ []);
160
+ tabindex = input(void 0, {
161
+ ...ngDevMode ? { debugName: "tabindex" } : /* istanbul ignore next */ {},
162
+ transform: optionalNumber
163
+ });
164
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
165
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
166
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
167
+ unstyled = input(void 0, {
168
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
169
+ transform: optionalBoolean
170
+ });
171
+ strengthChange = output();
172
+ cleared = output();
173
+ headerTemplate = contentChild(TxPasswordHeaderTemplate, ...ngDevMode ? [{ debugName: "headerTemplate" }] : /* istanbul ignore next */ []);
174
+ contentTemplate = contentChild(TxPasswordContentTemplate, ...ngDevMode ? [{ debugName: "contentTemplate" }] : /* istanbul ignore next */ []);
175
+ footerTemplate = contentChild(TxPasswordFooterTemplate, ...ngDevMode ? [{ debugName: "footerTemplate" }] : /* istanbul ignore next */ []);
176
+ inputRef = viewChild.required("input", ...ngDevMode ? [{ debugName: "inputRef" }] : /* istanbul ignore next */ []);
177
+ panelTemplate = viewChild.required("panel", ...ngDevMode ? [{ debugName: "panelTemplate" }] : /* istanbul ignore next */ []);
178
+ translations = injectTranslations();
179
+ isUnstyled = injectUnstyled(this.unstyled);
180
+ isFluid = injectFluid(this.fluid);
181
+ isInvalid = injectFieldInvalid(this.invalid);
182
+ passThrough = injectPassThrough("password", this, this.pt, this.ptOptions);
183
+ isMasked = signal(true, ...ngDevMode ? [{ debugName: "isMasked" }] : /* istanbul ignore next */ []);
184
+ isFocused = signal(false, ...ngDevMode ? [{ debugName: "isFocused" }] : /* istanbul ignore next */ []);
185
+ resolvedId = computed(() => this.inputId() ?? this.generatedId, ...ngDevMode ? [{ debugName: "resolvedId" }] : /* istanbul ignore next */ []);
186
+ infoId = `${this.generatedId}-info`;
187
+ text = computed(() => this.value() ?? "", ...ngDevMode ? [{ debugName: "text" }] : /* istanbul ignore next */ []);
188
+ hasValue = computed(() => this.text() !== "", ...ngDevMode ? [{ debugName: "hasValue" }] : /* istanbul ignore next */ []);
189
+ isDisabled = computed(() => this.disabled() || this.disabledInput(), ...ngDevMode ? [{ debugName: "isDisabled" }] : /* istanbul ignore next */ []);
190
+ isEditable = computed(() => !this.isDisabled() && !this.readonly(), ...ngDevMode ? [{ debugName: "isEditable" }] : /* istanbul ignore next */ []);
191
+ strength = computed(() => {
192
+ const value = this.text();
193
+ if (!value) return null;
194
+ if (toRegExp(this.strongRegex()).test(value)) return "strong";
195
+ return toRegExp(this.mediumRegex()).test(value) ? "medium" : "weak";
196
+ }, ...ngDevMode ? [{ debugName: "strength" }] : /* istanbul ignore next */ []);
197
+ info = computed(() => {
198
+ const t = this.translations();
199
+ switch (this.strength()) {
200
+ case "strong": return this.strongLabel() ?? t.passwordStrong;
201
+ case "medium": return this.mediumLabel() ?? t.passwordMedium;
202
+ case "weak": return this.weakLabel() ?? t.passwordWeak;
203
+ default: return this.promptLabel() ?? t.passwordPrompt;
204
+ }
205
+ }, ...ngDevMode ? [{ debugName: "info" }] : /* istanbul ignore next */ []);
206
+ actionCount = computed(() => Number(this.toggleMask()) + Number(this.showClear() && this.hasValue() && this.isEditable()), ...ngDevMode ? [{ debugName: "actionCount" }] : /* istanbul ignore next */ []);
207
+ templateContext = computed(() => ({
208
+ $implicit: this.strength(),
209
+ value: this.text()
210
+ }), ...ngDevMode ? [{ debugName: "templateContext" }] : /* istanbul ignore next */ []);
211
+ hostStyle = computed(() => ({
212
+ ...toStyleObject(this.dt(), "--tx-password"),
213
+ "--tx-password-actions": String(this.actionCount()),
214
+ ...this.passThrough().root?.style
215
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
216
+ constructor() {
217
+ super();
218
+ let previous = null;
219
+ effect(() => {
220
+ const strength = this.strength();
221
+ if (strength !== previous) {
222
+ previous = strength;
223
+ this.strengthChange.emit(strength);
224
+ }
225
+ });
226
+ inject(DestroyRef).onDestroy(() => this.panelRef?.close());
227
+ }
228
+ focus() {
229
+ this.inputRef().nativeElement.focus();
230
+ }
231
+ onInput(event) {
232
+ this.updateValue(event.target.value);
233
+ }
234
+ onFocus() {
235
+ this.isFocused.set(true);
236
+ if (this.feedback() && this.isEditable() && !this.panelRef) {
237
+ this.panelRef = this.overlay.open(this.panelTemplate(), {
238
+ origin: this.inputRef().nativeElement,
239
+ viewContainerRef: this.viewContainerRef,
240
+ placement: "bottom-start",
241
+ matchWidth: true,
242
+ closeOnOutsideClick: false,
243
+ restoreFocus: false,
244
+ panelClass: "tx-password-overlay"
245
+ });
246
+ this.panelRef.closed.subscribe(() => this.panelRef = null);
247
+ }
248
+ }
249
+ onBlur() {
250
+ this.isFocused.set(false);
251
+ this.markTouched();
252
+ this.panelRef?.close();
253
+ }
254
+ fill(value, reveal = true) {
255
+ this.updateValue(value);
256
+ if (reveal) this.isMasked.set(false);
257
+ }
258
+ toggleVisibility() {
259
+ this.isMasked.update((masked) => !masked);
260
+ this.focus();
261
+ }
262
+ clear() {
263
+ this.updateValue("");
264
+ this.cleared.emit();
265
+ this.focus();
266
+ }
267
+ static ɵfac = i0.ɵɵngDeclareFactory({
268
+ minVersion: "12.0.0",
269
+ version: "22.2.3",
270
+ ngImport: i0,
271
+ type: TxPassword,
272
+ deps: [],
273
+ target: i0.ɵɵFactoryTarget.Component
274
+ });
275
+ static ɵcmp = i0.ɵɵngDeclareComponent({
276
+ minVersion: "17.0.0",
277
+ version: "22.2.3",
278
+ type: TxPassword,
279
+ isStandalone: true,
280
+ selector: "tx-password",
281
+ inputs: {
282
+ feedback: {
283
+ classPropertyName: "feedback",
284
+ publicName: "feedback",
285
+ isSignal: true,
286
+ isRequired: false,
287
+ transformFunction: null
288
+ },
289
+ toggleMask: {
290
+ classPropertyName: "toggleMask",
291
+ publicName: "toggleMask",
292
+ isSignal: true,
293
+ isRequired: false,
294
+ transformFunction: null
295
+ },
296
+ showClear: {
297
+ classPropertyName: "showClear",
298
+ publicName: "showClear",
299
+ isSignal: true,
300
+ isRequired: false,
301
+ transformFunction: null
302
+ },
303
+ placeholder: {
304
+ classPropertyName: "placeholder",
305
+ publicName: "placeholder",
306
+ isSignal: true,
307
+ isRequired: false,
308
+ transformFunction: null
309
+ },
310
+ promptLabel: {
311
+ classPropertyName: "promptLabel",
312
+ publicName: "promptLabel",
313
+ isSignal: true,
314
+ isRequired: false,
315
+ transformFunction: null
316
+ },
317
+ weakLabel: {
318
+ classPropertyName: "weakLabel",
319
+ publicName: "weakLabel",
320
+ isSignal: true,
321
+ isRequired: false,
322
+ transformFunction: null
323
+ },
324
+ mediumLabel: {
325
+ classPropertyName: "mediumLabel",
326
+ publicName: "mediumLabel",
327
+ isSignal: true,
328
+ isRequired: false,
329
+ transformFunction: null
330
+ },
331
+ strongLabel: {
332
+ classPropertyName: "strongLabel",
333
+ publicName: "strongLabel",
334
+ isSignal: true,
335
+ isRequired: false,
336
+ transformFunction: null
337
+ },
338
+ mediumRegex: {
339
+ classPropertyName: "mediumRegex",
340
+ publicName: "mediumRegex",
341
+ isSignal: true,
342
+ isRequired: false,
343
+ transformFunction: null
344
+ },
345
+ strongRegex: {
346
+ classPropertyName: "strongRegex",
347
+ publicName: "strongRegex",
348
+ isSignal: true,
349
+ isRequired: false,
350
+ transformFunction: null
351
+ },
352
+ autocomplete: {
353
+ classPropertyName: "autocomplete",
354
+ publicName: "autocomplete",
355
+ isSignal: true,
356
+ isRequired: false,
357
+ transformFunction: null
358
+ },
359
+ size: {
360
+ classPropertyName: "size",
361
+ publicName: "size",
362
+ isSignal: true,
363
+ isRequired: false,
364
+ transformFunction: null
365
+ },
366
+ variant: {
367
+ classPropertyName: "variant",
368
+ publicName: "variant",
369
+ isSignal: true,
370
+ isRequired: false,
371
+ transformFunction: null
372
+ },
373
+ fluid: {
374
+ classPropertyName: "fluid",
375
+ publicName: "fluid",
376
+ isSignal: true,
377
+ isRequired: false,
378
+ transformFunction: null
379
+ },
380
+ invalid: {
381
+ classPropertyName: "invalid",
382
+ publicName: "invalid",
383
+ isSignal: true,
384
+ isRequired: false,
385
+ transformFunction: null
386
+ },
387
+ disabledInput: {
388
+ classPropertyName: "disabledInput",
389
+ publicName: "disabled",
390
+ isSignal: true,
391
+ isRequired: false,
392
+ transformFunction: null
393
+ },
394
+ readonly: {
395
+ classPropertyName: "readonly",
396
+ publicName: "readonly",
397
+ isSignal: true,
398
+ isRequired: false,
399
+ transformFunction: null
400
+ },
401
+ required: {
402
+ classPropertyName: "required",
403
+ publicName: "required",
404
+ isSignal: true,
405
+ isRequired: false,
406
+ transformFunction: null
407
+ },
408
+ maxlength: {
409
+ classPropertyName: "maxlength",
410
+ publicName: "maxlength",
411
+ isSignal: true,
412
+ isRequired: false,
413
+ transformFunction: null
414
+ },
415
+ name: {
416
+ classPropertyName: "name",
417
+ publicName: "name",
418
+ isSignal: true,
419
+ isRequired: false,
420
+ transformFunction: null
421
+ },
422
+ inputId: {
423
+ classPropertyName: "inputId",
424
+ publicName: "inputId",
425
+ isSignal: true,
426
+ isRequired: false,
427
+ transformFunction: null
428
+ },
429
+ ariaLabel: {
430
+ classPropertyName: "ariaLabel",
431
+ publicName: "ariaLabel",
432
+ isSignal: true,
433
+ isRequired: false,
434
+ transformFunction: null
435
+ },
436
+ ariaLabelledBy: {
437
+ classPropertyName: "ariaLabelledBy",
438
+ publicName: "ariaLabelledBy",
439
+ isSignal: true,
440
+ isRequired: false,
441
+ transformFunction: null
442
+ },
443
+ tabindex: {
444
+ classPropertyName: "tabindex",
445
+ publicName: "tabindex",
446
+ isSignal: true,
447
+ isRequired: false,
448
+ transformFunction: null
449
+ },
450
+ dt: {
451
+ classPropertyName: "dt",
452
+ publicName: "dt",
453
+ isSignal: true,
454
+ isRequired: false,
455
+ transformFunction: null
456
+ },
457
+ pt: {
458
+ classPropertyName: "pt",
459
+ publicName: "pt",
460
+ isSignal: true,
461
+ isRequired: false,
462
+ transformFunction: null
463
+ },
464
+ ptOptions: {
465
+ classPropertyName: "ptOptions",
466
+ publicName: "ptOptions",
467
+ isSignal: true,
468
+ isRequired: false,
469
+ transformFunction: null
470
+ },
471
+ unstyled: {
472
+ classPropertyName: "unstyled",
473
+ publicName: "unstyled",
474
+ isSignal: true,
475
+ isRequired: false,
476
+ transformFunction: null
477
+ }
478
+ },
479
+ outputs: {
480
+ strengthChange: "strengthChange",
481
+ cleared: "cleared"
482
+ },
483
+ host: {
484
+ properties: {
485
+ "class": "passThrough().root?.class",
486
+ "style": "hostStyle()",
487
+ "attr.data-styled": "!isUnstyled() || null",
488
+ "class.tx-password--fluid": "isFluid()",
489
+ "class.tx-password--filled": "hasValue()",
490
+ "class.tx-password--invalid": "isInvalid()",
491
+ "class.tx-password--disabled": "isDisabled()"
492
+ },
493
+ classAttribute: "tx-password"
494
+ },
495
+ providers: [{
496
+ provide: NG_VALUE_ACCESSOR,
497
+ useExisting: forwardRef(() => TxPassword),
498
+ multi: true
499
+ }],
500
+ queries: [
501
+ {
502
+ propertyName: "headerTemplate",
503
+ first: true,
504
+ predicate: TxPasswordHeaderTemplate,
505
+ descendants: true,
506
+ isSignal: true
507
+ },
508
+ {
509
+ propertyName: "contentTemplate",
510
+ first: true,
511
+ predicate: TxPasswordContentTemplate,
512
+ descendants: true,
513
+ isSignal: true
514
+ },
515
+ {
516
+ propertyName: "footerTemplate",
517
+ first: true,
518
+ predicate: TxPasswordFooterTemplate,
519
+ descendants: true,
520
+ isSignal: true
521
+ }
522
+ ],
523
+ viewQueries: [{
524
+ propertyName: "inputRef",
525
+ first: true,
526
+ predicate: ["input"],
527
+ descendants: true,
528
+ isSignal: true
529
+ }, {
530
+ propertyName: "panelTemplate",
531
+ first: true,
532
+ predicate: ["panel"],
533
+ descendants: true,
534
+ isSignal: true
535
+ }],
536
+ usesInheritance: true,
537
+ ngImport: i0,
538
+ template: "<input\n #input\n txInput\n class=\"tx-password__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [type]=\"isMasked() ? 'password' : 'text'\"\n [value]=\"text()\"\n [id]=\"resolvedId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"feedback() && isFocused() ? infoId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n<span class=\"tx-password__actions\">\n @if (showClear() && hasValue() && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n [title]=\"translations().clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n @if (toggleMask()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-label]=\"translations().showPassword\"\n [attr.aria-pressed]=\"!isMasked()\"\n [attr.aria-controls]=\"resolvedId()\"\n [title]=\"isMasked() ? translations().showPassword : translations().hidePassword\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleVisibility()\"\n >\n <tx-icon [name]=\"isMasked() ? 'eye' : 'eye-slash'\" />\n </button>\n }\n</span>\n\n<ng-template #panel>\n <div class=\"tx-password__panel\" [attr.data-styled]=\"!isUnstyled() || null\" [style]=\"hostStyle()\" [class]=\"passThrough().panel?.class\">\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n <div class=\"tx-password__meter\" [attr.data-strength]=\"strength()\" [class]=\"passThrough().meter?.class\" [style]=\"passThrough().meter?.style\">\n <span class=\"tx-password__meter-bar\"></span>\n </div>\n <div class=\"tx-password__info\" aria-live=\"polite\" [id]=\"infoId\" [class]=\"passThrough().info?.class\" [style]=\"passThrough().info?.style\">\n {{ info() }}\n </div>\n @if (contentTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n </div>\n</ng-template>\n",
539
+ styles: [":host{position:relative;display:inline-flex;vertical-align:top}:host(.tx-password--fluid){display:flex;width:100%}.tx-password__input{flex:1 1 auto;min-width:0;--tx-field-inset-end: calc(var(--tx-password-actions) * (24px + var(--tx-password-action-gap)))}.tx-password__input::-ms-reveal{display:none}.tx-password__actions{position:absolute;top:50%;right:var(--tx-password-action-inset);display:flex;gap:var(--tx-password-action-gap);transform:translateY(-50%)}.tx-password__action{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}.tx-password__action:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-password__action:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-password__action:disabled{cursor:not-allowed;opacity:.6}.tx-password__panel{width:100%}.tx-password__panel[data-styled]{display:grid;gap:var(--tx-password-panel-gap);box-sizing:border-box;padding:var(--tx-password-panel-padding);border:1px solid var(--tx-password-panel-border-color);border-radius:var(--tx-password-panel-border-radius);background:var(--tx-password-panel-background);box-shadow:var(--tx-password-panel-shadow);color:var(--tx-password-panel-color);font-family:var(--tx-font-family);font-size:var(--tx-password-panel-font-size)}.tx-password__panel[data-styled] .tx-password__meter{height:var(--tx-password-meter-height);overflow:hidden;border-radius:var(--tx-password-meter-border-radius);background:var(--tx-password-meter-background)}.tx-password__panel[data-styled] .tx-password__meter-bar{display:block;width:0;height:100%;border-radius:inherit;transition:width var(--tx-password-meter-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-password-meter-transition-duration)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=weak] .tx-password__meter-bar{width:33.33%;background:var(--tx-password-meter-weak-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=medium] .tx-password__meter-bar{width:66.66%;background:var(--tx-password-meter-medium-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=strong] .tx-password__meter-bar{width:100%;background:var(--tx-password-meter-strong-background)}@media(prefers-reduced-motion:reduce){.tx-password__panel[data-styled] .tx-password__meter-bar{transition:none}}\n"],
540
+ dependencies: [
541
+ {
542
+ kind: "directive",
543
+ type: TxInput,
544
+ selector: "input[txInput], textarea[txInput]",
545
+ inputs: [
546
+ "invalid",
547
+ "size",
548
+ "variant",
549
+ "fluid",
550
+ "dt",
551
+ "pt",
552
+ "ptOptions",
553
+ "unstyled"
554
+ ]
555
+ },
556
+ {
557
+ kind: "component",
558
+ type: TxIcon,
559
+ selector: "tx-icon",
560
+ inputs: ["name"]
561
+ },
562
+ {
563
+ kind: "directive",
564
+ type: NgTemplateOutlet,
565
+ selector: "[ngTemplateOutlet]",
566
+ inputs: [
567
+ "ngTemplateOutletContext",
568
+ "ngTemplateOutlet",
569
+ "ngTemplateOutletInjector"
570
+ ]
571
+ }
572
+ ],
573
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
574
+ });
575
+ };
576
+ i0.ɵɵngDeclareClassMetadata({
577
+ minVersion: "12.0.0",
578
+ version: "22.2.3",
579
+ ngImport: i0,
580
+ type: TxPassword,
581
+ decorators: [{
582
+ type: Component,
583
+ args: [{
584
+ selector: "tx-password",
585
+ imports: [
586
+ TxInput,
587
+ TxIcon,
588
+ NgTemplateOutlet
589
+ ],
590
+ changeDetection: ChangeDetectionStrategy.OnPush,
591
+ providers: [{
592
+ provide: NG_VALUE_ACCESSOR,
593
+ useExisting: forwardRef(() => TxPassword),
594
+ multi: true
595
+ }],
596
+ host: {
597
+ class: "tx-password",
598
+ "[class]": "passThrough().root?.class",
599
+ "[style]": "hostStyle()",
600
+ "[attr.data-styled]": "!isUnstyled() || null",
601
+ "[class.tx-password--fluid]": "isFluid()",
602
+ "[class.tx-password--filled]": "hasValue()",
603
+ "[class.tx-password--invalid]": "isInvalid()",
604
+ "[class.tx-password--disabled]": "isDisabled()"
605
+ },
606
+ template: "<input\n #input\n txInput\n class=\"tx-password__input\"\n [class]=\"passThrough().input?.class\"\n [style]=\"passThrough().input?.style\"\n [type]=\"isMasked() ? 'password' : 'text'\"\n [value]=\"text()\"\n [id]=\"resolvedId()\"\n [size]=\"size()\"\n [variant]=\"variant()\"\n [fluid]=\"true\"\n [invalid]=\"isInvalid()\"\n [unstyled]=\"isUnstyled()\"\n [disabled]=\"isDisabled()\"\n [readOnly]=\"readonly()\"\n [required]=\"required()\"\n [attr.placeholder]=\"placeholder() ?? null\"\n [attr.maxlength]=\"maxlength() ?? null\"\n [attr.name]=\"name() ?? null\"\n [attr.autocomplete]=\"autocomplete()\"\n [attr.tabindex]=\"tabindex() ?? null\"\n [attr.aria-label]=\"ariaLabel() ?? null\"\n [attr.aria-labelledby]=\"ariaLabelledBy() ?? null\"\n [attr.aria-describedby]=\"feedback() && isFocused() ? infoId : null\"\n (input)=\"onInput($event)\"\n (focus)=\"onFocus()\"\n (blur)=\"onBlur()\"\n/>\n<span class=\"tx-password__actions\">\n @if (showClear() && hasValue() && isEditable()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__clear\"\n [class]=\"passThrough().clear?.class\"\n [style]=\"passThrough().clear?.style\"\n [attr.aria-label]=\"translations().clear\"\n [title]=\"translations().clear\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"clear()\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n @if (toggleMask()) {\n <button\n type=\"button\"\n class=\"tx-password__action tx-password__toggle\"\n [class]=\"passThrough().toggle?.class\"\n [style]=\"passThrough().toggle?.style\"\n [attr.aria-label]=\"translations().showPassword\"\n [attr.aria-pressed]=\"!isMasked()\"\n [attr.aria-controls]=\"resolvedId()\"\n [title]=\"isMasked() ? translations().showPassword : translations().hidePassword\"\n [disabled]=\"isDisabled()\"\n (mousedown)=\"$event.preventDefault()\"\n (click)=\"toggleVisibility()\"\n >\n <tx-icon [name]=\"isMasked() ? 'eye' : 'eye-slash'\" />\n </button>\n }\n</span>\n\n<ng-template #panel>\n <div class=\"tx-password__panel\" [attr.data-styled]=\"!isUnstyled() || null\" [style]=\"hostStyle()\" [class]=\"passThrough().panel?.class\">\n @if (headerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n <div class=\"tx-password__meter\" [attr.data-strength]=\"strength()\" [class]=\"passThrough().meter?.class\" [style]=\"passThrough().meter?.style\">\n <span class=\"tx-password__meter-bar\"></span>\n </div>\n <div class=\"tx-password__info\" aria-live=\"polite\" [id]=\"infoId\" [class]=\"passThrough().info?.class\" [style]=\"passThrough().info?.style\">\n {{ info() }}\n </div>\n @if (contentTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n @if (footerTemplate(); as template) {\n <ng-container [ngTemplateOutlet]=\"template.templateRef\" [ngTemplateOutletContext]=\"templateContext()\" />\n }\n </div>\n</ng-template>\n",
607
+ styles: [":host{position:relative;display:inline-flex;vertical-align:top}:host(.tx-password--fluid){display:flex;width:100%}.tx-password__input{flex:1 1 auto;min-width:0;--tx-field-inset-end: calc(var(--tx-password-actions) * (24px + var(--tx-password-action-gap)))}.tx-password__input::-ms-reveal{display:none}.tx-password__actions{position:absolute;top:50%;right:var(--tx-password-action-inset);display:flex;gap:var(--tx-password-action-gap);transform:translateY(-50%)}.tx-password__action{display:grid;place-items:center;width:24px;height:24px;padding:0;border:none;border-radius:var(--tx-radius-sm);background:transparent;color:var(--tx-form-field-icon-color);font-size:var(--tx-form-field-font-size);cursor:pointer;pointer-events:auto;transition:background-color var(--tx-form-field-transition-duration),color var(--tx-form-field-transition-duration)}.tx-password__action:hover{background:var(--tx-surface-hover);color:var(--tx-form-field-color)}.tx-password__action:focus-visible{outline:2px solid var(--tx-focus-ring-color);outline-offset:1px}.tx-password__action:disabled{cursor:not-allowed;opacity:.6}.tx-password__panel{width:100%}.tx-password__panel[data-styled]{display:grid;gap:var(--tx-password-panel-gap);box-sizing:border-box;padding:var(--tx-password-panel-padding);border:1px solid var(--tx-password-panel-border-color);border-radius:var(--tx-password-panel-border-radius);background:var(--tx-password-panel-background);box-shadow:var(--tx-password-panel-shadow);color:var(--tx-password-panel-color);font-family:var(--tx-font-family);font-size:var(--tx-password-panel-font-size)}.tx-password__panel[data-styled] .tx-password__meter{height:var(--tx-password-meter-height);overflow:hidden;border-radius:var(--tx-password-meter-border-radius);background:var(--tx-password-meter-background)}.tx-password__panel[data-styled] .tx-password__meter-bar{display:block;width:0;height:100%;border-radius:inherit;transition:width var(--tx-password-meter-transition-duration) cubic-bezier(.2,0,0,1),background-color var(--tx-password-meter-transition-duration)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=weak] .tx-password__meter-bar{width:33.33%;background:var(--tx-password-meter-weak-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=medium] .tx-password__meter-bar{width:66.66%;background:var(--tx-password-meter-medium-background)}.tx-password__panel[data-styled] .tx-password__meter[data-strength=strong] .tx-password__meter-bar{width:100%;background:var(--tx-password-meter-strong-background)}@media(prefers-reduced-motion:reduce){.tx-password__panel[data-styled] .tx-password__meter-bar{transition:none}}\n"]
608
+ }]
609
+ }],
610
+ ctorParameters: () => [],
611
+ propDecorators: {
612
+ feedback: [{
613
+ type: i0.Input,
614
+ args: [{
615
+ isSignal: true,
616
+ alias: "feedback",
617
+ required: false
618
+ }]
619
+ }],
620
+ toggleMask: [{
621
+ type: i0.Input,
622
+ args: [{
623
+ isSignal: true,
624
+ alias: "toggleMask",
625
+ required: false
626
+ }]
627
+ }],
628
+ showClear: [{
629
+ type: i0.Input,
630
+ args: [{
631
+ isSignal: true,
632
+ alias: "showClear",
633
+ required: false
634
+ }]
635
+ }],
636
+ placeholder: [{
637
+ type: i0.Input,
638
+ args: [{
639
+ isSignal: true,
640
+ alias: "placeholder",
641
+ required: false
642
+ }]
643
+ }],
644
+ promptLabel: [{
645
+ type: i0.Input,
646
+ args: [{
647
+ isSignal: true,
648
+ alias: "promptLabel",
649
+ required: false
650
+ }]
651
+ }],
652
+ weakLabel: [{
653
+ type: i0.Input,
654
+ args: [{
655
+ isSignal: true,
656
+ alias: "weakLabel",
657
+ required: false
658
+ }]
659
+ }],
660
+ mediumLabel: [{
661
+ type: i0.Input,
662
+ args: [{
663
+ isSignal: true,
664
+ alias: "mediumLabel",
665
+ required: false
666
+ }]
667
+ }],
668
+ strongLabel: [{
669
+ type: i0.Input,
670
+ args: [{
671
+ isSignal: true,
672
+ alias: "strongLabel",
673
+ required: false
674
+ }]
675
+ }],
676
+ mediumRegex: [{
677
+ type: i0.Input,
678
+ args: [{
679
+ isSignal: true,
680
+ alias: "mediumRegex",
681
+ required: false
682
+ }]
683
+ }],
684
+ strongRegex: [{
685
+ type: i0.Input,
686
+ args: [{
687
+ isSignal: true,
688
+ alias: "strongRegex",
689
+ required: false
690
+ }]
691
+ }],
692
+ autocomplete: [{
693
+ type: i0.Input,
694
+ args: [{
695
+ isSignal: true,
696
+ alias: "autocomplete",
697
+ required: false
698
+ }]
699
+ }],
700
+ size: [{
701
+ type: i0.Input,
702
+ args: [{
703
+ isSignal: true,
704
+ alias: "size",
705
+ required: false
706
+ }]
707
+ }],
708
+ variant: [{
709
+ type: i0.Input,
710
+ args: [{
711
+ isSignal: true,
712
+ alias: "variant",
713
+ required: false
714
+ }]
715
+ }],
716
+ fluid: [{
717
+ type: i0.Input,
718
+ args: [{
719
+ isSignal: true,
720
+ alias: "fluid",
721
+ required: false
722
+ }]
723
+ }],
724
+ invalid: [{
725
+ type: i0.Input,
726
+ args: [{
727
+ isSignal: true,
728
+ alias: "invalid",
729
+ required: false
730
+ }]
731
+ }],
732
+ disabledInput: [{
733
+ type: i0.Input,
734
+ args: [{
735
+ isSignal: true,
736
+ alias: "disabled",
737
+ required: false
738
+ }]
739
+ }],
740
+ readonly: [{
741
+ type: i0.Input,
742
+ args: [{
743
+ isSignal: true,
744
+ alias: "readonly",
745
+ required: false
746
+ }]
747
+ }],
748
+ required: [{
749
+ type: i0.Input,
750
+ args: [{
751
+ isSignal: true,
752
+ alias: "required",
753
+ required: false
754
+ }]
755
+ }],
756
+ maxlength: [{
757
+ type: i0.Input,
758
+ args: [{
759
+ isSignal: true,
760
+ alias: "maxlength",
761
+ required: false
762
+ }]
763
+ }],
764
+ name: [{
765
+ type: i0.Input,
766
+ args: [{
767
+ isSignal: true,
768
+ alias: "name",
769
+ required: false
770
+ }]
771
+ }],
772
+ inputId: [{
773
+ type: i0.Input,
774
+ args: [{
775
+ isSignal: true,
776
+ alias: "inputId",
777
+ required: false
778
+ }]
779
+ }],
780
+ ariaLabel: [{
781
+ type: i0.Input,
782
+ args: [{
783
+ isSignal: true,
784
+ alias: "ariaLabel",
785
+ required: false
786
+ }]
787
+ }],
788
+ ariaLabelledBy: [{
789
+ type: i0.Input,
790
+ args: [{
791
+ isSignal: true,
792
+ alias: "ariaLabelledBy",
793
+ required: false
794
+ }]
795
+ }],
796
+ tabindex: [{
797
+ type: i0.Input,
798
+ args: [{
799
+ isSignal: true,
800
+ alias: "tabindex",
801
+ required: false
802
+ }]
803
+ }],
804
+ dt: [{
805
+ type: i0.Input,
806
+ args: [{
807
+ isSignal: true,
808
+ alias: "dt",
809
+ required: false
810
+ }]
811
+ }],
812
+ pt: [{
813
+ type: i0.Input,
814
+ args: [{
815
+ isSignal: true,
816
+ alias: "pt",
817
+ required: false
818
+ }]
819
+ }],
820
+ ptOptions: [{
821
+ type: i0.Input,
822
+ args: [{
823
+ isSignal: true,
824
+ alias: "ptOptions",
825
+ required: false
826
+ }]
827
+ }],
828
+ unstyled: [{
829
+ type: i0.Input,
830
+ args: [{
831
+ isSignal: true,
832
+ alias: "unstyled",
833
+ required: false
834
+ }]
835
+ }],
836
+ strengthChange: [{
837
+ type: i0.Output,
838
+ args: ["strengthChange"]
839
+ }],
840
+ cleared: [{
841
+ type: i0.Output,
842
+ args: ["cleared"]
843
+ }],
844
+ headerTemplate: [{
845
+ type: i0.ContentChild,
846
+ args: [i0.forwardRef(() => TxPasswordHeaderTemplate), { isSignal: true }]
847
+ }],
848
+ contentTemplate: [{
849
+ type: i0.ContentChild,
850
+ args: [i0.forwardRef(() => TxPasswordContentTemplate), { isSignal: true }]
851
+ }],
852
+ footerTemplate: [{
853
+ type: i0.ContentChild,
854
+ args: [i0.forwardRef(() => TxPasswordFooterTemplate), { isSignal: true }]
855
+ }],
856
+ inputRef: [{
857
+ type: i0.ViewChild,
858
+ args: ["input", { isSignal: true }]
859
+ }],
860
+ panelTemplate: [{
861
+ type: i0.ViewChild,
862
+ args: ["panel", { isSignal: true }]
863
+ }]
864
+ }
865
+ });
866
+ function toRegExp(pattern) {
867
+ return typeof pattern === "string" ? new RegExp(pattern) : pattern;
868
+ }
869
+ export { TxPassword, TxPasswordContentTemplate, TxPasswordFooterTemplate, TxPasswordHeaderTemplate };
870
+
871
+ //# sourceMappingURL=tectra-ng-ui-password.mjs.map