@taiga-ui/kit 4.52.0-canary.a4e325d → 4.52.0-canary.e10b718

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 (255) hide show
  1. package/components/avatar/avatar.directive.d.ts +15 -0
  2. package/components/avatar/avatar.options.d.ts +1 -4
  3. package/components/avatar/index.d.ts +1 -1
  4. package/components/badge/badge.directive.d.ts +1 -1
  5. package/components/calendar-month/calendar-month.options.d.ts +1 -1
  6. package/components/checkbox/checkbox.component.d.ts +7 -18
  7. package/components/checkbox/checkbox.options.d.ts +5 -9
  8. package/components/files/file/file.options.d.ts +1 -1
  9. package/components/index.d.ts +0 -1
  10. package/components/input-chip/input-chip.options.d.ts +1 -1
  11. package/components/input-color/input-color.component.d.ts +2 -2
  12. package/components/input-color/input-color.options.d.ts +1 -1
  13. package/components/input-date/input-date.options.d.ts +1 -1
  14. package/components/input-number/input-number.options.d.ts +1 -1
  15. package/components/input-phone/input-phone.options.d.ts +1 -1
  16. package/components/input-time/input-time.options.d.ts +1 -1
  17. package/components/like/like.component.d.ts +4 -11
  18. package/components/like/like.options.d.ts +3 -4
  19. package/components/line-clamp/line-clamp.component.d.ts +6 -10
  20. package/components/pager/pager.component.d.ts +1 -1
  21. package/components/push/push.component.d.ts +1 -1
  22. package/components/radio/radio.component.d.ts +7 -8
  23. package/components/radio/radio.directive.d.ts +2 -2
  24. package/components/radio/radio.options.d.ts +2 -5
  25. package/components/segmented/segmented.component.d.ts +1 -3
  26. package/components/switch/switch.component.d.ts +7 -19
  27. package/components/switch/switch.options.d.ts +4 -8
  28. package/components/textarea/textarea.options.d.ts +1 -1
  29. package/directives/copy/copy.directive.d.ts +1 -2
  30. package/directives/copy/copy.options.d.ts +2 -2
  31. package/directives/highlight/highlight.directive.d.ts +1 -3
  32. package/directives/index.d.ts +0 -1
  33. package/directives/password/password.options.d.ts +1 -1
  34. package/directives/tooltip/tooltip.options.d.ts +1 -4
  35. package/fesm2022/taiga-ui-kit-components-accordion.mjs +14 -15
  36. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +6 -6
  38. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-kit-components-avatar.mjs +74 -82
  40. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +3 -3
  42. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  43. package/fesm2022/taiga-ui-kit-components-badge.mjs +9 -8
  44. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  45. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +6 -6
  46. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  47. package/fesm2022/taiga-ui-kit-components-block.mjs +7 -7
  48. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  49. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +6 -8
  50. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  51. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +3 -3
  52. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +4 -6
  54. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +7 -7
  56. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-kit-components-carousel.mjs +17 -19
  58. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +19 -76
  60. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-kit-components-chip.mjs +16 -9
  62. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +3 -3
  64. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-kit-components-comment.mjs +6 -6
  66. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-kit-components-compass.mjs +3 -3
  68. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-kit-components-confirm.mjs +8 -8
  70. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +8 -9
  72. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-kit-components-drawer.mjs +3 -3
  74. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +6 -6
  76. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-kit-components-files.mjs +26 -35
  78. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-kit-components-filter.mjs +5 -14
  80. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +6 -6
  82. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +20 -17
  84. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-kit-components-input-color.mjs +9 -11
  86. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +5 -5
  88. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +3 -3
  90. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +7 -8
  92. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-kit-components-input-date.mjs +13 -14
  94. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +5 -5
  96. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +5 -5
  98. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-kit-components-input-month.mjs +10 -11
  100. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-kit-components-input-number.mjs +19 -19
  102. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +5 -8
  104. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +3 -3
  106. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +3 -3
  108. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-kit-components-input-range.mjs +6 -14
  110. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +6 -6
  112. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-kit-components-input-time.mjs +12 -13
  114. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  115. package/fesm2022/taiga-ui-kit-components-input-year.mjs +5 -5
  116. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  117. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +16 -16
  118. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  119. package/fesm2022/taiga-ui-kit-components-like.mjs +40 -33
  120. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  121. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +29 -35
  122. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-kit-components-message.mjs +6 -6
  124. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +33 -31
  126. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +11 -11
  128. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -6
  130. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-kit-components-pagination.mjs +5 -5
  132. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +9 -9
  134. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  136. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +9 -9
  138. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-kit-components-preview.mjs +29 -31
  140. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-kit-components-progress.mjs +24 -24
  142. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  143. package/fesm2022/taiga-ui-kit-components-pulse.mjs +3 -3
  144. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  145. package/fesm2022/taiga-ui-kit-components-push.mjs +17 -17
  146. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  147. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +5 -6
  148. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  149. package/fesm2022/taiga-ui-kit-components-radio.mjs +33 -38
  150. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  151. package/fesm2022/taiga-ui-kit-components-range.mjs +6 -6
  152. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  153. package/fesm2022/taiga-ui-kit-components-rating.mjs +3 -3
  154. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  155. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +3 -3
  156. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  157. package/fesm2022/taiga-ui-kit-components-segmented.mjs +6 -6
  158. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  159. package/fesm2022/taiga-ui-kit-components-select.mjs +13 -13
  160. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  161. package/fesm2022/taiga-ui-kit-components-slider.mjs +17 -17
  162. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  163. package/fesm2022/taiga-ui-kit-components-slides.mjs +6 -6
  164. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
  165. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  166. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  167. package/fesm2022/taiga-ui-kit-components-stepper.mjs +11 -11
  168. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  169. package/fesm2022/taiga-ui-kit-components-switch.mjs +19 -65
  170. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  171. package/fesm2022/taiga-ui-kit-components-tabs.mjs +20 -22
  172. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  173. package/fesm2022/taiga-ui-kit-components-textarea.mjs +14 -15
  174. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  175. package/fesm2022/taiga-ui-kit-components-tiles.mjs +12 -12
  176. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  177. package/fesm2022/taiga-ui-kit-components-tree.mjs +31 -39
  178. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  179. package/fesm2022/taiga-ui-kit-components.mjs +0 -1
  180. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  181. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +3 -3
  182. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  183. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +6 -6
  184. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  185. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +3 -3
  186. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  187. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +6 -6
  188. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  189. package/fesm2022/taiga-ui-kit-directives-connected.mjs +6 -6
  190. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  191. package/fesm2022/taiga-ui-kit-directives-copy.mjs +10 -11
  192. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +1 -1
  193. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +3 -3
  194. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  195. package/fesm2022/taiga-ui-kit-directives-fade.mjs +6 -6
  196. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  197. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +3 -3
  198. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  199. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +3 -3
  200. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  201. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +6 -7
  202. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
  203. package/fesm2022/taiga-ui-kit-directives-password.mjs +6 -6
  204. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  205. package/fesm2022/taiga-ui-kit-directives-present.mjs +3 -3
  206. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  207. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  208. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  209. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  210. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  211. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +6 -6
  212. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  213. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +6 -6
  214. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  215. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +3 -3
  216. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  217. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +3 -3
  218. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  219. package/fesm2022/taiga-ui-kit-directives.mjs +0 -1
  220. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  221. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -3
  222. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs +6 -6
  224. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs.map +1 -1
  225. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +3 -3
  226. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  227. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +3 -3
  228. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  229. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +3 -3
  230. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  231. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
  232. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
  234. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  237. package/package.json +5 -13
  238. package/styles/components/avatar.less +188 -0
  239. package/styles/components/block.less +1 -1
  240. package/styles/components/checkbox.less +13 -11
  241. package/styles/components/chip.less +1 -3
  242. package/styles/components/like.less +4 -9
  243. package/styles/components/pin.less +3 -6
  244. package/styles/components/switch.less +8 -8
  245. package/tokens/input-date-options.d.ts +1 -1
  246. package/components/avatar/avatar.component.d.ts +0 -15
  247. package/components/input-password/index.d.ts +0 -2
  248. package/components/input-password/input-password.component.d.ts +0 -16
  249. package/components/input-password/input-password.options.d.ts +0 -24
  250. package/directives/icon-badge/icon-badge.directive.d.ts +0 -9
  251. package/directives/icon-badge/index.d.ts +0 -1
  252. package/fesm2022/taiga-ui-kit-components-input-password.mjs +0 -95
  253. package/fesm2022/taiga-ui-kit-components-input-password.mjs.map +0 -1
  254. package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs +0 -47
  255. package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs.map +0 -1
@@ -0,0 +1,188 @@
1
+ @import '@taiga-ui/core/styles/taiga-ui-local.less';
2
+
3
+ /**
4
+ * @name Avatar
5
+ * @selector [tuiAvatar]
6
+ *
7
+ * @description
8
+ * An avatar component which can be used with icons, text or images
9
+ * and is applicable to static elements as well as buttons and links
10
+ *
11
+ * @attributes
12
+ * data-size — size (default: 'l') ('xs' | 's' | 'm' | 'l' | 'xl' | 'xxl')
13
+ * data-shape — shape (default: 'round') ('round' | 'square')
14
+ *
15
+ * @example
16
+ * <span tuiAvatar tuiIcons style="--t-icon-start: url('icon.svg')"></span>
17
+ * <button tuiAvatar>
18
+ * <img src="path/to/image" alt="Avatar" />
19
+ * </button>
20
+ *
21
+ * @see-also
22
+ * Icons, Icon, Appearance
23
+ */
24
+ [tuiAvatar] {
25
+ --t-size: var(--tui-height-l);
26
+ --t-radius: 0.75rem;
27
+ --t-corner-offset: calc((var(--t-radius) * 1.4142 - var(--t-radius)) * 1 / 1.4142);
28
+
29
+ position: relative;
30
+ display: inline-flex;
31
+ flex-shrink: 0;
32
+ inline-size: var(--t-size);
33
+ block-size: var(--t-size);
34
+ align-items: center;
35
+ justify-content: center;
36
+ white-space: nowrap;
37
+ border-radius: var(--t-radius);
38
+ border: none;
39
+ background: var(--tui-background-neutral-1);
40
+ color: var(--tui-text-secondary);
41
+ vertical-align: middle;
42
+ box-sizing: border-box;
43
+ padding: 0.25rem;
44
+ font: var(--tui-font-text-l);
45
+ font-weight: bold;
46
+ opacity: 0.999; // Kick in hardware rendering layer to avoid artifacts on the edges
47
+
48
+ &::before {
49
+ inline-size: auto;
50
+ block-size: auto;
51
+ }
52
+
53
+ &:not(._initials)::before {
54
+ position: absolute;
55
+ inset: 0;
56
+ font-size: calc(var(--t-size) * 0.6);
57
+ }
58
+
59
+ &[data-size='xs'] {
60
+ --t-size: var(--tui-height-xs);
61
+ --t-radius: 0.5rem;
62
+
63
+ font: var(--tui-font-text-ui-xs);
64
+ font-size: 0.5625rem;
65
+
66
+ &._initials::before {
67
+ font: var(--tui-font-text-ui-xs);
68
+ font-weight: bold;
69
+ }
70
+ }
71
+
72
+ &[data-size='s'] {
73
+ --t-size: var(--tui-height-s);
74
+ --t-radius: 0.5rem;
75
+
76
+ font: var(--tui-font-text-ui-xs);
77
+ font-weight: bold;
78
+
79
+ &._initials::before {
80
+ font: var(--tui-font-text-s);
81
+ font-weight: bold;
82
+ }
83
+ }
84
+
85
+ &[data-size='m'] {
86
+ --t-size: calc(var(--tui-height-m) - 0.25rem);
87
+ --t-radius: 0.75rem;
88
+
89
+ font: var(--tui-font-text-ui-m);
90
+ font-weight: bold;
91
+
92
+ &._initials::before {
93
+ font: var(--tui-font-text-m);
94
+ font-weight: bold;
95
+ }
96
+ }
97
+
98
+ &[data-size='xl'] {
99
+ --t-size: 5rem;
100
+ --t-radius: 0.75rem;
101
+
102
+ font: var(--tui-font-heading-4);
103
+
104
+ &._initials::before {
105
+ font: var(--tui-font-heading-3);
106
+ }
107
+ }
108
+
109
+ &[data-size='xxl'] {
110
+ --t-size: 6rem;
111
+ --t-radius: 1rem;
112
+
113
+ font: var(--tui-font-heading-3);
114
+
115
+ &._initials::before {
116
+ font: var(--tui-font-heading-3);
117
+ }
118
+ }
119
+
120
+ &[data-size='xxxl'] {
121
+ --t-size: 8rem;
122
+ --t-radius: 1.25rem;
123
+
124
+ font: var(--tui-font-heading-3);
125
+
126
+ &._initials::before {
127
+ font: var(--tui-font-heading-2);
128
+ }
129
+ }
130
+
131
+ &:not([data-shape='square']) {
132
+ --t-radius: calc(var(--t-size) / 2);
133
+ }
134
+
135
+ &._initials {
136
+ &::before {
137
+ content: attr(data-icon-start);
138
+ mask: none;
139
+ background: none;
140
+ font: var(--tui-font-heading-6);
141
+ }
142
+ }
143
+
144
+ &._badge {
145
+ mask: radial-gradient(
146
+ circle at calc(100% - var(--t-corner-offset)) calc(100% - var(--t-corner-offset)),
147
+ black 0.23rem,
148
+ transparent 0.25rem,
149
+ transparent 0.375rem,
150
+ black 0.39rem
151
+ );
152
+ mask-clip: no-clip;
153
+
154
+ &::after {
155
+ content: '';
156
+ position: absolute;
157
+ top: calc(100% - var(--t-corner-offset));
158
+ left: calc(100% - var(--t-corner-offset));
159
+ display: block;
160
+ inline-size: 0.55rem;
161
+ block-size: 0.55rem;
162
+ border-radius: 100%;
163
+ background: var(--t-badge);
164
+ transform: translate3d(-50%, -50%, 0);
165
+ }
166
+ }
167
+
168
+ &._fallback {
169
+ img,
170
+ video {
171
+ display: none;
172
+ }
173
+ }
174
+
175
+ img,
176
+ video,
177
+ picture {
178
+ .fullsize();
179
+
180
+ object-fit: cover;
181
+ box-sizing: border-box;
182
+ border-radius: inherit;
183
+ }
184
+
185
+ &:has(img, video):not(._fallback) {
186
+ background: none;
187
+ }
188
+ }
@@ -94,7 +94,7 @@
94
94
  padding: 0;
95
95
  }
96
96
 
97
- tui-avatar {
97
+ [tuiAvatar] {
98
98
  margin: -0.25rem;
99
99
  }
100
100
 
@@ -11,11 +11,11 @@
11
11
  * data-size — size (default: 'm') ('s' | 'm')
12
12
  *
13
13
  * @vars
14
- * --t-checked-icon — checkmark icon
15
- * --t-indeterminate-icon — indeterminate state icon
14
+ * --t-icon-start — checkmark icon
15
+ * --t-icon-end — indeterminate state icon
16
16
  *
17
17
  * @example
18
- * <input type="checkbox" tuiCheckbox />
18
+ * <input type="checkbox" tuiCheckbox tuiIcons tuiAppearance data-appearance='secondary' />
19
19
  *
20
20
  * @see-also
21
21
  * Switch, Radio, Appearance
@@ -32,19 +32,21 @@
32
32
  flex-shrink: 0;
33
33
 
34
34
  &::before {
35
- .fullsize(absolute, inset);
36
-
37
- content: '';
35
+ position: absolute;
36
+ block-size: 100%;
37
+ inline-size: 100%;
38
38
  font-size: 1rem;
39
- background: currentColor;
40
- mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"></svg>') no-repeat center /
41
- calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem)) ~'min(1em, 100%)' padding-box;
39
+ mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
42
40
  transform: scale(0);
43
41
  transition:
44
42
  transform var(--tui-duration) ease-in-out,
45
43
  mask 0s var(--tui-duration) ease-in-out;
46
44
  }
47
45
 
46
+ &::after {
47
+ display: none;
48
+ }
49
+
48
50
  &:disabled._readonly {
49
51
  opacity: 1;
50
52
  pointer-events: none;
@@ -53,7 +55,7 @@
53
55
  &:checked,
54
56
  &:indeterminate {
55
57
  &::before {
56
- mask-image: var(--t-checked-icon);
58
+ mask-image: var(--t-icon-start);
57
59
  transform: scale(1);
58
60
  transition:
59
61
  transform var(--tui-duration) ease-in-out,
@@ -63,7 +65,7 @@
63
65
  }
64
66
 
65
67
  &:indeterminate::before {
66
- mask-image: var(--t-indeterminate-icon);
68
+ mask-image: var(--t-icon-end);
67
69
  }
68
70
 
69
71
  &[data-size='s'] {
@@ -88,7 +88,7 @@ tui-chip,
88
88
  }
89
89
 
90
90
  & > img,
91
- tui-avatar {
91
+ [tuiAvatar] {
92
92
  inline-size: 1.5rem;
93
93
  margin-inline-start: -0.375rem;
94
94
  }
@@ -115,8 +115,6 @@ tui-chip,
115
115
  }
116
116
  }
117
117
 
118
- &[tuiAppearance][data-appearance='error'], /* TODO @deprecated remove in v5 */
119
- &[tuiAppearance][data-appearance='success'], /* TODO @deprecated remove in v5 */
120
118
  &[tuiAppearance][data-appearance='negative'],
121
119
  &[tuiAppearance][data-appearance='positive'],
122
120
  &[tuiAppearance][data-appearance='warning'],
@@ -11,12 +11,12 @@
11
11
  * data-size — size (default: 'm') ('s' | 'm')
12
12
  *
13
13
  * @vars
14
- * --t-icon-color - custom color for `:checked` state
15
- * --t-unchecked-icon — default state icon
16
- * --t-checked-icon — checkmark icon
14
+ * --t-icon-color custom color for `:checked` state
15
+ * --t-icon-start — default state icon
16
+ * --t-icon-end — checkmark icon
17
17
  *
18
18
  * @example
19
- * <input tuiLike />
19
+ * <input tuiLike tuiIcons tuiAppearance data-appearance="secondary" />
20
20
  *
21
21
  * @see-also
22
22
  * Checkbox, Switch, Radio, Appearance
@@ -34,16 +34,11 @@
34
34
  &::after {
35
35
  .fullsize();
36
36
 
37
- content: '';
38
- background: currentColor;
39
37
  font-size: 1.25rem;
40
- mask: var(--t-unchecked-icon) no-repeat center /
41
- calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem)) ~'min(1em, 100%)' padding-box;
42
38
  transition-property: transform, opacity;
43
39
  }
44
40
 
45
41
  &::after {
46
- mask-image: var(--t-checked-icon);
47
42
  opacity: 0;
48
43
  color: var(--t-icon-color, inherit);
49
44
  transform: scale(0);
@@ -64,8 +64,7 @@ tui-pin,
64
64
  background: var(--tui-background-base);
65
65
  }
66
66
 
67
- > tui-icon,
68
- > tui-svg {
67
+ > tui-icon {
69
68
  .transition(~'width, height');
70
69
 
71
70
  font-size: 1.25rem;
@@ -84,8 +83,7 @@ tui-pin,
84
83
  padding: 0.125rem;
85
84
  }
86
85
 
87
- > tui-icon,
88
- > tui-svg {
86
+ > tui-icon {
89
87
  font-size: 2.125rem;
90
88
  }
91
89
 
@@ -113,8 +111,7 @@ tui-pin,
113
111
  padding: 0.125rem;
114
112
  }
115
113
 
116
- > tui-icon,
117
- > tui-svg {
114
+ > tui-icon {
118
115
  font-size: 2.125rem;
119
116
  }
120
117
 
@@ -11,10 +11,10 @@
11
11
  * data-size — size (default: 'm') ('s' | 'm')
12
12
  *
13
13
  * @vars
14
- * --t-checked-icon — checkmark icon
14
+ * --t-icon-start — checkmark icon
15
15
  *
16
16
  * @example
17
- * <input type="checkbox" tuiSwitch />
17
+ * <input type="checkbox" tuiSwitch tuiAppearance data-appearance="primary" />
18
18
  *
19
19
  * @see-also
20
20
  * Checkbox, Radio
@@ -69,7 +69,6 @@
69
69
 
70
70
  &::before,
71
71
  &::after {
72
- content: '';
73
72
  position: absolute;
74
73
  block-size: 100%;
75
74
  inline-size: 1.5rem;
@@ -77,10 +76,6 @@
77
76
  }
78
77
 
79
78
  &::before {
80
- display: var(--t-checked-icon, none);
81
- background: currentColor;
82
- mask: var(--t-checked-icon) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
83
- ~'min(1em, 100%)' padding-box;
84
79
  font-size: 1rem;
85
80
  inline-size: 1.375rem;
86
81
  transform: translateX(-1.5rem);
@@ -88,11 +83,16 @@
88
83
 
89
84
  &::after {
90
85
  right: 0;
86
+ display: block;
91
87
  border-radius: 100%;
88
+ background: none;
92
89
  transform: scale(0.33333);
93
90
  box-shadow: -4.5rem 0 0 0.75rem var(--tui-background-base);
94
91
  outline: 0.375rem solid var(--tui-background-neutral-2-pressed);
95
- outline-offset: var(--t-checked-icon, 20rem);
92
+ }
93
+
94
+ &:not([data-icon-start])::after {
95
+ outline-offset: 20rem;
96
96
  }
97
97
 
98
98
  &:invalid:not([data-mode]),
@@ -12,4 +12,4 @@ export declare const TUI_INPUT_DATE_DEFAULT_OPTIONS: TuiInputDateOptions;
12
12
  /**
13
13
  * Default parameters for InputDate component
14
14
  */
15
- export declare const TUI_INPUT_DATE_OPTIONS: import("@angular/core").InjectionToken<TuiInputDateOptions>, tuiInputDateOptionsProvider: (item: Partial<TuiInputDateOptions> | import("@angular/core").ProviderToken<Partial<TuiInputDateOptions>> | (() => Partial<TuiInputDateOptions>)) => import("@angular/core").FactoryProvider;
15
+ export declare const TUI_INPUT_DATE_OPTIONS: import("@angular/core").InjectionToken<TuiInputDateOptions>, tuiInputDateOptionsProvider: (item: Partial<TuiInputDateOptions> | (() => Partial<TuiInputDateOptions>)) => import("@angular/core").FactoryProvider;
@@ -1,15 +0,0 @@
1
- import { type SafeResourceUrl } from '@angular/platform-browser';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@taiga-ui/core/directives/appearance";
4
- import * as i2 from "@taiga-ui/core/directives/icons";
5
- export declare class TuiAvatar {
6
- private readonly options;
7
- size: "m" | "s" | "xs" | "l" | "xl" | "xxl";
8
- round: boolean;
9
- src?: SafeResourceUrl | string | null;
10
- protected get value(): SafeResourceUrl | string;
11
- protected get svg(): boolean;
12
- protected get type(): 'content' | 'icon' | 'img' | 'text';
13
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiAvatar, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiAvatar, "tui-avatar,button[tuiAvatar],a[tuiAvatar]", never, { "size": { "alias": "size"; "required": false; }; "round": { "alias": "round"; "required": false; }; "src": { "alias": "src"; "required": false; }; }, {}, never, ["*"], true, [{ directive: typeof i1.TuiWithAppearance; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiIcons; inputs: { "iconStart": "src"; }; outputs: {}; }]>;
15
- }
@@ -1,2 +0,0 @@
1
- export * from './input-password.component';
2
- export * from './input-password.options';
@@ -1,16 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@taiga-ui/core/components/textfield";
3
- /**
4
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
5
- */
6
- export declare class TuiInputPassword {
7
- private readonly options;
8
- private readonly texts;
9
- protected readonly el: HTMLInputElement;
10
- protected readonly size: import("@angular/core").WritableSignal<"m" | "l" | "s">;
11
- protected readonly hidden: import("@angular/core").WritableSignal<boolean>;
12
- protected readonly text: import("@angular/core").Signal<string>;
13
- protected readonly icon: import("@angular/core").Signal<string>;
14
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiInputPassword, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiInputPassword, "input[tuiInputPassword]", never, {}, {}, never, never, true, [{ directive: typeof i1.TuiWithTextfield; inputs: {}; outputs: {}; }]>;
16
- }
@@ -1,24 +0,0 @@
1
- import { InjectionToken, type Provider } from '@angular/core';
2
- import { type TuiStringHandler } from '@taiga-ui/cdk/types';
3
- import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
4
- /**
5
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
6
- */
7
- export interface TuiInputPasswordOptions {
8
- readonly icons: Readonly<{
9
- hide: TuiStringHandler<TuiSizeL | TuiSizeS> | string;
10
- show: TuiStringHandler<TuiSizeL | TuiSizeS> | string;
11
- }>;
12
- }
13
- /**
14
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
15
- */
16
- export declare const TUI_INPUT_PASSWORD_DEFAULT_OPTIONS: TuiInputPasswordOptions;
17
- /**
18
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
19
- */
20
- export declare const TUI_INPUT_PASSWORD_OPTIONS: InjectionToken<TuiInputPasswordOptions>;
21
- /**
22
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
23
- */
24
- export declare function tuiInputPasswordOptionsProvider(options: Partial<TuiInputPasswordOptions>): Provider;
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class TuiIconBadge {
3
- private readonly icon;
4
- protected readonly nothing: undefined;
5
- protected readonly badgeSrc: import("@angular/core").WritableSignal<string | null>;
6
- set badge(icon: string);
7
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiIconBadge, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiIconBadge, "tui-icon[badge]", never, { "badge": { "alias": "badge"; "required": false; }; }, {}, never, never, true, never>;
9
- }
@@ -1 +0,0 @@
1
- export * from './icon-badge.directive';
@@ -1,95 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, signal, computed, ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { toSignal } from '@angular/core/rxjs-interop';
4
- import { tuiFallbackValueProvider } from '@taiga-ui/cdk/tokens';
5
- import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
6
- import { tuiProvideOptions, tuiIsString } from '@taiga-ui/cdk/utils/miscellaneous';
7
- import { TuiIcon } from '@taiga-ui/core/components/icon';
8
- import * as i1 from '@taiga-ui/core/components/textfield';
9
- import { TUI_TEXTFIELD_OPTIONS, TuiTextfieldContent, TuiWithTextfield } from '@taiga-ui/core/components/textfield';
10
- import { TuiTooltip } from '@taiga-ui/kit/directives';
11
- import { TUI_PASSWORD_TEXTS } from '@taiga-ui/kit/tokens';
12
-
13
- /**
14
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
15
- */
16
- const TUI_INPUT_PASSWORD_DEFAULT_OPTIONS = {
17
- icons: {
18
- hide: '@tui.eye-off',
19
- show: '@tui.eye',
20
- },
21
- };
22
- /**
23
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
24
- */
25
- const TUI_INPUT_PASSWORD_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_INPUT_PASSWORD_OPTIONS' : '', {
26
- factory: () => TUI_INPUT_PASSWORD_DEFAULT_OPTIONS,
27
- });
28
- /**
29
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
30
- */
31
- function tuiInputPasswordOptionsProvider(options) {
32
- return tuiProvideOptions(TUI_INPUT_PASSWORD_OPTIONS, options, TUI_INPUT_PASSWORD_DEFAULT_OPTIONS);
33
- }
34
-
35
- /**
36
- * @deprecated use {@link TuiPassword} with {@link TuiTextfield}
37
- */
38
- class TuiInputPassword {
39
- constructor() {
40
- this.options = inject(TUI_INPUT_PASSWORD_OPTIONS);
41
- this.texts = toSignal(inject(TUI_PASSWORD_TEXTS), {
42
- initialValue: ['', ''],
43
- });
44
- this.el = tuiInjectElement();
45
- this.size = inject(TUI_TEXTFIELD_OPTIONS).size;
46
- this.hidden = signal(true);
47
- this.text = computed(() => this.hidden() ? this.texts()[0] : this.texts()[1]);
48
- this.icon = computed((size = this.size()) => {
49
- const icon = this.hidden() ? this.options.icons.show : this.options.icons.hide;
50
- return tuiIsString(icon) ? icon : icon(size);
51
- });
52
- }
53
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiInputPassword, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
54
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiInputPassword, isStandalone: true, selector: "input[tuiInputPassword]", host: { attributes: { "ngSkipHydration": "true" }, properties: { "type": "hidden() ? \"password\" : \"text\"" } }, providers: [tuiFallbackValueProvider('')], hostDirectives: [{ directive: i1.TuiWithTextfield }], ngImport: i0, template: `
55
- <tui-icon
56
- *tuiTextfieldContent
57
- [icon]="icon()"
58
- [style.border]="size() === 's' ? null : 'none'"
59
- [tuiTooltip]="text()"
60
- (click)="hidden.set(!hidden())"
61
- (mousedown.capture.prevent.stop)="el.focus()"
62
- />
63
- `, isInline: true, dependencies: [{ kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }, { kind: "directive", type: TuiTextfieldContent, selector: "ng-template[tuiTextfieldContent]" }, { kind: "directive", type: TuiTooltip, selector: "tui-icon[tuiTooltip]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
64
- }
65
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiInputPassword, decorators: [{
66
- type: Component,
67
- args: [{
68
- selector: 'input[tuiInputPassword]',
69
- imports: [TuiIcon, TuiTextfieldContent, TuiTooltip],
70
- template: `
71
- <tui-icon
72
- *tuiTextfieldContent
73
- [icon]="icon()"
74
- [style.border]="size() === 's' ? null : 'none'"
75
- [tuiTooltip]="text()"
76
- (click)="hidden.set(!hidden())"
77
- (mousedown.capture.prevent.stop)="el.focus()"
78
- />
79
- `,
80
- changeDetection: ChangeDetectionStrategy.OnPush,
81
- providers: [tuiFallbackValueProvider('')],
82
- hostDirectives: [TuiWithTextfield],
83
- host: {
84
- ngSkipHydration: 'true',
85
- '[type]': 'hidden() ? "password" : "text"',
86
- },
87
- }]
88
- }] });
89
-
90
- /**
91
- * Generated bundle index. Do not edit.
92
- */
93
-
94
- export { TUI_INPUT_PASSWORD_DEFAULT_OPTIONS, TUI_INPUT_PASSWORD_OPTIONS, TuiInputPassword, tuiInputPasswordOptionsProvider };
95
- //# sourceMappingURL=taiga-ui-kit-components-input-password.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-kit-components-input-password.mjs","sources":["../../../projects/kit/components/input-password/input-password.options.ts","../../../projects/kit/components/input-password/input-password.component.ts","../../../projects/kit/components/input-password/taiga-ui-kit-components-input-password.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\n/**\n * @deprecated use {@link TuiPassword} with {@link TuiTextfield}\n */\nexport interface TuiInputPasswordOptions {\n readonly icons: Readonly<{\n hide: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n show: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n }>;\n}\n\n/**\n * @deprecated use {@link TuiPassword} with {@link TuiTextfield}\n */\nexport const TUI_INPUT_PASSWORD_DEFAULT_OPTIONS: TuiInputPasswordOptions = {\n icons: {\n hide: '@tui.eye-off',\n show: '@tui.eye',\n },\n};\n\n/**\n * @deprecated use {@link TuiPassword} with {@link TuiTextfield}\n */\nexport const TUI_INPUT_PASSWORD_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_INPUT_PASSWORD_OPTIONS' : '',\n {\n factory: () => TUI_INPUT_PASSWORD_DEFAULT_OPTIONS,\n },\n);\n\n/**\n * @deprecated use {@link TuiPassword} with {@link TuiTextfield}\n */\nexport function tuiInputPasswordOptionsProvider(\n options: Partial<TuiInputPasswordOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_INPUT_PASSWORD_OPTIONS,\n options,\n TUI_INPUT_PASSWORD_DEFAULT_OPTIONS,\n );\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n signal,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiFallbackValueProvider} from '@taiga-ui/cdk/tokens';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n TuiTextfieldContent,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiTooltip} from '@taiga-ui/kit/directives';\nimport {TUI_PASSWORD_TEXTS} from '@taiga-ui/kit/tokens';\n\nimport {TUI_INPUT_PASSWORD_OPTIONS} from './input-password.options';\n\n/**\n * @deprecated use {@link TuiPassword} with {@link TuiTextfield}\n */\n@Component({\n selector: 'input[tuiInputPassword]',\n imports: [TuiIcon, TuiTextfieldContent, TuiTooltip],\n template: `\n <tui-icon\n *tuiTextfieldContent\n [icon]=\"icon()\"\n [style.border]=\"size() === 's' ? null : 'none'\"\n [tuiTooltip]=\"text()\"\n (click)=\"hidden.set(!hidden())\"\n (mousedown.capture.prevent.stop)=\"el.focus()\"\n />\n `,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiFallbackValueProvider('')],\n hostDirectives: [TuiWithTextfield],\n host: {\n ngSkipHydration: 'true',\n '[type]': 'hidden() ? \"password\" : \"text\"',\n },\n})\nexport class TuiInputPassword {\n private readonly options = inject(TUI_INPUT_PASSWORD_OPTIONS);\n private readonly texts = toSignal(inject(TUI_PASSWORD_TEXTS), {\n initialValue: ['', ''] as const,\n });\n\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly size = inject(TUI_TEXTFIELD_OPTIONS).size;\n protected readonly hidden = signal(true);\n protected readonly text = computed(() =>\n this.hidden() ? this.texts()[0] : this.texts()[1],\n );\n\n protected readonly icon = computed((size = this.size()) => {\n const icon = this.hidden() ? this.options.icons.show : this.options.icons.hide;\n\n return tuiIsString(icon) ? icon : icon(size);\n });\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;AAeA;;AAEG;AACI,MAAM,kCAAkC,GAA4B;AACvE,IAAA,KAAK,EAAE;AACH,QAAA,IAAI,EAAE,cAAc;AACpB,QAAA,IAAI,EAAE,UAAU;AACnB,KAAA;;AAGL;;AAEG;AACI,MAA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AC,wBAAwB,CAAC,EAAE,CAAC,CAAC;oBACzC,cAAc,EAAE,CAAC,gBAAgB,CAAC;AAClC,oBAAA,IAAI,EAAE;AACF,wBAAA,eAAe,EAAE,MAAM;AACvB,wBAAA,QAAQ,EAAE,gCAAgC;AAC7C,qBAAA;AACJ,iBAAA;;;AC7CD;;AAEG;;;;"}
@@ -1,47 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, signal, Input, Directive } from '@angular/core';
3
- import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
4
- import { TuiIcon } from '@taiga-ui/core/components/icon';
5
-
6
- class TuiIconBadgeStyles {
7
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiIconBadgeStyles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiIconBadgeStyles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-icon-badge" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiIconBadge]:after{content:\"\";position:absolute;right:.143em;bottom:.143em;display:var(--t-icon-badge, none);inline-size:.57em;block-size:.57em;transform:translate(50%,50%);mask:var(--t-icon-badge) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;background:currentColor}[tuiIconBadge][style*=\"--t-icon-badge:\"]:before{-webkit-mask-image:var(--t-icon),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
9
- }
10
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiIconBadgeStyles, decorators: [{
11
- type: Component,
12
- args: [{ standalone: true, template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
13
- class: 'tui-icon-badge',
14
- }, styles: ["[tuiIconBadge]:after{content:\"\";position:absolute;right:.143em;bottom:.143em;display:var(--t-icon-badge, none);inline-size:.57em;block-size:.57em;transform:translate(50%,50%);mask:var(--t-icon-badge) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;background:currentColor}[tuiIconBadge][style*=\"--t-icon-badge:\"]:before{-webkit-mask-image:var(--t-icon),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}\n"] }]
15
- }] });
16
- class TuiIconBadge {
17
- constructor() {
18
- this.icon = inject(TuiIcon);
19
- this.nothing = tuiWithStyles(TuiIconBadgeStyles);
20
- this.badgeSrc = signal(null);
21
- }
22
- set badge(icon) {
23
- this.badgeSrc.set(this.icon.resolve(icon));
24
- }
25
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiIconBadge, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
26
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: TuiIconBadge, isStandalone: true, selector: "tui-icon[badge]", inputs: { badge: "badge" }, host: { attributes: { "tuiIconBadge": "" }, properties: { "style.--t-icon-badge": "badgeSrc()" } }, ngImport: i0 }); }
27
- }
28
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiIconBadge, decorators: [{
29
- type: Directive,
30
- args: [{
31
- standalone: true,
32
- selector: 'tui-icon[badge]',
33
- host: {
34
- tuiIconBadge: '',
35
- '[style.--t-icon-badge]': 'badgeSrc()',
36
- },
37
- }]
38
- }], propDecorators: { badge: [{
39
- type: Input
40
- }] } });
41
-
42
- /**
43
- * Generated bundle index. Do not edit.
44
- */
45
-
46
- export { TuiIconBadge };
47
- //# sourceMappingURL=taiga-ui-kit-directives-icon-badge.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-kit-directives-icon-badge.mjs","sources":["../../../projects/kit/directives/icon-badge/icon-badge.directive.ts","../../../projects/kit/directives/icon-badge/taiga-ui-kit-directives-icon-badge.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n Input,\n signal,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\n\n@Component({\n standalone: true,\n template: '',\n styleUrls: ['./icon-badge.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'tui-icon-badge',\n },\n})\nclass TuiIconBadgeStyles {}\n\n@Directive({\n standalone: true,\n selector: 'tui-icon[badge]',\n host: {\n tuiIconBadge: '',\n '[style.--t-icon-badge]': 'badgeSrc()',\n },\n})\nexport class TuiIconBadge {\n private readonly icon = inject(TuiIcon);\n\n protected readonly nothing = tuiWithStyles(TuiIconBadgeStyles);\n protected readonly badgeSrc = signal<string | null>(null);\n\n @Input()\n public set badge(icon: string) {\n this.badgeSrc.set(this.icon.resolve(icon));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAYA,MAUM,kBAAkB,CAAA;8GAAlB,kBAAkB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,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