@taiga-ui/kit 4.52.0-canary.24b31eb → 4.52.0-canary.2c75afa

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 (250) hide show
  1. package/components/action-bar/action-bar.component.d.ts +5 -7
  2. package/components/action-bar/index.d.ts +0 -2
  3. package/components/calendar-month/calendar-month.component.d.ts +1 -1
  4. package/components/calendar-range/calendar-range.component.d.ts +1 -2
  5. package/components/confirm/confirm.component.d.ts +2 -2
  6. package/components/copy/copy.component.d.ts +1 -1
  7. package/components/copy/copy.directive.d.ts +1 -0
  8. package/components/data-list-wrapper/data-list-group-wrapper.component.d.ts +2 -0
  9. package/components/files/file/file.options.d.ts +1 -1
  10. package/components/files/files/files.component.d.ts +2 -2
  11. package/components/index.d.ts +0 -1
  12. package/components/input-number/input-number.directive.d.ts +5 -9
  13. package/components/input-number/step/input-number-step.component.d.ts +1 -1
  14. package/components/input-phone-international/input-phone-international.component.d.ts +3 -3
  15. package/components/input-pin/input-pin.component.d.ts +1 -1
  16. package/components/input-range/input-range.component.d.ts +4 -7
  17. package/components/input-slider/input-slider.directive.d.ts +0 -1
  18. package/components/input-time/input-time.directive.d.ts +6 -8
  19. package/components/line-clamp/line-clamp.component.d.ts +8 -10
  20. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +1 -1
  21. package/components/multi-select/multi-select-option/multi-select-option.component.d.ts +1 -1
  22. package/components/notification-middle/notification-middle.component.d.ts +2 -2
  23. package/components/notification-middle/notification-middle.directive.d.ts +4 -3
  24. package/components/notification-middle/notification-middle.service.d.ts +7 -3
  25. package/components/pagination/index.d.ts +1 -0
  26. package/components/pagination/pagination.component.d.ts +3 -2
  27. package/components/pagination/pagination.options.d.ts +10 -0
  28. package/components/preview/dialog/preview-dialog.component.d.ts +2 -2
  29. package/components/preview/dialog/preview-dialog.directive.d.ts +3 -3
  30. package/components/preview/dialog/preview-dialog.service.d.ts +5 -2
  31. package/components/preview/pagination/preview-pagination.component.d.ts +1 -1
  32. package/components/preview/preview.component.d.ts +1 -1
  33. package/components/preview/zoom/preview-zoom.component.d.ts +1 -1
  34. package/components/progress/progress-bar/progress-color-segments.directive.d.ts +4 -4
  35. package/components/push/push-alert.component.d.ts +4 -3
  36. package/components/push/push.component.d.ts +1 -1
  37. package/components/push/push.directive.d.ts +4 -6
  38. package/components/push/push.options.d.ts +4 -8
  39. package/components/push/push.service.d.ts +6 -2
  40. package/components/range/range-change.directive.d.ts +1 -2
  41. package/components/range/range.component.d.ts +16 -24
  42. package/components/select/native-select/native-select.component.d.ts +4 -5
  43. package/components/slider/helpers/key-steps.d.ts +1 -2
  44. package/components/slider/helpers/slider-key-steps.directive.d.ts +12 -21
  45. package/components/tabs/tabs-with-more.component.d.ts +1 -1
  46. package/components/textarea/textarea-limit.directive.d.ts +4 -5
  47. package/components/toast/toast.component.d.ts +4 -3
  48. package/components/toast/toast.options.d.ts +8 -7
  49. package/components/toast/toast.service.d.ts +10 -9
  50. package/components/tree/components/tree-item-content/tree-item-content.component.d.ts +8 -1
  51. package/components/tree/misc/tree.constants.d.ts +0 -3
  52. package/components/tree/misc/tree.tokens.d.ts +1 -6
  53. package/directives/button-close/button-close.directive.d.ts +2 -1
  54. package/directives/button-select/button-select.directive.d.ts +1 -2
  55. package/directives/fluid-typography/fluid-typography.directive.d.ts +3 -6
  56. package/fesm2022/taiga-ui-kit-components-accordion.mjs +1 -2
  57. package/fesm2022/taiga-ui-kit-components-accordion.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-kit-components-action-bar.mjs +20 -36
  59. package/fesm2022/taiga-ui-kit-components-action-bar.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-kit-components-avatar.mjs +1 -1
  61. package/fesm2022/taiga-ui-kit-components-avatar.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs +1 -1
  63. package/fesm2022/taiga-ui-kit-components-badge-notification.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-kit-components-badge.mjs +2 -2
  65. package/fesm2022/taiga-ui-kit-components-badge.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-kit-components-badged-content.mjs +0 -1
  67. package/fesm2022/taiga-ui-kit-components-badged-content.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-kit-components-block.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs +3 -4
  70. package/fesm2022/taiga-ui-kit-components-breadcrumbs.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-kit-components-button-loading.mjs +3 -3
  72. package/fesm2022/taiga-ui-kit-components-button-loading.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs +3 -6
  74. package/fesm2022/taiga-ui-kit-components-calendar-month.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs +4 -5
  76. package/fesm2022/taiga-ui-kit-components-calendar-range.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-kit-components-carousel.mjs +3 -9
  78. package/fesm2022/taiga-ui-kit-components-carousel.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-kit-components-checkbox.mjs +1 -1
  80. package/fesm2022/taiga-ui-kit-components-checkbox.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-kit-components-chip.mjs +2 -2
  82. package/fesm2022/taiga-ui-kit-components-chip.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-kit-components-combo-box.mjs +5 -6
  84. package/fesm2022/taiga-ui-kit-components-combo-box.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-kit-components-comment.mjs.map +1 -1
  86. package/fesm2022/taiga-ui-kit-components-compass.mjs +1 -1
  87. package/fesm2022/taiga-ui-kit-components-compass.mjs.map +1 -1
  88. package/fesm2022/taiga-ui-kit-components-confirm.mjs +3 -5
  89. package/fesm2022/taiga-ui-kit-components-confirm.mjs.map +1 -1
  90. package/fesm2022/taiga-ui-kit-components-copy.mjs +6 -6
  91. package/fesm2022/taiga-ui-kit-components-copy.mjs.map +1 -1
  92. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs +11 -3
  93. package/fesm2022/taiga-ui-kit-components-data-list-wrapper.mjs.map +1 -1
  94. package/fesm2022/taiga-ui-kit-components-drawer.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs +0 -1
  96. package/fesm2022/taiga-ui-kit-components-elastic-container.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-kit-components-files.mjs +13 -15
  98. package/fesm2022/taiga-ui-kit-components-files.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-kit-components-filter.mjs.map +1 -1
  100. package/fesm2022/taiga-ui-kit-components-floating-container.mjs +2 -2
  101. package/fesm2022/taiga-ui-kit-components-floating-container.mjs.map +1 -1
  102. package/fesm2022/taiga-ui-kit-components-fullscreen.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-kit-components-input-chip.mjs +0 -2
  104. package/fesm2022/taiga-ui-kit-components-input-chip.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-kit-components-input-color.mjs.map +1 -1
  106. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs +3 -8
  107. package/fesm2022/taiga-ui-kit-components-input-date-multi.mjs.map +1 -1
  108. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs +0 -1
  109. package/fesm2022/taiga-ui-kit-components-input-date-range.mjs.map +1 -1
  110. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs +1 -3
  111. package/fesm2022/taiga-ui-kit-components-input-date-time.mjs.map +1 -1
  112. package/fesm2022/taiga-ui-kit-components-input-date.mjs +7 -15
  113. package/fesm2022/taiga-ui-kit-components-input-date.mjs.map +1 -1
  114. package/fesm2022/taiga-ui-kit-components-input-inline.mjs +2 -3
  115. package/fesm2022/taiga-ui-kit-components-input-inline.mjs.map +1 -1
  116. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs +3 -5
  117. package/fesm2022/taiga-ui-kit-components-input-month-range.mjs.map +1 -1
  118. package/fesm2022/taiga-ui-kit-components-input-month.mjs +3 -5
  119. package/fesm2022/taiga-ui-kit-components-input-month.mjs.map +1 -1
  120. package/fesm2022/taiga-ui-kit-components-input-number.mjs +22 -46
  121. package/fesm2022/taiga-ui-kit-components-input-number.mjs.map +1 -1
  122. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs +8 -7
  123. package/fesm2022/taiga-ui-kit-components-input-phone-international.mjs.map +1 -1
  124. package/fesm2022/taiga-ui-kit-components-input-phone.mjs +3 -5
  125. package/fesm2022/taiga-ui-kit-components-input-phone.mjs.map +1 -1
  126. package/fesm2022/taiga-ui-kit-components-input-pin.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-kit-components-input-range.mjs +7 -14
  128. package/fesm2022/taiga-ui-kit-components-input-range.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-kit-components-input-slider.mjs +9 -15
  130. package/fesm2022/taiga-ui-kit-components-input-slider.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-kit-components-input-time.mjs +29 -35
  132. package/fesm2022/taiga-ui-kit-components-input-time.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-kit-components-input-year.mjs +2 -4
  134. package/fesm2022/taiga-ui-kit-components-input-year.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs +2 -4
  136. package/fesm2022/taiga-ui-kit-components-items-with-more.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-kit-components-like.mjs +1 -1
  138. package/fesm2022/taiga-ui-kit-components-like.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs +22 -60
  140. package/fesm2022/taiga-ui-kit-components-line-clamp.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-kit-components-message.mjs +0 -1
  142. package/fesm2022/taiga-ui-kit-components-message.mjs.map +1 -1
  143. package/fesm2022/taiga-ui-kit-components-multi-select.mjs +12 -14
  144. package/fesm2022/taiga-ui-kit-components-multi-select.mjs.map +1 -1
  145. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs +31 -20
  146. package/fesm2022/taiga-ui-kit-components-notification-middle.mjs.map +1 -1
  147. package/fesm2022/taiga-ui-kit-components-pager.mjs.map +1 -1
  148. package/fesm2022/taiga-ui-kit-components-pagination.mjs +20 -10
  149. package/fesm2022/taiga-ui-kit-components-pagination.mjs.map +1 -1
  150. package/fesm2022/taiga-ui-kit-components-pin.mjs +2 -2
  151. package/fesm2022/taiga-ui-kit-components-pin.mjs.map +1 -1
  152. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs +23 -15
  153. package/fesm2022/taiga-ui-kit-components-preview-dialog.mjs.map +1 -1
  154. package/fesm2022/taiga-ui-kit-components-preview.mjs +36 -29
  155. package/fesm2022/taiga-ui-kit-components-preview.mjs.map +1 -1
  156. package/fesm2022/taiga-ui-kit-components-progress.mjs +38 -26
  157. package/fesm2022/taiga-ui-kit-components-progress.mjs.map +1 -1
  158. package/fesm2022/taiga-ui-kit-components-pulse.mjs +1 -1
  159. package/fesm2022/taiga-ui-kit-components-pulse.mjs.map +1 -1
  160. package/fesm2022/taiga-ui-kit-components-push.mjs +40 -47
  161. package/fesm2022/taiga-ui-kit-components-push.mjs.map +1 -1
  162. package/fesm2022/taiga-ui-kit-components-radio-list.mjs +2 -2
  163. package/fesm2022/taiga-ui-kit-components-radio-list.mjs.map +1 -1
  164. package/fesm2022/taiga-ui-kit-components-radio.mjs +1 -2
  165. package/fesm2022/taiga-ui-kit-components-radio.mjs.map +1 -1
  166. package/fesm2022/taiga-ui-kit-components-range.mjs +36 -80
  167. package/fesm2022/taiga-ui-kit-components-range.mjs.map +1 -1
  168. package/fesm2022/taiga-ui-kit-components-rating.mjs.map +1 -1
  169. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs +7 -3
  170. package/fesm2022/taiga-ui-kit-components-routable-dialog.mjs.map +1 -1
  171. package/fesm2022/taiga-ui-kit-components-segmented.mjs +1 -2
  172. package/fesm2022/taiga-ui-kit-components-segmented.mjs.map +1 -1
  173. package/fesm2022/taiga-ui-kit-components-select.mjs +35 -40
  174. package/fesm2022/taiga-ui-kit-components-select.mjs.map +1 -1
  175. package/fesm2022/taiga-ui-kit-components-slider.mjs +56 -57
  176. package/fesm2022/taiga-ui-kit-components-slider.mjs.map +1 -1
  177. package/fesm2022/taiga-ui-kit-components-slides.mjs.map +1 -1
  178. package/fesm2022/taiga-ui-kit-components-status.mjs.map +1 -1
  179. package/fesm2022/taiga-ui-kit-components-stepper.mjs.map +1 -1
  180. package/fesm2022/taiga-ui-kit-components-switch.mjs +1 -1
  181. package/fesm2022/taiga-ui-kit-components-switch.mjs.map +1 -1
  182. package/fesm2022/taiga-ui-kit-components-tabs.mjs +3 -6
  183. package/fesm2022/taiga-ui-kit-components-tabs.mjs.map +1 -1
  184. package/fesm2022/taiga-ui-kit-components-textarea.mjs +5 -14
  185. package/fesm2022/taiga-ui-kit-components-textarea.mjs.map +1 -1
  186. package/fesm2022/taiga-ui-kit-components-tiles.mjs +2 -3
  187. package/fesm2022/taiga-ui-kit-components-tiles.mjs.map +1 -1
  188. package/fesm2022/taiga-ui-kit-components-toast.mjs +39 -40
  189. package/fesm2022/taiga-ui-kit-components-toast.mjs.map +1 -1
  190. package/fesm2022/taiga-ui-kit-components-tree.mjs +34 -39
  191. package/fesm2022/taiga-ui-kit-components-tree.mjs.map +1 -1
  192. package/fesm2022/taiga-ui-kit-components.mjs +0 -1
  193. package/fesm2022/taiga-ui-kit-components.mjs.map +1 -1
  194. package/fesm2022/taiga-ui-kit-directives-button-close.mjs +13 -5
  195. package/fesm2022/taiga-ui-kit-directives-button-close.mjs.map +1 -1
  196. package/fesm2022/taiga-ui-kit-directives-button-group.mjs.map +1 -1
  197. package/fesm2022/taiga-ui-kit-directives-button-select.mjs +2 -10
  198. package/fesm2022/taiga-ui-kit-directives-button-select.mjs.map +1 -1
  199. package/fesm2022/taiga-ui-kit-directives-chevron.mjs.map +1 -1
  200. package/fesm2022/taiga-ui-kit-directives-connected.mjs +0 -1
  201. package/fesm2022/taiga-ui-kit-directives-connected.mjs.map +1 -1
  202. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs +0 -1
  203. package/fesm2022/taiga-ui-kit-directives-data-list-dropdown-manager.mjs.map +1 -1
  204. package/fesm2022/taiga-ui-kit-directives-fade.mjs.map +1 -1
  205. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs +10 -18
  206. package/fesm2022/taiga-ui-kit-directives-fluid-typography.mjs.map +1 -1
  207. package/fesm2022/taiga-ui-kit-directives-highlight.mjs +0 -1
  208. package/fesm2022/taiga-ui-kit-directives-highlight.mjs.map +1 -1
  209. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs +0 -1
  210. package/fesm2022/taiga-ui-kit-directives-lazy-loading.mjs.map +1 -1
  211. package/fesm2022/taiga-ui-kit-directives-password.mjs +2 -6
  212. package/fesm2022/taiga-ui-kit-directives-password.mjs.map +1 -1
  213. package/fesm2022/taiga-ui-kit-directives-present.mjs +0 -1
  214. package/fesm2022/taiga-ui-kit-directives-present.mjs.map +1 -1
  215. package/fesm2022/taiga-ui-kit-directives-sensitive.mjs.map +1 -1
  216. package/fesm2022/taiga-ui-kit-directives-shimmer.mjs.map +1 -1
  217. package/fesm2022/taiga-ui-kit-directives-skeleton.mjs.map +1 -1
  218. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs +2 -2
  219. package/fesm2022/taiga-ui-kit-directives-tooltip.mjs.map +1 -1
  220. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs +1 -2
  221. package/fesm2022/taiga-ui-kit-directives-unfinished-validator.mjs.map +1 -1
  222. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs +0 -1
  223. package/fesm2022/taiga-ui-kit-directives-unmask-handler.mjs.map +1 -1
  224. package/fesm2022/taiga-ui-kit-pipes-emails.mjs +0 -1
  225. package/fesm2022/taiga-ui-kit-pipes-emails.mjs.map +1 -1
  226. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs +0 -1
  227. package/fesm2022/taiga-ui-kit-pipes-filter-by-input.mjs.map +1 -1
  228. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs +0 -1
  229. package/fesm2022/taiga-ui-kit-pipes-hide-selected.mjs.map +1 -1
  230. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs +2 -2
  231. package/fesm2022/taiga-ui-kit-pipes-sort-countries.mjs.map +1 -1
  232. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs +0 -1
  233. package/fesm2022/taiga-ui-kit-pipes-stringify-content.mjs.map +1 -1
  234. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs +0 -1
  235. package/fesm2022/taiga-ui-kit-pipes-stringify.mjs.map +1 -1
  236. package/fesm2022/taiga-ui-kit-tokens.mjs +3 -1
  237. package/fesm2022/taiga-ui-kit-tokens.mjs.map +1 -1
  238. package/package.json +10 -10
  239. package/styles/components/badge.less +1 -0
  240. package/styles/components/chip.less +12 -1
  241. package/tokens/i18n.d.ts +25 -26
  242. package/components/action-bar/action-bar.d.ts +0 -3
  243. package/components/action-bar/action-bar.directive.d.ts +0 -6
  244. package/components/pdf-viewer/index.d.ts +0 -4
  245. package/components/pdf-viewer/pdf-viewer.component.d.ts +0 -12
  246. package/components/pdf-viewer/pdf-viewer.directive.d.ts +0 -7
  247. package/components/pdf-viewer/pdf-viewer.options.d.ts +0 -13
  248. package/components/pdf-viewer/pdf-viewer.service.d.ts +0 -13
  249. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs +0 -83
  250. package/fesm2022/taiga-ui-kit-components-pdf-viewer.mjs.map +0 -1
@@ -1,8 +1,7 @@
1
1
  import { NgTemplateOutlet } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { inject, signal, computed, effect, Input, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
3
+ import { inject, computed, effect, input, ChangeDetectionStrategy, Component, Directive } from '@angular/core';
4
4
  import { TuiControl, tuiAsControl } from '@taiga-ui/cdk/classes';
5
- import { TUI_ALLOW_SIGNAL_WRITES } from '@taiga-ui/cdk/constants';
6
5
  import { tuiIsPresent, tuiDirectiveBinding } from '@taiga-ui/cdk/utils/miscellaneous';
7
6
  import * as i1 from '@taiga-ui/core/components/textfield';
8
7
  import { TuiTextfieldDirective, tuiAsTextfieldAccessor, TuiWithTextfield, TuiSelectLike } from '@taiga-ui/core/components/textfield';
@@ -19,30 +18,26 @@ class TuiNativeSelect extends TuiControl {
19
18
  super(...arguments);
20
19
  this.textfield = inject(TuiTextfieldDirective);
21
20
  this.isFlat = tuiIsFlat;
22
- this.placeholder = signal('');
23
21
  this.itemsHandlers = inject(TUI_ITEMS_HANDLERS);
24
22
  this.stringified = computed((value = this.value()) => tuiIsPresent(value) ? this.itemsHandlers.stringify()(value) : '');
25
23
  this.showPlaceholder = computed(() => this.placeholder() && !this.stringified());
26
24
  this.isSelected = computed((value = this.value()) => (x) => tuiIsPresent(value) && this.itemsHandlers.identityMatcher()(x, value));
27
25
  this.valueEffect = effect(() => {
28
26
  this.textfield.value.set(this.stringified());
29
- }, TUI_ALLOW_SIGNAL_WRITES);
30
- this.items = [];
31
- this.labels = [];
32
- }
33
- // TODO(v5): use signal inputs
34
- set placeholderSetter(x) {
35
- this.placeholder.set(x);
27
+ });
28
+ this.items = input([]);
29
+ this.labels = input([]);
30
+ this.placeholder = input('');
36
31
  }
37
32
  setValue(value) {
38
33
  this.onChange(value);
39
34
  }
40
35
  selectOption(index) {
41
- const items = (this.items?.flat() ?? []);
36
+ const items = (this.items()?.flat() ?? []);
42
37
  this.onChange(items[index - (this.showPlaceholder() ? 1 : 0)] ?? null);
43
38
  }
44
39
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeSelect, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
45
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiNativeSelect, isStandalone: true, selector: "select[tuiSelect]", inputs: { items: "items", labels: "labels", placeholderSetter: ["placeholder", "placeholderSetter"] }, 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\n@if (items && !isFlat(items)) {\n @for (group of labels; track group; let index = $index) {\n <optgroup [label]=\"labels[index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: items[index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: items}\" />\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 }); }
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 }); }
46
41
  }
47
42
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiNativeSelect, decorators: [{
48
43
  type: Component,
@@ -50,15 +45,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
50
45
  '[attr.aria-invalid]': 'invalid()',
51
46
  '[disabled]': '!interactive()',
52
47
  '(change)': 'selectOption($event.target.options.selectedIndex)',
53
- }, template: "@if (showPlaceholder()) {\n <option\n disabled\n selected\n value=\"\"\n >\n {{ placeholder() }}\n </option>\n}\n\n@if (items && !isFlat(items)) {\n @for (group of labels; track group; let index = $index) {\n <optgroup [label]=\"labels[index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: items[index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: items}\" />\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" }]
54
- }], propDecorators: { items: [{
55
- type: Input
56
- }], labels: [{
57
- type: Input
58
- }], placeholderSetter: [{
59
- type: Input,
60
- args: ['placeholder']
61
- }] } });
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" }]
49
+ }] });
62
50
 
63
51
  class TuiSelectOption {
64
52
  constructor() {
@@ -74,31 +62,39 @@ class TuiSelectOption {
74
62
  this.scrolled = tuiDirectiveBinding(TuiScrollIntoView, 'tuiScrollIntoView', this.selected);
75
63
  }
76
64
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSelectOption, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
77
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.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: `
78
- <input
79
- tuiCheckbox
80
- type="checkbox"
81
- class="t-check"
82
- [checked]="selected()"
83
- [size]="datalist.size === 'l' ? 'm' : 's'"
84
- />
85
- `, isInline: true, styles: [":host._value>.t-check{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)}\n"], dependencies: [{ kind: "component", type: TuiCheckbox, selector: "input[type=\"checkbox\"][tuiCheckbox]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
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: `
66
+ @if (selected()) {
67
+ <input
68
+ tuiCheckbox
69
+ type="checkbox"
70
+ class="t-check"
71
+ [checked]="selected()"
72
+ [size]="datalist.size === 'l' ? 'm' : 's'"
73
+ />
74
+ } @else {
75
+ <span class="t-dummy"></span>
76
+ }
77
+ `, 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 }); }
86
78
  }
87
79
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSelectOption, decorators: [{
88
80
  type: Component,
89
81
  args: [{ imports: [TuiCheckbox], template: `
90
- <input
91
- tuiCheckbox
92
- type="checkbox"
93
- class="t-check"
94
- [checked]="selected()"
95
- [size]="datalist.size === 'l' ? 'm' : 's'"
96
- />
82
+ @if (selected()) {
83
+ <input
84
+ tuiCheckbox
85
+ type="checkbox"
86
+ class="t-check"
87
+ [checked]="selected()"
88
+ [size]="datalist.size === 'l' ? 'm' : 's'"
89
+ />
90
+ } @else {
91
+ <span class="t-dummy"></span>
92
+ }
97
93
  `, changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiCheckboxOptionsProvider({ appearance: () => 'action' })], hostDirectives: [TuiScrollIntoView], host: {
98
94
  tuiSelectOption: '',
99
95
  '[class._value]': 'option',
100
96
  '[class._selected]': 'selected()',
101
- }, styles: [":host._value>.t-check{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)}\n"] }]
97
+ }, 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"] }]
102
98
  }] });
103
99
 
104
100
  class TuiSelectDirective extends TuiControl {
@@ -112,7 +108,7 @@ class TuiSelectDirective extends TuiControl {
112
108
  const value = this.value();
113
109
  const string = tuiIsPresent(value) ? this.itemsHandlers.stringify()(value) : '';
114
110
  this.textfield.value.set(string);
115
- }, TUI_ALLOW_SIGNAL_WRITES);
111
+ });
116
112
  }
117
113
  setValue(value) {
118
114
  this.onChange(value);
@@ -130,7 +126,6 @@ class TuiSelectDirective extends TuiControl {
130
126
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSelectDirective, decorators: [{
131
127
  type: Directive,
132
128
  args: [{
133
- standalone: true,
134
129
  selector: 'input[tuiSelect]',
135
130
  providers: [
136
131
  tuiAsOptionContent(TuiSelectOption),
@@ -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 signal,\n} from '@angular/core';\nimport {tuiAsControl, TuiControl} from '@taiga-ui/cdk/classes';\nimport {TUI_ALLOW_SIGNAL_WRITES} from '@taiga-ui/cdk/constants';\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 placeholder = signal('');\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 }, TUI_ALLOW_SIGNAL_WRITES);\n\n @Input()\n public items: ReadonlyArray<readonly T[]> | readonly T[] | null = [];\n\n @Input()\n public labels: readonly string[] = [];\n\n // TODO(v5): use signal inputs\n @Input('placeholder')\n public set placeholderSetter(x: string) {\n this.placeholder.set(x);\n }\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\n@if (items && !isFlat(items)) {\n @for (group of labels; track group; let index = $index) {\n <optgroup [label]=\"labels[index]\">\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: items[index]}\" />\n </optgroup>\n }\n} @else {\n <ng-container *ngTemplateOutlet=\"options; context: {$implicit: items}\" />\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 <input\n tuiCheckbox\n type=\"checkbox\"\n class=\"t-check\"\n [checked]=\"selected()\"\n [size]=\"datalist.size === 'l' ? 'm' : 's'\"\n />\n `,\n styleUrls: ['./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 {TUI_ALLOW_SIGNAL_WRITES} from '@taiga-ui/cdk/constants';\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 standalone: true,\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 }, TUI_ALLOW_SIGNAL_WRITES);\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":";;;;;;;;;;;;;;;;AAsCM,MAAO,eACT,SAAQ,UAAoB,CAAA;AAdhC,IAAA,WAAA,GAAA;;AAiBqB,QAAA,IAAA,CAAA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,EAAA,QAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,0DAAA,EAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,YAAA,EAAA,EAAA,EAAA,SAAA,EAAA;YACP,kBAAkB,CAAC,eAAe,CAAC;YACnC,sBAAsB,CAAC,kBAAkB,CAAC;YAC1C,YAAY,CAAC,kBAAkB,CAAC;AACnC,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,gBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,aAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAOQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAd9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,UAAU,EAAE,IAAI;AAChB,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;;;MC9BY,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} 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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AA,CAAA,CAAA;;4FAOQ,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;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,10 +1,10 @@
1
1
  import { tuiRound } from '@taiga-ui/cdk/utils/math';
2
2
  import { __decorate } from 'tslib';
3
3
  import * as i0 from '@angular/core';
4
- import { InjectionToken, inject, signal, computed, Input, ChangeDetectionStrategy, Component, INJECTOR, Directive, forwardRef, ContentChild } from '@angular/core';
4
+ import { InjectionToken, inject, signal, computed, Input, ChangeDetectionStrategy, Component, INJECTOR, input, Directive, ContentChild } from '@angular/core';
5
5
  import { toSignal, takeUntilDestroyed } from '@angular/core/rxjs-interop';
6
6
  import { NgControl, NgModel } from '@angular/forms';
7
- import { TuiControl } from '@taiga-ui/cdk/classes';
7
+ import { TuiControl, TUI_IDENTITY_VALUE_TRANSFORMER } from '@taiga-ui/cdk/classes';
8
8
  import { tuiWatch, tuiControlValue, tuiTypedFromEvent } from '@taiga-ui/cdk/observables';
9
9
  import { tuiFallbackValueProvider } from '@taiga-ui/cdk/tokens';
10
10
  import { tuiProvideOptions, tuiPure } from '@taiga-ui/cdk/utils/miscellaneous';
@@ -38,15 +38,13 @@ function tuiKeyStepValueToPercentage(value, keySteps) {
38
38
  const ratio = (value - lowerStepValue) / (upperStepValue - lowerStepValue) || 0;
39
39
  return (upperStepPercent - lowerStepPercent) * ratio + lowerStepPercent;
40
40
  }
41
- function tuiCreateKeyStepsTransformer(keySteps, slider) {
41
+ function tuiCreateKeyStepsTransformer(keySteps) {
42
42
  return new (class {
43
43
  fromControlValue(controlValue) {
44
- const newValuePercentage = tuiKeyStepValueToPercentage(controlValue, keySteps);
45
- return (newValuePercentage * (slider.max - slider.min)) / 100 + slider.min;
44
+ return tuiKeyStepValueToPercentage(controlValue, keySteps) / 100;
46
45
  }
47
- toControlValue(nativeValue) {
48
- const valueRatio = (nativeValue - slider.min) / (slider.max - slider.min) || 0;
49
- return tuiPercentageToKeyStepValue(valueRatio * 100, keySteps);
46
+ toControlValue(ratio) {
47
+ return tuiPercentageToKeyStepValue(ratio * 100, keySteps);
50
48
  }
51
49
  })();
52
50
  }
@@ -125,8 +123,8 @@ class TuiSliderComponent {
125
123
  */
126
124
  if (this.control instanceof NgModel) {
127
125
  const transformer = this.keySteps?.transformer();
128
- const value = transformer
129
- ? transformer.fromControlValue(this.control.value)
126
+ const value = this.keySteps && transformer
127
+ ? this.keySteps.toSliderValue(transformer.fromControlValue(this.control.value))
130
128
  : this.control.viewModel;
131
129
  return this.step
132
130
  ? tuiRound(Math.round(value / this.step) * this.step, TUI_FLOATING_PRECISION)
@@ -154,7 +152,7 @@ class TuiSliderComponent {
154
152
  }
155
153
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSliderComponent, decorators: [{
156
154
  type: Component,
157
- args: [{ standalone: true, selector: 'input[type=range][tuiSlider]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsAuxiliary(TuiSliderComponent)], host: {
155
+ args: [{ selector: 'input[type=range][tuiSlider]', template: '', changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiAsAuxiliary(TuiSliderComponent)], host: {
158
156
  /**
159
157
  * For change detection.
160
158
  * Webkit does not have built-in method for customization of filling progress (as Firefox).
@@ -181,32 +179,13 @@ class TuiSliderKeyStepsBase {
181
179
  constructor() {
182
180
  this.injector = inject(INJECTOR);
183
181
  this.control = inject(NgControl, { self: true, optional: true });
184
- this.step = 1;
182
+ this.min = signal(undefined);
183
+ this.max = signal(undefined);
184
+ this.step = input(1);
185
185
  this.transformer = signal(null);
186
- this.value = toSignal(timer(0) // https://github.com/angular/angular/issues/54418
186
+ this.controlValue = toSignal(timer(0) // https://github.com/angular/angular/issues/54418
187
187
  .pipe(switchMap(() => tuiControlValue(this.control))));
188
- }
189
- get slider() {
190
- return this.injector.get(TuiSliderComponent);
191
- }
192
- set keySteps(steps) {
193
- this.transformer.set(steps && tuiCreateKeyStepsTransformer(steps, this.slider));
194
- this.min = steps?.[0][1];
195
- this.max = steps?.[steps.length - 1]?.[1];
196
- }
197
- /**
198
- * TODO(v5): standardize logic between `TuiSlider` & `TuiInputSlider` & `Range` & `InputRange`
199
- * For non-linear slider (with `[keySteps]` property) `step` means percentage
200
- * Add these host-bindings to `TuiSliderKeyStepsBase`:
201
- * ```
202
- * host: {
203
- * '[attr.min]': '0',
204
- * '[attr.step]': '1',
205
- * '[attr.max]': 'totalSteps',
206
- * },
207
- * ```
208
- */
209
- get totalSteps() {
188
+ this.totalSteps = computed(() =>
210
189
  /**
211
190
  * Not-integer amount of steps is invalid usage of native sliders
212
191
  * ```html
@@ -214,15 +193,33 @@ class TuiSliderKeyStepsBase {
214
193
  * ```
215
194
  * (impossible to select 100; 99.9 is max allowed value)
216
195
  */
217
- return this.step ? Math.round(100 / this.step) : Infinity;
196
+ Math.round(100 / this.step()));
197
+ }
198
+ get slider() {
199
+ return this.injector.get(TuiSliderComponent);
200
+ }
201
+ set keySteps(steps) {
202
+ this.transformer.set(steps && tuiCreateKeyStepsTransformer(steps));
203
+ this.min.set(steps?.[0][1]);
204
+ this.max.set(steps?.[steps.length - 1]?.[1]);
218
205
  }
219
206
  takeStep(coefficient) {
220
207
  const newValue = this.slider.value + coefficient;
221
- return (this.transformer()?.toControlValue(this.slider.value + coefficient) ??
222
- newValue);
208
+ return (this.transformer()?.toControlValue((this.slider.value + coefficient) / this.totalSteps()) ?? newValue);
209
+ }
210
+ toSliderValue(fraction) {
211
+ return this.transformer() ? fraction * this.totalSteps() : fraction;
212
+ }
213
+ setControlValue(controlValue) {
214
+ const fraction = this.transformer()?.fromControlValue(controlValue) ?? controlValue;
215
+ this.slider.value = this.toSliderValue(fraction);
216
+ }
217
+ getControlValue() {
218
+ const { value } = this.slider;
219
+ return this.transformer()?.toControlValue(value / this.totalSteps()) ?? value;
223
220
  }
224
221
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSliderKeyStepsBase, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
225
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "19.2.15", type: TuiSliderKeyStepsBase, isStandalone: true, selector: "input[tuiSlider][keySteps]", inputs: { step: ["step", "step", (x) => (x === 'any' ? null : x)], keySteps: "keySteps" }, host: { properties: { "attr.aria-valuemin": "min", "attr.aria-valuemax": "max", "attr.aria-valuenow": "value()" } }, ngImport: i0 }); }
222
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiSliderKeyStepsBase, isStandalone: true, selector: "input[tuiSlider][keySteps]", inputs: { step: { classPropertyName: "step", publicName: "step", isSignal: true, isRequired: false, transformFunction: null }, keySteps: { classPropertyName: "keySteps", publicName: "keySteps", isSignal: false, isRequired: false, transformFunction: null } }, host: { properties: { "attr.min": "transformer() ? 0 : slider.min", "attr.step": "transformer() ? 1 : step()", "attr.max": "transformer() ? totalSteps() : slider.max", "attr.aria-valuemin": "min()", "attr.aria-valuemax": "max()", "attr.aria-valuenow": "controlValue()" } }, ngImport: i0 }); }
226
223
  }
227
224
  __decorate([
228
225
  tuiPure
@@ -230,43 +227,46 @@ __decorate([
230
227
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSliderKeyStepsBase, decorators: [{
231
228
  type: Directive,
232
229
  args: [{
233
- standalone: true,
234
230
  selector: 'input[tuiSlider][keySteps]',
235
231
  host: {
236
- '[attr.aria-valuemin]': 'min',
237
- '[attr.aria-valuemax]': 'max',
238
- '[attr.aria-valuenow]': 'value()',
232
+ '[attr.min]': 'transformer() ? 0 : slider.min',
233
+ '[attr.step]': 'transformer() ? 1 : step()',
234
+ '[attr.max]': 'transformer() ? totalSteps() : slider.max',
235
+ '[attr.aria-valuemin]': 'min()',
236
+ '[attr.aria-valuemax]': 'max()',
237
+ '[attr.aria-valuenow]': 'controlValue()',
239
238
  },
240
239
  }]
241
- }], propDecorators: { step: [{
242
- type: Input,
243
- args: [{ transform: (x) => (x === 'any' ? null : x) }]
244
- }], slider: [], keySteps: [{
240
+ }], propDecorators: { slider: [], keySteps: [{
245
241
  type: Input
246
242
  }] } });
247
243
  class TuiSliderKeySteps extends TuiControl {
248
244
  constructor() {
249
245
  super(...arguments);
250
- this.slider = inject(forwardRef(() => TuiSliderComponent));
246
+ this.base = inject(TuiSliderKeyStepsBase);
251
247
  }
252
248
  set keySteps(steps) {
253
- this.transformer = tuiCreateKeyStepsTransformer(steps, this.slider);
249
+ this.transformer = steps
250
+ ? tuiCreateKeyStepsTransformer(steps)
251
+ : TUI_IDENTITY_VALUE_TRANSFORMER;
252
+ }
253
+ setValue(sliderValue) {
254
+ this.onChange(this.base.transformer() ? sliderValue / this.base.totalSteps() : sliderValue);
254
255
  }
255
256
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSliderKeySteps, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
256
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSliderKeySteps, isStandalone: true, selector: "input[tuiSlider][keySteps][ngModel],input[tuiSlider][keySteps][formControl],input[tuiSlider][keySteps][formControlName]", inputs: { keySteps: "keySteps" }, host: { listeners: { "blur": "onTouched()", "input": "onChange($event.target.value)", "change": "onChange($event.target.value)" }, properties: { "value": "value()", "disabled": "disabled()" } }, providers: [tuiFallbackValueProvider(0)], usesInheritance: true, ngImport: i0 }); }
257
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiSliderKeySteps, isStandalone: true, selector: "input[tuiSlider][keySteps][ngModel],input[tuiSlider][keySteps][formControl],input[tuiSlider][keySteps][formControlName]", inputs: { keySteps: "keySteps" }, host: { listeners: { "blur": "onTouched()", "input": "setValue($event.target.value)", "change": "setValue($event.target.value)" }, properties: { "value": "base.toSliderValue(value())", "disabled": "disabled()" } }, providers: [tuiFallbackValueProvider(0)], usesInheritance: true, ngImport: i0 }); }
257
258
  }
258
259
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSliderKeySteps, decorators: [{
259
260
  type: Directive,
260
261
  args: [{
261
- standalone: true,
262
262
  selector: 'input[tuiSlider][keySteps][ngModel],input[tuiSlider][keySteps][formControl],input[tuiSlider][keySteps][formControlName]',
263
263
  providers: [tuiFallbackValueProvider(0)],
264
264
  host: {
265
- '[value]': 'value()',
265
+ '[value]': 'base.toSliderValue(value())',
266
266
  '[disabled]': 'disabled()',
267
267
  '(blur)': 'onTouched()',
268
- '(input)': 'onChange($event.target.value)',
269
- '(change)': 'onChange($event.target.value)',
268
+ '(input)': 'setValue($event.target.value)',
269
+ '(change)': 'setValue($event.target.value)',
270
270
  },
271
271
  }]
272
272
  }], propDecorators: { keySteps: [{
@@ -326,7 +326,6 @@ class TuiSliderReadonly {
326
326
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSliderReadonly, decorators: [{
327
327
  type: Directive,
328
328
  args: [{
329
- standalone: true,
330
329
  selector: 'input[tuiSlider][readonly]',
331
330
  host: {
332
331
  '(keydown)': 'preventKeyboardInteraction($event)',
@@ -355,11 +354,11 @@ class TuiSliderThumbLabel {
355
354
  return this.ratio * (this.slider?.el.offsetWidth || 0);
356
355
  }
357
356
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSliderThumbLabel, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
358
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSliderThumbLabel, isStandalone: true, selector: "[tuiSliderThumbLabel]", providers: [tuiHintOptionsProvider({ direction: 'top', appearance: 'floating' })], queries: [{ propertyName: "slider", first: true, predicate: TuiSliderComponent, descendants: true }, { propertyName: "control", first: true, predicate: NgControl, descendants: true }], ngImport: i0, template: "@if (control?.valueChanges | async) {}\n\n<div\n class=\"t-ghost\"\n [attr.data-size]=\"size\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.inset-inline-start.px]=\"ghostStart\"\n [style.left.px]=\"ghostStart\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s]{inline-size:.5rem;block-size:.5rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.5rem * var(--tui-inline)))}.t-ghost[data-size=m]{inline-size:.75rem;block-size:.75rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.75rem * var(--tui-inline)))}@supports (inset-inline-end: 0){:host-context([dir=\"rtl\"]) .t-ghost{left:unset!important}}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
357
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiSliderThumbLabel, isStandalone: true, selector: "[tuiSliderThumbLabel]", providers: [tuiHintOptionsProvider({ direction: 'top', appearance: 'floating' })], queries: [{ propertyName: "slider", first: true, predicate: TuiSliderComponent, descendants: true }, { propertyName: "control", first: true, predicate: NgControl, descendants: true }], ngImport: i0, template: "@if (control?.valueChanges | async) {}\n\n<div\n class=\"t-ghost\"\n [attr.data-size]=\"size\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.inset-inline-start.px]=\"ghostStart\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s]{inline-size:.5rem;block-size:.5rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.5rem * var(--tui-inline)))}.t-ghost[data-size=m]{inline-size:.75rem;block-size:.75rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.75rem * var(--tui-inline)))}@supports (inset-inline-end: 0){:host-context([dir=\"rtl\"]) .t-ghost{left:unset!important}}\n"], dependencies: [{ kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
359
358
  }
360
359
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiSliderThumbLabel, decorators: [{
361
360
  type: Component,
362
- args: [{ selector: '[tuiSliderThumbLabel]', imports: [AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiHintOptionsProvider({ direction: 'top', appearance: 'floating' })], template: "@if (control?.valueChanges | async) {}\n\n<div\n class=\"t-ghost\"\n [attr.data-size]=\"size\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.inset-inline-start.px]=\"ghostStart\"\n [style.left.px]=\"ghostStart\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s]{inline-size:.5rem;block-size:.5rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.5rem * var(--tui-inline)))}.t-ghost[data-size=m]{inline-size:.75rem;block-size:.75rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.75rem * var(--tui-inline)))}@supports (inset-inline-end: 0){:host-context([dir=\"rtl\"]) .t-ghost{left:unset!important}}\n"] }]
361
+ args: [{ selector: '[tuiSliderThumbLabel]', imports: [AsyncPipe], changeDetection: ChangeDetectionStrategy.OnPush, providers: [tuiHintOptionsProvider({ direction: 'top', appearance: 'floating' })], template: "@if (control?.valueChanges | async) {}\n\n<div\n class=\"t-ghost\"\n [attr.data-size]=\"size\"\n [style.--tui-slider-thumb-ratio]=\"ratio\"\n [style.inset-inline-start.px]=\"ghostStart\"\n>\n <ng-content />\n</div>\n\n<ng-content select=\"input[type=range]\" />\n", styles: [":host{position:relative}.t-ghost{position:absolute;top:0;bottom:0;margin:auto;border-radius:50%;pointer-events:none}.t-ghost[data-size=s]{inline-size:.5rem;block-size:.5rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.5rem * var(--tui-inline)))}.t-ghost[data-size=m]{inline-size:.75rem;block-size:.75rem;transform:translate(calc(var(--tui-slider-thumb-ratio) * -.75rem * var(--tui-inline)))}@supports (inset-inline-end: 0){:host-context([dir=\"rtl\"]) .t-ghost{left:unset!important}}\n"] }]
363
362
  }], propDecorators: { slider: [{
364
363
  type: ContentChild,
365
364
  args: [TuiSliderComponent]