@tectra-ng/ui 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (317) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +26 -2
  3. package/amount/README.md +28 -0
  4. package/autocomplete/README.md +82 -0
  5. package/avatar/README.md +43 -0
  6. package/badge/README.md +19 -0
  7. package/button/README.md +46 -0
  8. package/button-group/README.md +8 -0
  9. package/card/README.md +30 -0
  10. package/cascade-select/README.md +49 -0
  11. package/checkbox/README.md +64 -0
  12. package/chip/README.md +38 -0
  13. package/chips-input/README.md +47 -0
  14. package/color-picker/README.md +43 -0
  15. package/confirm/README.md +46 -0
  16. package/country/README.md +23 -0
  17. package/country-select/README.md +39 -0
  18. package/dialog/README.md +84 -0
  19. package/divider/README.md +24 -0
  20. package/drawer/README.md +54 -0
  21. package/email-suggestion/README.md +20 -0
  22. package/fesm2022/tectra-ng-ui-amount.mjs +415 -0
  23. package/fesm2022/tectra-ng-ui-amount.mjs.map +1 -0
  24. package/fesm2022/tectra-ng-ui-autocomplete.mjs +730 -0
  25. package/fesm2022/tectra-ng-ui-autocomplete.mjs.map +1 -0
  26. package/fesm2022/tectra-ng-ui-avatar.mjs +670 -0
  27. package/fesm2022/tectra-ng-ui-avatar.mjs.map +1 -0
  28. package/fesm2022/tectra-ng-ui-badge.mjs +191 -0
  29. package/fesm2022/tectra-ng-ui-badge.mjs.map +1 -0
  30. package/fesm2022/tectra-ng-ui-button-group.mjs +50 -0
  31. package/fesm2022/tectra-ng-ui-button-group.mjs.map +1 -0
  32. package/fesm2022/tectra-ng-ui-button.mjs +725 -0
  33. package/fesm2022/tectra-ng-ui-button.mjs.map +1 -0
  34. package/fesm2022/tectra-ng-ui-card.mjs +210 -0
  35. package/fesm2022/tectra-ng-ui-card.mjs.map +1 -0
  36. package/fesm2022/tectra-ng-ui-cascade-select.mjs +887 -0
  37. package/fesm2022/tectra-ng-ui-cascade-select.mjs.map +1 -0
  38. package/fesm2022/tectra-ng-ui-checkbox.mjs +1150 -0
  39. package/fesm2022/tectra-ng-ui-checkbox.mjs.map +1 -0
  40. package/fesm2022/tectra-ng-ui-chip.mjs +344 -0
  41. package/fesm2022/tectra-ng-ui-chip.mjs.map +1 -0
  42. package/fesm2022/tectra-ng-ui-chips-input.mjs +649 -0
  43. package/fesm2022/tectra-ng-ui-chips-input.mjs.map +1 -0
  44. package/fesm2022/tectra-ng-ui-color-picker.mjs +828 -0
  45. package/fesm2022/tectra-ng-ui-color-picker.mjs.map +1 -0
  46. package/fesm2022/tectra-ng-ui-confirm.mjs +489 -0
  47. package/fesm2022/tectra-ng-ui-confirm.mjs.map +1 -0
  48. package/fesm2022/tectra-ng-ui-country-select.mjs +545 -0
  49. package/fesm2022/tectra-ng-ui-country-select.mjs.map +1 -0
  50. package/fesm2022/tectra-ng-ui-country.mjs +313 -0
  51. package/fesm2022/tectra-ng-ui-country.mjs.map +1 -0
  52. package/fesm2022/tectra-ng-ui-dialog.mjs +1539 -0
  53. package/fesm2022/tectra-ng-ui-dialog.mjs.map +1 -0
  54. package/fesm2022/tectra-ng-ui-divider.mjs +194 -0
  55. package/fesm2022/tectra-ng-ui-divider.mjs.map +1 -0
  56. package/fesm2022/tectra-ng-ui-drawer.mjs +540 -0
  57. package/fesm2022/tectra-ng-ui-drawer.mjs.map +1 -0
  58. package/fesm2022/tectra-ng-ui-email-suggestion.mjs +341 -0
  59. package/fesm2022/tectra-ng-ui-email-suggestion.mjs.map +1 -0
  60. package/fesm2022/tectra-ng-ui-field.mjs +492 -0
  61. package/fesm2022/tectra-ng-ui-field.mjs.map +1 -0
  62. package/fesm2022/tectra-ng-ui-fieldset.mjs +258 -0
  63. package/fesm2022/tectra-ng-ui-fieldset.mjs.map +1 -0
  64. package/fesm2022/tectra-ng-ui-highlight-text.mjs +246 -0
  65. package/fesm2022/tectra-ng-ui-highlight-text.mjs.map +1 -0
  66. package/fesm2022/tectra-ng-ui-icon-field.mjs +478 -0
  67. package/fesm2022/tectra-ng-ui-icon-field.mjs.map +1 -0
  68. package/fesm2022/tectra-ng-ui-input-group.mjs +113 -0
  69. package/fesm2022/tectra-ng-ui-input-group.mjs.map +1 -0
  70. package/fesm2022/tectra-ng-ui-input-mask.mjs +413 -0
  71. package/fesm2022/tectra-ng-ui-input-mask.mjs.map +1 -0
  72. package/fesm2022/tectra-ng-ui-input-number.mjs +1045 -0
  73. package/fesm2022/tectra-ng-ui-input-number.mjs.map +1 -0
  74. package/fesm2022/tectra-ng-ui-input-otp.mjs +553 -0
  75. package/fesm2022/tectra-ng-ui-input-otp.mjs.map +1 -0
  76. package/fesm2022/tectra-ng-ui-input.mjs +260 -0
  77. package/fesm2022/tectra-ng-ui-input.mjs.map +1 -0
  78. package/fesm2022/tectra-ng-ui-key-filter.mjs +185 -0
  79. package/fesm2022/tectra-ng-ui-key-filter.mjs.map +1 -0
  80. package/fesm2022/tectra-ng-ui-knob.mjs +630 -0
  81. package/fesm2022/tectra-ng-ui-knob.mjs.map +1 -0
  82. package/fesm2022/tectra-ng-ui-label.mjs +271 -0
  83. package/fesm2022/tectra-ng-ui-label.mjs.map +1 -0
  84. package/fesm2022/tectra-ng-ui-link.mjs +699 -0
  85. package/fesm2022/tectra-ng-ui-link.mjs.map +1 -0
  86. package/fesm2022/tectra-ng-ui-listbox.mjs +484 -0
  87. package/fesm2022/tectra-ng-ui-listbox.mjs.map +1 -0
  88. package/fesm2022/tectra-ng-ui-mention-textarea.mjs +717 -0
  89. package/fesm2022/tectra-ng-ui-mention-textarea.mjs.map +1 -0
  90. package/fesm2022/tectra-ng-ui-menu.mjs +1484 -0
  91. package/fesm2022/tectra-ng-ui-menu.mjs.map +1 -0
  92. package/fesm2022/tectra-ng-ui-message.mjs +975 -0
  93. package/fesm2022/tectra-ng-ui-message.mjs.map +1 -0
  94. package/fesm2022/tectra-ng-ui-multiselect.mjs +569 -0
  95. package/fesm2022/tectra-ng-ui-multiselect.mjs.map +1 -0
  96. package/fesm2022/tectra-ng-ui-overlay-badge.mjs +345 -0
  97. package/fesm2022/tectra-ng-ui-overlay-badge.mjs.map +1 -0
  98. package/fesm2022/tectra-ng-ui-paginator.mjs +849 -0
  99. package/fesm2022/tectra-ng-ui-paginator.mjs.map +1 -0
  100. package/fesm2022/tectra-ng-ui-panel.mjs +317 -0
  101. package/fesm2022/tectra-ng-ui-panel.mjs.map +1 -0
  102. package/fesm2022/tectra-ng-ui-password-generator.mjs +292 -0
  103. package/fesm2022/tectra-ng-ui-password-generator.mjs.map +1 -0
  104. package/fesm2022/tectra-ng-ui-password.mjs +871 -0
  105. package/fesm2022/tectra-ng-ui-password.mjs.map +1 -0
  106. package/fesm2022/tectra-ng-ui-pill.mjs +361 -0
  107. package/fesm2022/tectra-ng-ui-pill.mjs.map +1 -0
  108. package/fesm2022/tectra-ng-ui-popover.mjs +742 -0
  109. package/fesm2022/tectra-ng-ui-popover.mjs.map +1 -0
  110. package/fesm2022/tectra-ng-ui-progress-bar.mjs +440 -0
  111. package/fesm2022/tectra-ng-ui-progress-bar.mjs.map +1 -0
  112. package/fesm2022/tectra-ng-ui-progress-spinner.mjs +265 -0
  113. package/fesm2022/tectra-ng-ui-progress-spinner.mjs.map +1 -0
  114. package/fesm2022/tectra-ng-ui-radio-button.mjs +817 -0
  115. package/fesm2022/tectra-ng-ui-radio-button.mjs.map +1 -0
  116. package/fesm2022/tectra-ng-ui-rating.mjs +584 -0
  117. package/fesm2022/tectra-ng-ui-rating.mjs.map +1 -0
  118. package/fesm2022/tectra-ng-ui-select.mjs +2478 -0
  119. package/fesm2022/tectra-ng-ui-select.mjs.map +1 -0
  120. package/fesm2022/tectra-ng-ui-skeleton.mjs +548 -0
  121. package/fesm2022/tectra-ng-ui-skeleton.mjs.map +1 -0
  122. package/fesm2022/tectra-ng-ui-slider.mjs +630 -0
  123. package/fesm2022/tectra-ng-ui-slider.mjs.map +1 -0
  124. package/fesm2022/tectra-ng-ui-speed-dial.mjs +669 -0
  125. package/fesm2022/tectra-ng-ui-speed-dial.mjs.map +1 -0
  126. package/fesm2022/tectra-ng-ui-split-button.mjs +614 -0
  127. package/fesm2022/tectra-ng-ui-split-button.mjs.map +1 -0
  128. package/fesm2022/tectra-ng-ui-status-icon.mjs +295 -0
  129. package/fesm2022/tectra-ng-ui-status-icon.mjs.map +1 -0
  130. package/fesm2022/tectra-ng-ui-table.mjs +5997 -0
  131. package/fesm2022/tectra-ng-ui-table.mjs.map +1 -0
  132. package/fesm2022/tectra-ng-ui-tag.mjs +422 -0
  133. package/fesm2022/tectra-ng-ui-tag.mjs.map +1 -0
  134. package/fesm2022/tectra-ng-ui-textarea.mjs +482 -0
  135. package/fesm2022/tectra-ng-ui-textarea.mjs.map +1 -0
  136. package/fesm2022/tectra-ng-ui-toast.mjs +668 -0
  137. package/fesm2022/tectra-ng-ui-toast.mjs.map +1 -0
  138. package/fesm2022/tectra-ng-ui-toggle-button.mjs +416 -0
  139. package/fesm2022/tectra-ng-ui-toggle-button.mjs.map +1 -0
  140. package/fesm2022/tectra-ng-ui-toggle-switch.mjs +560 -0
  141. package/fesm2022/tectra-ng-ui-toggle-switch.mjs.map +1 -0
  142. package/fesm2022/tectra-ng-ui-tooltip.mjs +835 -0
  143. package/fesm2022/tectra-ng-ui-tooltip.mjs.map +1 -0
  144. package/fesm2022/tectra-ng-ui-tree-select.mjs +986 -0
  145. package/fesm2022/tectra-ng-ui-tree-select.mjs.map +1 -0
  146. package/fesm2022/tectra-ng-ui.mjs +4 -0
  147. package/fesm2022/tectra-ng-ui.mjs.map +1 -0
  148. package/field/README.md +43 -0
  149. package/fieldset/README.md +36 -0
  150. package/highlight-text/README.md +20 -0
  151. package/icon-field/README.md +30 -0
  152. package/input/README.md +22 -0
  153. package/input-group/README.md +21 -0
  154. package/input-mask/README.md +30 -0
  155. package/input-number/README.md +61 -0
  156. package/input-otp/README.md +44 -0
  157. package/key-filter/README.md +31 -0
  158. package/knob/README.md +50 -0
  159. package/label/README.md +29 -0
  160. package/link/README.md +47 -0
  161. package/listbox/README.md +68 -0
  162. package/mention-textarea/README.md +47 -0
  163. package/menu/README.md +65 -0
  164. package/message/README.md +58 -0
  165. package/multiselect/README.md +85 -0
  166. package/overlay-badge/README.md +30 -0
  167. package/package.json +301 -3
  168. package/paginator/README.md +60 -0
  169. package/panel/README.md +45 -0
  170. package/password/README.md +60 -0
  171. package/password-generator/README.md +34 -0
  172. package/pill/README.md +42 -0
  173. package/popover/README.md +67 -0
  174. package/progress-bar/README.md +32 -0
  175. package/progress-spinner/README.md +22 -0
  176. package/radio-button/README.md +54 -0
  177. package/rating/README.md +49 -0
  178. package/select/README.md +78 -0
  179. package/skeleton/README.md +27 -0
  180. package/slider/README.md +48 -0
  181. package/speed-dial/README.md +49 -0
  182. package/split-button/README.md +45 -0
  183. package/status-icon/README.md +22 -0
  184. package/table/README.md +178 -0
  185. package/tag/README.md +42 -0
  186. package/textarea/README.md +37 -0
  187. package/toast/README.md +52 -0
  188. package/toggle-button/README.md +34 -0
  189. package/toggle-switch/README.md +49 -0
  190. package/tooltip/README.md +60 -0
  191. package/tree-select/README.md +49 -0
  192. package/types/tectra-ng-ui-amount.d.ts +135 -0
  193. package/types/tectra-ng-ui-amount.d.ts.map +1 -0
  194. package/types/tectra-ng-ui-autocomplete.d.ts +250 -0
  195. package/types/tectra-ng-ui-autocomplete.d.ts.map +1 -0
  196. package/types/tectra-ng-ui-avatar.d.ts +289 -0
  197. package/types/tectra-ng-ui-avatar.d.ts.map +1 -0
  198. package/types/tectra-ng-ui-badge.d.ts +119 -0
  199. package/types/tectra-ng-ui-badge.d.ts.map +1 -0
  200. package/types/tectra-ng-ui-button-group.d.ts +6 -0
  201. package/types/tectra-ng-ui-button-group.d.ts.map +1 -0
  202. package/types/tectra-ng-ui-button.d.ts +466 -0
  203. package/types/tectra-ng-ui-button.d.ts.map +1 -0
  204. package/types/tectra-ng-ui-card.d.ts +71 -0
  205. package/types/tectra-ng-ui-card.d.ts.map +1 -0
  206. package/types/tectra-ng-ui-cascade-select.d.ts +244 -0
  207. package/types/tectra-ng-ui-cascade-select.d.ts.map +1 -0
  208. package/types/tectra-ng-ui-checkbox.d.ts +450 -0
  209. package/types/tectra-ng-ui-checkbox.d.ts.map +1 -0
  210. package/types/tectra-ng-ui-chip.d.ts +106 -0
  211. package/types/tectra-ng-ui-chip.d.ts.map +1 -0
  212. package/types/tectra-ng-ui-chips-input.d.ts +187 -0
  213. package/types/tectra-ng-ui-chips-input.d.ts.map +1 -0
  214. package/types/tectra-ng-ui-color-picker.d.ts +237 -0
  215. package/types/tectra-ng-ui-color-picker.d.ts.map +1 -0
  216. package/types/tectra-ng-ui-confirm.d.ts +80 -0
  217. package/types/tectra-ng-ui-confirm.d.ts.map +1 -0
  218. package/types/tectra-ng-ui-country-select.d.ts +235 -0
  219. package/types/tectra-ng-ui-country-select.d.ts.map +1 -0
  220. package/types/tectra-ng-ui-country.d.ts +105 -0
  221. package/types/tectra-ng-ui-country.d.ts.map +1 -0
  222. package/types/tectra-ng-ui-dialog.d.ts +453 -0
  223. package/types/tectra-ng-ui-dialog.d.ts.map +1 -0
  224. package/types/tectra-ng-ui-divider.d.ts +70 -0
  225. package/types/tectra-ng-ui-divider.d.ts.map +1 -0
  226. package/types/tectra-ng-ui-drawer.d.ts +188 -0
  227. package/types/tectra-ng-ui-drawer.d.ts.map +1 -0
  228. package/types/tectra-ng-ui-email-suggestion.d.ts +84 -0
  229. package/types/tectra-ng-ui-email-suggestion.d.ts.map +1 -0
  230. package/types/tectra-ng-ui-field.d.ts +139 -0
  231. package/types/tectra-ng-ui-field.d.ts.map +1 -0
  232. package/types/tectra-ng-ui-fieldset.d.ts +74 -0
  233. package/types/tectra-ng-ui-fieldset.d.ts.map +1 -0
  234. package/types/tectra-ng-ui-highlight-text.d.ts +75 -0
  235. package/types/tectra-ng-ui-highlight-text.d.ts.map +1 -0
  236. package/types/tectra-ng-ui-icon-field.d.ts +77 -0
  237. package/types/tectra-ng-ui-icon-field.d.ts.map +1 -0
  238. package/types/tectra-ng-ui-input-group.d.ts +18 -0
  239. package/types/tectra-ng-ui-input-group.d.ts.map +1 -0
  240. package/types/tectra-ng-ui-input-mask.d.ts +91 -0
  241. package/types/tectra-ng-ui-input-mask.d.ts.map +1 -0
  242. package/types/tectra-ng-ui-input-number.d.ts +326 -0
  243. package/types/tectra-ng-ui-input-number.d.ts.map +1 -0
  244. package/types/tectra-ng-ui-input-otp.d.ts +173 -0
  245. package/types/tectra-ng-ui-input-otp.d.ts.map +1 -0
  246. package/types/tectra-ng-ui-input.d.ts +113 -0
  247. package/types/tectra-ng-ui-input.d.ts.map +1 -0
  248. package/types/tectra-ng-ui-key-filter.d.ts +43 -0
  249. package/types/tectra-ng-ui-key-filter.d.ts.map +1 -0
  250. package/types/tectra-ng-ui-knob.d.ts +207 -0
  251. package/types/tectra-ng-ui-knob.d.ts.map +1 -0
  252. package/types/tectra-ng-ui-label.d.ts +53 -0
  253. package/types/tectra-ng-ui-label.d.ts.map +1 -0
  254. package/types/tectra-ng-ui-link.d.ts +223 -0
  255. package/types/tectra-ng-ui-link.d.ts.map +1 -0
  256. package/types/tectra-ng-ui-listbox.d.ts +131 -0
  257. package/types/tectra-ng-ui-listbox.d.ts.map +1 -0
  258. package/types/tectra-ng-ui-mention-textarea.d.ts +169 -0
  259. package/types/tectra-ng-ui-mention-textarea.d.ts.map +1 -0
  260. package/types/tectra-ng-ui-menu.d.ts +512 -0
  261. package/types/tectra-ng-ui-menu.d.ts.map +1 -0
  262. package/types/tectra-ng-ui-message.d.ts +390 -0
  263. package/types/tectra-ng-ui-message.d.ts.map +1 -0
  264. package/types/tectra-ng-ui-multiselect.d.ts +216 -0
  265. package/types/tectra-ng-ui-multiselect.d.ts.map +1 -0
  266. package/types/tectra-ng-ui-overlay-badge.d.ts +104 -0
  267. package/types/tectra-ng-ui-overlay-badge.d.ts.map +1 -0
  268. package/types/tectra-ng-ui-paginator.d.ts +293 -0
  269. package/types/tectra-ng-ui-paginator.d.ts.map +1 -0
  270. package/types/tectra-ng-ui-panel.d.ts +133 -0
  271. package/types/tectra-ng-ui-panel.d.ts.map +1 -0
  272. package/types/tectra-ng-ui-password-generator.d.ts +80 -0
  273. package/types/tectra-ng-ui-password-generator.d.ts.map +1 -0
  274. package/types/tectra-ng-ui-password.d.ts +271 -0
  275. package/types/tectra-ng-ui-password.d.ts.map +1 -0
  276. package/types/tectra-ng-ui-pill.d.ts +167 -0
  277. package/types/tectra-ng-ui-pill.d.ts.map +1 -0
  278. package/types/tectra-ng-ui-popover.d.ts +244 -0
  279. package/types/tectra-ng-ui-popover.d.ts.map +1 -0
  280. package/types/tectra-ng-ui-progress-bar.d.ts +151 -0
  281. package/types/tectra-ng-ui-progress-bar.d.ts.map +1 -0
  282. package/types/tectra-ng-ui-progress-spinner.d.ts +95 -0
  283. package/types/tectra-ng-ui-progress-spinner.d.ts.map +1 -0
  284. package/types/tectra-ng-ui-radio-button.d.ts +380 -0
  285. package/types/tectra-ng-ui-radio-button.d.ts.map +1 -0
  286. package/types/tectra-ng-ui-rating.d.ts +195 -0
  287. package/types/tectra-ng-ui-rating.d.ts.map +1 -0
  288. package/types/tectra-ng-ui-select.d.ts +761 -0
  289. package/types/tectra-ng-ui-select.d.ts.map +1 -0
  290. package/types/tectra-ng-ui-skeleton.d.ts +182 -0
  291. package/types/tectra-ng-ui-skeleton.d.ts.map +1 -0
  292. package/types/tectra-ng-ui-slider.d.ts +220 -0
  293. package/types/tectra-ng-ui-slider.d.ts.map +1 -0
  294. package/types/tectra-ng-ui-speed-dial.d.ts +175 -0
  295. package/types/tectra-ng-ui-speed-dial.d.ts.map +1 -0
  296. package/types/tectra-ng-ui-split-button.d.ts +139 -0
  297. package/types/tectra-ng-ui-split-button.d.ts.map +1 -0
  298. package/types/tectra-ng-ui-status-icon.d.ts +105 -0
  299. package/types/tectra-ng-ui-status-icon.d.ts.map +1 -0
  300. package/types/tectra-ng-ui-table.d.ts +1301 -0
  301. package/types/tectra-ng-ui-table.d.ts.map +1 -0
  302. package/types/tectra-ng-ui-tag.d.ts +157 -0
  303. package/types/tectra-ng-ui-tag.d.ts.map +1 -0
  304. package/types/tectra-ng-ui-textarea.d.ts +146 -0
  305. package/types/tectra-ng-ui-textarea.d.ts.map +1 -0
  306. package/types/tectra-ng-ui-toast.d.ts +268 -0
  307. package/types/tectra-ng-ui-toast.d.ts.map +1 -0
  308. package/types/tectra-ng-ui-toggle-button.d.ts +184 -0
  309. package/types/tectra-ng-ui-toggle-button.d.ts.map +1 -0
  310. package/types/tectra-ng-ui-toggle-switch.d.ts +226 -0
  311. package/types/tectra-ng-ui-toggle-switch.d.ts.map +1 -0
  312. package/types/tectra-ng-ui-tooltip.d.ts +275 -0
  313. package/types/tectra-ng-ui-tooltip.d.ts.map +1 -0
  314. package/types/tectra-ng-ui-tree-select.d.ts +339 -0
  315. package/types/tectra-ng-ui-tree-select.d.ts.map +1 -0
  316. package/types/tectra-ng-ui.d.ts +2 -0
  317. package/types/tectra-ng-ui.d.ts.map +1 -0
@@ -0,0 +1,295 @@
1
+ import { NgClass } from "@angular/common";
2
+ import * as i0 from "@angular/core";
3
+ import { ChangeDetectionStrategy, Component, computed, inject, input } from "@angular/core";
4
+ import { injectPassThrough, injectUnstyled } from "@tectra-ng/core/config";
5
+ import { injectTranslations } from "@tectra-ng/core/i18n";
6
+ import { optionalBoolean } from "@tectra-ng/core/utils";
7
+ import { TxIcon, TxIconRegistry } from "@tectra-ng/icons";
8
+ import { toStyleObject } from "@tectra-ng/themes";
9
+ const SEVERITY_ICONS = {
10
+ success: "check-circle",
11
+ info: "info-circle",
12
+ warn: "exclamation-triangle",
13
+ danger: "times-circle",
14
+ secondary: "minus-circle"
15
+ };
16
+ var TxStatusIcon = class TxStatusIcon {
17
+ txIconRegistry = inject(TxIconRegistry);
18
+ status = input(void 0, {
19
+ ...ngDevMode ? { debugName: "status" } : /* istanbul ignore next */ {},
20
+ transform: optionalBoolean
21
+ });
22
+ severity = input(void 0, ...ngDevMode ? [{ debugName: "severity" }] : /* istanbul ignore next */ []);
23
+ icon = input(void 0, ...ngDevMode ? [{ debugName: "icon" }] : /* istanbul ignore next */ []);
24
+ label = input(void 0, ...ngDevMode ? [{ debugName: "label" }] : /* istanbul ignore next */ []);
25
+ toolTip = input(void 0, ...ngDevMode ? [{ debugName: "toolTip" }] : /* istanbul ignore next */ []);
26
+ size = input("medium", ...ngDevMode ? [{ debugName: "size" }] : /* istanbul ignore next */ []);
27
+ dt = input(void 0, ...ngDevMode ? [{ debugName: "dt" }] : /* istanbul ignore next */ []);
28
+ pt = input(void 0, ...ngDevMode ? [{ debugName: "pt" }] : /* istanbul ignore next */ []);
29
+ ptOptions = input(void 0, ...ngDevMode ? [{ debugName: "ptOptions" }] : /* istanbul ignore next */ []);
30
+ unstyled = input(void 0, {
31
+ ...ngDevMode ? { debugName: "unstyled" } : /* istanbul ignore next */ {},
32
+ transform: optionalBoolean
33
+ });
34
+ translations = injectTranslations();
35
+ isUnstyled = injectUnstyled(this.unstyled);
36
+ passThrough = injectPassThrough("statusIcon", this, this.pt, this.ptOptions);
37
+ resolvedSeverity = computed(() => this.severity() ?? (this.status() ? "success" : "danger"), ...ngDevMode ? [{ debugName: "resolvedSeverity" }] : /* istanbul ignore next */ []);
38
+ resolvedIcon = computed(() => this.icon() ?? SEVERITY_ICONS[this.resolvedSeverity()], ...ngDevMode ? [{ debugName: "resolvedIcon" }] : /* istanbul ignore next */ []);
39
+ iconName = computed(() => {
40
+ const icon = this.resolvedIcon();
41
+ return this.txIconRegistry.has(icon) ? icon : null;
42
+ }, ...ngDevMode ? [{ debugName: "iconName" }] : /* istanbul ignore next */ []);
43
+ resolvedLabel = computed(() => {
44
+ const label = this.label() ?? this.toolTip();
45
+ if (label !== void 0) return label;
46
+ if (this.severity()) return "";
47
+ return this.status() ? this.translations().yes : this.translations().no;
48
+ }, ...ngDevMode ? [{ debugName: "resolvedLabel" }] : /* istanbul ignore next */ []);
49
+ hostStyle = computed(() => ({
50
+ ...toStyleObject(this.dt(), "--tx-status-icon"),
51
+ ...this.passThrough().root?.style
52
+ }), ...ngDevMode ? [{ debugName: "hostStyle" }] : /* istanbul ignore next */ []);
53
+ static ɵfac = i0.ɵɵngDeclareFactory({
54
+ minVersion: "12.0.0",
55
+ version: "22.2.3",
56
+ ngImport: i0,
57
+ type: TxStatusIcon,
58
+ deps: [],
59
+ target: i0.ɵɵFactoryTarget.Component
60
+ });
61
+ static ɵcmp = i0.ɵɵngDeclareComponent({
62
+ minVersion: "17.0.0",
63
+ version: "22.2.3",
64
+ type: TxStatusIcon,
65
+ isStandalone: true,
66
+ selector: "tx-status-icon",
67
+ inputs: {
68
+ status: {
69
+ classPropertyName: "status",
70
+ publicName: "status",
71
+ isSignal: true,
72
+ isRequired: false,
73
+ transformFunction: null
74
+ },
75
+ severity: {
76
+ classPropertyName: "severity",
77
+ publicName: "severity",
78
+ isSignal: true,
79
+ isRequired: false,
80
+ transformFunction: null
81
+ },
82
+ icon: {
83
+ classPropertyName: "icon",
84
+ publicName: "icon",
85
+ isSignal: true,
86
+ isRequired: false,
87
+ transformFunction: null
88
+ },
89
+ label: {
90
+ classPropertyName: "label",
91
+ publicName: "label",
92
+ isSignal: true,
93
+ isRequired: false,
94
+ transformFunction: null
95
+ },
96
+ toolTip: {
97
+ classPropertyName: "toolTip",
98
+ publicName: "toolTip",
99
+ isSignal: true,
100
+ isRequired: false,
101
+ transformFunction: null
102
+ },
103
+ size: {
104
+ classPropertyName: "size",
105
+ publicName: "size",
106
+ isSignal: true,
107
+ isRequired: false,
108
+ transformFunction: null
109
+ },
110
+ dt: {
111
+ classPropertyName: "dt",
112
+ publicName: "dt",
113
+ isSignal: true,
114
+ isRequired: false,
115
+ transformFunction: null
116
+ },
117
+ pt: {
118
+ classPropertyName: "pt",
119
+ publicName: "pt",
120
+ isSignal: true,
121
+ isRequired: false,
122
+ transformFunction: null
123
+ },
124
+ ptOptions: {
125
+ classPropertyName: "ptOptions",
126
+ publicName: "ptOptions",
127
+ isSignal: true,
128
+ isRequired: false,
129
+ transformFunction: null
130
+ },
131
+ unstyled: {
132
+ classPropertyName: "unstyled",
133
+ publicName: "unstyled",
134
+ isSignal: true,
135
+ isRequired: false,
136
+ transformFunction: null
137
+ }
138
+ },
139
+ host: {
140
+ properties: {
141
+ "class": "passThrough().root?.class",
142
+ "style": "hostStyle()",
143
+ "attr.data-styled": "!isUnstyled() || null",
144
+ "attr.data-severity": "resolvedSeverity()",
145
+ "attr.data-size": "size()",
146
+ "attr.role": "resolvedLabel() ? \"img\" : null",
147
+ "attr.aria-label": "resolvedLabel() || null",
148
+ "attr.aria-hidden": "resolvedLabel() ? null : \"true\"",
149
+ "attr.title": "resolvedLabel() || null"
150
+ },
151
+ classAttribute: "tx-status-icon"
152
+ },
153
+ ngImport: i0,
154
+ template: `
155
+ @if (iconName(); as name) {
156
+ <tx-icon class="tx-status-icon__icon" [name]="name" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style" />
157
+ } @else {
158
+ <span class="tx-status-icon__icon" [class]="resolvedIcon()" [ngClass]="passThrough().icon?.class ?? null" [style]="passThrough().icon?.style"></span>
159
+ }
160
+ `,
161
+ isInline: true,
162
+ styles: [":host{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;vertical-align:middle}:host([data-styled]){--_color: var(--tx-status-icon-secondary-color);color:var(--_color);font-size:var(--tx-status-icon-size);line-height:1}:host([data-styled][data-size=small]){font-size:var(--tx-status-icon-sm-size)}:host([data-styled][data-size=large]){font-size:var(--tx-status-icon-lg-size)}:host([data-styled][data-severity=success]){--_color: var(--tx-status-icon-success-color)}:host([data-styled][data-severity=info]){--_color: var(--tx-status-icon-info-color)}:host([data-styled][data-severity=warn]){--_color: var(--tx-status-icon-warn-color)}:host([data-styled][data-severity=danger]){--_color: var(--tx-status-icon-danger-color)}\n"],
163
+ dependencies: [{
164
+ kind: "directive",
165
+ type: NgClass,
166
+ selector: "[ngClass]",
167
+ inputs: ["class", "ngClass"]
168
+ }, {
169
+ kind: "component",
170
+ type: TxIcon,
171
+ selector: "tx-icon",
172
+ inputs: ["name"]
173
+ }],
174
+ changeDetection: i0.ChangeDetectionStrategy.OnPush
175
+ });
176
+ };
177
+ i0.ɵɵngDeclareClassMetadata({
178
+ minVersion: "12.0.0",
179
+ version: "22.2.3",
180
+ ngImport: i0,
181
+ type: TxStatusIcon,
182
+ decorators: [{
183
+ type: Component,
184
+ args: [{
185
+ selector: "tx-status-icon",
186
+ imports: [NgClass, TxIcon],
187
+ template: `
188
+ @if (iconName(); as name) {
189
+ <tx-icon class="tx-status-icon__icon" [name]="name" [class]="passThrough().icon?.class" [style]="passThrough().icon?.style" />
190
+ } @else {
191
+ <span class="tx-status-icon__icon" [class]="resolvedIcon()" [ngClass]="passThrough().icon?.class ?? null" [style]="passThrough().icon?.style"></span>
192
+ }
193
+ `,
194
+ changeDetection: ChangeDetectionStrategy.OnPush,
195
+ host: {
196
+ class: "tx-status-icon",
197
+ "[class]": "passThrough().root?.class",
198
+ "[style]": "hostStyle()",
199
+ "[attr.data-styled]": "!isUnstyled() || null",
200
+ "[attr.data-severity]": "resolvedSeverity()",
201
+ "[attr.data-size]": "size()",
202
+ "[attr.role]": "resolvedLabel() ? \"img\" : null",
203
+ "[attr.aria-label]": "resolvedLabel() || null",
204
+ "[attr.aria-hidden]": "resolvedLabel() ? null : \"true\"",
205
+ "[attr.title]": "resolvedLabel() || null"
206
+ },
207
+ styles: [":host{display:inline-flex;flex-shrink:0;align-items:center;justify-content:center;vertical-align:middle}:host([data-styled]){--_color: var(--tx-status-icon-secondary-color);color:var(--_color);font-size:var(--tx-status-icon-size);line-height:1}:host([data-styled][data-size=small]){font-size:var(--tx-status-icon-sm-size)}:host([data-styled][data-size=large]){font-size:var(--tx-status-icon-lg-size)}:host([data-styled][data-severity=success]){--_color: var(--tx-status-icon-success-color)}:host([data-styled][data-severity=info]){--_color: var(--tx-status-icon-info-color)}:host([data-styled][data-severity=warn]){--_color: var(--tx-status-icon-warn-color)}:host([data-styled][data-severity=danger]){--_color: var(--tx-status-icon-danger-color)}\n"]
208
+ }]
209
+ }],
210
+ propDecorators: {
211
+ status: [{
212
+ type: i0.Input,
213
+ args: [{
214
+ isSignal: true,
215
+ alias: "status",
216
+ required: false
217
+ }]
218
+ }],
219
+ severity: [{
220
+ type: i0.Input,
221
+ args: [{
222
+ isSignal: true,
223
+ alias: "severity",
224
+ required: false
225
+ }]
226
+ }],
227
+ icon: [{
228
+ type: i0.Input,
229
+ args: [{
230
+ isSignal: true,
231
+ alias: "icon",
232
+ required: false
233
+ }]
234
+ }],
235
+ label: [{
236
+ type: i0.Input,
237
+ args: [{
238
+ isSignal: true,
239
+ alias: "label",
240
+ required: false
241
+ }]
242
+ }],
243
+ toolTip: [{
244
+ type: i0.Input,
245
+ args: [{
246
+ isSignal: true,
247
+ alias: "toolTip",
248
+ required: false
249
+ }]
250
+ }],
251
+ size: [{
252
+ type: i0.Input,
253
+ args: [{
254
+ isSignal: true,
255
+ alias: "size",
256
+ required: false
257
+ }]
258
+ }],
259
+ dt: [{
260
+ type: i0.Input,
261
+ args: [{
262
+ isSignal: true,
263
+ alias: "dt",
264
+ required: false
265
+ }]
266
+ }],
267
+ pt: [{
268
+ type: i0.Input,
269
+ args: [{
270
+ isSignal: true,
271
+ alias: "pt",
272
+ required: false
273
+ }]
274
+ }],
275
+ ptOptions: [{
276
+ type: i0.Input,
277
+ args: [{
278
+ isSignal: true,
279
+ alias: "ptOptions",
280
+ required: false
281
+ }]
282
+ }],
283
+ unstyled: [{
284
+ type: i0.Input,
285
+ args: [{
286
+ isSignal: true,
287
+ alias: "unstyled",
288
+ required: false
289
+ }]
290
+ }]
291
+ }
292
+ });
293
+ export { TxStatusIcon };
294
+
295
+ //# sourceMappingURL=tectra-ng-ui-status-icon.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tectra-ng-ui-status-icon.mjs","names":[],"sources":["../../../../packages/ui/status-icon/src/status-icon.component.ts"],"sourcesContent":["import { NgClass } from '@angular/common';\nimport { ChangeDetectionStrategy, Component, computed, inject, input } 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, TectraStatusIconTokens, toStyleObject } from '@tectra-ng/themes';\nimport { TxStatusIconPart, TxStatusIconSeverity, TxStatusIconSize } from './status-icon.types';\n\nconst SEVERITY_ICONS: Record<TxStatusIconSeverity, TxIconName> = {\n success: 'check-circle',\n info: 'info-circle',\n warn: 'exclamation-triangle',\n danger: 'times-circle',\n secondary: 'minus-circle',\n};\n\n@Component({\n selector: 'tx-status-icon',\n imports: [NgClass, TxIcon],\n template: `\n @if (iconName(); as name) {\n <tx-icon class=\"tx-status-icon__icon\" [name]=\"name\" [class]=\"passThrough().icon?.class\" [style]=\"passThrough().icon?.style\" />\n } @else {\n <span class=\"tx-status-icon__icon\" [class]=\"resolvedIcon()\" [ngClass]=\"passThrough().icon?.class ?? null\" [style]=\"passThrough().icon?.style\"></span>\n }\n `,\n styleUrl: './status-icon.component.scss',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tx-status-icon',\n '[class]': 'passThrough().root?.class',\n '[style]': 'hostStyle()',\n '[attr.data-styled]': '!isUnstyled() || null',\n '[attr.data-severity]': 'resolvedSeverity()',\n '[attr.data-size]': 'size()',\n '[attr.role]': 'resolvedLabel() ? \"img\" : null',\n '[attr.aria-label]': 'resolvedLabel() || null',\n '[attr.aria-hidden]': 'resolvedLabel() ? null : \"true\"',\n '[attr.title]': 'resolvedLabel() || null',\n },\n})\nexport class TxStatusIcon {\n private txIconRegistry = inject(TxIconRegistry);\n\n readonly status = input<boolean | null | undefined, unknown>(undefined, { transform: optionalBoolean });\n readonly severity = input<TxStatusIconSeverity | undefined>(undefined);\n readonly icon = input<TxIconName | (string & {}) | undefined>(undefined);\n readonly label = input<string | undefined>(undefined);\n readonly toolTip = input<string | undefined>(undefined);\n readonly size = input<TxStatusIconSize>('medium');\n readonly dt = input<TectraDeepPartial<TectraStatusIconTokens> | undefined>(undefined);\n readonly pt = input<TxPassThrough<TxStatusIconPart, TxStatusIcon> | undefined>(undefined);\n readonly ptOptions = input<TxPassThroughOptions | undefined>(undefined);\n readonly unstyled = input<boolean | undefined, unknown>(undefined, { transform: optionalBoolean });\n\n readonly translations = injectTranslations();\n readonly isUnstyled = injectUnstyled(this.unstyled);\n readonly passThrough = injectPassThrough('statusIcon', this, this.pt, this.ptOptions);\n readonly resolvedSeverity = computed<TxStatusIconSeverity>(() => this.severity() ?? (this.status() ? 'success' : 'danger'));\n readonly resolvedIcon = computed(() => this.icon() ?? SEVERITY_ICONS[this.resolvedSeverity()]);\n readonly iconName = computed(() => {\n const icon = this.resolvedIcon();\n return this.txIconRegistry.has(icon) ? icon : null;\n });\n readonly resolvedLabel = computed(() => {\n const label = this.label() ?? this.toolTip();\n if (label !== undefined) {\n return label;\n }\n if (this.severity()) {\n return '';\n }\n return this.status() ? this.translations().yes : this.translations().no;\n });\n readonly hostStyle = computed(() => ({ ...toStyleObject(this.dt(), '--tx-status-icon'), ...this.passThrough().root?.style }));\n}\n"],"mappings":";;;;;;;;AASA,MAAM,iBAA2D;CAC/D,SAAS;CACT,MAAM;CACN,MAAM;CACN,QAAQ;CACR,WAAW;AACZ;AA2BD,IAAa,eAAb,MAAa,aAAY;CACf,iBAAiB,OAAO,cAAc;CAErC,SAAS,MAA2C,QAAS;EAAA,GAAA,YAAA,EAAA,WAAA,SAAA,+BAAA,CAAA;EAAI,WAAW;CAAe,CAAA;CAC3F,WAAW,MAAwC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,WAAA,CAAA,+BAAA,CAAA,CAAA;CAC7D,OAAO,MAA8C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,OAAA,CAAA,+BAAA,CAAA,CAAA;CAC/D,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