@taiga-ui/kit 4.52.0-canary.6c67ccf → 4.52.0-canary.811ffeb

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 (385) hide show
  1. package/README.md +1 -1
  2. package/components/accordion/accordion.component.d.ts +13 -0
  3. package/components/accordion/accordion.d.ts +4 -4
  4. package/components/accordion/accordion.directive.d.ts +11 -10
  5. package/components/accordion/index.d.ts +1 -3
  6. package/components/action-bar/action-bar.component.d.ts +5 -7
  7. package/components/action-bar/index.d.ts +0 -2
  8. package/components/avatar/avatar-outline.directive.d.ts +3 -3
  9. package/components/avatar/avatar.directive.d.ts +15 -0
  10. package/components/avatar/avatar.options.d.ts +1 -4
  11. package/components/avatar/index.d.ts +1 -1
  12. package/components/badge/badge.directive.d.ts +2 -2
  13. package/components/badge/badge.options.d.ts +1 -3
  14. package/components/badge-notification/badge-notification.options.d.ts +1 -3
  15. package/components/block/block.directive.d.ts +4 -4
  16. package/components/block/block.options.d.ts +2 -4
  17. package/components/breadcrumbs/breadcrumbs.options.d.ts +1 -3
  18. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  19. package/components/calendar-month/calendar-month.options.d.ts +1 -1
  20. package/components/calendar-range/calendar-range.component.d.ts +1 -2
  21. package/components/checkbox/checkbox.component.d.ts +7 -18
  22. package/components/checkbox/checkbox.options.d.ts +5 -9
  23. package/components/chip/chip.directive.d.ts +2 -4
  24. package/components/chip/chip.options.d.ts +1 -3
  25. package/components/comment/comment.directive.d.ts +2 -2
  26. package/components/confirm/confirm.component.d.ts +4 -2
  27. package/components/confirm/confirm.service.d.ts +2 -1
  28. package/{directives → components}/copy/copy.component.d.ts +2 -2
  29. package/{directives → components}/copy/copy.directive.d.ts +3 -4
  30. package/{directives → components}/copy/copy.options.d.ts +2 -2
  31. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -0
  32. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +1 -1
  33. package/components/files/file/file.options.d.ts +2 -2
  34. package/components/files/files/files.component.d.ts +2 -2
  35. package/components/files/input-files/input-files.options.d.ts +1 -3
  36. package/components/floating-container/floating-container.directive.d.ts +2 -2
  37. package/components/fullscreen/fullscreen.component.d.ts +14 -0
  38. package/components/fullscreen/index.d.ts +1 -0
  39. package/components/index.d.ts +3 -2
  40. package/components/input-chip/input-chip.component.d.ts +8 -7
  41. package/components/input-chip/input-chip.directive.d.ts +5 -10
  42. package/components/input-chip/input-chip.options.d.ts +1 -1
  43. package/components/input-color/input-color.component.d.ts +2 -2
  44. package/components/input-color/input-color.options.d.ts +1 -1
  45. package/components/input-date/input-date.options.d.ts +1 -1
  46. package/components/input-date-multi/input-date-multi.directive.d.ts +9 -13
  47. package/components/input-number/input-number.directive.d.ts +5 -9
  48. package/components/input-number/input-number.options.d.ts +1 -1
  49. package/components/input-number/quantum.directive.d.ts +1 -1
  50. package/components/input-number/step/input-number-step.component.d.ts +1 -1
  51. package/components/input-phone/input-phone.options.d.ts +1 -1
  52. package/components/input-phone-international/input-phone-international.component.d.ts +24 -30
  53. package/components/input-phone-international/input-phone-international.options.d.ts +1 -3
  54. package/components/input-pin/input-pin.component.d.ts +1 -1
  55. package/components/input-range/input-range.component.d.ts +9 -12
  56. package/components/input-slider/input-slider.directive.d.ts +3 -5
  57. package/components/input-time/input-time.directive.d.ts +6 -8
  58. package/components/input-time/input-time.options.d.ts +1 -1
  59. package/components/like/like.component.d.ts +4 -11
  60. package/components/like/like.options.d.ts +3 -4
  61. package/components/line-clamp/line-clamp-box.component.d.ts +3 -4
  62. package/components/line-clamp/line-clamp.component.d.ts +8 -10
  63. package/components/line-clamp/line-clamp.options.d.ts +1 -3
  64. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +6 -8
  65. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  66. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  67. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  68. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  69. package/components/pager/pager.component.d.ts +1 -1
  70. package/components/pagination/index.d.ts +1 -0
  71. package/components/pagination/pagination.component.d.ts +3 -2
  72. package/components/pagination/pagination.options.d.ts +10 -0
  73. package/components/pin/pin.directive.d.ts +2 -2
  74. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  75. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  76. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  77. package/components/preview/pagination/preview-pagination.component.d.ts +1 -1
  78. package/components/preview/preview.component.d.ts +1 -1
  79. package/components/preview/preview.d.ts +2 -1
  80. package/components/preview/zoom/preview-zoom.component.d.ts +1 -1
  81. package/components/progress/progress-bar/fixed-gradient/progress-fixed-gradient.directive.d.ts +1 -2
  82. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  83. package/components/progress/progress-segmented/progress-segmented.directive.d.ts +2 -2
  84. package/components/progress/progress.options.d.ts +1 -3
  85. package/components/push/push-alert.component.d.ts +4 -3
  86. package/components/push/push.component.d.ts +2 -2
  87. package/components/push/push.directive.d.ts +4 -6
  88. package/components/push/push.options.d.ts +5 -8
  89. package/components/push/push.service.d.ts +6 -2
  90. package/components/radio/radio.component.d.ts +7 -8
  91. package/components/radio/radio.directive.d.ts +2 -2
  92. package/components/radio/radio.options.d.ts +2 -5
  93. package/components/range/range-change.directive.d.ts +1 -2
  94. package/components/range/range.component.d.ts +16 -24
  95. package/components/rating/rating.component.d.ts +5 -5
  96. package/components/rating/rating.options.d.ts +6 -6
  97. package/components/segmented/segmented.component.d.ts +5 -9
  98. package/components/segmented/segmented.directive.d.ts +6 -7
  99. package/components/select/native-select/native-select.component.d.ts +4 -5
  100. package/components/slider/helpers/key-steps.d.ts +1 -2
  101. package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
  102. package/components/slider/slider.options.d.ts +1 -6
  103. package/components/slides/slides.directive.d.ts +4 -4
  104. package/components/status/status.directive.d.ts +2 -2
  105. package/components/stepper/step.component.d.ts +6 -8
  106. package/components/stepper/stepper.component.d.ts +6 -11
  107. package/components/switch/switch.component.d.ts +7 -19
  108. package/components/switch/switch.options.d.ts +4 -8
  109. package/components/tabs/tabs-with-more.component.d.ts +1 -1
  110. package/components/tabs/tabs.options.d.ts +1 -6
  111. package/components/textarea/textarea-limit.directive.d.ts +4 -5
  112. package/components/textarea/textarea.options.d.ts +1 -1
  113. package/components/toast/index.d.ts +5 -0
  114. package/components/toast/toast.component.d.ts +18 -0
  115. package/components/toast/toast.d.ts +3 -0
  116. package/components/toast/toast.directive.d.ts +7 -0
  117. package/components/toast/toast.options.d.ts +10 -0
  118. package/components/toast/toast.service.d.ts +17 -0
  119. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
  120. package/components/tree/misc/tree.constants.d.ts +0 -3
  121. package/components/tree/misc/tree.tokens.d.ts +1 -6
  122. package/directives/button-close/button-close.directive.d.ts +2 -1
  123. package/directives/button-select/button-select.directive.d.ts +3 -3
  124. package/directives/chevron/chevron.directive.d.ts +2 -3
  125. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  126. package/directives/fade/fade.directive.d.ts +1 -0
  127. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  128. package/directives/fluid-typography/fluid-typography.options.d.ts +1 -3
  129. package/directives/highlight/highlight.directive.d.ts +1 -3
  130. package/directives/index.d.ts +0 -1
  131. package/directives/password/password.options.d.ts +1 -1
  132. package/directives/sensitive/sensitive.directive.d.ts +2 -2
  133. package/directives/shimmer/shimmer.directive.d.ts +3 -3
  134. package/directives/skeleton/skeleton.directive.d.ts +3 -3
  135. package/directives/tooltip/tooltip.directive.d.ts +2 -2
  136. package/directives/tooltip/tooltip.options.d.ts +1 -4
  137. package/fesm2022/taiga-ui-kit-components-accordion.mjs +69 -145
  138. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +22 -38
  140. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-kit-components-avatar.mjs +53 -71
  142. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  143. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +4 -9
  144. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  145. package/fesm2022/taiga-ui-kit-components-badge.mjs +14 -25
  146. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  147. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +0 -1
  148. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  149. package/fesm2022/taiga-ui-kit-components-block.mjs +18 -29
  150. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  151. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +6 -12
  152. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  153. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +3 -3
  154. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  155. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +4 -15
  156. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  157. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +4 -5
  158. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  159. package/fesm2022/taiga-ui-kit-components-carousel.mjs +3 -9
  160. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  161. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +17 -75
  162. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  163. package/fesm2022/taiga-ui-kit-components-chip.mjs +23 -32
  164. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  165. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +5 -6
  166. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  167. package/fesm2022/taiga-ui-kit-components-comment.mjs +11 -18
  168. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  169. package/fesm2022/taiga-ui-kit-components-compass.mjs +3 -3
  170. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  171. package/fesm2022/taiga-ui-kit-components-confirm.mjs +8 -11
  172. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  173. package/fesm2022/{taiga-ui-kit-directives-copy.mjs → taiga-ui-kit-components-copy.mjs} +17 -22
  174. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -0
  175. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +14 -6
  176. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  177. package/fesm2022/taiga-ui-kit-components-drawer.mjs +2 -2
  178. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  179. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -1
  180. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
  181. package/fesm2022/taiga-ui-kit-components-files.mjs +21 -28
  182. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  183. package/fesm2022/taiga-ui-kit-components-filter.mjs +1 -1
  184. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  185. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +11 -17
  186. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
  187. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +63 -0
  188. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -0
  189. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +55 -68
  190. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  191. package/fesm2022/taiga-ui-kit-components-input-color.mjs +4 -6
  192. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  193. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +26 -45
  194. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  195. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +1 -2
  196. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  197. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +4 -6
  198. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  199. package/fesm2022/taiga-ui-kit-components-input-date.mjs +13 -21
  200. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  201. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +2 -3
  202. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  203. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +6 -8
  204. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  205. package/fesm2022/taiga-ui-kit-components-input-month.mjs +6 -8
  206. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  207. package/fesm2022/taiga-ui-kit-components-input-number.mjs +30 -54
  208. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  209. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +105 -133
  210. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  211. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +3 -5
  212. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  213. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +5 -6
  214. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  215. package/fesm2022/taiga-ui-kit-components-input-range.mjs +31 -27
  216. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  217. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +26 -41
  218. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  219. package/fesm2022/taiga-ui-kit-components-input-time.mjs +32 -39
  220. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  221. package/fesm2022/taiga-ui-kit-components-input-year.mjs +5 -7
  222. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +2 -4
  224. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  225. package/fesm2022/taiga-ui-kit-components-like.mjs +38 -31
  226. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  227. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +28 -72
  228. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  229. package/fesm2022/taiga-ui-kit-components-message.mjs +6 -9
  230. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  231. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +27 -38
  232. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +32 -28
  234. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-pager.mjs +5 -7
  236. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-pagination.mjs +22 -13
  238. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-pin.mjs +13 -17
  240. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  241. package/fesm2022/taiga-ui-kit-components-preview.mjs +37 -29
  242. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-progress.mjs +61 -66
  244. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components-pulse.mjs +1 -1
  246. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-components-push.mjs +40 -47
  248. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  249. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +2 -2
  250. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  251. package/fesm2022/taiga-ui-kit-components-radio.mjs +31 -37
  252. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  253. package/fesm2022/taiga-ui-kit-components-range.mjs +36 -80
  254. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  255. package/fesm2022/taiga-ui-kit-components-rating.mjs +17 -26
  256. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  257. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +7 -3
  258. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  259. package/fesm2022/taiga-ui-kit-components-segmented.mjs +28 -55
  260. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  261. package/fesm2022/taiga-ui-kit-components-select.mjs +37 -41
  262. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  263. package/fesm2022/taiga-ui-kit-components-slider.mjs +62 -70
  264. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  265. package/fesm2022/taiga-ui-kit-components-slides.mjs +12 -20
  266. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
  267. package/fesm2022/taiga-ui-kit-components-status.mjs +10 -14
  268. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  269. package/fesm2022/taiga-ui-kit-components-stepper.mjs +41 -75
  270. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  271. package/fesm2022/taiga-ui-kit-components-switch.mjs +17 -64
  272. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  273. package/fesm2022/taiga-ui-kit-components-tabs.mjs +18 -31
  274. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  275. package/fesm2022/taiga-ui-kit-components-textarea.mjs +8 -18
  276. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  277. package/fesm2022/taiga-ui-kit-components-tiles.mjs +2 -3
  278. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  279. package/fesm2022/taiga-ui-kit-components-toast.mjs +165 -0
  280. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -0
  281. package/fesm2022/taiga-ui-kit-components-tree.mjs +39 -43
  282. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-components.mjs +3 -2
  284. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  285. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +13 -5
  286. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  287. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +6 -9
  288. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  289. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +14 -13
  290. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  291. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +13 -19
  292. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  293. package/fesm2022/taiga-ui-kit-directives-connected.mjs +7 -13
  294. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  295. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +22 -50
  296. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  297. package/fesm2022/taiga-ui-kit-directives-fade.mjs +6 -9
  298. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  299. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +12 -25
  300. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  301. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +0 -1
  302. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  303. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -1
  304. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
  305. package/fesm2022/taiga-ui-kit-directives-password.mjs +9 -11
  306. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  307. package/fesm2022/taiga-ui-kit-directives-present.mjs +0 -1
  308. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  309. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +11 -16
  310. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  311. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +22 -32
  312. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  313. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +25 -36
  314. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  315. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +13 -18
  316. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  317. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +3 -5
  318. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  319. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +1 -2
  320. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  321. package/fesm2022/taiga-ui-kit-directives.mjs +0 -1
  322. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  323. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +0 -1
  324. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  325. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +0 -1
  326. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  327. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +1 -2
  328. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  329. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +2 -2
  330. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  331. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +0 -1
  332. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  333. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +0 -1
  334. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  335. package/fesm2022/taiga-ui-kit-pipes.mjs +0 -1
  336. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  337. package/fesm2022/taiga-ui-kit-tokens.mjs +6 -24
  338. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  339. package/fesm2022/taiga-ui-kit-utils.mjs +1 -1
  340. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  341. package/package.json +44 -48
  342. package/pipes/index.d.ts +0 -1
  343. package/styles/components/avatar.less +188 -0
  344. package/styles/components/badge.less +1 -0
  345. package/styles/components/checkbox.less +14 -12
  346. package/styles/components/chip.less +12 -3
  347. package/styles/components/like.less +4 -9
  348. package/styles/components/pin.less +3 -7
  349. package/styles/components/radio.less +1 -1
  350. package/styles/components/switch.less +9 -9
  351. package/styles/components/toast.less +44 -0
  352. package/tokens/i18n.d.ts +25 -26
  353. package/tokens/index.d.ts +0 -1
  354. package/tokens/input-date-options.d.ts +1 -1
  355. package/tokens/items-handlers.d.ts +1 -7
  356. package/tokens/preview-icons.d.ts +1 -3
  357. package/components/accordion/accordion-item-content.directive.d.ts +0 -6
  358. package/components/accordion/accordion-item-eager-content.directive.d.ts +0 -5
  359. package/components/accordion/accordion-item.component.d.ts +0 -25
  360. package/components/action-bar/action-bar.d.ts +0 -3
  361. package/components/action-bar/action-bar.directive.d.ts +0 -6
  362. package/components/avatar/avatar.component.d.ts +0 -15
  363. package/components/input-password/index.d.ts +0 -2
  364. package/components/input-password/input-password.component.d.ts +0 -16
  365. package/components/input-password/input-password.options.d.ts +0 -24
  366. package/components/pdf-viewer/index.d.ts +0 -4
  367. package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
  368. package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
  369. package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
  370. package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
  371. package/fesm2022/taiga-ui-kit-components-input-password.mjs +0 -95
  372. package/fesm2022/taiga-ui-kit-components-input-password.mjs.map +0 -1
  373. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
  374. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
  375. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +0 -64
  376. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +0 -1
  377. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +0 -1
  378. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs +0 -147
  379. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs.map +0 -1
  380. package/pipes/field-error/field-error-content-pipe.d.ts +0 -14
  381. package/pipes/field-error/field-error-pipe.d.ts +0 -29
  382. package/pipes/field-error/index.d.ts +0 -2
  383. package/tokens/validation-errors.d.ts +0 -5
  384. /package/{directives → components}/copy/copy.d.ts +0 -0
  385. /package/{directives → components}/copy/index.d.ts +0 -0
@@ -1,64 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, ViewEncapsulation, Component, Injectable, Directive } from '@angular/core';
3
- import * as i1 from '@taiga-ui/cdk/directives/animated';
4
- import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
5
- import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
6
- import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
7
- import { TuiPopoverService, tuiAsPopover } from '@taiga-ui/cdk/services';
8
- import { TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
9
-
10
- class TuiPreviewDialog {
11
- constructor() {
12
- this.context = injectContext();
13
- }
14
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPreviewDialog, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiPreviewDialog, isStandalone: true, selector: "tui-preview-dialog", host: { listeners: { "document:keydown.esc.prevent": "context.$implicit.complete()" } }, hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: `
16
- <ng-container *polymorpheusOutlet="context.content as text; context: context">
17
- {{ text }}
18
- </ng-container>
19
- `, isInline: true, styles: ["tui-preview-dialog{inline-size:100%;block-size:100%}tui-preview-dialog.tui-enter,tui-preview-dialog.tui-leave{animation-name:tuiFade,tuiSlide}[tuiAppearance][data-appearance=preview-action]{background:#686868f5;color:#fff}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=preview-action]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){background:#9f9f9fdb}}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=preview-action]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){background:#9f9f9fdb}}[tuiAppearance][data-appearance=preview-action][data-state=hover]{background:#9f9f9fdb}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=preview-action][tuiWrapper]:hover:not(._no-hover),[tuiAppearance][data-appearance=preview-action][tuiWrapper][data-state=hover]{background:#9f9f9fdb}}[tuiAppearance][data-appearance=preview-action]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not(:disabled):not([data-state]){background:#9f9f9fbf}[tuiAppearance][data-appearance=preview-action]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not(:disabled):not([data-state]){background:#9f9f9fbf}[tuiAppearance][data-appearance=preview-action][data-state=active]{background:#9f9f9fbf}[tuiAppearance][data-appearance=preview-action][tuiWrapper]:active:not(._no-active),[tuiAppearance][data-appearance=preview-action][tuiWrapper][data-state=active],[tuiAppearance][data-appearance=preview-action][tuiWrapper][data-state=active]:hover{background:#9f9f9fbf}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
20
- }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPreviewDialog, decorators: [{
22
- type: Component,
23
- args: [{ selector: 'tui-preview-dialog', imports: [PolymorpheusOutlet], template: `
24
- <ng-container *polymorpheusOutlet="context.content as text; context: context">
25
- {{ text }}
26
- </ng-container>
27
- `, encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiAnimated], host: {
28
- '(document:keydown.esc.prevent)': 'context.$implicit.complete()',
29
- }, styles: ["tui-preview-dialog{inline-size:100%;block-size:100%}tui-preview-dialog.tui-enter,tui-preview-dialog.tui-leave{animation-name:tuiFade,tuiSlide}[tuiAppearance][data-appearance=preview-action]{background:#686868f5;color:#fff}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=preview-action]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){background:#9f9f9fdb}}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=preview-action]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){background:#9f9f9fdb}}[tuiAppearance][data-appearance=preview-action][data-state=hover]{background:#9f9f9fdb}@media (hover: hover) and (pointer: fine){[tuiAppearance][data-appearance=preview-action][tuiWrapper]:hover:not(._no-hover),[tuiAppearance][data-appearance=preview-action][tuiWrapper][data-state=hover]{background:#9f9f9fdb}}[tuiAppearance][data-appearance=preview-action]:matches(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not(:disabled):not([data-state]){background:#9f9f9fbf}[tuiAppearance][data-appearance=preview-action]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not(:disabled):not([data-state]){background:#9f9f9fbf}[tuiAppearance][data-appearance=preview-action][data-state=active]{background:#9f9f9fbf}[tuiAppearance][data-appearance=preview-action][tuiWrapper]:active:not(._no-active),[tuiAppearance][data-appearance=preview-action][tuiWrapper][data-state=active],[tuiAppearance][data-appearance=preview-action][tuiWrapper][data-state=active]:hover{background:#9f9f9fbf}\n"] }]
30
- }] });
31
-
32
- class TuiPreviewDialogService extends TuiPopoverService {
33
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPreviewDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
34
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPreviewDialogService, providedIn: 'root', useFactory: () => new TuiPreviewDialogService(TUI_DIALOGS, TuiPreviewDialog) }); }
35
- }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPreviewDialogService, decorators: [{
37
- type: Injectable,
38
- args: [{
39
- providedIn: 'root',
40
- useFactory: () => new TuiPreviewDialogService(TUI_DIALOGS, TuiPreviewDialog),
41
- }]
42
- }] });
43
-
44
- class TuiPreviewDialogDirective extends TuiPopoverDirective {
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPreviewDialogDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
46
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiPreviewDialogDirective, isStandalone: true, selector: "ng-template[tuiPreviewDialog]", inputs: { open: ["tuiPreviewDialog", "open"] }, outputs: { openChange: "tuiPreviewDialogChange" }, providers: [tuiAsPopover(TuiPreviewDialogService)], usesInheritance: true, ngImport: i0 }); }
47
- }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiPreviewDialogDirective, decorators: [{
49
- type: Directive,
50
- args: [{
51
- standalone: true,
52
- selector: 'ng-template[tuiPreviewDialog]',
53
- inputs: ['open: tuiPreviewDialog'],
54
- outputs: ['openChange: tuiPreviewDialogChange'],
55
- providers: [tuiAsPopover(TuiPreviewDialogService)],
56
- }]
57
- }] });
58
-
59
- /**
60
- * Generated bundle index. Do not edit.
61
- */
62
-
63
- export { TuiPreviewDialog, TuiPreviewDialogDirective, TuiPreviewDialogService };
64
- //# sourceMappingURL=taiga-ui-kit-components-preview-dialog.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-kit-components-preview-dialog.mjs","sources":["../../../projects/kit/components/preview/dialog/preview-dialog.component.ts","../../../projects/kit/components/preview/dialog/preview-dialog.service.ts","../../../projects/kit/components/preview/dialog/preview-dialog.directive.ts","../../../projects/kit/components/preview/dialog/taiga-ui-kit-components-preview-dialog.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, ViewEncapsulation} from '@angular/core';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-preview-dialog',\n imports: [PolymorpheusOutlet],\n template: `\n <ng-container *polymorpheusOutlet=\"context.content as text; context: context\">\n {{ text }}\n </ng-container>\n `,\n styleUrls: ['./preview-dialog.style.less'],\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated],\n host: {\n '(document:keydown.esc.prevent)': 'context.$implicit.complete()',\n },\n})\nexport class TuiPreviewDialog {\n protected readonly context = injectContext<TuiPopover<void, void>>();\n}\n","import {Injectable} from '@angular/core';\nimport {TuiPopoverService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\n\nimport {TuiPreviewDialog} from './preview-dialog.component';\n\n@Injectable({\n providedIn: 'root',\n useFactory: () => new TuiPreviewDialogService(TUI_DIALOGS, TuiPreviewDialog),\n})\nexport class TuiPreviewDialogService extends TuiPopoverService<unknown> {}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {TuiPreviewDialogService} from './preview-dialog.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiPreviewDialog]',\n inputs: ['open: tuiPreviewDialog'],\n outputs: ['openChange: tuiPreviewDialogChange'],\n providers: [tuiAsPopover(TuiPreviewDialogService)],\n})\nexport class TuiPreviewDialogDirective extends TuiPopoverDirective<unknown> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAqBa,gBAAgB,CAAA;AAhB7B,IAAA,WAAA,GAAA;QAiBuB,IAAO,CAAA,OAAA,GAAG,aAAa,EAA0B;AACvE;+GAFY,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,gBAAgB,EAbf,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,oBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,8BAAA,EAAA,8BAAA,EAAA,EAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,WAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA;;;;AAIT,IAAA,CAAA,EAAA,QAAA,EAAA,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AAA,CAAA;AACR,oBAAA,UAAU,EAAE,MAAM;oBAClB,UAAU,EAAE,MAAM,4BAA4B,WAAW,EAAE,gBAAgB,CAAC;AAC/E,iBAAA;;;ACIK,MAAO,yBAA0B,SAAQ,mBAA4B,CAAA;+GAA9D,yBAAyB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAzB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,yBAAyB,+KAFvB,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAEzC,yBAAyB,EAAA,UAAA,EAAA,CAAA;kBAPrC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,+BAA+B;oBACzC,MAAM,EAAE,CAAC,wBAAwB,CAAC;oBAClC,OAAO,EAAE,CAAC,oCAAoC,CAAC;AAC/C,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,uBAAuB,CAAC,CAAC;AACrD,iBAAA;;;ACZD;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-kit-directives-copy.mjs","sources":["../../../projects/kit/directives/copy/copy.options.ts","../../../projects/kit/directives/copy/copy.component.ts","../../../projects/kit/directives/copy/copy.template.html","../../../projects/kit/directives/copy/copy.directive.ts","../../../projects/kit/directives/copy/copy.ts","../../../projects/kit/directives/copy/index.ts","../../../projects/kit/directives/copy/taiga-ui-kit-directives-copy.ts"],"sourcesContent":["import {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\n\nexport interface TuiCopyOptions {\n readonly icon: TuiStringHandler<TuiSizeL | TuiSizeS> | string;\n}\n\nexport const [TUI_COPY_OPTIONS, tuiCopyOptionsProvider] =\n tuiCreateOptions<TuiCopyOptions>({icon: '@tui.copy'});\n","import {ClipboardModule} from '@angular/cdk/clipboard';\nimport {ChangeDetectionStrategy, Component, inject, Input} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {TUI_FALSE_HANDLER} from '@taiga-ui/cdk/constants';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TUI_NOTIFICATION_OPTIONS} from '@taiga-ui/core/components/notification';\nimport {TuiHint} from '@taiga-ui/core/directives/hint';\nimport {type TuiSizeL} from '@taiga-ui/core/types';\nimport {TUI_COPY_TEXTS} from '@taiga-ui/kit/tokens';\nimport {BehaviorSubject, map, startWith, switchMap, timer} from 'rxjs';\n\nimport {TUI_COPY_OPTIONS} from './copy.options';\n\n@Component({\n selector: 'tui-copy',\n imports: [ClipboardModule, TuiButton, TuiHint, TuiIcon],\n templateUrl: './copy.template.html',\n styleUrls: ['./copy.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size',\n '(pointerdown)': 'copied$.next(false)',\n },\n})\nexport class TuiCopyComponent {\n protected readonly notification = inject(TUI_NOTIFICATION_OPTIONS);\n protected readonly options = inject(TUI_COPY_OPTIONS);\n protected readonly copied$ = new BehaviorSubject<boolean>(false);\n protected readonly texts = toSignal(inject(TUI_COPY_TEXTS));\n protected readonly hint = toSignal(\n this.copied$.pipe(\n switchMap((copied) =>\n timer(2000).pipe(map(TUI_FALSE_HANDLER), startWith(copied)),\n ),\n ),\n );\n\n @Input()\n public size: TuiSizeL = 'm';\n\n protected get icon(): string {\n return tuiIsString(this.options.icon)\n ? this.options.icon\n : this.options.icon(this.size);\n }\n\n protected get check(): string {\n return tuiIsString(this.notification.icon)\n ? this.notification.icon\n : this.notification.icon('positive');\n }\n}\n","<span\n #content\n tuiHintAppearance=\"dark\"\n tuiHintDirection=\"top\"\n class=\"t-content\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [tuiHint]=\"template\"\n [tuiHintManual]=\"!!hint()\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n>\n <ng-content />\n</span>\n<button\n appearance=\"icon\"\n size=\"xs\"\n tuiIconButton\n type=\"button\"\n class=\"t-button\"\n [attr.aria-label]=\"texts()?.[0]\"\n [cdkCopyToClipboard]=\"content.textContent ?? ''\"\n [iconStart]=\"icon\"\n (cdkCopyToClipboardCopied)=\"copied$.next($event)\"\n></button>\n<ng-template #template>\n <tui-icon\n class=\"t-icon\"\n [icon]=\"check\"\n />\n {{ texts()?.[1] }}\n</ng-template>\n","import {DOCUMENT} from '@angular/common';\nimport {computed, Directive, inject, Input} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {tuiDirectiveBinding, tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiTextfieldComponent} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_APPEARANCE_OPTIONS,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiHintDirective} from '@taiga-ui/core/directives/hint';\nimport {TuiIcons} from '@taiga-ui/core/directives/icons';\nimport {TUI_COPY_TEXTS} from '@taiga-ui/kit/tokens';\nimport {map, startWith, Subject, switchMap, timer} from 'rxjs';\n\nimport {TUI_COPY_OPTIONS} from './copy.options';\n\n@Directive({\n standalone: true,\n selector: 'tui-icon[tuiCopy]',\n providers: [\n {\n provide: TUI_APPEARANCE_OPTIONS,\n useValue: {appearance: 'icon'},\n },\n ],\n hostDirectives: [\n TuiWithAppearance,\n {\n directive: TuiHintDirective,\n inputs: ['tuiHintAppearance', 'tuiHintContext'],\n },\n ],\n host: {\n style: 'cursor: pointer',\n '(click)': 'copy()',\n '[style.pointer-events]': 'disabled ? \"none\" : null',\n '[style.opacity]': 'disabled ? \"var(--tui-disabled-opacity)\" : null',\n '[style.border-width.rem]': 'textfield.options.size() === \"l\" ? null : 0.25',\n },\n})\nexport class TuiCopyDirective {\n private readonly options = inject(TUI_COPY_OPTIONS);\n private readonly copied$ = new Subject<void>();\n private readonly doc = inject(DOCUMENT);\n\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly hint = tuiDirectiveBinding(\n TuiHintDirective,\n 'tuiHint',\n toSignal(\n inject(TUI_COPY_TEXTS).pipe(\n switchMap(([copy, copied]) =>\n this.copied$.pipe(\n switchMap(() =>\n timer(3000).pipe(\n map(() => copy),\n startWith(copied),\n ),\n ),\n startWith(copy),\n ),\n ),\n ),\n {initialValue: ''},\n ),\n );\n\n protected readonly icons = tuiDirectiveBinding(\n TuiIcons,\n 'iconStart',\n computed((size = this.textfield.options.size()) =>\n tuiIsString(this.options.icon) ? this.options.icon : this.options.icon(size),\n ),\n );\n\n @Input()\n public tuiCopy = '';\n\n protected get disabled(): boolean {\n return !this.textfield.input?.nativeElement.value;\n }\n\n protected copy(): void {\n this.textfield.input?.nativeElement.select();\n this.doc.execCommand('copy');\n this.copied$.next();\n }\n}\n","import {TuiCopyComponent} from './copy.component';\nimport {TuiCopyDirective} from './copy.directive';\n\nexport const TuiCopy = [TuiCopyComponent, TuiCopyDirective] as const;\n","// TODO: Move to components in v5\nexport * from './copy';\nexport * from './copy.component';\nexport * from './copy.directive';\nexport * from './copy.options';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAQa,MAAA,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GACnD,gBAAgB,CAAiB,EAAC,IAAI,EAAE,WAAW,EAAC;;MCiB3C,gBAAgB,CAAA;AAX7B,IAAA,WAAA,GAAA;AAYuB,QAAA,IAAA,CAAA,YAAY,GAAG,MA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AA,KAAK,EAAE,iBAAiB;AACxB,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,wBAAwB,EAAE,0BAA0B;AACpD,wBAAA,iBAAiB,EAAE,iDAAiD;AACpE,wBAAA,0BAA0B,EAAE,gDAAgD;AAC/E,qBAAA;AACJ,iBAAA;8BAqCU,OAAO,EAAA,CAAA;sBADb;;;MCxEQ,OAAO,GAAG,CAAC,gBAAgB,EAAE,gBAAgB;;ACH1D;;ACAA;;AAEG;;;;"}
@@ -1,147 +0,0 @@
1
- import { AsyncPipe } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, Pipe, INJECTOR, Injector } from '@angular/core';
4
- import { __decorate } from 'tslib';
5
- import { NgControl, ControlContainer } from '@angular/forms';
6
- import { TuiValidationError } from '@taiga-ui/cdk/classes';
7
- import { tuiIsString, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
8
- import { TUI_VALIDATION_ERRORS } from '@taiga-ui/kit/tokens';
9
- import { map, of, Observable } from 'rxjs';
10
-
11
- const EMPTY_RECORD = {};
12
- function unwrapObservable(content, context) {
13
- return content.pipe(map((error) => new TuiValidationError(error || '', context)));
14
- }
15
- function defaultError(content, context) {
16
- return of(new TuiValidationError(content || '', context));
17
- }
18
- class TuiFieldErrorPipe {
19
- constructor() {
20
- this.order = [];
21
- this.parent = inject(NgControl, { skipSelf: true, optional: true });
22
- this.self = inject(NgControl, { self: true, optional: true });
23
- this.container = inject(ControlContainer, { optional: true });
24
- this.validationErrors = inject(TUI_VALIDATION_ERRORS);
25
- if (this.self && !this.self.valueAccessor) {
26
- this.self.valueAccessor = this;
27
- }
28
- }
29
- transform(order) {
30
- this.order = order;
31
- return this.computedError;
32
- }
33
- registerOnChange() { }
34
- registerOnTouched() { }
35
- setDisabledState() { }
36
- writeValue() { }
37
- get computedError() {
38
- return (this.invalid && this.touched && this.error) || of(null);
39
- }
40
- get error() {
41
- const { errorId } = this;
42
- if (!errorId) {
43
- return null;
44
- }
45
- const firstError = this.controlErrors[errorId];
46
- const errorContent = this.validationErrors[errorId];
47
- return this.getError(firstError, errorContent);
48
- }
49
- get invalid() {
50
- return !!this.control?.invalid;
51
- }
52
- get touched() {
53
- return !!this.control?.touched;
54
- }
55
- get control() {
56
- return this.self?.control || this.parent?.control || this.container?.control;
57
- }
58
- get errorId() {
59
- return this.getErrorId(this.order, this.controlErrors);
60
- }
61
- get controlErrors() {
62
- return this.control?.errors || EMPTY_RECORD;
63
- }
64
- getError(context, content) {
65
- if (context instanceof TuiValidationError) {
66
- return of(context);
67
- }
68
- if (content === undefined && tuiIsString(context)) {
69
- return of(new TuiValidationError(context));
70
- }
71
- if (content instanceof Observable) {
72
- return unwrapObservable(content, context);
73
- }
74
- if (content instanceof Function) {
75
- const message = content(context);
76
- return message instanceof Observable
77
- ? unwrapObservable(message, context)
78
- : defaultError(message, context);
79
- }
80
- return defaultError(content, context);
81
- }
82
- getErrorId(order, controlErrors) {
83
- const id = order?.find((errorId) => controlErrors[errorId]);
84
- const [fallback] = Object.keys(controlErrors);
85
- return id || fallback || '';
86
- }
87
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFieldErrorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
88
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiFieldErrorPipe, isStandalone: true, name: "tuiFieldError", pure: false }); }
89
- }
90
- __decorate([
91
- tuiPure
92
- ], TuiFieldErrorPipe.prototype, "getError", null);
93
- __decorate([
94
- tuiPure
95
- ], TuiFieldErrorPipe.prototype, "getErrorId", null);
96
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFieldErrorPipe, decorators: [{
97
- type: Pipe,
98
- args: [{
99
- standalone: true,
100
- name: 'tuiFieldError',
101
- pure: false,
102
- }]
103
- }], ctorParameters: () => [], propDecorators: { getError: [], getErrorId: [] } });
104
-
105
- class TuiFieldErrorContentPipe {
106
- constructor() {
107
- this.injector = inject(INJECTOR);
108
- this.localInjector = Injector.create({
109
- providers: [{ provide: AsyncPipe }, { provide: TuiFieldErrorPipe }],
110
- parent: this.injector,
111
- });
112
- this.asyncPipe = this.localInjector.get(AsyncPipe);
113
- this.fieldErrorPipe = this.localInjector.get(TuiFieldErrorPipe);
114
- }
115
- transform(order) {
116
- return this.getErrorContent(order);
117
- }
118
- ngOnDestroy() {
119
- this.asyncPipe.ngOnDestroy();
120
- }
121
- getErrorContent(order) {
122
- const error = this.asyncPipe.transform(this.fieldErrorPipe.transform(order));
123
- if (!error) {
124
- return '';
125
- }
126
- return typeof error.message === 'function'
127
- ? error.message(error.context)
128
- : error.message;
129
- }
130
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFieldErrorContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
131
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiFieldErrorContentPipe, isStandalone: true, name: "tuiFieldErrorContent", pure: false }); }
132
- }
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiFieldErrorContentPipe, decorators: [{
134
- type: Pipe,
135
- args: [{
136
- standalone: true,
137
- name: 'tuiFieldErrorContent',
138
- pure: false,
139
- }]
140
- }] });
141
-
142
- /**
143
- * Generated bundle index. Do not edit.
144
- */
145
-
146
- export { TuiFieldErrorContentPipe, TuiFieldErrorPipe };
147
- //# sourceMappingURL=taiga-ui-kit-pipes-field-error.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-kit-pipes-field-error.mjs","sources":["../../../projects/kit/pipes/field-error/field-error-pipe.ts","../../../projects/kit/pipes/field-error/field-error-content-pipe.ts","../../../projects/kit/pipes/field-error/taiga-ui-kit-pipes-field-error.ts"],"sourcesContent":["import {inject, Pipe, type PipeTransform} from '@angular/core';\nimport {\n type AbstractControl,\n ControlContainer,\n type ControlValueAccessor,\n NgControl,\n} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {tuiIsString, tuiPure} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/kit/tokens';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {map, Observable, of} from 'rxjs';\n\nconst EMPTY_RECORD = {};\n\nfunction unwrapObservable(\n content: Observable<PolymorpheusContent>,\n context: any,\n): Observable<TuiValidationError> {\n return content.pipe(map((error) => new TuiValidationError(error || '', context)));\n}\n\nfunction defaultError(\n content: PolymorpheusContent,\n context: any,\n): Observable<TuiValidationError> {\n return of(new TuiValidationError(content || '', context));\n}\n\n@Pipe({\n standalone: true,\n name: 'tuiFieldError',\n pure: false,\n})\nexport class TuiFieldErrorPipe implements PipeTransform, ControlValueAccessor {\n private order: readonly string[] = [];\n private readonly parent = inject(NgControl, {skipSelf: true, optional: true});\n private readonly self = inject(NgControl, {self: true, optional: true});\n private readonly container = inject(ControlContainer, {optional: true});\n private readonly validationErrors = inject(TUI_VALIDATION_ERRORS);\n\n constructor() {\n if (this.self && !this.self.valueAccessor) {\n this.self.valueAccessor = this;\n }\n }\n\n public transform(order: readonly string[]): Observable<TuiValidationError | null> {\n this.order = order;\n\n return this.computedError;\n }\n\n public registerOnChange(): void {}\n\n public registerOnTouched(): void {}\n\n public setDisabledState(): void {}\n\n public writeValue(): void {}\n\n protected get computedError(): Observable<TuiValidationError | null> {\n return (this.invalid && this.touched && this.error) || of(null);\n }\n\n private get error(): Observable<TuiValidationError> | null {\n const {errorId} = this;\n\n if (!errorId) {\n return null;\n }\n\n const firstError = this.controlErrors[errorId];\n const errorContent = this.validationErrors[errorId];\n\n return this.getError(firstError, errorContent);\n }\n\n private get invalid(): boolean {\n return !!this.control?.invalid;\n }\n\n private get touched(): boolean {\n return !!this.control?.touched;\n }\n\n private get control(): AbstractControl | null | undefined {\n return this.self?.control || this.parent?.control || this.container?.control;\n }\n\n private get errorId(): string {\n return this.getErrorId(this.order, this.controlErrors);\n }\n\n private get controlErrors(): Record<string, unknown> {\n return this.control?.errors || EMPTY_RECORD;\n }\n\n @tuiPure\n private getError(\n context: any,\n content?: Observable<PolymorpheusContent> | PolymorpheusContent,\n ): Observable<TuiValidationError> {\n if (context instanceof TuiValidationError) {\n return of(context);\n }\n\n if (content === undefined && tuiIsString(context)) {\n return of(new TuiValidationError(context));\n }\n\n if (content instanceof Observable) {\n return unwrapObservable(content, context);\n }\n\n if (content instanceof Function) {\n const message = content(context) as\n | Observable<PolymorpheusContent>\n | PolymorpheusContent;\n\n return message instanceof Observable\n ? unwrapObservable(message, context)\n : defaultError(message, context);\n }\n\n return defaultError(content, context);\n }\n\n @tuiPure\n private getErrorId(\n order: readonly string[],\n controlErrors: Record<string, unknown>,\n ): string {\n const id = order?.find((errorId) => controlErrors[errorId]);\n const [fallback] = Object.keys(controlErrors);\n\n return id || fallback || '';\n }\n}\n","import {AsyncPipe} from '@angular/common';\nimport {\n inject,\n INJECTOR,\n Injector,\n type OnDestroy,\n Pipe,\n type PipeTransform,\n} from '@angular/core';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TuiFieldErrorPipe} from './field-error-pipe';\n\n@Pipe({\n standalone: true,\n name: 'tuiFieldErrorContent',\n pure: false,\n})\nexport class TuiFieldErrorContentPipe implements PipeTransform, OnDestroy {\n private readonly injector = inject(INJECTOR);\n private readonly localInjector = Injector.create({\n providers: [{provide: AsyncPipe}, {provide: TuiFieldErrorPipe}],\n parent: this.injector,\n });\n\n private readonly asyncPipe = this.localInjector.get(AsyncPipe);\n private readonly fieldErrorPipe = this.localInjector.get(TuiFieldErrorPipe);\n\n public transform(order: readonly string[]): PolymorpheusContent {\n return this.getErrorContent(order);\n }\n\n public ngOnDestroy(): void {\n this.asyncPipe.ngOnDestroy();\n }\n\n private getErrorContent(order: readonly string[]): PolymorpheusContent {\n const error = this.asyncPipe.transform(this.fieldErrorPipe.transform(order));\n\n if (!error) {\n return '';\n }\n\n return typeof error.message === 'function'\n ? error.message(error.context)\n : error.message;\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;AAaA,MAAM,YAAY,GAAG,EAAE;AAEvB,SAAS,gBAAgB,CACrB,OAAwC,EACxC,OAAY,EAAA;IAEZ,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,KAAK,KAAK,IAAI,kBAAkB,CAAC,KAAK,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC,CAAC;AACrF;AAEA,SAAS,YAAY,CACjB,OAA4B,EAC5B,OAAY,EAAA;AAEZ,IAAA,OAAO,EAAE,CAAC,IAAI,kBAAkB,CAAC,OAAO,IAAI,EAAE,EAAE,OAAO,CAAC,CAAC;AAC7D;MAOa,iBAAiB,CAAA;AAO1B,IAAA,WAAA,GAAA;QANQ,IAAK,CAAA,KAAA,GAAsB,EAAE;AACpB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC5D,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,SAAS,EAAE,EAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAC,CAAC;QACtD,IAAS,CAAA,SAAA,GAAG,MAAM,CAAC,gBAAgB,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AACtD,QAAA,IAAA,CAAA,gBAAgB,GAAG,MAAM,CAAC,qBAAqB,CAAC;QAG7D,IAAI,IAAI,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE;AACvC,YAAA,IAAI,CAAC,IAAI,CAAC,aAAa,GAAG,I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AI,CAAC,KAAK,EAAE;AACR,YAAA,OAAO,EAAE;;AAGb,QAAA,OAAO,OAAO,KAAK,CAAC,OAAO,KAAK;cAC1B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO;AAC7B,cAAE,KAAK,CAAC,OAAO;;+GA3Bd,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,sBAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;4FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBALpC,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,IAAI,EAAE,sBAAsB;AAC5B,oBAAA,IAAI,EAAE,KAAK;AACd,iBAAA;;;ACjBD;;AAEG;;;;"}
@@ -1,14 +0,0 @@
1
- import { type OnDestroy, type PipeTransform } from '@angular/core';
2
- import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
3
- import * as i0 from "@angular/core";
4
- export declare class TuiFieldErrorContentPipe implements PipeTransform, OnDestroy {
5
- private readonly injector;
6
- private readonly localInjector;
7
- private readonly asyncPipe;
8
- private readonly fieldErrorPipe;
9
- transform(order: readonly string[]): PolymorpheusContent;
10
- ngOnDestroy(): void;
11
- private getErrorContent;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiFieldErrorContentPipe, never>;
13
- static ɵpipe: i0.ɵɵPipeDeclaration<TuiFieldErrorContentPipe, "tuiFieldErrorContent", true>;
14
- }
@@ -1,29 +0,0 @@
1
- import { type PipeTransform } from '@angular/core';
2
- import { type ControlValueAccessor } from '@angular/forms';
3
- import { TuiValidationError } from '@taiga-ui/cdk/classes';
4
- import { Observable } from 'rxjs';
5
- import * as i0 from "@angular/core";
6
- export declare class TuiFieldErrorPipe implements PipeTransform, ControlValueAccessor {
7
- private order;
8
- private readonly parent;
9
- private readonly self;
10
- private readonly container;
11
- private readonly validationErrors;
12
- constructor();
13
- transform(order: readonly string[]): Observable<TuiValidationError | null>;
14
- registerOnChange(): void;
15
- registerOnTouched(): void;
16
- setDisabledState(): void;
17
- writeValue(): void;
18
- protected get computedError(): Observable<TuiValidationError | null>;
19
- private get error();
20
- private get invalid();
21
- private get touched();
22
- private get control();
23
- private get errorId();
24
- private get controlErrors();
25
- private getError;
26
- private getErrorId;
27
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiFieldErrorPipe, never>;
28
- static ɵpipe: i0.ɵɵPipeDeclaration<TuiFieldErrorPipe, "tuiFieldError", true>;
29
- }
@@ -1,2 +0,0 @@
1
- export * from './field-error-content-pipe';
2
- export * from './field-error-pipe';
@@ -1,5 +0,0 @@
1
- import { InjectionToken, type Provider } from '@angular/core';
2
- import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
3
- import { type Observable } from 'rxjs';
4
- export declare const TUI_VALIDATION_ERRORS: InjectionToken<Record<string, PolymorpheusContent | Observable<PolymorpheusContent>>>;
5
- export declare const tuiValidationErrorsProvider: (useValue: Record<string, Observable<PolymorpheusContent> | PolymorpheusContent>) => Provider;
File without changes
File without changes