@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,422 @@
1
+ import * as i0 from "@angular/core";
2
+ import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, booleanAttribute, computed, inject, input, output, signal, viewChild } from "@angular/core";
3
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
4
+ import { injectTranslations } from "@tectra-ng/core/i18n";
5
+ import { optionalBoolean } from "@tectra-ng/core/utils";
6
+ import { TxIcon, TxIconRegistry } from "@tectra-ng/icons";
7
+ import { toStyleObject } from "@tectra-ng/themes";
8
+ const COPIED_FOR = 1500;
9
+ var TxTag = class TxTag {
10
+ txIconRegistry = inject(TxIconRegistry);
11
+ document = inject(DOCUMENT);
12
+ timer = null;
13
+ value = input(void 0, ...ngDevMode ? [{ debugName: "value" }] : /* istanbul ignore next */ []);
14
+ severity = input("primary", ...ngDevMode ? [{ debugName: "severity" }] : /* istanbul ignore next */ []);
15
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
16
+ rounded = input(false, {
17
+ ...ngDevMode ? { debugName: "rounded" } : /* istanbul ignore next */ {},
18
+ transform: booleanAttribute
19
+ });
20
+ icon = input(void 0, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
21
+ copyable = input(false, {
22
+ ...ngDevMode ? { debugName: "copyable" } : /* istanbul ignore next */ {},
23
+ transform: booleanAttribute
24
+ });
25
+ removable = input(false, {
26
+ ...ngDevMode ? { debugName: "removable" } : /* istanbul ignore next */ {},
27
+ transform: booleanAttribute
28
+ });
29
+ removeLabel = input(void 0, ...ngDevMode ? [{ debugName: "removeLabel" }] : /* istanbul ignore next */ []);
30
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
31
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
32
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
33
+ unstyled = input(void 0, {
34
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
35
+ transform: optionalBoolean
36
+ });
37
+ copied = output();
38
+ removed = output();
39
+ label = viewChild.required("label", ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
40
+ translations = injectTranslations();
41
+ isUnstyled = injectUnstyled(this.unstyled);
42
+ passThrough = injectPassThrough("tag", this, this.pt, this.ptOptions);
43
+ isCopied = signal(false, ...ngDevMode ? [{ debugName: "isCopied" }] : /* istanbul ignore next */ []);
44
+ resolvedSize = computed(() => this.size() === "normal" ? "medium" : this.size(), ...ngDevMode ? [{ debugName: "resolvedSize" }] : /* istanbul ignore next */ []);
45
+ iconName = computed(() => {
46
+ const icon = this.icon();
47
+ return icon && this.txIconRegistry.has(icon) ? icon : null;
48
+ }, ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
49
+ hostStyle = computed(() => ({
50
+ ...toStyleObject(this.dt(), "--tx-tag"),
51
+ ...this.passThrough().root?.style
52
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
53
+ constructor() {
54
+ inject(DestroyRef).onDestroy(() => this.timer && clearTimeout(this.timer));
55
+ }
56
+ copy() {
57
+ const text = (this.label().nativeElement.textContent ?? "").trim();
58
+ this.document.defaultView?.navigator.clipboard?.writeText(text);
59
+ this.copied.emit(text);
60
+ this.isCopied.set(true);
61
+ if (this.timer) clearTimeout(this.timer);
62
+ this.timer = setTimeout(() => this.isCopied.set(false), COPIED_FOR);
63
+ }
64
+ remove(event) {
65
+ event.preventDefault();
66
+ event.stopPropagation();
67
+ this.removed.emit(event);
68
+ }
69
+ static ɵfac = i0.ɵɵngDeclareFactory({
70
+ minVersion: "12.0.0",
71
+ version: "22.2.3",
72
+ ngImport: i0,
73
+ type: TxTag,
74
+ deps: [],
75
+ target: i0.ɵɵFactoryTarget.Component
76
+ });
77
+ static ɵcmp = i0.ɵɵngDeclareComponent({
78
+ minVersion: "17.0.0",
79
+ version: "22.2.3",
80
+ type: TxTag,
81
+ isStandalone: true,
82
+ selector: "tx-tag",
83
+ inputs: {
84
+ value: {
85
+ classPropertyName: "value",
86
+ publicName: "value",
87
+ isSignal: true,
88
+ isRequired: false,
89
+ transformFunction: null
90
+ },
91
+ severity: {
92
+ classPropertyName: "severity",
93
+ publicName: "severity",
94
+ isSignal: true,
95
+ isRequired: false,
96
+ transformFunction: null
97
+ },
98
+ size: {
99
+ classPropertyName: "size",
100
+ publicName: "size",
101
+ isSignal: true,
102
+ isRequired: false,
103
+ transformFunction: null
104
+ },
105
+ rounded: {
106
+ classPropertyName: "rounded",
107
+ publicName: "rounded",
108
+ isSignal: true,
109
+ isRequired: false,
110
+ transformFunction: null
111
+ },
112
+ icon: {
113
+ classPropertyName: "icon",
114
+ publicName: "icon",
115
+ isSignal: true,
116
+ isRequired: false,
117
+ transformFunction: null
118
+ },
119
+ copyable: {
120
+ classPropertyName: "copyable",
121
+ publicName: "copyable",
122
+ isSignal: true,
123
+ isRequired: false,
124
+ transformFunction: null
125
+ },
126
+ removable: {
127
+ classPropertyName: "removable",
128
+ publicName: "removable",
129
+ isSignal: true,
130
+ isRequired: false,
131
+ transformFunction: null
132
+ },
133
+ removeLabel: {
134
+ classPropertyName: "removeLabel",
135
+ publicName: "removeLabel",
136
+ isSignal: true,
137
+ isRequired: false,
138
+ transformFunction: null
139
+ },
140
+ dt: {
141
+ classPropertyName: "dt",
142
+ publicName: "dt",
143
+ isSignal: true,
144
+ isRequired: false,
145
+ transformFunction: null
146
+ },
147
+ pt: {
148
+ classPropertyName: "pt",
149
+ publicName: "pt",
150
+ isSignal: true,
151
+ isRequired: false,
152
+ transformFunction: null
153
+ },
154
+ ptOptions: {
155
+ classPropertyName: "ptOptions",
156
+ publicName: "ptOptions",
157
+ isSignal: true,
158
+ isRequired: false,
159
+ transformFunction: null
160
+ },
161
+ unstyled: {
162
+ classPropertyName: "unstyled",
163
+ publicName: "unstyled",
164
+ isSignal: true,
165
+ isRequired: false,
166
+ transformFunction: null
167
+ }
168
+ },
169
+ outputs: {
170
+ copied: "copied",
171
+ removed: "removed"
172
+ },
173
+ host: {
174
+ properties: {
175
+ "class": "passThrough().root?.class",
176
+ "style": "hostStyle()",
177
+ "attr.data-styled": "!isUnstyled() || null",
178
+ "attr.data-severity": "severity()",
179
+ "attr.data-size": "resolvedSize()",
180
+ "class.tx-tag--rounded": "rounded()"
181
+ },
182
+ classAttribute: "tx-tag"
183
+ },
184
+ viewQueries: [{
185
+ propertyName: "label",
186
+ first: true,
187
+ predicate: ["label"],
188
+ descendants: true,
189
+ isSignal: true
190
+ }],
191
+ ngImport: i0,
192
+ template: `
193
+ @if (icon(); as icon) {
194
+ <span class="tx-tag__icon" aria-hidden="true" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style">
195
+ @if (iconName(); as name) {
196
+ <tx-icon [name]="name" />
197
+ } @else {
198
+ <span [class]="icon"></span>
199
+ }
200
+ </span>
201
+ }
202
+ <span #label class="tx-tag__label" [class]="passThrough().label?.class" [style]="passThrough().label?.style">{{ value() }}<ng-content /></span>
203
+ @if (copyable()) {
204
+ <button
205
+ type="button"
206
+ class="tx-tag__action tx-tag__copy"
207
+ [class.tx-tag__copy--done]="isCopied()"
208
+ [class]="passThrough().copy?.class"
209
+ [style]="passThrough().copy?.style"
210
+ [attr.aria-label]="isCopied() ? translations().copied : translations().copy"
211
+ [title]="isCopied() ? translations().copied : translations().copy"
212
+ (click)="copy()"
213
+ >
214
+ <tx-icon [name]="isCopied() ? 'check' : 'copy'" />
215
+ </button>
216
+ }
217
+ @if (removable()) {
218
+ <button
219
+ type="button"
220
+ class="tx-tag__action tx-tag__remove"
221
+ [class]="passThrough().remove?.class"
222
+ [style]="passThrough().remove?.style"
223
+ [attr.aria-label]="removeLabel() ?? translations().remove"
224
+ [title]="removeLabel() ?? translations().remove"
225
+ (click)="remove($event)"
226
+ (keydown.delete)="remove($event)"
227
+ (keydown.backspace)="remove($event)"
228
+ >
229
+ <tx-icon [name]="'times'" />
230
+ </button>
231
+ }
232
+ `,
233
+ isInline: true,
234
+ styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-tag__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-tag__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-tag-primary-color);flex-shrink:0;gap:var(--tx-tag-gap);box-sizing:border-box;padding:var(--tx-tag-padding-y) var(--tx-tag-padding-x);border-radius:var(--tx-tag-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-tag-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-tag-font-size);font-weight:var(--tx-tag-font-weight);line-height:var(--tx-tag-line-height)}:host([data-styled][data-severity=secondary]){--_tone: var(--tx-tag-secondary-color)}:host([data-styled][data-severity=success]){--_tone: var(--tx-tag-success-color)}:host([data-styled][data-severity=info]){--_tone: var(--tx-tag-info-color)}:host([data-styled][data-severity=warn]){--_tone: var(--tx-tag-warn-color)}:host([data-styled][data-severity=danger]){--_tone: var(--tx-tag-danger-color)}:host([data-styled][data-severity=help]){--_tone: var(--tx-tag-help-color)}:host([data-styled][data-severity=contrast]){--_tone: var(--tx-tag-contrast-color)}:host([data-styled][data-size=small]){padding:var(--tx-tag-sm-padding-y) var(--tx-tag-sm-padding-x);font-size:var(--tx-tag-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-tag-lg-padding-y) var(--tx-tag-lg-padding-x);font-size:var(--tx-tag-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-tag-lg-gap)}:host([data-styled].tx-tag--rounded){border-radius:var(--tx-tag-rounded-border-radius)}:host([data-styled]) .tx-tag__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-tag-icon-size)}:host([data-styled]) .tx-tag__action{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-tag-action-size);height:var(--tx-tag-action-size);margin-inline-end:-3px;padding:0;border:none;border-radius:var(--tx-radius-xs);background:transparent;color:inherit;font-size:.85em;opacity:.75;cursor:pointer;transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),opacity var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-tag__action:hover{background:color-mix(in srgb,currentColor 16%,transparent);opacity:1}:host([data-styled]) .tx-tag__action:focus-visible{outline:2px solid var(--tx-tag-focus-ring-color);outline-offset:1px;opacity:1}:host([data-styled]) .tx-tag__action+.tx-tag__action{margin-inline-start:-2px}:host([data-styled]) .tx-tag__copy--done{opacity:1}\n"],
235
+ dependencies: [{
236
+ kind: "component",
237
+ type: TxIcon,
238
+ selector: "tx-icon",
239
+ inputs: ["name"]
240
+ }],
241
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
242
+ });
243
+ };
244
+ i0.ɵɵngDeclareClassMetadata({
245
+ minVersion: "12.0.0",
246
+ version: "22.2.3",
247
+ ngImport: i0,
248
+ type: TxTag,
249
+ decorators: [{
250
+ type: Component,
251
+ args: [{
252
+ selector: "tx-tag",
253
+ imports: [TxIcon],
254
+ template: `
255
+ @if (icon(); as icon) {
256
+ <span class="tx-tag__icon" aria-hidden="true" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style">
257
+ @if (iconName(); as name) {
258
+ <tx-icon [name]="name" />
259
+ } @else {
260
+ <span [class]="icon"></span>
261
+ }
262
+ </span>
263
+ }
264
+ <span #label class="tx-tag__label" [class]="passThrough().label?.class" [style]="passThrough().label?.style">{{ value() }}<ng-content /></span>
265
+ @if (copyable()) {
266
+ <button
267
+ type="button"
268
+ class="tx-tag__action tx-tag__copy"
269
+ [class.tx-tag__copy--done]="isCopied()"
270
+ [class]="passThrough().copy?.class"
271
+ [style]="passThrough().copy?.style"
272
+ [attr.aria-label]="isCopied() ? translations().copied : translations().copy"
273
+ [title]="isCopied() ? translations().copied : translations().copy"
274
+ (click)="copy()"
275
+ >
276
+ <tx-icon [name]="isCopied() ? 'check' : 'copy'" />
277
+ </button>
278
+ }
279
+ @if (removable()) {
280
+ <button
281
+ type="button"
282
+ class="tx-tag__action tx-tag__remove"
283
+ [class]="passThrough().remove?.class"
284
+ [style]="passThrough().remove?.style"
285
+ [attr.aria-label]="removeLabel() ?? translations().remove"
286
+ [title]="removeLabel() ?? translations().remove"
287
+ (click)="remove($event)"
288
+ (keydown.delete)="remove($event)"
289
+ (keydown.backspace)="remove($event)"
290
+ >
291
+ <tx-icon [name]="'times'" />
292
+ </button>
293
+ }
294
+ `,
295
+ changeDetection: ChangeDetectionStrategy.OnPush,
296
+ host: {
297
+ class: "tx-tag",
298
+ "[class]": "passThrough().root?.class",
299
+ "[style]": "hostStyle()",
300
+ "[attr.data-styled]": "!isUnstyled() || null",
301
+ "[attr.data-severity]": "severity()",
302
+ "[attr.data-size]": "resolvedSize()",
303
+ "[class.tx-tag--rounded]": "rounded()"
304
+ },
305
+ styles: [":host{display:inline-flex;align-items:center;max-width:100%;vertical-align:middle;white-space:nowrap}.tx-tag__label{min-width:0;overflow:hidden;text-overflow:ellipsis}.tx-tag__label:empty{display:none}:host([data-styled]){--_tone: var(--tx-tag-primary-color);flex-shrink:0;gap:var(--tx-tag-gap);box-sizing:border-box;padding:var(--tx-tag-padding-y) var(--tx-tag-padding-x);border-radius:var(--tx-tag-border-radius);background:color-mix(in srgb,var(--_tone) var(--tx-tag-tint),transparent);color:var(--_tone);font-family:var(--tx-font-family);font-size:var(--tx-tag-font-size);font-weight:var(--tx-tag-font-weight);line-height:var(--tx-tag-line-height)}:host([data-styled][data-severity=secondary]){--_tone: var(--tx-tag-secondary-color)}:host([data-styled][data-severity=success]){--_tone: var(--tx-tag-success-color)}:host([data-styled][data-severity=info]){--_tone: var(--tx-tag-info-color)}:host([data-styled][data-severity=warn]){--_tone: var(--tx-tag-warn-color)}:host([data-styled][data-severity=danger]){--_tone: var(--tx-tag-danger-color)}:host([data-styled][data-severity=help]){--_tone: var(--tx-tag-help-color)}:host([data-styled][data-severity=contrast]){--_tone: var(--tx-tag-contrast-color)}:host([data-styled][data-size=small]){padding:var(--tx-tag-sm-padding-y) var(--tx-tag-sm-padding-x);font-size:var(--tx-tag-sm-font-size)}:host([data-styled][data-size=large]){padding:var(--tx-tag-lg-padding-y) var(--tx-tag-lg-padding-x);font-size:var(--tx-tag-lg-font-size)}:host([data-styled][data-size=large]){gap:var(--tx-tag-lg-gap)}:host([data-styled].tx-tag--rounded){border-radius:var(--tx-tag-rounded-border-radius)}:host([data-styled]) .tx-tag__icon{display:inline-flex;flex-shrink:0;font-size:var(--tx-tag-icon-size)}:host([data-styled]) .tx-tag__action{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;width:var(--tx-tag-action-size);height:var(--tx-tag-action-size);margin-inline-end:-3px;padding:0;border:none;border-radius:var(--tx-radius-xs);background:transparent;color:inherit;font-size:.85em;opacity:.75;cursor:pointer;transition:background-color var(--tx-motion-duration) var(--tx-motion-easing),opacity var(--tx-motion-duration) var(--tx-motion-easing)}:host([data-styled]) .tx-tag__action:hover{background:color-mix(in srgb,currentColor 16%,transparent);opacity:1}:host([data-styled]) .tx-tag__action:focus-visible{outline:2px solid var(--tx-tag-focus-ring-color);outline-offset:1px;opacity:1}:host([data-styled]) .tx-tag__action+.tx-tag__action{margin-inline-start:-2px}:host([data-styled]) .tx-tag__copy--done{opacity:1}\n"]
306
+ }]
307
+ }],
308
+ ctorParameters: () => [],
309
+ propDecorators: {
310
+ value: [{
311
+ type: i0.Input,
312
+ args: [{
313
+ isSignal: true,
314
+ alias: "value",
315
+ required: false
316
+ }]
317
+ }],
318
+ severity: [{
319
+ type: i0.Input,
320
+ args: [{
321
+ isSignal: true,
322
+ alias: "severity",
323
+ required: false
324
+ }]
325
+ }],
326
+ size: [{
327
+ type: i0.Input,
328
+ args: [{
329
+ isSignal: true,
330
+ alias: "size",
331
+ required: false
332
+ }]
333
+ }],
334
+ rounded: [{
335
+ type: i0.Input,
336
+ args: [{
337
+ isSignal: true,
338
+ alias: "rounded",
339
+ required: false
340
+ }]
341
+ }],
342
+ icon: [{
343
+ type: i0.Input,
344
+ args: [{
345
+ isSignal: true,
346
+ alias: "icon",
347
+ required: false
348
+ }]
349
+ }],
350
+ copyable: [{
351
+ type: i0.Input,
352
+ args: [{
353
+ isSignal: true,
354
+ alias: "copyable",
355
+ required: false
356
+ }]
357
+ }],
358
+ removable: [{
359
+ type: i0.Input,
360
+ args: [{
361
+ isSignal: true,
362
+ alias: "removable",
363
+ required: false
364
+ }]
365
+ }],
366
+ removeLabel: [{
367
+ type: i0.Input,
368
+ args: [{
369
+ isSignal: true,
370
+ alias: "removeLabel",
371
+ required: false
372
+ }]
373
+ }],
374
+ dt: [{
375
+ type: i0.Input,
376
+ args: [{
377
+ isSignal: true,
378
+ alias: "dt",
379
+ required: false
380
+ }]
381
+ }],
382
+ pt: [{
383
+ type: i0.Input,
384
+ args: [{
385
+ isSignal: true,
386
+ alias: "pt",
387
+ required: false
388
+ }]
389
+ }],
390
+ ptOptions: [{
391
+ type: i0.Input,
392
+ args: [{
393
+ isSignal: true,
394
+ alias: "ptOptions",
395
+ required: false
396
+ }]
397
+ }],
398
+ unstyled: [{
399
+ type: i0.Input,
400
+ args: [{
401
+ isSignal: true,
402
+ alias: "unstyled",
403
+ required: false
404
+ }]
405
+ }],
406
+ copied: [{
407
+ type: i0.Output,
408
+ args: ["copied"]
409
+ }],
410
+ removed: [{
411
+ type: i0.Output,
412
+ args: ["removed"]
413
+ }],
414
+ label: [{
415
+ type: i0.ViewChild,
416
+ args: ["label", { isSignal: true }]
417
+ }]
418
+ }
419
+ });
420
+ export { TxTag };
421
+
422
+ //# sourceMappingURL=tectra-ng-ui-tag.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-ui-tag.mjs","names":[],"sources":["../../../../packages/ui/tag/src/tag.component.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, DOCUMENT, DestroyRef, ElementRef, booleanAttribute, computed, inject, input, output, signal, viewChild } from '@angular/core';\nimport { TxPassThrough, TxPassThroughOptions, injectPassThrough, injectUnstyled } from '@tectra-ng/core/config';\nimport { injectTranslations } from '@tectra-ng/core/i18n';\nimport { optionalBoolean } from '@tectra-ng/core/utils';\nimport { TxIcon, TxIconName, TxIconRegistry } from '@tectra-ng/icons';\nimport { TectraDeepPartial, TectraTagTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxTagPart, TxTagSeverity, TxTagSize } from './tag.types';\n\nconst COPIED_FOR = 1500;\n\n@Component({\n selector: 'tx-tag',\n imports: [TxIcon],\n template: `\n @if (icon(); as icon) {\n <span class=\"tx-tag__icon\" aria-hidden=\"true\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\">\n @if (iconName(); as name) {\n <tx-icon [name]=\"name\" />\n } @else {\n <span [class]=\"icon\"></span>\n }\n </span>\n }\n <span #label class=\"tx-tag__label\" [class]=\"passThrough().label?.class\" [style]=\"passThrough().label?.style\">{{ value() }}<ng-content /></span>\n @if (copyable()) {\n <button\n type=\"button\"\n class=\"tx-tag__action tx-tag__copy\"\n [class.tx-tag__copy--done]=\"isCopied()\"\n [class]=\"passThrough().copy?.class\"\n [style]=\"passThrough().copy?.style\"\n [attr.aria-label]=\"isCopied() ? translations().copied : translations().copy\"\n [title]=\"isCopied() ? translations().copied : translations().copy\"\n (click)=\"copy()\"\n >\n <tx-icon [name]=\"isCopied() ? 'check' : 'copy'\" />\n </button>\n }\n @if (removable()) {\n <button\n type=\"button\"\n class=\"tx-tag__action tx-tag__remove\"\n [class]=\"passThrough().remove?.class\"\n [style]=\"passThrough().remove?.style\"\n [attr.aria-label]=\"removeLabel() ?? translations().remove\"\n [title]=\"removeLabel() ?? translations().remove\"\n (click)=\"remove($event)\"\n (keydown.delete)=\"remove($event)\"\n (keydown.backspace)=\"remove($event)\"\n >\n <tx-icon [name]=\"'times'\" />\n </button>\n }\n `,\n styleUrl: './tag.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-tag',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-severity]': 'severity()',\n '[attr.data-size]': 'resolvedSize()',\n '[class.tx-tag--rounded]': 'rounded()',\n },\n})\nexport class TxTag {\n private txIconRegistry = inject(TxIconRegistry);\n private document = inject(DOCUMENT);\n private timer: ReturnType<typeof setTimeout> | null = null;\n\n readonly value = input<string | number | undefined>(undefined);\n readonly severity = input<TxTagSeverity>('primary');\n readonly size = input<TxTagSize>('medium');\n readonly rounded = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly copyable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removable = input<boolean, unknown>(false, { transform: booleanAttribute });\n readonly removeLabel = input<string | undefined>(undefined);\n readonly dt = input<TectraDeepPartial<TectraTagTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxTagPart, TxTag> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly copied = output<string>();\n readonly removed = output<Event>();\n\n readonly label = viewChild.required<ElementRef<HTMLElement>>('label');\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('tag', this, this.pt, this.ptOptions);\n readonly isCopied = signal(false);\n readonly resolvedSize = computed(() => (this.size() === 'normal' ? 'medium' : this.size()));\n readonly iconName = computed(() => {\n const icon = this.icon();\n return icon && this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-tag'), ...this.passThrough().root?.style }));\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.timer && clearTimeout(this.timer));\n }\n\n copy(): void {\n const text = (this.label().nativeElement.textContent ?? '').trim();\n this.document.defaultView?.navigator.clipboard?.writeText(text);\n this.copied.emit(text);\n this.isCopied.set(true);\n if (this.timer) {\n clearTimeout(this.timer);\n }\n this.timer = setTimeout(() => this.isCopied.set(false), COPIED_FOR);\n }\n\n remove(event: Event): void {\n event.preventDefault();\n event.stopPropagation();\n this.removed.emit(event);\n }\n}\n"],"mappings":";;;;;;;AAQA,MAAM,aAAa;AA0DnB,IAAa,QAAb,MAAa,MAAK;CACR,iBAAiB,OAAO,cAAc;CACtC,WAAW,OAAO,QAAQ;CAC1B,QAA8C;CAE7C,QAAQ,MAAmC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,WAAW,MAAqB,WAAU,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC1C,OAAO,MAAiB,UAAS,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CACjC,UAAU,MAAwB,OAAK;EAAA,GAAA,YAAA,EAAA,WAAA,UAAA,+BAAA,CAAA;EAAI,WAAW;CAAgB,CAAA;CACtE,OA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