@taiga-ui/kit 4.52.0-canary.ec0802b → 4.52.0-canary.efbd0d4

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 (359) hide show
  1. package/components/avatar/avatar-labeled.component.d.ts +3 -3
  2. package/components/avatar/avatar-stack.component.d.ts +2 -2
  3. package/components/badge-notification/badge-notification.component.d.ts +2 -3
  4. package/components/badged-content/badged-content.directive.d.ts +2 -2
  5. package/components/breadcrumbs/breadcrumbs.component.d.ts +6 -7
  6. package/components/button-loading/button-loading.component.d.ts +5 -5
  7. package/components/calendar-range/calendar-range.component.d.ts +0 -1
  8. package/components/calendar-range/day-range-period.d.ts +2 -1
  9. package/components/carousel/carousel.component.d.ts +15 -18
  10. package/components/carousel/carousel.directive.d.ts +5 -4
  11. package/components/combo-box/combo-box.d.ts +5 -0
  12. package/components/combo-box/combo-box.directive.d.ts +7 -9
  13. package/components/combo-box/index.d.ts +1 -0
  14. package/components/compass/compass.component.d.ts +2 -2
  15. package/components/confirm/confirm.component.d.ts +3 -2
  16. package/components/confirm/confirm.service.d.ts +1 -1
  17. package/components/copy/copy.component.d.ts +2 -3
  18. package/components/copy/copy.directive.d.ts +2 -4
  19. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -2
  20. package/components/data-list-wrapper/data-list-wrapper.component.d.ts +14 -22
  21. package/components/data-list-wrapper/{data-list-wrapper.module.d.ts → data-list-wrapper.d.ts} +1 -2
  22. package/components/data-list-wrapper/index.d.ts +1 -1
  23. package/components/drawer/drawer.component.d.ts +3 -4
  24. package/components/files/file/file.component.d.ts +16 -29
  25. package/components/files/files/files.component.d.ts +5 -8
  26. package/components/files/input-files/input-files.component.d.ts +2 -2
  27. package/components/files/input-files/input-files.content.d.ts +7 -8
  28. package/components/files/input-files/input-files.directive.d.ts +2 -2
  29. package/components/filter/filter.component.d.ts +9 -11
  30. package/components/fullscreen/fullscreen.component.d.ts +5 -8
  31. package/components/index.d.ts +0 -3
  32. package/components/input-chip/input-chip.component.d.ts +9 -8
  33. package/components/input-chip/input-chip.d.ts +5 -1
  34. package/components/input-chip/input-chip.directive.d.ts +7 -12
  35. package/components/input-color/index.d.ts +1 -0
  36. package/components/input-color/input-color.component.d.ts +4 -4
  37. package/components/input-color/input-color.d.ts +5 -0
  38. package/components/input-date/input-date.d.ts +4 -1
  39. package/components/input-date/input-date.directive.d.ts +12 -14
  40. package/components/input-date/input-date.options.d.ts +3 -3
  41. package/components/input-date-multi/input-date-multi.d.ts +1 -2
  42. package/components/input-date-multi/input-date-multi.directive.d.ts +10 -14
  43. package/components/input-date-range/input-date-range.d.ts +4 -1
  44. package/components/input-date-range/input-date-range.directive.d.ts +5 -8
  45. package/components/input-date-range/input-date-range.options.d.ts +2 -2
  46. package/components/input-date-time/input-date-time.d.ts +4 -1
  47. package/components/input-date-time/input-date-time.directive.d.ts +6 -6
  48. package/components/input-date-time/input-date-time.options.d.ts +2 -2
  49. package/components/input-month/input-month.d.ts +4 -1
  50. package/components/input-month/input-month.directive.d.ts +6 -5
  51. package/components/input-month-range/input-month-range.d.ts +4 -1
  52. package/components/input-month-range/input-month-range.directive.d.ts +6 -5
  53. package/components/input-number/input-number.d.ts +4 -1
  54. package/components/input-number/input-number.directive.d.ts +5 -7
  55. package/components/input-number/input-number.options.d.ts +2 -3
  56. package/components/input-number/step/input-number-step.component.d.ts +2 -1
  57. package/components/input-phone/index.d.ts +1 -0
  58. package/components/input-phone/input-phone.d.ts +5 -0
  59. package/components/input-phone/input-phone.directive.d.ts +7 -7
  60. package/components/input-phone-international/index.d.ts +1 -0
  61. package/components/input-phone-international/input-phone-international.component.d.ts +9 -8
  62. package/components/input-phone-international/input-phone-international.d.ts +5 -0
  63. package/components/input-pin/index.d.ts +1 -0
  64. package/components/input-pin/input-pin.component.d.ts +3 -3
  65. package/components/input-pin/input-pin.d.ts +5 -0
  66. package/components/input-range/index.d.ts +0 -1
  67. package/components/input-range/input-range.component.d.ts +4 -3
  68. package/components/input-slider/input-slider.d.ts +4 -1
  69. package/components/input-slider/input-slider.directive.d.ts +1 -1
  70. package/components/input-time/input-time.component.d.ts +1 -3
  71. package/components/input-time/input-time.d.ts +4 -1
  72. package/components/input-time/input-time.directive.d.ts +4 -4
  73. package/components/input-year/input-year.d.ts +4 -1
  74. package/components/input-year/input-year.directive.d.ts +5 -5
  75. package/components/input-year/input-year.options.d.ts +2 -2
  76. package/components/like/like.options.d.ts +1 -1
  77. package/components/line-clamp/line-clamp-box.component.d.ts +1 -1
  78. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +4 -6
  79. package/components/notification-middle/notification-middle.service.d.ts +1 -1
  80. package/components/pagination/pagination.component.d.ts +22 -52
  81. package/components/pagination/pagination.options.d.ts +3 -6
  82. package/components/preview/dialog/preview-dialog.service.d.ts +1 -1
  83. package/components/preview/index.d.ts +1 -0
  84. package/components/preview/pagination/preview-pagination.component.d.ts +2 -1
  85. package/components/preview/preview.component.d.ts +1 -1
  86. package/components/preview/zoom/preview-zoom.component.d.ts +3 -1
  87. package/components/progress/progress-bar/progress-bar.component.d.ts +3 -4
  88. package/components/pulse/pulse.component.d.ts +2 -2
  89. package/components/push/push-alert.component.d.ts +1 -1
  90. package/components/push/push.options.d.ts +4 -3
  91. package/components/push/push.service.d.ts +1 -1
  92. package/components/radio/radio.component.d.ts +1 -1
  93. package/components/radio-list/radio-list.component.d.ts +5 -3
  94. package/components/rating/rating.component.d.ts +1 -1
  95. package/components/routable-dialog/generate-dialogable-route.d.ts +1 -1
  96. package/components/segmented/segmented.component.d.ts +4 -6
  97. package/components/segmented/segmented.directive.d.ts +6 -7
  98. package/components/select/native-select/native-select.component.d.ts +4 -4
  99. package/components/select/select.d.ts +4 -1
  100. package/components/select/select.directive.d.ts +4 -3
  101. package/components/switch/switch.component.d.ts +1 -0
  102. package/components/textarea/index.d.ts +2 -1
  103. package/components/textarea/textarea.component.d.ts +4 -4
  104. package/components/textarea/textarea.d.ts +6 -0
  105. package/components/textarea/textarea.directive.d.ts +13 -0
  106. package/components/toast/toast.component.d.ts +1 -1
  107. package/components/toast/toast.options.d.ts +4 -3
  108. package/components/toast/toast.service.d.ts +1 -1
  109. package/directives/appearance-proxy/appearance-proxy.directive.d.ts +10 -0
  110. package/directives/appearance-proxy/index.d.ts +1 -0
  111. package/directives/button-select/button-select.directive.d.ts +1 -1
  112. package/directives/data-list-dropdown-manager/data-list-dropdown-manager.directive.d.ts +5 -5
  113. package/directives/fade/fade.directive.d.ts +5 -6
  114. package/directives/highlight/highlight.directive.d.ts +4 -4
  115. package/directives/index.d.ts +1 -1
  116. package/directives/password/password.directive.d.ts +1 -1
  117. package/directives/present/present.directive.d.ts +2 -4
  118. package/directives/tooltip/tooltip.directive.d.ts +1 -1
  119. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +2 -2
  120. package/directives/unmask-handler/unmask-handler.directive.d.ts +3 -3
  121. package/fesm2022/taiga-ui-kit-components-accordion.mjs +8 -8
  122. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +7 -7
  124. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-kit-components-avatar.mjs +33 -47
  126. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +8 -10
  128. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-badge.mjs +7 -7
  130. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +9 -11
  131. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  132. package/fesm2022/taiga-ui-kit-components-block.mjs +7 -7
  133. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  134. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +16 -30
  135. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  136. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +18 -26
  137. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  138. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +5 -13
  139. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  140. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +23 -23
  141. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  142. package/fesm2022/taiga-ui-kit-components-carousel.mjs +63 -107
  143. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  144. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +4 -5
  145. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  146. package/fesm2022/taiga-ui-kit-components-chip.mjs +7 -7
  147. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +40 -44
  148. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  149. package/fesm2022/taiga-ui-kit-components-comment.mjs +7 -7
  150. package/fesm2022/taiga-ui-kit-components-compass.mjs +7 -9
  151. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-kit-components-confirm.mjs +9 -10
  153. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-kit-components-copy.mjs +19 -32
  155. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  156. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +24 -85
  157. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  158. package/fesm2022/taiga-ui-kit-components-drawer.mjs +15 -32
  159. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  160. package/fesm2022/taiga-ui-kit-components-files.mjs +110 -230
  161. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  162. package/fesm2022/taiga-ui-kit-components-filter.mjs +20 -34
  163. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  164. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs +23 -42
  165. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  166. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +63 -75
  167. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  168. package/fesm2022/taiga-ui-kit-components-input-color.mjs +24 -13
  169. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  170. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +34 -46
  171. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  172. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +30 -35
  173. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  174. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +31 -27
  175. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  176. package/fesm2022/taiga-ui-kit-components-input-date.mjs +42 -38
  177. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  178. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +3 -3
  179. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +26 -22
  180. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  181. package/fesm2022/taiga-ui-kit-components-input-month.mjs +32 -22
  182. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  183. package/fesm2022/taiga-ui-kit-components-input-number.mjs +47 -40
  184. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  185. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +48 -36
  186. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  187. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +29 -18
  188. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  189. package/fesm2022/taiga-ui-kit-components-input-pin.mjs +18 -9
  190. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  191. package/fesm2022/taiga-ui-kit-components-input-range.mjs +18 -16
  192. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  193. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +15 -10
  194. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  195. package/fesm2022/taiga-ui-kit-components-input-time.mjs +38 -39
  196. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  197. package/fesm2022/taiga-ui-kit-components-input-year.mjs +27 -18
  198. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  199. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +12 -12
  200. package/fesm2022/taiga-ui-kit-components-like.mjs +3 -3
  201. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +14 -14
  203. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-components-message.mjs +7 -7
  205. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  206. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +29 -39
  207. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  208. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +12 -12
  209. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  210. package/fesm2022/taiga-ui-kit-components-pager.mjs +6 -8
  211. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  212. package/fesm2022/taiga-ui-kit-components-pagination.mjs +59 -140
  213. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  214. package/fesm2022/taiga-ui-kit-components-pin.mjs +7 -7
  215. package/fesm2022/taiga-ui-kit-components-preview.mjs +48 -36
  216. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  217. package/fesm2022/taiga-ui-kit-components-progress.mjs +31 -35
  218. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  219. package/fesm2022/taiga-ui-kit-components-pulse.mjs +7 -11
  220. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  221. package/fesm2022/taiga-ui-kit-components-push.mjs +20 -21
  222. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  223. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +8 -8
  224. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  225. package/fesm2022/taiga-ui-kit-components-radio.mjs +6 -6
  226. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  227. package/fesm2022/taiga-ui-kit-components-range.mjs +7 -7
  228. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  229. package/fesm2022/taiga-ui-kit-components-rating.mjs +4 -4
  230. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  231. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +4 -4
  232. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  233. package/fesm2022/taiga-ui-kit-components-segmented.mjs +31 -57
  234. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  235. package/fesm2022/taiga-ui-kit-components-select.mjs +50 -26
  236. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  237. package/fesm2022/taiga-ui-kit-components-slider.mjs +18 -18
  238. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  239. package/fesm2022/taiga-ui-kit-components-status.mjs +6 -6
  240. package/fesm2022/taiga-ui-kit-components-stepper.mjs +8 -8
  241. package/fesm2022/taiga-ui-kit-components-switch.mjs +10 -6
  242. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  243. package/fesm2022/taiga-ui-kit-components-tabs.mjs +24 -22
  244. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  245. package/fesm2022/taiga-ui-kit-components-textarea.mjs +51 -50
  246. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  247. package/fesm2022/taiga-ui-kit-components-tiles.mjs +12 -12
  248. package/fesm2022/taiga-ui-kit-components-toast.mjs +23 -24
  249. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  250. package/fesm2022/taiga-ui-kit-components-tree.mjs +26 -25
  251. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  252. package/fesm2022/taiga-ui-kit-components.mjs +0 -3
  253. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  254. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs +27 -0
  255. package/fesm2022/taiga-ui-kit-directives-appearance-proxy.mjs.map +1 -0
  256. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +3 -3
  257. package/fesm2022/taiga-ui-kit-directives-button-group.mjs +7 -7
  258. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  259. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +6 -6
  260. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  261. package/fesm2022/taiga-ui-kit-directives-chevron.mjs +10 -9
  262. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  263. package/fesm2022/taiga-ui-kit-directives-connected.mjs +6 -6
  264. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +25 -52
  265. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  266. package/fesm2022/taiga-ui-kit-directives-fade.mjs +25 -34
  267. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  268. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +3 -3
  269. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +16 -20
  270. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  271. package/fesm2022/taiga-ui-kit-directives-password.mjs +10 -8
  272. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  273. package/fesm2022/taiga-ui-kit-directives-present.mjs +10 -17
  274. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  275. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs +6 -6
  276. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs +6 -6
  277. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs +7 -6
  278. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  279. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +8 -8
  280. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  281. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +8 -10
  282. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  283. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +10 -14
  284. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  285. package/fesm2022/taiga-ui-kit-directives.mjs +1 -1
  286. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs +43 -0
  287. package/fesm2022/taiga-ui-kit-pipes-auto-color.mjs.map +1 -0
  288. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +3 -3
  289. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +12 -24
  290. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  291. package/fesm2022/taiga-ui-kit-pipes-flag.mjs +30 -0
  292. package/fesm2022/taiga-ui-kit-pipes-flag.mjs.map +1 -0
  293. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +4 -4
  294. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  295. package/fesm2022/taiga-ui-kit-pipes-initials.mjs +28 -0
  296. package/fesm2022/taiga-ui-kit-pipes-initials.mjs.map +1 -0
  297. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +10 -8
  298. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  299. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +3 -3
  300. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  301. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +3 -3
  302. package/fesm2022/taiga-ui-kit-pipes.mjs +3 -0
  303. package/fesm2022/taiga-ui-kit-pipes.mjs.map +1 -1
  304. package/fesm2022/taiga-ui-kit-tokens.mjs +4 -108
  305. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  306. package/fesm2022/taiga-ui-kit-utils.mjs +3 -15
  307. package/fesm2022/taiga-ui-kit-utils.mjs.map +1 -1
  308. package/package.json +62 -62
  309. package/pipes/auto-color/auto-color.pipe.d.ts +13 -0
  310. package/pipes/auto-color/index.d.ts +1 -0
  311. package/pipes/filter-by-input/filter-by-input.pipe.d.ts +2 -2
  312. package/pipes/flag/flag.pipe.d.ts +14 -0
  313. package/pipes/flag/index.d.ts +1 -0
  314. package/pipes/index.d.ts +3 -0
  315. package/pipes/initials/index.d.ts +1 -0
  316. package/pipes/initials/initials.pipe.d.ts +7 -0
  317. package/pipes/sort-countries/sort-countries.pipe.d.ts +4 -3
  318. package/pipes/stringify-content/stringify-content.pipe.d.ts +2 -3
  319. package/styles/components/avatar.less +14 -14
  320. package/styles/components/badge.less +3 -3
  321. package/styles/components/block.less +4 -4
  322. package/styles/components/chip.less +3 -3
  323. package/styles/components/comment.less +1 -1
  324. package/styles/components/message.less +1 -1
  325. package/styles/components/pin.less +3 -3
  326. package/styles/components/switch.less +2 -2
  327. package/styles/components/toast.less +1 -1
  328. package/tokens/i18n.d.ts +1 -0
  329. package/tokens/index.d.ts +0 -7
  330. package/utils/index.d.ts +0 -2
  331. package/components/elastic-container/elastic-container.component.d.ts +0 -8
  332. package/components/elastic-container/elastic-container.directive.d.ts +0 -7
  333. package/components/elastic-container/index.d.ts +0 -2
  334. package/components/floating-container/floating-container.directive.d.ts +0 -7
  335. package/components/floating-container/index.d.ts +0 -1
  336. package/components/input-range/input-range.d.ts +0 -3
  337. package/components/slides/index.d.ts +0 -1
  338. package/components/slides/slides.directive.d.ts +0 -11
  339. package/components/textarea/textarea-limit.directive.d.ts +0 -26
  340. package/directives/lazy-loading/index.d.ts +0 -2
  341. package/directives/lazy-loading/lazy-loading.directive.d.ts +0 -18
  342. package/directives/lazy-loading/lazy-loading.service.d.ts +0 -12
  343. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -77
  344. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +0 -1
  345. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +0 -37
  346. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +0 -1
  347. package/fesm2022/taiga-ui-kit-components-slides.mjs +0 -49
  348. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +0 -1
  349. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -80
  350. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +0 -1
  351. package/tokens/calendar-date-stream.d.ts +0 -10
  352. package/tokens/date-inputs-value-transformers.d.ts +0 -19
  353. package/tokens/input-date-options.d.ts +0 -15
  354. package/tokens/items-handlers.d.ts +0 -20
  355. package/tokens/mobile-calendar.d.ts +0 -6
  356. package/tokens/month-formatter.d.ts +0 -5
  357. package/utils/phone.d.ts +0 -3
  358. package/utils/toggle-day.d.ts +0 -2
  359. /package/{tokens/preview-icons.d.ts → components/preview/preview.options.d.ts} +0 -0
@@ -1,70 +1,55 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, ElementRef, ContentChildren, Directive, EventEmitter, Output, Input, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
- import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
2
+ import { inject, contentChildren, ElementRef, Directive, input, model, ChangeDetectionStrategy, ViewEncapsulation, Component } from '@angular/core';
3
+ import { toObservable, takeUntilDestroyed } from '@angular/core/rxjs-interop';
4
4
  import { ResizeObserverService } from '@ng-web-apis/resize-observer';
5
- import { tuiQueryListChanges, tuiControlValue, tuiZonefree } from '@taiga-ui/cdk/observables';
5
+ import { tuiControlValue, tuiZonefree } from '@taiga-ui/cdk/observables';
6
6
  import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
7
7
  import { tuiInjectElement, tuiIsHTMLElement } from '@taiga-ui/cdk/utils/dom';
8
8
  import { tuiPx } from '@taiga-ui/cdk/utils/miscellaneous';
9
9
  import { tuiBadgeNotificationOptionsProvider } from '@taiga-ui/kit/components/badge-notification';
10
10
  import { NgControl, RadioControlValueAccessor } from '@angular/forms';
11
11
  import { RouterLinkActive } from '@angular/router';
12
- import { EMPTY_QUERY } from '@taiga-ui/cdk/constants';
13
12
  import { switchMap, map } from 'rxjs';
14
13
 
15
14
  class TuiSegmentedDirective {
16
15
  constructor() {
17
- this.controls = EMPTY_QUERY;
18
- this.radios = EMPTY_QUERY;
19
- this.links = EMPTY_QUERY;
20
- this.elements = EMPTY_QUERY;
21
16
  this.component = inject(TuiSegmented);
22
17
  this.el = tuiInjectElement();
18
+ this.links = contentChildren(RouterLinkActive);
19
+ this.elements = contentChildren(RouterLinkActive, { read: ElementRef });
20
+ this.controls = contentChildren(NgControl, { descendants: true });
21
+ this.controls$ = toObservable(this.controls);
22
+ this.radios = contentChildren(RadioControlValueAccessor, {
23
+ descendants: true,
24
+ });
23
25
  }
24
26
  ngAfterContentInit() {
25
- tuiQueryListChanges(this.controls)
26
- .pipe(switchMap(() => tuiControlValue(this.controls.first)), map((value) => this.radios.toArray().findIndex((c) => c.value === value)))
27
+ this.controls$
28
+ .pipe(switchMap(([control]) => tuiControlValue(control)), map((value) => this.radios().findIndex((c) => c.value === value)))
27
29
  .subscribe((index) => {
28
30
  this.component.update(index);
29
31
  });
30
32
  }
31
33
  ngAfterContentChecked() {
32
- if (this.links.length) {
33
- this.update(this.elements.get(this.linkIndex)?.nativeElement || null);
34
+ const index = this.links().findIndex(({ isActive }) => isActive);
35
+ if (index !== -1) {
36
+ this.update(this.elements()[index]?.nativeElement || null);
34
37
  }
35
38
  }
36
39
  update(target) {
37
- this.component.update(this.getIndex(target));
38
- }
39
- get linkIndex() {
40
- return this.links.toArray().findIndex((link) => link.isActive);
40
+ this.component.update(Array.from(this.el.children).findIndex((tab) => tab.contains(target)));
41
41
  }
42
- getIndex(element) {
43
- return Array.from(this.el.children).findIndex((tab) => tab.contains(element));
44
- }
45
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSegmentedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
46
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSegmentedDirective, isStandalone: true, host: { listeners: { "click": "update($event.target)" } }, queries: [{ propertyName: "controls", predicate: NgControl, descendants: true }, { propertyName: "radios", predicate: RadioControlValueAccessor, descendants: true }, { propertyName: "links", predicate: RouterLinkActive }, { propertyName: "elements", predicate: RouterLinkActive, read: ElementRef }], ngImport: i0 }); }
42
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSegmentedDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
43
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.17", type: TuiSegmentedDirective, isStandalone: true, host: { listeners: { "click": "update($event.target)" } }, queries: [{ propertyName: "links", predicate: RouterLinkActive, isSignal: true }, { propertyName: "elements", predicate: RouterLinkActive, read: ElementRef, isSignal: true }, { propertyName: "controls", predicate: NgControl, descendants: true, isSignal: true }, { propertyName: "radios", predicate: RadioControlValueAccessor, descendants: true, isSignal: true }], ngImport: i0 }); }
47
44
  }
48
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSegmentedDirective, decorators: [{
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSegmentedDirective, decorators: [{
49
46
  type: Directive,
50
47
  args: [{
51
48
  host: {
52
49
  '(click)': 'update($event.target)',
53
50
  },
54
51
  }]
55
- }], propDecorators: { controls: [{
56
- type: ContentChildren,
57
- args: [NgControl, { descendants: true }]
58
- }], radios: [{
59
- type: ContentChildren,
60
- args: [RadioControlValueAccessor, { descendants: true }]
61
- }], links: [{
62
- type: ContentChildren,
63
- args: [RouterLinkActive]
64
- }], elements: [{
65
- type: ContentChildren,
66
- args: [RouterLinkActive, { read: ElementRef }]
67
- }] } });
52
+ }] });
68
53
 
69
54
  const [TUI_SEGMENTED_OPTIONS, tuiSegmentedOptionsProvider] = tuiCreateOptions({
70
55
  size: 's',
@@ -75,26 +60,21 @@ class TuiSegmented {
75
60
  this.sub = inject(ResizeObserverService, { self: true })
76
61
  .pipe(tuiZonefree(), takeUntilDestroyed())
77
62
  .subscribe(() => this.refresh());
78
- this.size = inject(TUI_SEGMENTED_OPTIONS).size;
79
- this.activeItemIndex = 0;
80
- this.activeItemIndexChange = new EventEmitter();
63
+ this.size = input(inject(TUI_SEGMENTED_OPTIONS).size);
64
+ this.activeItemIndex = model(0);
81
65
  }
82
66
  ngOnChanges() {
83
67
  this.refresh();
84
68
  }
85
69
  update(activeItemIndex) {
86
- if (activeItemIndex === this.activeItemIndex || activeItemIndex < 0) {
70
+ if (activeItemIndex === this.activeItemIndex() || activeItemIndex < 0) {
87
71
  return;
88
72
  }
89
- this.activeItemIndex = activeItemIndex;
90
- this.activeItemIndexChange.emit(activeItemIndex);
73
+ this.activeItemIndex.set(activeItemIndex);
91
74
  this.refresh();
92
75
  }
93
- get activeElement() {
94
- return this.el.children.item(this.activeItemIndex);
95
- }
96
76
  refresh() {
97
- const el = this.activeElement;
77
+ const el = this.el.children.item(this.activeItemIndex());
98
78
  if (!tuiIsHTMLElement(el)) {
99
79
  return;
100
80
  }
@@ -105,21 +85,15 @@ class TuiSegmented {
105
85
  this.el.style.setProperty('--t-left', tuiPx(offsetLeft));
106
86
  this.el.style.setProperty('--t-width', tuiPx(offsetWidth));
107
87
  }
108
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSegmented, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
109
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: TuiSegmented, isStandalone: true, selector: "tui-segmented", inputs: { size: "size", activeItemIndex: "activeItemIndex" }, outputs: { activeItemIndexChange: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size" } }, providers: [ResizeObserverService, tuiBadgeNotificationOptionsProvider({ size: 's' })], usesOnChanges: true, hostDirectives: [{ directive: TuiSegmentedDirective }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["tui-segmented{position:relative;display:flex;color:var(--tui-background-base);background:var(--tui-background-neutral-1);overflow:hidden;-webkit-mask-image:linear-gradient(#000,#000);mask-image:linear-gradient(#000,#000)}tui-segmented[data-size=s]{--t-padding: .5rem;--t-gap: .5rem;--t-margin: -.125rem;--t-height: var(--tui-height-s);font:var(--tui-font-text-s);border-radius:var(--tui-radius-m)}tui-segmented[data-size=s] tui-icon{font-size:1rem}tui-segmented[data-size=m]{--t-padding: .875rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-m);font:var(--tui-font-text-m);border-radius:var(--tui-radius-m)}tui-segmented[data-size=l]{--t-padding: 1.25rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-l);font:var(--tui-font-text-l);border-radius:var(--tui-radius-l)}tui-segmented[data-size=l]>*:before{block-size:1.25rem}tui-segmented>a,tui-segmented>button,tui-segmented>label,tui-segmented>label>input:not([tuiRadio]){transition-property:color,background,opacity,border-image;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;justify-content:center;block-size:var(--t-height);white-space:nowrap;gap:var(--t-gap);margin:0;padding:0 var(--t-padding);color:var(--tui-text-primary);overflow:hidden;cursor:pointer;font:inherit;border-radius:inherit;border:.125rem solid transparent;background-clip:padding-box;box-sizing:border-box;border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 0 0 100 .5;clip-path:polygon(-1rem calc(50% - .5rem),1px calc(50% - .5rem),1px 0,100% 0,100% 100%,1px 100%,1px calc(50% + .5rem),-1rem calc(50% + .5rem))}tui-segmented>a>*,tui-segmented>button>*,tui-segmented>label>*,tui-segmented>label>input:not([tuiRadio])>*{margin:0 var(--t-margin)}tui-segmented>a:focus-visible,tui-segmented>button:focus-visible,tui-segmented>label:focus-visible,tui-segmented>label>input:not([tuiRadio]):focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.25rem}@media (hover: hover) and (pointer: fine){tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover{background-color:var(--tui-background-neutral-1-hover)}tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover,tui-segmented>a:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>button:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}}tui-segmented>a:active,tui-segmented>button:active,tui-segmented>label:active,tui-segmented>label>input:not([tuiRadio]):active,tui-segmented>a:active+*,tui-segmented>button:active+*,tui-segmented>label:active+*,tui-segmented>label>input:not([tuiRadio]):active+*,tui-segmented>a.tui-segmented_active,tui-segmented>button.tui-segmented_active,tui-segmented>label.tui-segmented_active,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active,tui-segmented>a.tui-segmented_active+*,tui-segmented>button.tui-segmented_active+*,tui-segmented>label.tui-segmented_active+*,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}tui-segmented>label>input:not([tuiRadio]){position:absolute;inset:-.125rem;background:transparent!important}tui-segmented:before{transition-property:top,left,width;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;left:var(--t-left);top:var(--t-top);block-size:var(--t-height);inline-size:var(--t-width);border-radius:inherit;background:currentColor;background-clip:padding-box;border:.125rem solid transparent;box-sizing:border-box;filter:drop-shadow(0 .25rem 1.25rem rgba(0,0,0,.1))}[tuiTheme=dark] tui-segmented,tui-segmented[tuiTheme=dark]{--tui-background-base: var(--tui-background-neutral-1-hover)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
88
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSegmented, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
89
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: TuiSegmented, isStandalone: true, selector: "tui-segmented", inputs: { size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, activeItemIndex: { classPropertyName: "activeItemIndex", publicName: "activeItemIndex", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { activeItemIndex: "activeItemIndexChange" }, host: { properties: { "attr.data-size": "size()" } }, providers: [ResizeObserverService, tuiBadgeNotificationOptionsProvider({ size: 's' })], usesOnChanges: true, hostDirectives: [{ directive: TuiSegmentedDirective }], ngImport: i0, template: '<ng-content />', isInline: true, styles: ["tui-segmented{position:relative;display:flex;color:var(--tui-background-base);background:var(--tui-background-neutral-1);overflow:hidden;-webkit-mask-image:linear-gradient(#000,#000);mask-image:linear-gradient(#000,#000)}tui-segmented[data-size=s]{--t-padding: .5rem;--t-gap: .5rem;--t-margin: -.125rem;--t-height: var(--tui-height-s);font:var(--tui-font-body-s);border-radius:var(--tui-radius-m)}tui-segmented[data-size=s] tui-icon{font-size:1rem}tui-segmented[data-size=m]{--t-padding: .875rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-m);font:var(--tui-font-body-m);border-radius:var(--tui-radius-m)}tui-segmented[data-size=l]{--t-padding: 1.25rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-l);font:var(--tui-font-body-l);border-radius:var(--tui-radius-l)}tui-segmented[data-size=l]>*:before{block-size:1.25rem}tui-segmented>a,tui-segmented>button,tui-segmented>label,tui-segmented>label>input:not([tuiRadio]){transition-property:color,background,opacity,border-image;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;justify-content:center;block-size:var(--t-height);white-space:nowrap;gap:var(--t-gap);margin:0;padding:0 var(--t-padding);color:var(--tui-text-primary);overflow:hidden;cursor:pointer;font:inherit;border-radius:inherit;border:.125rem solid transparent;background-clip:padding-box;box-sizing:border-box;border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 0 0 100 .5;clip-path:polygon(-1rem calc(50% - .5rem),1px calc(50% - .5rem),1px 0,100% 0,100% 100%,1px 100%,1px calc(50% + .5rem),-1rem calc(50% + .5rem))}tui-segmented>a>*,tui-segmented>button>*,tui-segmented>label>*,tui-segmented>label>input:not([tuiRadio])>*{margin:0 var(--t-margin)}tui-segmented>a:focus-visible,tui-segmented>button:focus-visible,tui-segmented>label:focus-visible,tui-segmented>label>input:not([tuiRadio]):focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.25rem}@media (hover: hover) and (pointer: fine){tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover{background-color:var(--tui-background-neutral-1-hover)}tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover,tui-segmented>a:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>button:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}}tui-segmented>a:active,tui-segmented>button:active,tui-segmented>label:active,tui-segmented>label>input:not([tuiRadio]):active,tui-segmented>a:active+*,tui-segmented>button:active+*,tui-segmented>label:active+*,tui-segmented>label>input:not([tuiRadio]):active+*,tui-segmented>a.tui-segmented_active,tui-segmented>button.tui-segmented_active,tui-segmented>label.tui-segmented_active,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active,tui-segmented>a.tui-segmented_active+*,tui-segmented>button.tui-segmented_active+*,tui-segmented>label.tui-segmented_active+*,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}tui-segmented>label>input:not([tuiRadio]){position:absolute;inset:-.125rem;background:transparent!important}tui-segmented:before{transition-property:top,left,width;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;inset:var(--t-top) auto auto var(--t-left);block-size:var(--t-height);inline-size:var(--t-width);border-radius:inherit;background:currentColor;background-clip:padding-box;border:.125rem solid transparent;box-sizing:border-box;filter:drop-shadow(0 .25rem 1.25rem rgba(0,0,0,.1))}[dir=rtl] tui-segmented:before{inset-inline:auto var(--t-left)}[tuiTheme=dark] tui-segmented,tui-segmented[tuiTheme=dark]{--tui-background-base: var(--tui-background-neutral-1-hover)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
110
90
  }
111
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSegmented, decorators: [{
91
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSegmented, decorators: [{
112
92
  type: Component,
113
93
  args: [{ selector: 'tui-segmented', template: '<ng-content />', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, providers: [ResizeObserverService, tuiBadgeNotificationOptionsProvider({ size: 's' })], hostDirectives: [TuiSegmentedDirective], host: {
114
- '[attr.data-size]': 'size',
115
- }, styles: ["tui-segmented{position:relative;display:flex;color:var(--tui-background-base);background:var(--tui-background-neutral-1);overflow:hidden;-webkit-mask-image:linear-gradient(#000,#000);mask-image:linear-gradient(#000,#000)}tui-segmented[data-size=s]{--t-padding: .5rem;--t-gap: .5rem;--t-margin: -.125rem;--t-height: var(--tui-height-s);font:var(--tui-font-text-s);border-radius:var(--tui-radius-m)}tui-segmented[data-size=s] tui-icon{font-size:1rem}tui-segmented[data-size=m]{--t-padding: .875rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-m);font:var(--tui-font-text-m);border-radius:var(--tui-radius-m)}tui-segmented[data-size=l]{--t-padding: 1.25rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-l);font:var(--tui-font-text-l);border-radius:var(--tui-radius-l)}tui-segmented[data-size=l]>*:before{block-size:1.25rem}tui-segmented>a,tui-segmented>button,tui-segmented>label,tui-segmented>label>input:not([tuiRadio]){transition-property:color,background,opacity,border-image;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;justify-content:center;block-size:var(--t-height);white-space:nowrap;gap:var(--t-gap);margin:0;padding:0 var(--t-padding);color:var(--tui-text-primary);overflow:hidden;cursor:pointer;font:inherit;border-radius:inherit;border:.125rem solid transparent;background-clip:padding-box;box-sizing:border-box;border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 0 0 100 .5;clip-path:polygon(-1rem calc(50% - .5rem),1px calc(50% - .5rem),1px 0,100% 0,100% 100%,1px 100%,1px calc(50% + .5rem),-1rem calc(50% + .5rem))}tui-segmented>a>*,tui-segmented>button>*,tui-segmented>label>*,tui-segmented>label>input:not([tuiRadio])>*{margin:0 var(--t-margin)}tui-segmented>a:focus-visible,tui-segmented>button:focus-visible,tui-segmented>label:focus-visible,tui-segmented>label>input:not([tuiRadio]):focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.25rem}@media (hover: hover) and (pointer: fine){tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover{background-color:var(--tui-background-neutral-1-hover)}tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover,tui-segmented>a:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>button:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}}tui-segmented>a:active,tui-segmented>button:active,tui-segmented>label:active,tui-segmented>label>input:not([tuiRadio]):active,tui-segmented>a:active+*,tui-segmented>button:active+*,tui-segmented>label:active+*,tui-segmented>label>input:not([tuiRadio]):active+*,tui-segmented>a.tui-segmented_active,tui-segmented>button.tui-segmented_active,tui-segmented>label.tui-segmented_active,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active,tui-segmented>a.tui-segmented_active+*,tui-segmented>button.tui-segmented_active+*,tui-segmented>label.tui-segmented_active+*,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}tui-segmented>label>input:not([tuiRadio]){position:absolute;inset:-.125rem;background:transparent!important}tui-segmented:before{transition-property:top,left,width;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;left:var(--t-left);top:var(--t-top);block-size:var(--t-height);inline-size:var(--t-width);border-radius:inherit;background:currentColor;background-clip:padding-box;border:.125rem solid transparent;box-sizing:border-box;filter:drop-shadow(0 .25rem 1.25rem rgba(0,0,0,.1))}[tuiTheme=dark] tui-segmented,tui-segmented[tuiTheme=dark]{--tui-background-base: var(--tui-background-neutral-1-hover)}\n"] }]
116
- }], propDecorators: { size: [{
117
- type: Input
118
- }], activeItemIndex: [{
119
- type: Input
120
- }], activeItemIndexChange: [{
121
- type: Output
122
- }] } });
94
+ '[attr.data-size]': 'size()',
95
+ }, styles: ["tui-segmented{position:relative;display:flex;color:var(--tui-background-base);background:var(--tui-background-neutral-1);overflow:hidden;-webkit-mask-image:linear-gradient(#000,#000);mask-image:linear-gradient(#000,#000)}tui-segmented[data-size=s]{--t-padding: .5rem;--t-gap: .5rem;--t-margin: -.125rem;--t-height: var(--tui-height-s);font:var(--tui-font-body-s);border-radius:var(--tui-radius-m)}tui-segmented[data-size=s] tui-icon{font-size:1rem}tui-segmented[data-size=m]{--t-padding: .875rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-m);font:var(--tui-font-body-m);border-radius:var(--tui-radius-m)}tui-segmented[data-size=l]{--t-padding: 1.25rem;--t-gap: 1rem;--t-margin: -.375rem;--t-height: var(--tui-height-l);font:var(--tui-font-body-l);border-radius:var(--tui-radius-l)}tui-segmented[data-size=l]>*:before{block-size:1.25rem}tui-segmented>a,tui-segmented>button,tui-segmented>label,tui-segmented>label>input:not([tuiRadio]){transition-property:color,background,opacity,border-image;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;-webkit-appearance:none;appearance:none;padding:0;border:0;background:none;line-height:inherit;text-decoration:none;position:relative;display:flex;align-items:center;justify-content:center;block-size:var(--t-height);white-space:nowrap;gap:var(--t-gap);margin:0;padding:0 var(--t-padding);color:var(--tui-text-primary);overflow:hidden;cursor:pointer;font:inherit;border-radius:inherit;border:.125rem solid transparent;background-clip:padding-box;box-sizing:border-box;border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 0 0 100 .5;clip-path:polygon(-1rem calc(50% - .5rem),1px calc(50% - .5rem),1px 0,100% 0,100% 100%,1px 100%,1px calc(50% + .5rem),-1rem calc(50% + .5rem))}tui-segmented>a>*,tui-segmented>button>*,tui-segmented>label>*,tui-segmented>label>input:not([tuiRadio])>*{margin:0 var(--t-margin)}tui-segmented>a:focus-visible,tui-segmented>button:focus-visible,tui-segmented>label:focus-visible,tui-segmented>label>input:not([tuiRadio]):focus-visible{outline:.125rem solid var(--tui-border-focus);outline-offset:-.25rem}@media (hover: hover) and (pointer: fine){tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover{background-color:var(--tui-background-neutral-1-hover)}tui-segmented>a:not(.tui-segmented_active):not(:active):hover,tui-segmented>button:not(.tui-segmented_active):not(:active):hover,tui-segmented>label:not(.tui-segmented_active):not(:active):hover,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover,tui-segmented>a:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>button:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label:not(.tui-segmented_active):not(:active):hover+*,tui-segmented>label>input:not([tuiRadio]):not(.tui-segmented_active):not(:active):hover+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}}tui-segmented>a:active,tui-segmented>button:active,tui-segmented>label:active,tui-segmented>label>input:not([tuiRadio]):active,tui-segmented>a:active+*,tui-segmented>button:active+*,tui-segmented>label:active+*,tui-segmented>label>input:not([tuiRadio]):active+*,tui-segmented>a.tui-segmented_active,tui-segmented>button.tui-segmented_active,tui-segmented>label.tui-segmented_active,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active,tui-segmented>a.tui-segmented_active+*,tui-segmented>button.tui-segmented_active+*,tui-segmented>label.tui-segmented_active+*,tui-segmented>label>input:not([tuiRadio]).tui-segmented_active+*{border-image:linear-gradient(var(--tui-border-normal),transparent) 1 / 0 0 25% .5 / 100 0 0 .5}tui-segmented>label>input:not([tuiRadio]){position:absolute;inset:-.125rem;background:transparent!important}tui-segmented:before{transition-property:top,left,width;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;content:\"\";position:absolute;inset:var(--t-top) auto auto var(--t-left);block-size:var(--t-height);inline-size:var(--t-width);border-radius:inherit;background:currentColor;background-clip:padding-box;border:.125rem solid transparent;box-sizing:border-box;filter:drop-shadow(0 .25rem 1.25rem rgba(0,0,0,.1))}[dir=rtl] tui-segmented:before{inset-inline:auto var(--t-left)}[tuiTheme=dark] tui-segmented,tui-segmented[tuiTheme=dark]{--tui-background-base: var(--tui-background-neutral-1-hover)}\n"] }]
96
+ }] });
123
97
 
124
98
  /**
125
99
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-segmented.mjs","sources":["../../../projects/kit/components/segmented/segmented.directive.ts","../../../projects/kit/components/segmented/segmented.component.ts","../../../projects/kit/components/segmented/taiga-ui-kit-components-segmented.ts"],"sourcesContent":["import {\n type AfterContentChecked,\n type AfterContentInit,\n ContentChildren,\n Directive,\n ElementRef,\n inject,\n type QueryList,\n} from '@angular/core';\nimport {NgControl, RadioControlValueAccessor} from '@angular/forms';\nimport {RouterLinkActive} from '@angular/router';\nimport {EMPTY_QUERY} from '@taiga-ui/cdk/constants';\nimport {tuiControlValue, tuiQueryListChanges} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {map, switchMap} from 'rxjs';\n\nimport {TuiSegmented} from './segmented.component';\n\n@Directive({\n host: {\n '(click)': 'update($event.target)',\n },\n})\nexport class TuiSegmentedDirective implements AfterContentChecked, AfterContentInit {\n @ContentChildren(NgControl, {descendants: true})\n private readonly controls: QueryList<NgControl> = EMPTY_QUERY;\n\n @ContentChildren(RadioControlValueAccessor, {descendants: true})\n private readonly radios: QueryList<RadioControlValueAccessor> = EMPTY_QUERY;\n\n @ContentChildren(RouterLinkActive)\n private readonly links: QueryList<RouterLinkActive> = EMPTY_QUERY;\n\n @ContentChildren(RouterLinkActive, {read: ElementRef})\n private readonly elements: QueryList<ElementRef<HTMLElement>> = EMPTY_QUERY;\n\n private readonly component = inject(TuiSegmented);\n private readonly el = tuiInjectElement();\n\n public ngAfterContentInit(): void {\n tuiQueryListChanges(this.controls)\n .pipe(\n switchMap(() => tuiControlValue(this.controls.first)),\n map((value) => this.radios.toArray().findIndex((c) => c.value === value)),\n )\n .subscribe((index) => {\n this.component.update(index);\n });\n }\n\n public ngAfterContentChecked(): void {\n if (this.links.length) {\n this.update(this.elements.get(this.linkIndex)?.nativeElement || null);\n }\n }\n\n protected update(target: Element | null): void {\n this.component.update(this.getIndex(target));\n }\n\n private get linkIndex(): number {\n return this.links.toArray().findIndex((link) => link.isActive);\n }\n\n private getIndex(element: Element | null): number {\n return Array.from(this.el.children).findIndex((tab) => tab.contains(element));\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n EventEmitter,\n inject,\n Input,\n type OnChanges,\n Output,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement, tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {tuiBadgeNotificationOptionsProvider} from '@taiga-ui/kit/components/badge-notification';\n\nimport {TuiSegmentedDirective} from './segmented.directive';\n\nexport const [TUI_SEGMENTED_OPTIONS, tuiSegmentedOptionsProvider] = tuiCreateOptions({\n size: 's' as TuiSizeL | TuiSizeS,\n});\n\n@Component({\n selector: 'tui-segmented',\n template: '<ng-content />',\n styleUrl: './segmented.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ResizeObserverService, tuiBadgeNotificationOptionsProvider({size: 's'})],\n hostDirectives: [TuiSegmentedDirective],\n host: {\n '[attr.data-size]': 'size',\n },\n})\nexport class TuiSegmented implements OnChanges {\n private readonly el = tuiInjectElement();\n\n protected readonly sub = inject(ResizeObserverService, {self: true})\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => this.refresh());\n\n @Input()\n public size: TuiSizeL | TuiSizeS = inject(TUI_SEGMENTED_OPTIONS).size;\n\n @Input()\n public activeItemIndex = 0;\n\n @Output()\n public readonly activeItemIndexChange = new EventEmitter<number>();\n\n public ngOnChanges(): void {\n this.refresh();\n }\n\n public update(activeItemIndex: number): void {\n if (activeItemIndex === this.activeItemIndex || activeItemIndex < 0) {\n return;\n }\n\n this.activeItemIndex = activeItemIndex;\n this.activeItemIndexChange.emit(activeItemIndex);\n this.refresh();\n }\n\n private get activeElement(): Element | null {\n return this.el.children.item(this.activeItemIndex);\n }\n\n private refresh(): void {\n const el = this.activeElement;\n\n if (!tuiIsHTMLElement(el)) {\n return;\n }\n\n Array.from(this.el.children).forEach((e) =>\n e.classList.remove('tui-segmented_active'),\n );\n\n el.classList.add('tui-segmented_active');\n\n const {offsetWidth = 0, offsetLeft = 0, offsetTop = 0} = el;\n\n this.el.style.setProperty('--t-top', tuiPx(offsetTop));\n this.el.style.setProperty('--t-left', tuiPx(offsetLeft));\n this.el.style.setProperty('--t-width', tuiPx(offsetWidth));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;MAuBa,qBAAqB,CAAA;AALlC,IAAA,WAAA,GAAA;QAOqB,IAAQ,CAAA,QAAA,GAAyB,WAAW;QAG5C,IAAM,CAAA,MAAA,GAAyC,WAAW;QAG1D,IAAK,CAAA,KAAA,GAAgC,WAAW;QAGhD,IAAQ,CAAA,QAAA,GAAuC,WAAW;AAE1D,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;QAChC,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AA8B3C;IA5BU,kBAAkB,GAAA;AACrB,QAAA,mBAAmB,CAAC,IAAI,CAAC,QAAQ;aAC5B,IAAI,CACD,SAAS,CAAC,MAAM,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EACrD,GAAG,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAE5E,aAAA,SAAS,CAAC,CAAC,KAAK,KAAI;AACjB,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAA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kit-components-segmented.mjs","sources":["../../../projects/kit/components/segmented/segmented.directive.ts","../../../projects/kit/components/segmented/segmented.component.ts","../../../projects/kit/components/segmented/taiga-ui-kit-components-segmented.ts"],"sourcesContent":["import {\n type AfterContentChecked,\n type AfterContentInit,\n contentChildren,\n Directive,\n ElementRef,\n inject,\n} from '@angular/core';\nimport {toObservable} from '@angular/core/rxjs-interop';\nimport {NgControl, RadioControlValueAccessor} from '@angular/forms';\nimport {RouterLinkActive} from '@angular/router';\nimport {tuiControlValue} from '@taiga-ui/cdk/observables';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {map, switchMap} from 'rxjs';\n\nimport {TuiSegmented} from './segmented.component';\n\n@Directive({\n host: {\n '(click)': 'update($event.target)',\n },\n})\nexport class TuiSegmentedDirective implements AfterContentChecked, AfterContentInit {\n private readonly component = inject(TuiSegmented);\n private readonly el = tuiInjectElement();\n private readonly links = contentChildren(RouterLinkActive);\n private readonly elements = contentChildren(RouterLinkActive, {read: ElementRef});\n private readonly controls = contentChildren(NgControl, {descendants: true});\n private readonly controls$ = toObservable(this.controls);\n private readonly radios = contentChildren(RadioControlValueAccessor, {\n descendants: true,\n });\n\n public ngAfterContentInit(): void {\n this.controls$\n .pipe(\n switchMap(([control]) => tuiControlValue(control)),\n map((value) => this.radios().findIndex((c) => c.value === value)),\n )\n .subscribe((index) => {\n this.component.update(index);\n });\n }\n\n public ngAfterContentChecked(): void {\n const index = this.links().findIndex(({isActive}) => isActive);\n\n if (index !== -1) {\n this.update(this.elements()[index]?.nativeElement || null);\n }\n }\n\n protected update(target: Element | null): void {\n this.component.update(\n Array.from(this.el.children).findIndex((tab) => tab.contains(target)),\n );\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n inject,\n input,\n model,\n type OnChanges,\n ViewEncapsulation,\n} from '@angular/core';\nimport {takeUntilDestroyed} from '@angular/core/rxjs-interop';\nimport {ResizeObserverService} from '@ng-web-apis/resize-observer';\nimport {tuiZonefree} from '@taiga-ui/cdk/observables';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiInjectElement, tuiIsHTMLElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiPx} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {tuiBadgeNotificationOptionsProvider} from '@taiga-ui/kit/components/badge-notification';\n\nimport {TuiSegmentedDirective} from './segmented.directive';\n\nexport const [TUI_SEGMENTED_OPTIONS, tuiSegmentedOptionsProvider] = tuiCreateOptions({\n size: 's' as TuiSizeL | TuiSizeS,\n});\n\n@Component({\n selector: 'tui-segmented',\n template: '<ng-content />',\n styleUrl: './segmented.style.less',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [ResizeObserverService, tuiBadgeNotificationOptionsProvider({size: 's'})],\n hostDirectives: [TuiSegmentedDirective],\n host: {\n '[attr.data-size]': 'size()',\n },\n})\nexport class TuiSegmented implements OnChanges {\n private readonly el = tuiInjectElement();\n\n protected readonly sub = inject(ResizeObserverService, {self: true})\n .pipe(tuiZonefree(), takeUntilDestroyed())\n .subscribe(() => this.refresh());\n\n public readonly size = input(inject(TUI_SEGMENTED_OPTIONS).size);\n public readonly activeItemIndex = model(0);\n\n public ngOnChanges(): void {\n this.refresh();\n }\n\n public update(activeItemIndex: number): void {\n if (activeItemIndex === this.activeItemIndex() || activeItemIndex < 0) {\n return;\n }\n\n this.activeItemIndex.set(activeItemIndex);\n this.refresh();\n }\n\n private refresh(): void {\n const el = this.el.children.item(this.activeItemIndex());\n\n if (!tuiIsHTMLElement(el)) {\n return;\n }\n\n Array.from(this.el.children).forEach((e) =>\n e.classList.remove('tui-segmented_active'),\n );\n\n el.classList.add('tui-segmented_active');\n\n const {offsetWidth = 0, offsetLeft = 0, offsetTop = 0} = el;\n\n this.el.style.setProperty('--t-top', tuiPx(offsetTop));\n this.el.style.setProperty('--t-left', tuiPx(offsetLeft));\n this.el.style.setProperty('--t-width', tuiPx(offsetWidth));\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAsBa,qBAAqB,CAAA;AALlC,IAAA,WAAA,GAAA;AAMqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC;QAChC,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,KAAK,GAAG,eAAe,CAAC,gBAAgB,CAAC;QACzC,IAAQ,CAAA,QAAA,GAAG,eAAe,CAAC,gBAAgB,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC,CAAC;QAChE,IAAQ,CAAA,QAAA,GAAG,eAAe,CAAC,SAAS,EAAE,EAAC,WAAW,EAAE,IAAI,EAAC,CAAC;AAC1D,QAAA,IAAA,CAAA,SAAS,GAAG,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC;AACvC,QAAA,IAAA,CAAA,MAAM,GAAG,eAAe,CAAC,yBAAyB,EAAE;AACjE,YAAA,WAAW,EAAE,IAAI;AACpB,SAAA,CAAC;AA0BL;IAxBU,kBAAkB,GAAA;AACrB,QAAA,IAAI,CAAC;AACA,aAAA,IAAI,CACD,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,eAAe,CAAC,OAAO,CAAC,CAAC,EAClD,GAAG,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;AAEpE,aAAA,SAAS,CAAC,CAAC,KAAK,KAAI;AACjB,YAAA,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC;AAChC,SAAC,CAAC;;IAGH,qBAAqB,GAAA;AACxB,QAAA,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,CAAC,SAAS,CAAC,CAAC,EAAC,QAAQ,EAAC,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AAmC,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,uGAJ1E,gBAAgB,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,4kJAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAUjB,YAAY,EAAA,UAAA,EAAA,CAAA;kBAZxB,SAAS;+BACI,eAAe,EAAA,QAAA,EACf,gBAAgB,EAAA,aAAA,EAEX,iBAAiB,CAAC,IAAI,EAAA,eAAA,EACpB,uBAAuB,CAAC,MAAM,EAAA,SAAA,EACpC,CAAC,qBAAqB,EAAE,mCAAmC,CAAC,EAAC,IAAI,EAAE,GAAG,EAAC,CAAC,CAAC,EACpE,cAAA,EAAA,CAAC,qBAAqB,CAAC,EACjC,IAAA,EAAA;AACF,wBAAA,kBAAkB,EAAE,QAAQ;AAC/B,qBAAA,EAAA,MAAA,EAAA,CAAA,4kJAAA,CAAA,EAAA;;;AClCL;;AAEG;;;;"}
@@ -1,14 +1,18 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, computed, effect, input, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
3
+ import { inject, viewChildren, computed, effect, input, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
4
4
  import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
5
- import { tuiIsPresent, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
6
- import * as i1 from '@taiga-ui/core/components/textfield';
7
- import { TuiTextfieldDirective, tuiAsTextfieldAccessor, TuiWithTextfield, TuiSelectLike } from '@taiga-ui/core/components/textfield';
5
+ import { tuiIsPresent } from '@taiga-ui/cdk/utils/miscellaneous';
6
+ import * as i1 from '@taiga-ui/core/components/input';
7
+ import { TuiInputDirective, TuiWithInput } from '@taiga-ui/core/components/input';
8
+ import * as i2 from '@taiga-ui/core/components/textfield';
9
+ import { tuiAsTextfieldAccessor, TuiSelectLike, TuiTextfieldComponent, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
8
10
  import { TUI_ITEMS_HANDLERS } from '@taiga-ui/core/directives/items-handlers';
9
11
  import { tuiIsFlat, tuiInjectValue } from '@taiga-ui/kit/utils';
12
+ import { TuiLabel } from '@taiga-ui/core/components/label';
13
+ import { TuiDropdownOpen, tuiDropdownEnabled, TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
10
14
  import { TuiDataListComponent, TuiOptionWithValue, tuiAsOptionContent } from '@taiga-ui/core/components/data-list';
11
- import { tuiDropdownOpen, tuiDropdownEnabled } from '@taiga-ui/core/directives/dropdown';
15
+ import { tuiDirectiveBinding } from '@taiga-ui/cdk/utils/di';
12
16
  import * as i1$1 from '@taiga-ui/core/components/scrollbar';
13
17
  import { TuiScrollIntoView } from '@taiga-ui/core/components/scrollbar';
14
18
  import { TuiCheckbox, tuiCheckboxOptionsProvider } from '@taiga-ui/kit/components/checkbox';
@@ -16,14 +20,26 @@ import { TuiCheckbox, tuiCheckboxOptionsProvider } from '@taiga-ui/kit/component
16
20
  class TuiNativeSelect extends TuiControl {
17
21
  constructor() {
18
22
  super(...arguments);
19
- this.textfield = inject(TuiTextfieldDirective);
23
+ this.input = inject(TuiInputDirective);
24
+ this.options = viewChildren('option');
20
25
  this.isFlat = tuiIsFlat;
21
26
  this.itemsHandlers = inject(TUI_ITEMS_HANDLERS);
22
27
  this.stringified = computed((value = this.value()) => tuiIsPresent(value) ? this.itemsHandlers.stringify()(value) : '');
23
- this.showPlaceholder = computed(() => this.placeholder() && !this.stringified());
24
28
  this.isSelected = computed((value = this.value()) => (x) => tuiIsPresent(value) && this.itemsHandlers.identityMatcher()(x, value));
25
29
  this.valueEffect = effect(() => {
26
- this.textfield.value.set(this.stringified());
30
+ /**
31
+ * Wait until all `<option>`-s are inside DOM.
32
+ * Otherwise
33
+ * ```
34
+ * document.querySelector('select').value = 'even upcoming valid value';
35
+ * // same as
36
+ * document.querySelector('select').value = '';
37
+ * ```
38
+ * (it breaks `tuiValue` utility logic)
39
+ */
40
+ if (this.options().length) {
41
+ this.input.value.set(this.stringified());
42
+ }
27
43
  });
28
44
  this.items = input([]);
29
45
  this.labels = input([]);
@@ -34,18 +50,19 @@ class TuiNativeSelect extends TuiControl {
34
50
  }
35
51
  selectOption(index) {
36
52
  const items = (this.items()?.flat() ?? []);
37
- this.onChange(items[index - (this.showPlaceholder() ? 1 : 0)] ?? null);
53
+ const placeholderOffset = this.stringified() ? 0 : 1;
54
+ this.onChange(items[index - placeholderOffset] ?? null);
38
55
  }
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
40
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiNativeSelect, isStandalone: true, selector: "select[tuiSelect]", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "change": "selectOption($event.target.options.selectedIndex)" }, properties: { "attr.aria-invalid": "invalid()", "disabled": "!interactive()" } }, providers: [tuiAsTextfieldAccessor(TuiNativeSelect), tuiAsControl(TuiNativeSelect)], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }], ngImport: i0, template: "@if (showPlaceholder()) {\n <option\n disabled\n selected\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n}\n@let elements = items();\n\n@if (elements && !isFlat(elements)) {\n @for (group of labels(); track group) {\n <optgroup [label]=\"labels()[$index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements[$index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements}\" />\n}\n\n<ng-template\n #options\n let-items\n>\n @for (option of items; track option) {\n <option\n [disabled]=\"itemsHandlers.disabledItemHandler()(option)\"\n [selected]=\"isSelected()(option)\"\n [value]=\"itemsHandlers.stringify()(option)\"\n >\n {{ itemsHandlers.stringify()(option) }}\n </option>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
56
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNativeSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
57
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiNativeSelect, isStandalone: true, selector: "select[tuiSelect]", inputs: { items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null }, labels: { classPropertyName: "labels", publicName: "labels", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "change": "selectOption($event.target.options.selectedIndex)" }, properties: { "attr.aria-invalid": "invalid()", "disabled": "!interactive()" } }, providers: [tuiAsTextfieldAccessor(TuiNativeSelect), tuiAsControl(TuiNativeSelect)], viewQueries: [{ propertyName: "options", predicate: ["option"], descendants: true, isSignal: true }], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }], ngImport: i0, template: "@if (!stringified()) {\n <option\n disabled\n selected\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n}\n\n@let elements = items();\n\n@if (elements && !isFlat(elements)) {\n @for (group of labels(); track group) {\n <optgroup [label]=\"labels()[$index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements[$index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements}\" />\n}\n\n<ng-template\n #options\n let-items\n>\n @for (option of items; track option) {\n <option\n #option\n [disabled]=\"itemsHandlers.disabledItemHandler()(option)\"\n [selected]=\"isSelected()(option)\"\n [value]=\"itemsHandlers.stringify()(option)\"\n >\n {{ itemsHandlers.stringify()(option) }}\n </option>\n }\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
41
58
  }
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeSelect, decorators: [{
59
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiNativeSelect, decorators: [{
43
60
  type: Component,
44
- args: [{ selector: 'select[tuiSelect]', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsTextfieldAccessor(TuiNativeSelect), tuiAsControl(TuiNativeSelect)], hostDirectives: [TuiWithTextfield], host: {
61
+ args: [{ selector: 'select[tuiSelect]', imports: [NgTemplateOutlet], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsTextfieldAccessor(TuiNativeSelect), tuiAsControl(TuiNativeSelect)], hostDirectives: [TuiWithInput], host: {
45
62
  '[attr.aria-invalid]': 'invalid()',
46
63
  '[disabled]': '!interactive()',
47
64
  '(change)': 'selectOption($event.target.options.selectedIndex)',
48
- }, template: "@if (showPlaceholder()) {\n <option\n disabled\n selected\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n}\n@let elements = items();\n\n@if (elements && !isFlat(elements)) {\n @for (group of labels(); track group) {\n <optgroup [label]=\"labels()[$index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements[$index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements}\" />\n}\n\n<ng-template\n #options\n let-items\n>\n @for (option of items; track option) {\n <option\n [disabled]=\"itemsHandlers.disabledItemHandler()(option)\"\n [selected]=\"isSelected()(option)\"\n [value]=\"itemsHandlers.stringify()(option)\"\n >\n {{ itemsHandlers.stringify()(option) }}\n </option>\n }\n</ng-template>\n" }]
65
+ }, template: "@if (!stringified()) {\n <option\n disabled\n selected\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n}\n\n@let elements = items();\n\n@if (elements && !isFlat(elements)) {\n @for (group of labels(); track group) {\n <optgroup [label]=\"labels()[$index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements[$index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements}\" />\n}\n\n<ng-template\n #options\n let-items\n>\n @for (option of items; track option) {\n <option\n #option\n [disabled]=\"itemsHandlers.disabledItemHandler()(option)\"\n [selected]=\"isSelected()(option)\"\n [value]=\"itemsHandlers.stringify()(option)\"\n >\n {{ itemsHandlers.stringify()(option) }}\n </option>\n }\n</ng-template>\n" }]
49
66
  }] });
50
67
 
51
68
  class TuiSelectOption {
@@ -61,8 +78,8 @@ class TuiSelectOption {
61
78
  this.handlers.identityMatcher()(controlValue, optionValue));
62
79
  this.scrolled = tuiDirectiveBinding(TuiScrollIntoView, 'tuiScrollIntoView', this.selected);
63
80
  }
64
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
65
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSelectOption, isStandalone: true, selector: "ng-component", host: { attributes: { "tuiSelectOption": "" }, properties: { "class._value": "option", "class._selected": "selected()" } }, providers: [tuiCheckboxOptionsProvider({ appearance: () => 'action' })], hostDirectives: [{ directive: i1$1.TuiScrollIntoView }], ngImport: i0, template: `
81
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
82
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiSelectOption, isStandalone: true, selector: "ng-component", host: { attributes: { "tuiSelectOption": "" }, properties: { "class._value": "option", "class._selected": "selected()" } }, providers: [tuiCheckboxOptionsProvider({ appearance: () => 'action' })], hostDirectives: [{ directive: i1$1.TuiScrollIntoView }], ngImport: i0, template: `
66
83
  @if (selected()) {
67
84
  <input
68
85
  tuiCheckbox
@@ -76,7 +93,7 @@ class TuiSelectOption {
76
93
  }
77
94
  `, isInline: true, styles: [":host._value>.t-check,:host._value>.t-dummy{order:100;margin-inline-start:auto;pointer-events:none}:host._value._selected~::ng-deep [tuiSelectOption]>.t-check:before{opacity:0}:host:not(._value)>.t-check,:host-context(tui-dropdown-mobile)>.t-check{display:none}.t-check:before{font-size:var(--t-size)}.t-dummy{inline-size:1.5rem}\n"], dependencies: [{ kind: "component", type: TuiCheckbox, selector: "input[type=\"checkbox\"][tuiCheckbox]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
78
95
  }
79
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSelectOption, decorators: [{
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSelectOption, decorators: [{
80
97
  type: Component,
81
98
  args: [{ imports: [TuiCheckbox], template: `
82
99
  @if (selected()) {
@@ -100,14 +117,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
100
117
  class TuiSelectDirective extends TuiControl {
101
118
  constructor() {
102
119
  super(...arguments);
103
- this.textfield = inject(TuiTextfieldDirective);
104
- this.open = tuiDropdownOpen();
120
+ this.input = inject(TuiInputDirective);
121
+ this.open = inject(TuiDropdownOpen).open;
105
122
  this.itemsHandlers = inject(TUI_ITEMS_HANDLERS);
106
123
  this.dropdownEnabled = tuiDropdownEnabled(this.interactive);
107
124
  this.valueEffect = effect(() => {
108
125
  const value = this.value();
109
126
  const string = tuiIsPresent(value) ? this.itemsHandlers.stringify()(value) : '';
110
- this.textfield.value.set(string);
127
+ this.input.value.set(string);
111
128
  });
112
129
  }
113
130
  setValue(value) {
@@ -116,14 +133,14 @@ class TuiSelectDirective extends TuiControl {
116
133
  this.open.set(true);
117
134
  }
118
135
  }
119
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSelectDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
120
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSelectDirective, isStandalone: true, selector: "input[tuiSelect]", host: { listeners: { "input": "$event.inputType?.includes(\"delete\") && setValue(null)" }, properties: { "disabled": "disabled()" } }, providers: [
136
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSelectDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
137
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiSelectDirective, isStandalone: true, selector: "input[tuiSelect]", host: { listeners: { "input": "$event.inputType?.includes(\"delete\") && setValue(null)" }, properties: { "disabled": "disabled()" } }, providers: [
121
138
  tuiAsOptionContent(TuiSelectOption),
122
139
  tuiAsTextfieldAccessor(TuiSelectDirective),
123
140
  tuiAsControl(TuiSelectDirective),
124
- ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithTextfield }, { directive: i1.TuiSelectLike }], ngImport: i0 }); }
141
+ ], usesInheritance: true, hostDirectives: [{ directive: i1.TuiWithInput }, { directive: i2.TuiSelectLike }], ngImport: i0 }); }
125
142
  }
126
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSelectDirective, decorators: [{
143
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiSelectDirective, decorators: [{
127
144
  type: Directive,
128
145
  args: [{
129
146
  selector: 'input[tuiSelect]',
@@ -132,7 +149,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
132
149
  tuiAsTextfieldAccessor(TuiSelectDirective),
133
150
  tuiAsControl(TuiSelectDirective),
134
151
  ],
135
- hostDirectives: [TuiWithTextfield, TuiSelectLike],
152
+ hostDirectives: [TuiWithInput, TuiSelectLike],
136
153
  host: {
137
154
  '[disabled]': 'disabled()',
138
155
  '(input)': '$event.inputType?.includes("delete") && setValue(null)',
@@ -140,7 +157,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
140
157
  }]
141
158
  }] });
142
159
 
143
- const TuiSelect = [TuiSelectDirective, TuiNativeSelect];
160
+ const TuiSelect = [
161
+ TuiSelectDirective,
162
+ TuiNativeSelect,
163
+ TuiLabel,
164
+ TuiTextfieldComponent,
165
+ TuiTextfieldOptionsDirective,
166
+ TuiDropdownContent,
167
+ ];
144
168
 
145
169
  /**
146
170
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-kit-components-select.mjs","sources":["../../../projects/kit/components/select/native-select/native-select.component.ts","../../../projects/kit/components/select/native-select/native-select.template.html","../../../projects/kit/components/select/select-option/select-option.component.ts","../../../projects/kit/components/select/select.directive.ts","../../../projects/kit/components/select/select.ts","../../../projects/kit/components/select/taiga-ui-kit-components-select.ts"],"sourcesContent":["import {NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n} from '@angular/core';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n TuiTextfieldDirective,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {tuiIsFlat} from '@taiga-ui/kit/utils';\n\n@Component({\n selector: 'select[tuiSelect]',\n imports: [NgTemplateOutlet],\n templateUrl: './native-select.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsTextfieldAccessor(TuiNativeSelect), tuiAsControl(TuiNativeSelect)],\n hostDirectives: [TuiWithTextfield],\n host: {\n '[attr.aria-invalid]': 'invalid()',\n '[disabled]': '!interactive()',\n '(change)': 'selectOption($event.target.options.selectedIndex)',\n },\n})\nexport class TuiNativeSelect<T>\n extends TuiControl<T | null>\n implements TuiTextfieldAccessor<T>\n{\n private readonly textfield = inject(TuiTextfieldDirective);\n\n protected readonly isFlat = tuiIsFlat;\n protected readonly itemsHandlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n\n protected readonly stringified = computed((value = this.value()) =>\n tuiIsPresent(value) ? this.itemsHandlers.stringify()(value) : '',\n );\n\n protected readonly showPlaceholder = computed(\n () => this.placeholder() && !this.stringified(),\n );\n\n protected readonly isSelected = computed(\n (value = this.value()) =>\n (x: T) =>\n tuiIsPresent(value) && this.itemsHandlers.identityMatcher()(x, value),\n );\n\n protected readonly valueEffect = effect(() => {\n this.textfield.value.set(this.stringified());\n });\n\n public readonly items = input<ReadonlyArray<readonly T[]> | readonly T[] | null>([]);\n\n public readonly labels = input<readonly string[]>([]);\n\n public readonly placeholder = input('');\n\n public setValue(value: T | null): void {\n this.onChange(value);\n }\n\n protected selectOption(index: number): void {\n const items = (this.items()?.flat() ?? []) as T[];\n\n this.onChange(items[index - (this.showPlaceholder() ? 1 : 0)] ?? null);\n }\n}\n","@if (showPlaceholder()) {\n <option\n disabled\n selected\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n}\n@let elements = items();\n\n@if (elements && !isFlat(elements)) {\n @for (group of labels(); track group) {\n <optgroup [label]=\"labels()[$index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements[$index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements}\" />\n}\n\n<ng-template\n #options\n let-items\n>\n @for (option of items; track option) {\n <option\n [disabled]=\"itemsHandlers.disabledItemHandler()(option)\"\n [selected]=\"isSelected()(option)\"\n [value]=\"itemsHandlers.stringify()(option)\"\n >\n {{ itemsHandlers.stringify()(option) }}\n </option>\n }\n</ng-template>\n","import {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {tuiDirectiveBinding, tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TuiDataListComponent,\n TuiOptionWithValue,\n} from '@taiga-ui/core/components/data-list';\nimport {TuiScrollIntoView} from '@taiga-ui/core/components/scrollbar';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {TuiCheckbox, tuiCheckboxOptionsProvider} from '@taiga-ui/kit/components/checkbox';\nimport {tuiInjectValue} from '@taiga-ui/kit/utils';\n\n@Component({\n imports: [TuiCheckbox],\n template: `\n @if (selected()) {\n <input\n tuiCheckbox\n type=\"checkbox\"\n class=\"t-check\"\n [checked]=\"selected()\"\n [size]=\"datalist.size() === 'l' ? 'm' : 's'\"\n />\n } @else {\n <span class=\"t-dummy\"></span>\n }\n `,\n styleUrl: './select-option.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiCheckboxOptionsProvider({appearance: () => 'action'})],\n hostDirectives: [TuiScrollIntoView],\n host: {\n tuiSelectOption: '',\n '[class._value]': 'option',\n '[class._selected]': 'selected()',\n },\n})\nexport class TuiSelectOption<T> {\n private readonly handlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n private readonly value = tuiInjectValue<T>();\n\n protected readonly datalist = inject(TuiDataListComponent);\n protected readonly option = inject<TuiOptionWithValue<T>>(TuiOptionWithValue, {\n optional: true,\n });\n\n protected readonly selected = computed(\n (controlValue = this.value(), optionValue = this.option?.value()) =>\n tuiIsPresent(optionValue) &&\n tuiIsPresent(controlValue) &&\n this.handlers.identityMatcher()(controlValue, optionValue),\n );\n\n protected readonly scrolled = tuiDirectiveBinding(\n TuiScrollIntoView,\n 'tuiScrollIntoView',\n this.selected,\n );\n}\n","import {Directive, effect, inject} from '@angular/core';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport {\n tuiAsTextfieldAccessor,\n TuiSelectLike,\n type TuiTextfieldAccessor,\n TuiTextfieldDirective,\n TuiWithTextfield,\n} from '@taiga-ui/core/components/textfield';\nimport {tuiDropdownEnabled, tuiDropdownOpen} from '@taiga-ui/core/directives/dropdown';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\n\nimport {TuiSelectOption} from './select-option/select-option.component';\n\n@Directive({\n selector: 'input[tuiSelect]',\n providers: [\n tuiAsOptionContent(TuiSelectOption),\n tuiAsTextfieldAccessor(TuiSelectDirective),\n tuiAsControl(TuiSelectDirective),\n ],\n hostDirectives: [TuiWithTextfield, TuiSelectLike],\n host: {\n '[disabled]': 'disabled()',\n '(input)': '$event.inputType?.includes(\"delete\") && setValue(null)',\n },\n})\nexport class TuiSelectDirective<T>\n extends TuiControl<T | null>\n implements TuiTextfieldAccessor<T>\n{\n private readonly textfield = inject(TuiTextfieldDirective);\n private readonly open = tuiDropdownOpen();\n private readonly itemsHandlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n protected readonly valueEffect = effect(() => {\n const value = this.value();\n const string = tuiIsPresent(value) ? this.itemsHandlers.stringify()(value) : '';\n\n this.textfield.value.set(string);\n });\n\n public setValue(value: T | null): void {\n this.onChange(value);\n\n if (!value) {\n this.open.set(true);\n }\n }\n}\n","import {TuiNativeSelect} from './native-select/native-select.component';\nimport {TuiSelectDirective} from './select.directive';\n\nexport const TuiSelect = [TuiSelectDirective, TuiNativeSelect] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;AAoCM,MAAO,eACT,SAAQ,UAAoB,CAAA;AAdhC,IAAA,WAAA,GAAA;;AAiBqB,QAAA,IAAA,CAAA,SAAS,GAAG,MAAM,CAAC,qBAAqB,CAAC;QAEvC,IAAM,CAAA,MAAA,GAAG,SAAS;AAClB,QAAA,IAAA,CAAA,aAAa,GAAwB,MAAM,CAAC,kBAAkB,CAAC;AAE/D,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,KAC3D,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CACnE;AAEkB,QAAA,IAAA,CAAA,eAAe,GAAG,QAAQ,CACzC,MAAM,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,CAClD;AAEkB,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CACpC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,KACjB,CAAC,CAAI,KACD,YAAY,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAChF;AAEkB,QAAA,IAAA,CAAA,WAAW,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AA;AACP,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,SAAS,EAAE;wBACP,kBAAkB,CAAC,eAAe,CAAC;AACnC,wBAAA,sBAAsB,CAAoB,kBAAA,CAAA;AAC1C,wBAAA,YAAY,CAAoB,kBAAA,CAAA;AACnC,qBAAA;AACD,oBAAA,cAAc,EAAE,CAAC,gBAAgB,EAAE,aAAa,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,YAAY,EAAE,YAAY;AAC1B,wBAAA,SAAS,EAAE,wDAAwD;AACtE,qBAAA;AACJ,iBAAA;;;MC5BY,SAAS,GAAG,CAAC,kBAAkB,EAAE,eAAe;;ACH7D;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-kit-components-select.mjs","sources":["../../../projects/kit/components/select/native-select/native-select.component.ts","../../../projects/kit/components/select/native-select/native-select.template.html","../../../projects/kit/components/select/select-option/select-option.component.ts","../../../projects/kit/components/select/select.directive.ts","../../../projects/kit/components/select/select.ts","../../../projects/kit/components/select/taiga-ui-kit-components-select.ts"],"sourcesContent":["import {NgTemplateOutlet} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n inject,\n input,\n viewChildren,\n} from '@angular/core';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {tuiIsFlat} from '@taiga-ui/kit/utils';\n\n@Component({\n selector: 'select[tuiSelect]',\n imports: [NgTemplateOutlet],\n templateUrl: './native-select.template.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiAsTextfieldAccessor(TuiNativeSelect), tuiAsControl(TuiNativeSelect)],\n hostDirectives: [TuiWithInput],\n host: {\n '[attr.aria-invalid]': 'invalid()',\n '[disabled]': '!interactive()',\n '(change)': 'selectOption($event.target.options.selectedIndex)',\n },\n})\nexport class TuiNativeSelect<T>\n extends TuiControl<T | null>\n implements TuiTextfieldAccessor<T>\n{\n private readonly input = inject(TuiInputDirective);\n private readonly options = viewChildren<HTMLOptionElement>('option');\n\n protected readonly isFlat = tuiIsFlat;\n protected readonly itemsHandlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n protected readonly stringified = computed((value = this.value()) =>\n tuiIsPresent(value) ? this.itemsHandlers.stringify()(value) : '',\n );\n\n protected readonly isSelected = computed(\n (value = this.value()) =>\n (x: T) =>\n tuiIsPresent(value) && this.itemsHandlers.identityMatcher()(x, value),\n );\n\n protected readonly valueEffect = effect(() => {\n /**\n * Wait until all `<option>`-s are inside DOM.\n * Otherwise\n * ```\n * document.querySelector('select').value = 'even upcoming valid value';\n * // same as\n * document.querySelector('select').value = '';\n * ```\n * (it breaks `tuiValue` utility logic)\n */\n if (this.options().length) {\n this.input.value.set(this.stringified());\n }\n });\n\n public readonly items = input<ReadonlyArray<readonly T[]> | readonly T[] | null>([]);\n public readonly labels = input<readonly string[]>([]);\n public readonly placeholder = input('');\n\n public setValue(value: T | null): void {\n this.onChange(value);\n }\n\n protected selectOption(index: number): void {\n const items = (this.items()?.flat() ?? []) as T[];\n const placeholderOffset = this.stringified() ? 0 : 1;\n\n this.onChange(items[index - placeholderOffset] ?? null);\n }\n}\n","@if (!stringified()) {\n <option\n disabled\n selected\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n}\n\n@let elements = items();\n\n@if (elements && !isFlat(elements)) {\n @for (group of labels(); track group) {\n <optgroup [label]=\"labels()[$index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements[$index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: elements}\" />\n}\n\n<ng-template\n #options\n let-items\n>\n @for (option of items; track option) {\n <option\n #option\n [disabled]=\"itemsHandlers.disabledItemHandler()(option)\"\n [selected]=\"isSelected()(option)\"\n [value]=\"itemsHandlers.stringify()(option)\"\n >\n {{ itemsHandlers.stringify()(option) }}\n </option>\n }\n</ng-template>\n","import {ChangeDetectionStrategy, Component, computed, inject} from '@angular/core';\nimport {tuiDirectiveBinding} from '@taiga-ui/cdk/utils/di';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n TuiDataListComponent,\n TuiOptionWithValue,\n} from '@taiga-ui/core/components/data-list';\nimport {TuiScrollIntoView} from '@taiga-ui/core/components/scrollbar';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {TuiCheckbox, tuiCheckboxOptionsProvider} from '@taiga-ui/kit/components/checkbox';\nimport {tuiInjectValue} from '@taiga-ui/kit/utils';\n\n@Component({\n imports: [TuiCheckbox],\n template: `\n @if (selected()) {\n <input\n tuiCheckbox\n type=\"checkbox\"\n class=\"t-check\"\n [checked]=\"selected()\"\n [size]=\"datalist.size() === 'l' ? 'm' : 's'\"\n />\n } @else {\n <span class=\"t-dummy\"></span>\n }\n `,\n styleUrl: './select-option.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers: [tuiCheckboxOptionsProvider({appearance: () => 'action'})],\n hostDirectives: [TuiScrollIntoView],\n host: {\n tuiSelectOption: '',\n '[class._value]': 'option',\n '[class._selected]': 'selected()',\n },\n})\nexport class TuiSelectOption<T> {\n private readonly handlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n private readonly value = tuiInjectValue<T>();\n\n protected readonly datalist = inject(TuiDataListComponent);\n protected readonly option = inject<TuiOptionWithValue<T>>(TuiOptionWithValue, {\n optional: true,\n });\n\n protected readonly selected = computed(\n (controlValue = this.value(), optionValue = this.option?.value()) =>\n tuiIsPresent(optionValue) &&\n tuiIsPresent(controlValue) &&\n this.handlers.identityMatcher()(controlValue, optionValue),\n );\n\n protected readonly scrolled = tuiDirectiveBinding(\n TuiScrollIntoView,\n 'tuiScrollIntoView',\n this.selected,\n );\n}\n","import {Directive, effect, inject} from '@angular/core';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {tuiIsPresent} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {tuiAsOptionContent} from '@taiga-ui/core/components/data-list';\nimport {TuiInputDirective, TuiWithInput} from '@taiga-ui/core/components/input';\nimport {\n tuiAsTextfieldAccessor,\n TuiSelectLike,\n type TuiTextfieldAccessor,\n} from '@taiga-ui/core/components/textfield';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {tuiDropdownEnabled, TuiDropdownOpen} from '@taiga-ui/core/portals/dropdown';\n\nimport {TuiSelectOption} from './select-option/select-option.component';\n\n@Directive({\n selector: 'input[tuiSelect]',\n providers: [\n tuiAsOptionContent(TuiSelectOption),\n tuiAsTextfieldAccessor(TuiSelectDirective),\n tuiAsControl(TuiSelectDirective),\n ],\n hostDirectives: [TuiWithInput, TuiSelectLike],\n host: {\n '[disabled]': 'disabled()',\n '(input)': '$event.inputType?.includes(\"delete\") && setValue(null)',\n },\n})\nexport class TuiSelectDirective<T>\n extends TuiControl<T | null>\n implements TuiTextfieldAccessor<T>\n{\n private readonly input = inject(TuiInputDirective);\n private readonly open = inject(TuiDropdownOpen).open;\n private readonly itemsHandlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n\n protected readonly dropdownEnabled = tuiDropdownEnabled(this.interactive);\n protected readonly valueEffect = effect(() => {\n const value = this.value();\n const string = tuiIsPresent(value) ? this.itemsHandlers.stringify()(value) : '';\n\n this.input.value.set(string);\n });\n\n public setValue(value: T | null): void {\n this.onChange(value);\n\n if (!value) {\n this.open.set(true);\n }\n }\n}\n","import {TuiLabel} from '@taiga-ui/core/components/label';\nimport {\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n} from '@taiga-ui/core/components/textfield';\nimport {TuiDropdownContent} from '@taiga-ui/core/portals/dropdown';\n\nimport {TuiNativeSelect} from './native-select/native-select.component';\nimport {TuiSelectDirective} from './select.directive';\n\nexport const TuiSelect = [\n TuiSelectDirective,\n TuiNativeSelect,\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;;;;;;;;AAoCM,MAAO,eACT,SAAQ,UAAoB,CAAA;AAdhC,IAAA,WAAA,GAAA;;AAiBqB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,iBAAiB,CAAC;AACjC,QAAA,IAAA,CAAA,OAAO,GAAG,YAAY,CAAoB,QAAQ,CAAC;QAEjD,IAAM,CAAA,MAAA,GAAG,SAAS;AAClB,QAAA,IAAA,CAAA,aAAa,GAAwB,MAAM,CAAC,kBAAkB,CAAC;AAC/D,QAAA,IAAA,CAAA,WAAW,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,KAC3D,YAAY,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,CACnE;AAEkB,QAAA,IAAA,CAAA,UAAU,GAAG,QAAQ,CACpC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,KACjB,CAAC,CAAI,KACD,YAAY,CAAC,KAAK,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,eAAe,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,CAChF;AAEkB,QAAA,IAAA,CAAA,WAAW,GAAG,MAAM,CAAC,MAAK;AACzC;;;;;;;;;AASG;AACH,YAAA,IAAI,IAAI,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE;AACvB,gBAAA,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