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

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 (352) hide show
  1. package/components/accordion/accordion.component.d.ts +13 -0
  2. package/components/accordion/accordion.d.ts +4 -4
  3. package/components/accordion/accordion.directive.d.ts +11 -10
  4. package/components/accordion/index.d.ts +1 -3
  5. package/components/action-bar/action-bar.component.d.ts +5 -7
  6. package/components/action-bar/index.d.ts +0 -2
  7. package/components/avatar/avatar-outline.directive.d.ts +3 -3
  8. package/components/avatar/avatar.directive.d.ts +15 -0
  9. package/components/avatar/avatar.options.d.ts +1 -4
  10. package/components/avatar/index.d.ts +1 -1
  11. package/components/badge/badge.directive.d.ts +2 -2
  12. package/components/block/block.directive.d.ts +4 -4
  13. package/components/block/block.options.d.ts +1 -1
  14. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  15. package/components/calendar-month/calendar-month.options.d.ts +1 -1
  16. package/components/calendar-range/calendar-range.component.d.ts +1 -2
  17. package/components/checkbox/checkbox.component.d.ts +7 -18
  18. package/components/checkbox/checkbox.options.d.ts +5 -9
  19. package/components/chip/chip.directive.d.ts +2 -4
  20. package/components/comment/comment.directive.d.ts +2 -2
  21. package/components/confirm/confirm.component.d.ts +2 -1
  22. package/components/confirm/confirm.service.d.ts +2 -1
  23. package/{directives → components}/copy/copy.component.d.ts +1 -1
  24. package/{directives → components}/copy/copy.directive.d.ts +2 -2
  25. package/{directives → components}/copy/copy.options.d.ts +2 -2
  26. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -0
  27. package/components/files/file/file.options.d.ts +1 -1
  28. package/components/files/files/files.component.d.ts +2 -2
  29. package/components/floating-container/floating-container.directive.d.ts +2 -2
  30. package/components/fullscreen/fullscreen.component.d.ts +14 -0
  31. package/components/fullscreen/index.d.ts +1 -0
  32. package/components/index.d.ts +3 -2
  33. package/components/input-chip/input-chip.options.d.ts +1 -1
  34. package/components/input-color/input-color.component.d.ts +2 -2
  35. package/components/input-color/input-color.options.d.ts +1 -1
  36. package/components/input-date/input-date.options.d.ts +1 -1
  37. package/components/input-number/input-number.options.d.ts +1 -1
  38. package/components/input-number/quantum.directive.d.ts +1 -1
  39. package/components/input-number/step/input-number-step.component.d.ts +1 -1
  40. package/components/input-phone/input-phone.options.d.ts +1 -1
  41. package/components/input-phone-international/input-phone-international.component.d.ts +24 -30
  42. package/components/input-pin/input-pin.component.d.ts +1 -1
  43. package/components/input-range/input-range.component.d.ts +9 -12
  44. package/components/input-slider/input-slider.directive.d.ts +2 -4
  45. package/components/input-time/input-time.directive.d.ts +6 -8
  46. package/components/input-time/input-time.options.d.ts +1 -1
  47. package/components/like/like.component.d.ts +4 -11
  48. package/components/like/like.options.d.ts +3 -4
  49. package/components/line-clamp/line-clamp-box.component.d.ts +3 -4
  50. package/components/line-clamp/line-clamp.component.d.ts +12 -18
  51. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +3 -3
  52. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  53. package/components/pager/pager.component.d.ts +1 -1
  54. package/components/pagination/pagination.component.d.ts +1 -1
  55. package/components/pin/pin.directive.d.ts +2 -2
  56. package/components/preview/pagination/preview-pagination.component.d.ts +1 -1
  57. package/components/preview/preview.component.d.ts +1 -1
  58. package/components/preview/zoom/preview-zoom.component.d.ts +1 -1
  59. package/components/progress/progress-bar/fixed-gradient/progress-fixed-gradient.directive.d.ts +1 -2
  60. package/components/progress/progress-segmented/progress-segmented.directive.d.ts +2 -2
  61. package/components/push/push-alert.component.d.ts +4 -3
  62. package/components/push/push.component.d.ts +2 -2
  63. package/components/push/push.directive.d.ts +4 -6
  64. package/components/push/push.options.d.ts +4 -8
  65. package/components/push/push.service.d.ts +6 -2
  66. package/components/radio/radio.component.d.ts +7 -8
  67. package/components/radio/radio.directive.d.ts +2 -2
  68. package/components/radio/radio.options.d.ts +2 -5
  69. package/components/range/range-change.directive.d.ts +1 -2
  70. package/components/range/range.component.d.ts +16 -24
  71. package/components/rating/rating.component.d.ts +5 -5
  72. package/components/rating/rating.options.d.ts +5 -3
  73. package/components/segmented/segmented.component.d.ts +1 -3
  74. package/components/slider/helpers/key-steps.d.ts +1 -2
  75. package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
  76. package/components/slides/slides.directive.d.ts +4 -4
  77. package/components/status/status.directive.d.ts +2 -2
  78. package/components/switch/switch.component.d.ts +7 -19
  79. package/components/switch/switch.options.d.ts +4 -8
  80. package/components/tabs/tabs-with-more.component.d.ts +1 -1
  81. package/components/textarea/textarea-limit.directive.d.ts +4 -5
  82. package/components/textarea/textarea.options.d.ts +1 -1
  83. package/components/toast/index.d.ts +5 -0
  84. package/components/toast/toast.component.d.ts +18 -0
  85. package/components/toast/toast.d.ts +3 -0
  86. package/components/toast/toast.directive.d.ts +7 -0
  87. package/components/toast/toast.options.d.ts +9 -0
  88. package/components/toast/toast.service.d.ts +17 -0
  89. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +1 -1
  90. package/directives/button-select/button-select.directive.d.ts +1 -2
  91. package/directives/chevron/chevron.directive.d.ts +2 -3
  92. package/directives/fade/fade.directive.d.ts +1 -0
  93. package/directives/highlight/highlight.directive.d.ts +1 -3
  94. package/directives/index.d.ts +0 -2
  95. package/directives/password/password.options.d.ts +1 -1
  96. package/directives/sensitive/sensitive.directive.d.ts +2 -2
  97. package/directives/shimmer/shimmer.directive.d.ts +3 -3
  98. package/directives/skeleton/skeleton.directive.d.ts +3 -3
  99. package/directives/tooltip/tooltip.directive.d.ts +2 -2
  100. package/directives/tooltip/tooltip.options.d.ts +1 -4
  101. package/fesm2022/taiga-ui-kit-components-accordion.mjs +69 -145
  102. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +22 -38
  104. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-kit-components-avatar.mjs +81 -100
  106. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +3 -3
  108. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-kit-components-badge.mjs +15 -21
  110. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +6 -6
  112. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-kit-components-block.mjs +17 -24
  114. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  115. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +7 -10
  116. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  117. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +6 -6
  118. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  119. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +5 -8
  120. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  121. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +7 -8
  122. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-kit-components-carousel.mjs +17 -19
  124. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +19 -76
  126. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-kit-components-chip.mjs +22 -27
  128. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +8 -8
  130. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-kit-components-comment.mjs +13 -20
  132. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-kit-components-compass.mjs +3 -3
  134. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-kit-components-confirm.mjs +13 -14
  136. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-kit-components-copy.mjs +120 -0
  138. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -0
  139. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +18 -11
  140. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-kit-components-drawer.mjs +5 -5
  142. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  143. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +6 -6
  144. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
  145. package/fesm2022/taiga-ui-kit-components-files.mjs +35 -43
  146. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  147. package/fesm2022/taiga-ui-kit-components-filter.mjs +6 -15
  148. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  149. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +13 -19
  150. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
  151. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +63 -0
  152. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -0
  153. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +20 -17
  154. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  155. package/fesm2022/taiga-ui-kit-components-input-color.mjs +9 -12
  156. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  157. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +6 -7
  158. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  159. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +3 -3
  160. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  161. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +8 -10
  162. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  163. package/fesm2022/taiga-ui-kit-components-input-date.mjs +16 -18
  164. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  165. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +5 -5
  166. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  167. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +8 -9
  168. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  169. package/fesm2022/taiga-ui-kit-components-input-month.mjs +13 -15
  170. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  171. package/fesm2022/taiga-ui-kit-components-input-number.mjs +28 -27
  172. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  173. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +105 -131
  174. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  175. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +5 -6
  176. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  177. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +5 -5
  178. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  179. package/fesm2022/taiga-ui-kit-components-input-range.mjs +34 -38
  180. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  181. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +28 -42
  182. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  183. package/fesm2022/taiga-ui-kit-components-input-time.mjs +39 -45
  184. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  185. package/fesm2022/taiga-ui-kit-components-input-year.mjs +7 -8
  186. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  187. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +16 -16
  188. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  189. package/fesm2022/taiga-ui-kit-components-like.mjs +40 -33
  190. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  191. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +38 -83
  192. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  193. package/fesm2022/taiga-ui-kit-components-message.mjs +9 -11
  194. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  195. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +45 -44
  196. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  197. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +12 -19
  198. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  199. package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -6
  200. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  201. package/fesm2022/taiga-ui-kit-components-pagination.mjs +7 -8
  202. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  203. package/fesm2022/taiga-ui-kit-components-pin.mjs +15 -19
  204. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  205. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +11 -11
  206. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +1 -1
  207. package/fesm2022/taiga-ui-kit-components-preview.mjs +34 -36
  208. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  209. package/fesm2022/taiga-ui-kit-components-progress.mjs +37 -50
  210. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  211. package/fesm2022/taiga-ui-kit-components-pulse.mjs +3 -3
  212. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  213. package/fesm2022/taiga-ui-kit-components-push.mjs +49 -56
  214. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  215. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +5 -6
  216. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  217. package/fesm2022/taiga-ui-kit-components-radio.mjs +34 -39
  218. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  219. package/fesm2022/taiga-ui-kit-components-range.mjs +40 -81
  220. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  221. package/fesm2022/taiga-ui-kit-components-rating.mjs +17 -21
  222. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +3 -3
  224. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  225. package/fesm2022/taiga-ui-kit-components-segmented.mjs +6 -6
  226. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  227. package/fesm2022/taiga-ui-kit-components-select.mjs +38 -31
  228. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  229. package/fesm2022/taiga-ui-kit-components-slider.mjs +69 -67
  230. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  231. package/fesm2022/taiga-ui-kit-components-slides.mjs +14 -22
  232. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-status.mjs +12 -16
  234. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-stepper.mjs +11 -11
  236. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-switch.mjs +19 -65
  238. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-tabs.mjs +29 -34
  240. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  241. package/fesm2022/taiga-ui-kit-components-textarea.mjs +17 -25
  242. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-tiles.mjs +12 -12
  244. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components-toast.mjs +165 -0
  246. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -0
  247. package/fesm2022/taiga-ui-kit-components-tree.mjs +33 -41
  248. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  249. package/fesm2022/taiga-ui-kit-components.mjs +3 -2
  250. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  251. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +3 -3
  252. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  253. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +9 -12
  254. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  255. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +5 -12
  256. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  257. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +13 -20
  258. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  259. package/fesm2022/taiga-ui-kit-directives-connected.mjs +9 -14
  260. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  261. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +3 -3
  262. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  263. package/fesm2022/taiga-ui-kit-directives-fade.mjs +9 -12
  264. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  265. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +3 -3
  266. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  267. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +3 -3
  268. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  269. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +6 -7
  270. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
  271. package/fesm2022/taiga-ui-kit-directives-password.mjs +8 -11
  272. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  273. package/fesm2022/taiga-ui-kit-directives-present.mjs +3 -3
  274. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  275. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +13 -18
  276. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  277. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +24 -34
  278. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  279. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +27 -38
  280. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  281. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +15 -20
  282. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +5 -6
  284. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  285. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +3 -3
  286. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  287. package/fesm2022/taiga-ui-kit-directives.mjs +0 -2
  288. package/fesm2022/taiga-ui-kit-directives.mjs.map +1 -1
  289. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -3
  290. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  291. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +3 -3
  292. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  293. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +3 -3
  294. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  295. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +5 -4
  296. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  297. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
  298. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  299. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
  300. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  301. package/fesm2022/taiga-ui-kit-pipes.mjs +0 -1
  302. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  303. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -7
  304. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  305. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  306. package/package.json +30 -37
  307. package/pipes/index.d.ts +0 -1
  308. package/styles/components/avatar.less +188 -0
  309. package/styles/components/badge.less +1 -0
  310. package/styles/components/block.less +1 -1
  311. package/styles/components/checkbox.less +14 -12
  312. package/styles/components/chip.less +13 -4
  313. package/styles/components/like.less +4 -9
  314. package/styles/components/pin.less +3 -7
  315. package/styles/components/radio.less +1 -1
  316. package/styles/components/switch.less +9 -9
  317. package/styles/components/toast.less +44 -0
  318. package/tokens/i18n.d.ts +25 -26
  319. package/tokens/index.d.ts +0 -1
  320. package/tokens/input-date-options.d.ts +1 -1
  321. package/components/accordion/accordion-item-content.directive.d.ts +0 -6
  322. package/components/accordion/accordion-item-eager-content.directive.d.ts +0 -5
  323. package/components/accordion/accordion-item.component.d.ts +0 -25
  324. package/components/action-bar/action-bar.d.ts +0 -3
  325. package/components/action-bar/action-bar.directive.d.ts +0 -6
  326. package/components/avatar/avatar.component.d.ts +0 -15
  327. package/components/input-password/index.d.ts +0 -2
  328. package/components/input-password/input-password.component.d.ts +0 -16
  329. package/components/input-password/input-password.options.d.ts +0 -24
  330. package/components/pdf-viewer/index.d.ts +0 -4
  331. package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
  332. package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
  333. package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
  334. package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
  335. package/directives/icon-badge/icon-badge.directive.d.ts +0 -9
  336. package/directives/icon-badge/index.d.ts +0 -1
  337. package/fesm2022/taiga-ui-kit-components-input-password.mjs +0 -95
  338. package/fesm2022/taiga-ui-kit-components-input-password.mjs.map +0 -1
  339. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
  340. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
  341. package/fesm2022/taiga-ui-kit-directives-copy.mjs +0 -120
  342. package/fesm2022/taiga-ui-kit-directives-copy.mjs.map +0 -1
  343. package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs +0 -47
  344. package/fesm2022/taiga-ui-kit-directives-icon-badge.mjs.map +0 -1
  345. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs +0 -147
  346. package/fesm2022/taiga-ui-kit-pipes-field-error.mjs.map +0 -1
  347. package/pipes/field-error/field-error-content-pipe.d.ts +0 -14
  348. package/pipes/field-error/field-error-pipe.d.ts +0 -29
  349. package/pipes/field-error/index.d.ts +0 -2
  350. package/tokens/validation-errors.d.ts +0 -5
  351. /package/{directives → components}/copy/copy.d.ts +0 -0
  352. /package/{directives → components}/copy/index.d.ts +0 -0
@@ -1,83 +0,0 @@
1
- import { AsyncPipe } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, ChangeDetectionStrategy, Component, InjectionToken, Injectable, Directive } from '@angular/core';
4
- import * as i1 from '@taiga-ui/cdk/directives/animated';
5
- import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
6
- import { TuiButton } from '@taiga-ui/core/components/button';
7
- import { TUI_CLOSE_WORD, TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
8
- import { injectContext, PolymorpheusOutlet } from '@taiga-ui/polymorpheus';
9
- import { TuiPopoverDirective } from '@taiga-ui/cdk/directives/popover';
10
- import { TuiPopoverService, tuiAsPopover } from '@taiga-ui/cdk/services';
11
- import { TUI_DIALOGS } from '@taiga-ui/core/components/dialog';
12
- import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
13
-
14
- class TuiPdfViewerComponent {
15
- constructor() {
16
- this.closeWord$ = inject(TUI_CLOSE_WORD);
17
- this.icons = inject(TUI_COMMON_ICONS);
18
- this.context = injectContext();
19
- }
20
- onKeyDownEsc() {
21
- this.context.$implicit.complete();
22
- }
23
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiPdfViewerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
24
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiPdfViewerComponent, isStandalone: true, selector: "tui-pdf-viewer", host: { listeners: { "document:keydown.esc": "onKeyDownEsc()" } }, hostDirectives: [{ directive: i1.TuiAnimated }], ngImport: i0, template: "<header class=\"t-header\">\n <h2\n automation-id=\"tui-pdf-viewer__label\"\n class=\"t-title\"\n >\n {{ context.label }}\n </h2>\n <div class=\"t-actions\">\n <ng-container *polymorpheusOutlet=\"context.actions as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n <button\n appearance=\"\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ closeWord$ | async }}\n </button>\n</header>\n<section class=\"t-content\">\n <iframe\n *polymorpheusOutlet=\"context.content as content; context: context\"\n title=\"pdf\"\n class=\"t-iframe\"\n [src]=\"content\"\n ></iframe>\n</section>\n", styles: [":host{display:block;inline-size:100%;block-size:100%;box-sizing:border-box;color:#fff;background:#333639;padding-block-start:env(safe-area-inset-top);padding-block-end:env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}.t-header{display:flex;align-items:center;block-size:4rem;padding:0 1rem 0 1.5625rem;box-shadow:inset 0 -1px #535659}.t-title{margin:0;font:var(--tui-font-text-m);white-space:nowrap;text-overflow:ellipsis;padding-inline-end:.3125rem;overflow:hidden}.t-actions{display:flex;margin-inline-start:auto}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;margin-inline-start:.75rem;color:#fff;background:#ffffff52}.t-close:hover{background:#fff6}.t-content{block-size:calc(100% - 4rem);overflow:hidden}.t-iframe{inline-size:100%;block-size:100%}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
25
- }
26
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiPdfViewerComponent, decorators: [{
27
- type: Component,
28
- args: [{ selector: 'tui-pdf-viewer', imports: [AsyncPipe, PolymorpheusOutlet, TuiButton], changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [TuiAnimated], host: {
29
- '(document:keydown.esc)': 'onKeyDownEsc()',
30
- }, template: "<header class=\"t-header\">\n <h2\n automation-id=\"tui-pdf-viewer__label\"\n class=\"t-title\"\n >\n {{ context.label }}\n </h2>\n <div class=\"t-actions\">\n <ng-container *polymorpheusOutlet=\"context.actions as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n <button\n appearance=\"\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ closeWord$ | async }}\n </button>\n</header>\n<section class=\"t-content\">\n <iframe\n *polymorpheusOutlet=\"context.content as content; context: context\"\n title=\"pdf\"\n class=\"t-iframe\"\n [src]=\"content\"\n ></iframe>\n</section>\n", styles: [":host{display:block;inline-size:100%;block-size:100%;box-sizing:border-box;color:#fff;background:#333639;padding-block-start:env(safe-area-inset-top);padding-block-end:env(safe-area-inset-bottom)}:host.tui-enter,:host.tui-leave{animation-name:tuiFade,tuiSlide}.t-header{display:flex;align-items:center;block-size:4rem;padding:0 1rem 0 1.5625rem;box-shadow:inset 0 -1px #535659}.t-title{margin:0;font:var(--tui-font-text-m);white-space:nowrap;text-overflow:ellipsis;padding-inline-end:.3125rem;overflow:hidden}.t-actions{display:flex;margin-inline-start:auto}.t-close{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;margin-inline-start:.75rem;color:#fff;background:#ffffff52}.t-close:hover{background:#fff6}.t-content{block-size:calc(100% - 4rem);overflow:hidden}.t-iframe{inline-size:100%;block-size:100%}\n"] }]
31
- }] });
32
-
33
- const TUI_PDF_VIEWER_DEFAULT_OPTIONS = {
34
- label: '',
35
- actions: '',
36
- data: undefined,
37
- };
38
- /**
39
- * Default parameters for PdfViewer component
40
- */
41
- const TUI_PDF_VIEWER_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_PDF_VIEWER_OPTIONS' : '', {
42
- factory: () => TUI_PDF_VIEWER_DEFAULT_OPTIONS,
43
- });
44
- function tuiPdfViewerOptionsProvider(options) {
45
- return tuiProvideOptions(TUI_PDF_VIEWER_OPTIONS, options, TUI_PDF_VIEWER_DEFAULT_OPTIONS);
46
- }
47
-
48
- class TuiPdfViewerService extends TuiPopoverService {
49
- open(content, options = {}) {
50
- return super.open(content, options);
51
- }
52
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiPdfViewerService, deps: null, target: i0.ɵɵFactoryTarget.Injectable }); }
53
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiPdfViewerService, providedIn: 'root', useFactory: () => new TuiPdfViewerService(TUI_DIALOGS, TuiPdfViewerComponent, inject(TUI_PDF_VIEWER_OPTIONS)) }); }
54
- }
55
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiPdfViewerService, decorators: [{
56
- type: Injectable,
57
- args: [{
58
- providedIn: 'root',
59
- useFactory: () => new TuiPdfViewerService(TUI_DIALOGS, TuiPdfViewerComponent, inject(TUI_PDF_VIEWER_OPTIONS)),
60
- }]
61
- }] });
62
-
63
- class TuiPdfViewerDirective extends TuiPopoverDirective {
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiPdfViewerDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
65
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: TuiPdfViewerDirective, isStandalone: true, selector: "ng-template[tuiPdfViewer]", inputs: { options: ["tuiPdfViewerOptions", "options"], open: ["tuiPdfViewer", "open"] }, outputs: { openChange: "tuiPdfViewerChange" }, providers: [tuiAsPopover(TuiPdfViewerService)], usesInheritance: true, ngImport: i0 }); }
66
- }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiPdfViewerDirective, decorators: [{
68
- type: Directive,
69
- args: [{
70
- standalone: true,
71
- selector: 'ng-template[tuiPdfViewer]',
72
- inputs: ['options: tuiPdfViewerOptions', 'open: tuiPdfViewer'],
73
- outputs: ['openChange: tuiPdfViewerChange'],
74
- providers: [tuiAsPopover(TuiPdfViewerService)],
75
- }]
76
- }] });
77
-
78
- /**
79
- * Generated bundle index. Do not edit.
80
- */
81
-
82
- export { TUI_PDF_VIEWER_DEFAULT_OPTIONS, TUI_PDF_VIEWER_OPTIONS, TuiPdfViewerComponent, TuiPdfViewerDirective, TuiPdfViewerService, tuiPdfViewerOptionsProvider };
83
- //# sourceMappingURL=taiga-ui-kit-components-pdf-viewer.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-kit-components-pdf-viewer.mjs","sources":["../../../projects/kit/components/pdf-viewer/pdf-viewer.component.ts","../../../projects/kit/components/pdf-viewer/pdf-viewer.template.html","../../../projects/kit/components/pdf-viewer/pdf-viewer.options.ts","../../../projects/kit/components/pdf-viewer/pdf-viewer.service.ts","../../../projects/kit/components/pdf-viewer/pdf-viewer.directive.ts","../../../projects/kit/components/pdf-viewer/taiga-ui-kit-components-pdf-viewer.ts"],"sourcesContent":["import {AsyncPipe} from '@angular/common';\nimport {ChangeDetectionStrategy, Component, inject} from '@angular/core';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {type TuiPopover} from '@taiga-ui/cdk/services';\nimport {TuiButton} from '@taiga-ui/core/components/button';\nimport {TUI_CLOSE_WORD, TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {injectContext, PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\nimport {type TuiPdfViewerOptions} from './pdf-viewer.options';\n\n@Component({\n selector: 'tui-pdf-viewer',\n imports: [AsyncPipe, PolymorpheusOutlet, TuiButton],\n templateUrl: './pdf-viewer.template.html',\n styleUrls: ['./pdf-viewer.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [TuiAnimated],\n host: {\n '(document:keydown.esc)': 'onKeyDownEsc()',\n },\n})\nexport class TuiPdfViewerComponent<I, O> {\n protected readonly closeWord$ = inject(TUI_CLOSE_WORD);\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected readonly context = injectContext<TuiPopover<TuiPdfViewerOptions<I>, O>>();\n\n protected onKeyDownEsc(): void {\n this.context.$implicit.complete();\n }\n}\n","<header class=\"t-header\">\n <h2\n automation-id=\"tui-pdf-viewer__label\"\n class=\"t-title\"\n >\n {{ context.label }}\n </h2>\n <div class=\"t-actions\">\n <ng-container *polymorpheusOutlet=\"context.actions as text; context: context\">\n {{ text }}\n </ng-container>\n </div>\n <button\n appearance=\"\"\n size=\"s\"\n tuiIconButton\n type=\"button\"\n class=\"t-close\"\n [iconStart]=\"icons.close\"\n [style.border-radius.%]=\"100\"\n (click)=\"context.$implicit.complete()\"\n >\n {{ closeWord$ | async }}\n </button>\n</header>\n<section class=\"t-content\">\n <iframe\n *polymorpheusOutlet=\"context.content as content; context: context\"\n title=\"pdf\"\n class=\"t-iframe\"\n [src]=\"content\"\n ></iframe>\n</section>\n","import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nexport const TUI_PDF_VIEWER_DEFAULT_OPTIONS: TuiPdfViewerOptions = {\n label: '',\n actions: '',\n data: undefined,\n};\n\n/**\n * Default parameters for PdfViewer component\n */\nexport const TUI_PDF_VIEWER_OPTIONS = new InjectionToken(\n ngDevMode ? 'TUI_PDF_VIEWER_OPTIONS' : '',\n {\n factory: () => TUI_PDF_VIEWER_DEFAULT_OPTIONS,\n },\n);\n\nexport function tuiPdfViewerOptionsProvider(\n options: Partial<TuiPdfViewerOptions>,\n): Provider {\n return tuiProvideOptions(\n TUI_PDF_VIEWER_OPTIONS,\n options,\n TUI_PDF_VIEWER_DEFAULT_OPTIONS,\n );\n}\n\nexport interface TuiPdfViewerOptions<I = undefined> {\n readonly actions: PolymorpheusContent<TuiPdfViewerOptions<I>>;\n readonly data: I;\n readonly label: string;\n}\n","import {inject, Injectable} from '@angular/core';\nimport {type SafeResourceUrl} from '@angular/platform-browser';\nimport {type TuiPopoverContext, TuiPopoverService} from '@taiga-ui/cdk/services';\nimport {TUI_DIALOGS} from '@taiga-ui/core/components/dialog';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\nimport {type Observable} from 'rxjs';\n\nimport {TuiPdfViewerComponent} from './pdf-viewer.component';\nimport {TUI_PDF_VIEWER_OPTIONS, type TuiPdfViewerOptions} from './pdf-viewer.options';\n\ntype Content<G> = PolymorpheusContent<\n TuiPdfViewerOptions<unknown> & TuiPopoverContext<G>\n>;\n\n@Injectable({\n providedIn: 'root',\n useFactory: () =>\n new TuiPdfViewerService(\n TUI_DIALOGS,\n TuiPdfViewerComponent,\n inject(TUI_PDF_VIEWER_OPTIONS),\n ),\n})\nexport class TuiPdfViewerService extends TuiPopoverService<TuiPdfViewerOptions<unknown>> {\n public override open<G>(\n content: Content<G> | SafeResourceUrl,\n options: Partial<TuiPdfViewerOptions<any>> = {},\n ): Observable<G> {\n return super.open(content as Content<G>, options);\n }\n}\n","import {Directive} from '@angular/core';\nimport {TuiPopoverDirective} from '@taiga-ui/cdk/directives/popover';\nimport {tuiAsPopover} from '@taiga-ui/cdk/services';\n\nimport {type TuiPdfViewerOptions} from './pdf-viewer.options';\nimport {TuiPdfViewerService} from './pdf-viewer.service';\n\n@Directive({\n standalone: true,\n selector: 'ng-template[tuiPdfViewer]',\n inputs: ['options: tuiPdfViewerOptions', 'open: tuiPdfViewer'],\n outputs: ['openChange: tuiPdfViewerChange'],\n providers: [tuiAsPopover(TuiPdfViewerService)],\n})\nexport class TuiPdfViewerDirective<T> extends TuiPopoverDirective<\n TuiPdfViewerOptions<T>\n> {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAqBa,qBAAqB,CAAA;AAXlC,IAAA,WAAA,GAAA;AAYuB,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,cAAc,CAAC;AACnC,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAChC,IAAA,CAAA,OAAO,GAAG,aAAa,EAAyC;AAKtF,IAAA;IAHa,YAAY,GAAA;AAClB,QAAA,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,EAAE;IACrC;8GAPS,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EA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,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAErC,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAPjC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,2BAA2B;AACrC,oBAAA,MAAM,EAAE,CAAC,8BAA8B,EAAE,oBAAoB,CAAC;oBAC9D,OAAO,EAAE,CAAC,gCAAgC,CAAC;AAC3C,oBAAA,SAAS,EAAE,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;AACjD,iBAAA;;;ACbD;;AAEG;;;;"}
@@ -1,120 +0,0 @@
1
- import * as i1 from '@angular/cdk/clipboard';
2
- import { ClipboardModule } from '@angular/cdk/clipboard';
3
- import * as i0 from '@angular/core';
4
- import { inject, Input, ChangeDetectionStrategy, Component, computed, Directive } from '@angular/core';
5
- import { toSignal } from '@angular/core/rxjs-interop';
6
- import { TUI_FALSE_HANDLER } from '@taiga-ui/cdk/constants';
7
- import { tuiIsString, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
8
- import { TuiButton } from '@taiga-ui/core/components/button';
9
- import { TuiIcon } from '@taiga-ui/core/components/icon';
10
- import { TUI_NOTIFICATION_OPTIONS } from '@taiga-ui/core/components/notification';
11
- import * as i2 from '@taiga-ui/core/directives/hint';
12
- import { TuiHint, TuiHintDirective } from '@taiga-ui/core/directives/hint';
13
- import { TUI_COPY_TEXTS } from '@taiga-ui/kit/tokens';
14
- import { BehaviorSubject, switchMap, timer, map, startWith, Subject } from 'rxjs';
15
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
16
- import { DOCUMENT } from '@angular/common';
17
- import { TuiTextfieldComponent } from '@taiga-ui/core/components/textfield';
18
- import * as i1$1 from '@taiga-ui/core/directives/appearance';
19
- import { TUI_APPEARANCE_OPTIONS, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
20
-
21
- const [TUI_COPY_OPTIONS, tuiCopyOptionsProvider] = tuiCreateOptions({ icon: '@tui.copy' });
22
-
23
- class TuiCopyComponent {
24
- constructor() {
25
- this.notification = inject(TUI_NOTIFICATION_OPTIONS);
26
- this.options = inject(TUI_COPY_OPTIONS);
27
- this.copied$ = new BehaviorSubject(false);
28
- this.texts = toSignal(inject(TUI_COPY_TEXTS));
29
- this.hint = toSignal(this.copied$.pipe(switchMap((copied) => timer(2000).pipe(map(TUI_FALSE_HANDLER), startWith(copied)))));
30
- this.size = 'm';
31
- }
32
- get icon() {
33
- return tuiIsString(this.options.icon)
34
- ? this.options.icon
35
- : this.options.icon(this.size);
36
- }
37
- get check() {
38
- return tuiIsString(this.notification.icon)
39
- ? this.notification.icon
40
- : this.notification.icon('positive');
41
- }
42
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiCopyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
43
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiCopyComponent, isStandalone: true, selector: "tui-copy", inputs: { size: "size" }, host: { listeners: { "pointerdown": "copied$.next(false)" }, properties: { "attr.data-size": "size" } }, ngImport: i0, template: "<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", styles: [":host{cursor:pointer}:host[data-size=m]{--t-size: min( calc(1em + 1px) , 1rem)}:host[data-size=l]{--t-size: max(calc(1em / 1.57), min(max(calc(1em / 1.18), 1.25rem), 1.5rem))}@media (hover: hover) and (pointer: fine){:host:hover .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}:host:hover .t-button{opacity:1}}:host:has(.t-button:focus-visible) .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}.t-content{transition-property:opacity,mask;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;mask:linear-gradient(to var(--tui-inline-start),transparent calc(1.25 * var(--t-size)),black calc(2 * var(--t-size))) no-repeat,linear-gradient(to var(--tui-inline-end),black,black calc(2 * var(--t-size)),transparent calc(2 * var(--t-size))) no-repeat;-webkit-mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0;mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0}.t-button{opacity:0;border-radius:0;font-size:inherit!important;margin-inline-start:calc(-1 * var(--t-size));--t-size: inherit}.t-button:before{font-size:var(--t-size)}.t-button:focus-visible{opacity:1}.t-icon{font-size:1rem;margin-inline-end:.25rem;vertical-align:sub;color:var(--tui-text-positive)}\n"], dependencies: [{ kind: "ngmodule", type: ClipboardModule }, { kind: "directive", type: i1.CdkCopyToClipboard, selector: "[cdkCopyToClipboard]", inputs: ["cdkCopyToClipboard", "cdkCopyToClipboardAttempts"], outputs: ["cdkCopyToClipboardCopied"] }, { kind: "directive", type: TuiButton, selector: "a[tuiButton],button[tuiButton],a[tuiIconButton],button[tuiIconButton]", inputs: ["size"] }, { kind: "directive", type: i2.TuiHintDirective, selector: "[tuiHint]:not(ng-container):not(ng-template)", inputs: ["tuiHintContext", "tuiHintAppearance", "tuiHint"], outputs: ["tuiHintVisible"] }, { kind: "directive", type: i2.TuiHintManual, selector: "[tuiHint][tuiHintManual]", inputs: ["tuiHintManual"] }, { kind: "component", type: TuiIcon, selector: "tui-icon", inputs: ["icon", "background"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
44
- }
45
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiCopyComponent, decorators: [{
46
- type: Component,
47
- args: [{ selector: 'tui-copy', imports: [ClipboardModule, TuiButton, TuiHint, TuiIcon], changeDetection: ChangeDetectionStrategy.OnPush, host: {
48
- '[attr.data-size]': 'size',
49
- '(pointerdown)': 'copied$.next(false)',
50
- }, template: "<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", styles: [":host{cursor:pointer}:host[data-size=m]{--t-size: min( calc(1em + 1px) , 1rem)}:host[data-size=l]{--t-size: max(calc(1em / 1.57), min(max(calc(1em / 1.18), 1.25rem), 1.5rem))}@media (hover: hover) and (pointer: fine){:host:hover .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}:host:hover .t-button{opacity:1}}:host:has(.t-button:focus-visible) .t-content{opacity:var(--tui-disabled-opacity);-webkit-mask-position:0;mask-position:0}.t-content{transition-property:opacity,mask;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;mask:linear-gradient(to var(--tui-inline-start),transparent calc(1.25 * var(--t-size)),black calc(2 * var(--t-size))) no-repeat,linear-gradient(to var(--tui-inline-end),black,black calc(2 * var(--t-size)),transparent calc(2 * var(--t-size))) no-repeat;-webkit-mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0;mask-position:calc(var(--tui-inline) * 2 * var(--t-size)),0}.t-button{opacity:0;border-radius:0;font-size:inherit!important;margin-inline-start:calc(-1 * var(--t-size));--t-size: inherit}.t-button:before{font-size:var(--t-size)}.t-button:focus-visible{opacity:1}.t-icon{font-size:1rem;margin-inline-end:.25rem;vertical-align:sub;color:var(--tui-text-positive)}\n"] }]
51
- }], propDecorators: { size: [{
52
- type: Input
53
- }] } });
54
-
55
- class TuiCopyDirective {
56
- constructor() {
57
- this.options = inject(TUI_COPY_OPTIONS);
58
- this.copied$ = new Subject();
59
- this.doc = inject(DOCUMENT);
60
- this.textfield = inject(TuiTextfieldComponent);
61
- this.hint = tuiDirectiveBinding(TuiHintDirective, 'tuiHint', toSignal(inject(TUI_COPY_TEXTS).pipe(switchMap(([copy, copied]) => this.copied$.pipe(switchMap(() => timer(3000).pipe(map(() => copy), startWith(copied))), startWith(copy)))), { initialValue: '' }));
62
- this.icons = tuiDirectiveBinding(TuiIcon, 'icon', computed((size = this.textfield.options.size()) => tuiIsString(this.options.icon) ? this.options.icon : this.options.icon(size)));
63
- this.tuiCopy = '';
64
- }
65
- get disabled() {
66
- return !this.textfield.input?.nativeElement.value;
67
- }
68
- copy() {
69
- this.textfield.input?.nativeElement.select();
70
- this.doc.execCommand('copy');
71
- this.copied$.next();
72
- }
73
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiCopyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
74
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.9", type: TuiCopyDirective, isStandalone: true, selector: "tui-icon[tuiCopy]", inputs: { tuiCopy: "tuiCopy" }, host: { listeners: { "click": "copy()" }, properties: { "style.pointer-events": "disabled ? \"none\" : null", "style.opacity": "disabled ? \"var(--tui-disabled-opacity)\" : null", "style.border-width.rem": "textfield.options.size() === \"l\" ? null : 0.25" }, styleAttribute: "cursor: pointer" }, providers: [
75
- {
76
- provide: TUI_APPEARANCE_OPTIONS,
77
- useValue: { appearance: 'icon' },
78
- },
79
- ], hostDirectives: [{ directive: i1$1.TuiWithAppearance }, { directive: i2.TuiHintDirective, inputs: ["tuiHintAppearance", "tuiHintAppearance", "tuiHintContext", "tuiHintContext"] }], ngImport: i0 }); }
80
- }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiCopyDirective, decorators: [{
82
- type: Directive,
83
- args: [{
84
- standalone: true,
85
- selector: 'tui-icon[tuiCopy]',
86
- providers: [
87
- {
88
- provide: TUI_APPEARANCE_OPTIONS,
89
- useValue: { appearance: 'icon' },
90
- },
91
- ],
92
- hostDirectives: [
93
- TuiWithAppearance,
94
- {
95
- directive: TuiHintDirective,
96
- inputs: ['tuiHintAppearance', 'tuiHintContext'],
97
- },
98
- ],
99
- host: {
100
- style: 'cursor: pointer',
101
- '(click)': 'copy()',
102
- '[style.pointer-events]': 'disabled ? "none" : null',
103
- '[style.opacity]': 'disabled ? "var(--tui-disabled-opacity)" : null',
104
- '[style.border-width.rem]': 'textfield.options.size() === "l" ? null : 0.25',
105
- },
106
- }]
107
- }], propDecorators: { tuiCopy: [{
108
- type: Input
109
- }] } });
110
-
111
- const TuiCopy = [TuiCopyComponent, TuiCopyDirective];
112
-
113
- // TODO: Move to components in v5
114
-
115
- /**
116
- * Generated bundle index. Do not edit.
117
- */
118
-
119
- export { TUI_COPY_OPTIONS, TuiCopy, TuiCopyComponent, TuiCopyDirective, tuiCopyOptionsProvider };
120
- //# sourceMappingURL=taiga-ui-kit-directives-copy.mjs.map
@@ -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 {TuiIcon} from '@taiga-ui/core/components/icon';\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 {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 TuiIcon,\n 'icon',\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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AACI,4BAAA,OAAO,EAAE,sBAAsB;AAC/B,4BAAA,QAAQ,EAAE,EAAC,UAAU,EAAE,MAAM,EAAC;AACjC,yBAAA;AACJ,qBAAA;AACD,oBAAA,cAAc,EAAE;wBACZ,iBAAiB;AACjB,wBAAA;AACI,4BAAA,SAAS,EAAE,gBAAgB;AAC3B,4BAAA,MAAM,EAAE,CAAC,mBAAmB,EAAE,gBAAgB,CAAC;AAClD,yBAAA;AACJ,qBAAA;AACD,oBAAA,IAAI,EAAE;AACF,wBAAA,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,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,EAAA,IAAA,EAAA,kBAAkB,oHARV,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,2oBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;2FAQV,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAVvB,SAAS;iCACM,IAAI,EAAA,QAAA,EACN,EAAE,EAAA,aAAA,EAEG,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,KAAK,EAAE,gBAAgB;AAC1B,qBAAA,EAAA,MAAA,EAAA,CAAA,2oBAAA,CAAA,EAAA;;MAYQ,YAAY,CAAA;AARzB,IAAA,WAAA,GAAA;AASqB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;AAEpB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,kBAAkB,CAAC;AAC3C,QAAA,IAAA,CAAA,QAAQ,GAAG,MAAM,CAAgB,IAAI,CAAC;AAM5D,IAAA;IAJG,IACW,KAAK,CAAC,IAAY,EAAA;AACzB,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C;8GATS,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;kGAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,iBAAA,EAAA,MAAA,EAAA,EAAA,KAAA,EAAA,OAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,cAAA,EAAA,EAAA,EAAA,EAAA,UAAA,EAAA,EAAA,sBAAA,EAAA,YAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;2FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACF,wBAAA,YAAY,EAAE,EAAE;AAChB,wBAAA,wBAAwB,EAAE,YAAY;AACzC,qBAAA;AACJ,iBAAA;8BAQc,KAAK,EAAA,CAAA;sBADf;;;ACtCL;;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.9", ngImport: i0, type: TuiFieldErrorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
88
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.9", 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.9", 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.9", ngImport: i0, type: TuiFieldErrorContentPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
131
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.9", ngImport: i0, type: TuiFieldErrorContentPipe, isStandalone: true, name: "tuiFieldErrorContent", pure: false }); }
132
- }
133
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", 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,IAAA,CAAA,KAAK,GAAsB,EAAE;AACpB,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAAC,SAAS,EAAE,EAAC,QAAQ,EAA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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