@taiga-ui/core 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 (274) hide show
  1. package/classes/accessors.d.ts +1 -1
  2. package/components/calendar/calendar-sheet.component.d.ts +1 -1
  3. package/{pipes/calendar-sheet → components/calendar}/calendar-sheet.pipe.d.ts +2 -2
  4. package/components/calendar/calendar-spin.component.d.ts +1 -0
  5. package/components/calendar/calendar-year.component.d.ts +1 -1
  6. package/components/calendar/calendar.options.d.ts +9 -0
  7. package/components/calendar/index.d.ts +3 -0
  8. package/{pipes/order-week-days → components/calendar}/order-week-days.pipe.d.ts +1 -1
  9. package/components/data-list/data-list.component.d.ts +2 -4
  10. package/components/data-list/data-list.d.ts +3 -4
  11. package/components/data-list/data-list.tokens.d.ts +1 -23
  12. package/components/data-list/index.d.ts +3 -4
  13. package/components/data-list/option-content.directive.d.ts +14 -0
  14. package/components/data-list/option-with-value.directive.d.ts +9 -0
  15. package/components/data-list/option.directive.d.ts +19 -0
  16. package/components/icon/icon.component.d.ts +2 -2
  17. package/components/index.d.ts +2 -2
  18. package/components/input/index.d.ts +2 -0
  19. package/components/input/input.d.ts +5 -0
  20. package/components/input/input.directive.d.ts +29 -0
  21. package/components/label/label.directive.d.ts +1 -1
  22. package/components/link/index.d.ts +0 -1
  23. package/components/link/link.directive.d.ts +8 -6
  24. package/components/notification/notification.component.d.ts +1 -1
  25. package/components/notification/notification.directive.d.ts +1 -1
  26. package/components/notification/notification.options.d.ts +4 -3
  27. package/components/notification/notification.service.d.ts +1 -1
  28. package/components/root/root.component.d.ts +1 -1
  29. package/components/scrollbar/scroll-ref.directive.d.ts +2 -0
  30. package/components/scrollbar/scrollbar.component.d.ts +1 -5
  31. package/components/spin-button/spin-button.component.d.ts +1 -1
  32. package/components/textfield/index.d.ts +0 -1
  33. package/components/textfield/textfield-multi/textfield-item.component.d.ts +3 -2
  34. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +8 -13
  35. package/components/textfield/textfield.component.d.ts +20 -32
  36. package/components/textfield/textfield.d.ts +2 -3
  37. package/directives/group/group.directive.d.ts +7 -7
  38. package/directives/index.d.ts +0 -5
  39. package/directives/items-handlers/items-handlers.directive.d.ts +5 -9
  40. package/directives/items-handlers/items-handlers.tokens.d.ts +4 -4
  41. package/fesm2022/taiga-ui-core-classes.mjs +8 -10
  42. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  43. package/fesm2022/taiga-ui-core-components-button.mjs +7 -7
  44. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  45. package/fesm2022/taiga-ui-core-components-calendar.mjs +135 -26
  46. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  47. package/fesm2022/taiga-ui-core-components-cell.mjs +7 -7
  48. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
  49. package/fesm2022/taiga-ui-core-components-data-list.mjs +98 -233
  50. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  51. package/fesm2022/taiga-ui-core-components-error.mjs +12 -11
  52. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-core-components-expand.mjs +3 -3
  54. package/fesm2022/taiga-ui-core-components-icon.mjs +9 -9
  55. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-core-components-input.mjs +103 -0
  57. package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -0
  58. package/fesm2022/taiga-ui-core-components-label.mjs +11 -13
  59. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-core-components-link.mjs +13 -24
  61. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-core-components-loader.mjs +4 -4
  63. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-core-components-notification.mjs +27 -29
  65. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-core-components-root.mjs +7 -9
  67. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +42 -48
  69. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-core-components-spin-button.mjs +6 -6
  71. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-core-components-textfield.mjs +99 -254
  73. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  74. package/fesm2022/{taiga-ui-core-directives-title.mjs → taiga-ui-core-components-title.mjs} +8 -8
  75. package/fesm2022/{taiga-ui-core-directives-title.mjs.map → taiga-ui-core-components-title.mjs.map} +1 -1
  76. package/fesm2022/taiga-ui-core-components.mjs +2 -2
  77. package/fesm2022/taiga-ui-core-directives-appearance.mjs +16 -15
  78. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-directives-date-format.mjs +3 -3
  80. package/fesm2022/taiga-ui-core-directives-group.mjs +20 -28
  81. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-core-directives-icons.mjs +12 -11
  83. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +16 -37
  85. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  86. package/fesm2022/taiga-ui-core-directives-number-format.mjs +3 -3
  87. package/fesm2022/taiga-ui-core-directives.mjs +0 -5
  88. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +5 -8
  90. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-core-pipes.mjs +0 -7
  92. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  93. package/fesm2022/{taiga-ui-core-directives-alert.mjs → taiga-ui-core-portals-alert.mjs} +12 -12
  94. package/fesm2022/taiga-ui-core-portals-alert.mjs.map +1 -0
  95. package/fesm2022/taiga-ui-core-portals-dialog.mjs +158 -0
  96. package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -0
  97. package/fesm2022/{taiga-ui-core-directives-dropdown.mjs → taiga-ui-core-portals-dropdown.mjs} +160 -264
  98. package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -0
  99. package/fesm2022/{taiga-ui-core-directives-hint.mjs → taiga-ui-core-portals-hint.mjs} +62 -61
  100. package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -0
  101. package/fesm2022/taiga-ui-core-portals-modal.mjs +89 -0
  102. package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -0
  103. package/fesm2022/{taiga-ui-core-directives-popup.mjs → taiga-ui-core-portals-popup.mjs} +11 -11
  104. package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -0
  105. package/fesm2022/taiga-ui-core-portals.mjs +11 -0
  106. package/fesm2022/taiga-ui-core-portals.mjs.map +1 -0
  107. package/fesm2022/taiga-ui-core-services.mjs +15 -79
  108. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-core-tokens.mjs +34 -49
  110. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-core-utils-format.mjs +1 -23
  112. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +19 -19
  114. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  115. package/fesm2022/taiga-ui-core.mjs +1 -1
  116. package/index.d.ts +1 -1
  117. package/package.json +62 -87
  118. package/pipes/format-number/format-number.pipe.d.ts +1 -1
  119. package/pipes/index.d.ts +0 -7
  120. package/{components → portals}/dialog/dialog.service.d.ts +1 -1
  121. package/{directives → portals}/dropdown/dropdown-hover.directive.d.ts +5 -10
  122. package/{directives → portals}/dropdown/dropdown-manual.directive.d.ts +2 -2
  123. package/portals/dropdown/dropdown-open.directive.d.ts +30 -0
  124. package/{directives → portals}/dropdown/dropdown-options.directive.d.ts +0 -4
  125. package/{directives → portals}/dropdown/dropdown-position-sided.directive.d.ts +3 -3
  126. package/{directives → portals}/dropdown/dropdown-position.directive.d.ts +4 -4
  127. package/{directives → portals}/dropdown/dropdown-selection.directive.d.ts +4 -5
  128. package/{directives → portals}/dropdown/dropdown.bindings.d.ts +0 -1
  129. package/{directives → portals}/dropdown/dropdown.d.ts +1 -2
  130. package/{directives → portals}/dropdown/dropdown.directive.d.ts +5 -6
  131. package/{directives → portals}/dropdown/index.d.ts +0 -1
  132. package/{directives → portals}/hint/hint-position.directive.d.ts +3 -3
  133. package/{directives → portals}/hint/hint.directive.d.ts +1 -1
  134. package/portals/index.d.ts +6 -0
  135. package/services/index.d.ts +0 -3
  136. package/styles/components/appearance.less +5 -0
  137. package/styles/components/button.less +10 -20
  138. package/styles/components/icon.less +11 -0
  139. package/styles/components/icons.less +2 -1
  140. package/styles/components/label.less +3 -12
  141. package/styles/components/link.less +8 -24
  142. package/styles/components/notification.less +21 -22
  143. package/styles/components/textfield.less +129 -211
  144. package/styles/components/title.less +8 -8
  145. package/styles/mixins/appearance.less +9 -25
  146. package/styles/mixins/appearance.scss +8 -24
  147. package/styles/mixins/date-picker.less +1 -1
  148. package/styles/mixins/picker.less +1 -1
  149. package/styles/mixins/picker.scss +1 -1
  150. package/styles/mixins/slider.less +1 -1
  151. package/styles/mixins/slider.scss +2 -3
  152. package/styles/taiga-ui-local.less +0 -1
  153. package/styles/taiga-ui-local.scss +0 -1
  154. package/styles/taiga-ui-theme.less +0 -1
  155. package/styles/theme/appearance/outline.less +9 -18
  156. package/styles/theme/appearance/primary.less +2 -4
  157. package/styles/theme/appearance/secondary.less +6 -14
  158. package/styles/theme/appearance/status.less +0 -4
  159. package/styles/theme/appearance/table.less +36 -35
  160. package/styles/theme/appearance/textfield.less +30 -27
  161. package/styles/theme/appearance.less +0 -1
  162. package/styles/theme/variables.less +16 -17
  163. package/tokens/breakpoint.d.ts +4 -0
  164. package/tokens/common-icons.d.ts +2 -0
  165. package/tokens/icons.d.ts +0 -4
  166. package/tokens/index.d.ts +1 -4
  167. package/types/index.d.ts +0 -2
  168. package/types/point.d.ts +1 -1
  169. package/types/size.d.ts +0 -11
  170. package/utils/format/index.d.ts +0 -1
  171. package/utils/miscellaneous/font-scaling.d.ts +2 -1
  172. package/utils/miscellaneous/get-duration.d.ts +2 -0
  173. package/utils/miscellaneous/index.d.ts +1 -1
  174. package/animations/animations.d.ts +0 -109
  175. package/animations/index.d.ts +0 -1
  176. package/components/data-list/data-list.directive.d.ts +0 -7
  177. package/components/data-list/option/option-content.d.ts +0 -16
  178. package/components/data-list/option/option-legacy.component.d.ts +0 -24
  179. package/components/data-list/option/option.directive.d.ts +0 -26
  180. package/components/link/link.options.d.ts +0 -10
  181. package/components/textfield/textfield.directive.d.ts +0 -35
  182. package/directives/dropdown/dropdown-open-legacy.directive.d.ts +0 -12
  183. package/directives/dropdown/dropdown-open.directive.d.ts +0 -33
  184. package/fesm2022/taiga-ui-core-animations.mjs +0 -370
  185. package/fesm2022/taiga-ui-core-animations.mjs.map +0 -1
  186. package/fesm2022/taiga-ui-core-components-dialog.mjs +0 -158
  187. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +0 -1
  188. package/fesm2022/taiga-ui-core-components-modal.mjs +0 -89
  189. package/fesm2022/taiga-ui-core-components-modal.mjs.map +0 -1
  190. package/fesm2022/taiga-ui-core-directives-alert.mjs.map +0 -1
  191. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +0 -1
  192. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +0 -1
  193. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +0 -1
  194. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +0 -24
  195. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +0 -1
  196. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +0 -93
  197. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +0 -1
  198. package/fesm2022/taiga-ui-core-pipes-flag.mjs +0 -31
  199. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +0 -1
  200. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +0 -27
  201. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +0 -1
  202. package/fesm2022/taiga-ui-core-pipes-initials.mjs +0 -28
  203. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +0 -1
  204. package/fesm2022/taiga-ui-core-pipes-month.mjs +0 -29
  205. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +0 -1
  206. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +0 -35
  207. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +0 -1
  208. package/pipes/auto-color/auto-color.pipe.d.ts +0 -7
  209. package/pipes/auto-color/index.d.ts +0 -1
  210. package/pipes/calendar-sheet/index.d.ts +0 -1
  211. package/pipes/calendar-sheet/utils.d.ts +0 -20
  212. package/pipes/flag/flag.pipe.d.ts +0 -14
  213. package/pipes/flag/index.d.ts +0 -1
  214. package/pipes/format-date/format-date.pipe.d.ts +0 -9
  215. package/pipes/format-date/index.d.ts +0 -1
  216. package/pipes/initials/index.d.ts +0 -1
  217. package/pipes/initials/initials.pipe.d.ts +0 -7
  218. package/pipes/month/index.d.ts +0 -1
  219. package/pipes/month/month.pipe.d.ts +0 -10
  220. package/pipes/order-week-days/index.d.ts +0 -1
  221. package/services/breakpoint.service.d.ts +0 -16
  222. package/services/dark-theme.service.d.ts +0 -10
  223. package/services/format-date.service.d.ts +0 -8
  224. package/styles/mixins/wrapper.less +0 -64
  225. package/styles/mixins/wrapper.scss +0 -61
  226. package/styles/theme/appearance/opposite.less +0 -17
  227. package/styles/theme/wrapper.less +0 -211
  228. package/tokens/day-type-handler.d.ts +0 -7
  229. package/tokens/first-day-of-week.d.ts +0 -5
  230. package/tokens/scroll-ref.d.ts +0 -2
  231. package/tokens/spin-icons.d.ts +0 -6
  232. package/types/range-state.d.ts +0 -4
  233. package/types/value-content-context.d.ts +0 -4
  234. package/utils/format/string-hash-to-hsl.d.ts +0 -6
  235. package/utils/miscellaneous/to-animation-options.d.ts +0 -4
  236. /package/{directives → components}/title/index.d.ts +0 -0
  237. /package/{directives → components}/title/title.directive.d.ts +0 -0
  238. /package/{directives → portals}/alert/alert.directive.d.ts +0 -0
  239. /package/{directives → portals}/alert/alert.service.d.ts +0 -0
  240. /package/{directives → portals}/alert/index.d.ts +0 -0
  241. /package/{components → portals}/dialog/dialog.component.d.ts +0 -0
  242. /package/{components → portals}/dialog/dialog.directive.d.ts +0 -0
  243. /package/{components → portals}/dialog/dialog.factory.d.ts +0 -0
  244. /package/{components → portals}/dialog/dialog.options.d.ts +0 -0
  245. /package/{components → portals}/dialog/dialog.providers.d.ts +0 -0
  246. /package/{components → portals}/dialog/index.d.ts +0 -0
  247. /package/{directives → portals}/dropdown/dropdown-content.directive.d.ts +0 -0
  248. /package/{directives → portals}/dropdown/dropdown-context.directive.d.ts +0 -0
  249. /package/{directives → portals}/dropdown/dropdown-hover.options.d.ts +0 -0
  250. /package/{directives → portals}/dropdown/dropdown-limit-width.d.ts +0 -0
  251. /package/{directives → portals}/dropdown/dropdown.component.d.ts +0 -0
  252. /package/{directives → portals}/dropdown/dropdown.driver.d.ts +0 -0
  253. /package/{directives → portals}/dropdown/dropdown.providers.d.ts +0 -0
  254. /package/{directives → portals}/dropdown/with-dropdown-open.directive.d.ts +0 -0
  255. /package/{directives → portals}/hint/hint-describe.directive.d.ts +0 -0
  256. /package/{directives → portals}/hint/hint-driver.directive.d.ts +0 -0
  257. /package/{directives → portals}/hint/hint-host.directive.d.ts +0 -0
  258. /package/{directives → portals}/hint/hint-hover.directive.d.ts +0 -0
  259. /package/{directives → portals}/hint/hint-manual.directive.d.ts +0 -0
  260. /package/{directives → portals}/hint/hint-options.directive.d.ts +0 -0
  261. /package/{directives → portals}/hint/hint-overflow.directive.d.ts +0 -0
  262. /package/{directives → portals}/hint/hint-pointer.directive.d.ts +0 -0
  263. /package/{directives → portals}/hint/hint-unstyled.component.d.ts +0 -0
  264. /package/{directives → portals}/hint/hint.component.d.ts +0 -0
  265. /package/{directives → portals}/hint/hint.d.ts +0 -0
  266. /package/{directives → portals}/hint/hint.providers.d.ts +0 -0
  267. /package/{directives → portals}/hint/index.d.ts +0 -0
  268. /package/{components → portals}/modal/index.d.ts +0 -0
  269. /package/{components → portals}/modal/modal.component.d.ts +0 -0
  270. /package/{components → portals}/modal/modal.service.d.ts +0 -0
  271. /package/{directives → portals}/popup/index.d.ts +0 -0
  272. /package/{directives → portals}/popup/popup.directive.d.ts +0 -0
  273. /package/{directives → portals}/popup/popup.service.d.ts +0 -0
  274. /package/{directives → portals}/popup/popups.component.d.ts +0 -0
@@ -2,11 +2,12 @@ import * as i0 from '@angular/core';
2
2
  import { inject, computed, input, ChangeDetectionStrategy, Component, isSignal, Directive, TemplateRef, untracked, Pipe } from '@angular/core';
3
3
  import { TuiValidationError } from '@taiga-ui/cdk/classes';
4
4
  import { TuiAnimated } from '@taiga-ui/cdk/directives/animated';
5
- import { tuiIsString, tuiDirectiveBinding, tuiProvide, tuiSetSignal } from '@taiga-ui/cdk/utils/miscellaneous';
5
+ import { tuiIsString, tuiSetSignal } from '@taiga-ui/cdk/utils/miscellaneous';
6
6
  import { TUI_DEFAULT_ERROR_MESSAGE, TUI_VALIDATION_ERRORS } from '@taiga-ui/core/tokens';
7
7
  import { PolymorpheusOutlet, PolymorpheusTemplate, PolymorpheusComponent } from '@taiga-ui/polymorpheus';
8
8
  import { toSignal } from '@angular/core/rxjs-interop';
9
9
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, NgControl } from '@angular/forms';
10
+ import { tuiDirectiveBinding, tuiProvide } from '@taiga-ui/cdk/utils/di';
10
11
  import { Subject, distinctUntilChanged, switchMap, startWith, map } from 'rxjs';
11
12
 
12
13
  class TuiErrorComponent {
@@ -15,14 +16,14 @@ class TuiErrorComponent {
15
16
  this.content = computed((error = this.error()) => tuiIsString(error) ? new TuiValidationError(error) : error);
16
17
  this.error = input(null);
17
18
  }
18
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
19
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiErrorComponent, isStandalone: true, selector: "tui-error", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class._error": "content()" } }, ngImport: i0, template: "@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n", styles: [":host{transition-property:grid-template-rows;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:grid;font:var(--tui-font-text-s);color:var(--tui-text-negative);overflow-wrap:break-word;grid-template-rows:0fr}:host._error{grid-template-rows:1fr}.t-message-text{white-space:pre-line;grid-area:1 / 1 / span 2;overflow:hidden}.t-message-text.tui-enter,.t-message-text.tui-leave{animation-name:tuiFade}.t-message-text:before{content:\"\";line-height:1.5rem;vertical-align:bottom}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAnimated, selector: "[tuiAnimated]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
19
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
20
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiErrorComponent, isStandalone: true, selector: "tui-error", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class._error": "content()" } }, ngImport: i0, template: "@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n", styles: [":host{transition-property:grid-template-rows;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:grid;font:var(--tui-font-body-s);color:var(--tui-text-negative);overflow-wrap:break-word;grid-template-rows:0fr}:host._error{grid-template-rows:1fr}.t-message-text{white-space:pre-line;grid-area:1 / 1 / span 2;overflow:hidden}.t-message-text.tui-enter,.t-message-text.tui-leave{animation-name:tuiFade}.t-message-text:before{content:\"\";line-height:1.5rem;vertical-align:bottom}\n"], dependencies: [{ kind: "directive", type: PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: TuiAnimated, selector: "[tuiAnimated]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
20
21
  }
21
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiErrorComponent, decorators: [{
22
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiErrorComponent, decorators: [{
22
23
  type: Component,
23
24
  args: [{ selector: 'tui-error', imports: [PolymorpheusOutlet, TuiAnimated], changeDetection: ChangeDetectionStrategy.OnPush, host: {
24
25
  '[class._error]': 'content()',
25
- }, template: "@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n", styles: [":host{transition-property:grid-template-rows;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:grid;font:var(--tui-font-text-s);color:var(--tui-text-negative);overflow-wrap:break-word;grid-template-rows:0fr}:host._error{grid-template-rows:1fr}.t-message-text{white-space:pre-line;grid-area:1 / 1 / span 2;overflow:hidden}.t-message-text.tui-enter,.t-message-text.tui-leave{animation-name:tuiFade}.t-message-text:before{content:\"\";line-height:1.5rem;vertical-align:bottom}\n"] }]
26
+ }, template: "@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n", styles: [":host{transition-property:grid-template-rows;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;display:grid;font:var(--tui-font-body-s);color:var(--tui-text-negative);overflow-wrap:break-word;grid-template-rows:0fr}:host._error{grid-template-rows:1fr}.t-message-text{white-space:pre-line;grid-area:1 / 1 / span 2;overflow:hidden}.t-message-text.tui-enter,.t-message-text.tui-leave{animation-name:tuiFade}.t-message-text:before{content:\"\";line-height:1.5rem;vertical-align:bottom}\n"] }]
26
27
  }] });
27
28
 
28
29
  class TuiErrorDirective {
@@ -58,13 +59,13 @@ class TuiErrorDirective {
58
59
  }
59
60
  return getError(content, context);
60
61
  }
61
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
62
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiErrorDirective, isStandalone: true, selector: "tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName]", inputs: { order: { classPropertyName: "order", publicName: "order", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
62
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
63
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiErrorDirective, isStandalone: true, selector: "tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName]", inputs: { order: { classPropertyName: "order", publicName: "order", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
63
64
  tuiProvide(NG_VALUE_ACCESSOR, TuiErrorDirective, true),
64
65
  tuiProvide(NG_VALIDATORS, TuiErrorDirective, true),
65
66
  ], ngImport: i0 }); }
66
67
  }
67
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiErrorDirective, decorators: [{
68
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiErrorDirective, decorators: [{
68
69
  type: Directive,
69
70
  args: [{
70
71
  selector: 'tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName]',
@@ -102,10 +103,10 @@ class TuiErrorPipe {
102
103
  ? error.message(error.context)
103
104
  : error.message;
104
105
  }
105
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiErrorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
106
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiErrorPipe, isStandalone: true, name: "tuiError", pure: false }); }
106
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiErrorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
107
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiErrorPipe, isStandalone: true, name: "tuiError", pure: false }); }
107
108
  }
108
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiErrorPipe, decorators: [{
109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiErrorPipe, decorators: [{
109
110
  type: Pipe,
110
111
  args: [{
111
112
  name: 'tuiError',
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-error.mjs","sources":["../../../projects/core/components/error/error.component.ts","../../../projects/core/components/error/error.template.html","../../../projects/core/components/error/error.directive.ts","../../../projects/core/components/error/error.pipe.ts","../../../projects/core/components/error/error.ts","../../../projects/core/components/error/taiga-ui-core-components-error.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DEFAULT_ERROR_MESSAGE} from '@taiga-ui/core/tokens';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-error',\n imports: [PolymorpheusOutlet, TuiAnimated],\n templateUrl: './error.template.html',\n styleUrl: './error.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._error]': 'content()',\n },\n})\nexport class TuiErrorComponent {\n protected readonly default = inject(TUI_DEFAULT_ERROR_MESSAGE);\n protected readonly content = computed((error = this.error()) =>\n tuiIsString(error) ? new TuiValidationError(error) : error,\n );\n\n public readonly error = input<TuiValidationError | string | null>(null);\n}\n","@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n","import {\n computed,\n Directive,\n inject,\n input,\n isSignal,\n type Signal,\n TemplateRef,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {\n type AbstractControl,\n type ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n type ValidationErrors,\n type Validator,\n} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {\n tuiDirectiveBinding,\n tuiIsString,\n tuiProvide,\n} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/core/tokens';\nimport {\n PolymorpheusComponent,\n type PolymorpheusContent,\n PolymorpheusTemplate,\n} from '@taiga-ui/polymorpheus';\nimport {distinctUntilChanged, map, startWith, Subject, switchMap} from 'rxjs';\n\nimport {TuiErrorComponent} from './error.component';\n\n@Directive({\n selector:\n 'tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName]',\n providers: [\n tuiProvide(NG_VALUE_ACCESSOR, TuiErrorDirective, true),\n tuiProvide(NG_VALIDATORS, TuiErrorDirective, true),\n ],\n})\nexport class TuiErrorDirective implements ControlValueAccessor, Validator {\n private readonly content = inject(TUI_VALIDATION_ERRORS);\n private readonly control = new Subject<AbstractControl>();\n\n private readonly errors = toSignal(\n this.control.pipe(\n distinctUntilChanged(),\n switchMap((control) =>\n control.events.pipe(\n startWith(null),\n map(() => control.invalid && control.touched && control.errors),\n ),\n ),\n ),\n );\n\n private readonly key = computed(\n (errors = this.errors() || {}) =>\n this.order().find((id) => errors[id]) || Object.keys(errors)[0] || '',\n );\n\n public readonly order = input<readonly string[]>([]);\n public readonly error = tuiDirectiveBinding(\n TuiErrorComponent,\n 'error',\n computed(\n (errors = this.errors() || null) =>\n errors && this.getError(errors[this.key()], this.content[this.key()]),\n ),\n {self: true, optional: true},\n );\n\n public registerOnChange(): void {}\n public registerOnTouched(): void {}\n public writeValue(): void {}\n public validate(control: AbstractControl): ValidationErrors | null {\n this.control.next(control);\n\n return null;\n }\n\n private getError(\n context: unknown,\n content?: PolymorpheusContent | Signal<PolymorpheusContent>,\n ): TuiValidationError {\n context = isSignal(context) ? context() : context;\n\n if (context instanceof TuiValidationError) {\n return context;\n }\n\n if (content === undefined && isContent(context)) {\n return getError(context);\n }\n\n if (isSignal(content)) {\n return getError(content(), context);\n }\n\n if (content instanceof Function) {\n const message = content(context);\n\n return getError(isSignal(message) ? message() : message, context);\n }\n\n return getError(content, context);\n }\n}\n\nfunction getError(content: unknown = '', context?: any): TuiValidationError {\n return new TuiValidationError(content as PolymorpheusContent, context);\n}\n\nfunction isContent(value: unknown): value is PolymorpheusContent {\n return (\n tuiIsString(value) ||\n value instanceof TemplateRef ||\n value instanceof PolymorpheusTemplate ||\n value instanceof PolymorpheusComponent\n );\n}\n","import {inject, Pipe, type PipeTransform, untracked} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {tuiSetSignal} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TuiErrorDirective} from './error.directive';\n\n@Pipe({\n name: 'tuiError',\n pure: false,\n})\nexport class TuiErrorPipe implements PipeTransform {\n private readonly control = inject(NgControl);\n private readonly directive = new TuiErrorDirective();\n\n public transform(order: readonly string[]): PolymorpheusContent {\n untracked(() => {\n this.directive.validate(this.control.control!);\n tuiSetSignal(this.directive.order, order);\n });\n\n const error = this.directive.error();\n\n if (!error) {\n return '';\n }\n\n return typeof error.message === 'function'\n ? error.message(error.context)\n : error.message;\n }\n}\n","import {TuiErrorComponent} from './error.component';\nimport {TuiErrorDirective} from './error.directive';\nimport {TuiErrorPipe} from './error.pipe';\n\nexport const TuiError = [TuiErrorComponent, TuiErrorDirective, TuiErrorPipe] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;MAiBa,iBAAiB,CAAA;AAV9B,IAAA,WAAA,GAAA;AAWu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AAkBvD;AAhBU,IAAA,SAAS,CAAC,KAAwB,EAAA;QACrC,SAAS,CAAC,MAAK;YACX,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,OAAQ,CAAC;YAC9C,YAAY,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,KAAK,CAAC;AAC7C,SAAC,CAAC;QAEF,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE;QAEpC,IAAI,CAAC,KAAK,EAAE;AACR,YAAA,OAAO,EAAE;;AAGb,QAAA,OAAO,OAAO,KAAK,CAAC,OAAO,KAAK;cAC1B,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO;AAC7B,cAAE,KAAK,CAAC,OAAO;;+GAlBd,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,IAAI,EAAE,KAAK;AACd,iBAAA;;;ACNY,MAAA,QAAQ,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,YAAY;;ACJ3E;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-error.mjs","sources":["../../../projects/core/components/error/error.component.ts","../../../projects/core/components/error/error.template.html","../../../projects/core/components/error/error.directive.ts","../../../projects/core/components/error/error.pipe.ts","../../../projects/core/components/error/error.ts","../../../projects/core/components/error/taiga-ui-core-components-error.ts"],"sourcesContent":["import {ChangeDetectionStrategy, Component, computed, inject, input} from '@angular/core';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {TuiAnimated} from '@taiga-ui/cdk/directives/animated';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DEFAULT_ERROR_MESSAGE} from '@taiga-ui/core/tokens';\nimport {PolymorpheusOutlet} from '@taiga-ui/polymorpheus';\n\n@Component({\n selector: 'tui-error',\n imports: [PolymorpheusOutlet, TuiAnimated],\n templateUrl: './error.template.html',\n styleUrl: './error.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[class._error]': 'content()',\n },\n})\nexport class TuiErrorComponent {\n protected readonly default = inject(TUI_DEFAULT_ERROR_MESSAGE);\n protected readonly content = computed((error = this.error()) =>\n tuiIsString(error) ? new TuiValidationError(error) : error,\n );\n\n public readonly error = input<TuiValidationError | string | null>(null);\n}\n","@if (content(); as error) {\n <span\n tuiAnimated\n class=\"t-message-text\"\n >\n <span\n *polymorpheusOutlet=\"error.message || default() as text; context: error.context || {}\"\n [innerHTML]=\"text\"\n ></span>\n </span>\n}\n","import {\n computed,\n Directive,\n inject,\n input,\n isSignal,\n type Signal,\n TemplateRef,\n} from '@angular/core';\nimport {toSignal} from '@angular/core/rxjs-interop';\nimport {\n type AbstractControl,\n type ControlValueAccessor,\n NG_VALIDATORS,\n NG_VALUE_ACCESSOR,\n type ValidationErrors,\n type Validator,\n} from '@angular/forms';\nimport {TuiValidationError} from '@taiga-ui/cdk/classes';\nimport {tuiDirectiveBinding, tuiProvide} from '@taiga-ui/cdk/utils/di';\nimport {tuiIsString} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_VALIDATION_ERRORS} from '@taiga-ui/core/tokens';\nimport {\n PolymorpheusComponent,\n type PolymorpheusContent,\n PolymorpheusTemplate,\n} from '@taiga-ui/polymorpheus';\nimport {distinctUntilChanged, map, startWith, Subject, switchMap} from 'rxjs';\n\nimport {TuiErrorComponent} from './error.component';\n\n@Directive({\n selector:\n 'tui-error[ngModel], tui-error[formControlName], tui-error[formControl], tui-error[formGroup], tui-error[formGroupName], tui-error[formArrayName]',\n providers: [\n tuiProvide(NG_VALUE_ACCESSOR, TuiErrorDirective, true),\n tuiProvide(NG_VALIDATORS, TuiErrorDirective, true),\n ],\n})\nexport class TuiErrorDirective implements ControlValueAccessor, Validator {\n private readonly content = inject(TUI_VALIDATION_ERRORS);\n private readonly control = new Subject<AbstractControl>();\n\n private readonly errors = toSignal(\n this.control.pipe(\n distinctUntilChanged(),\n switchMap((control) =>\n control.events.pipe(\n startWith(null),\n map(() => control.invalid && control.touched && control.errors),\n ),\n ),\n ),\n );\n\n private readonly key = computed(\n (errors = this.errors() || {}) =>\n this.order().find((id) => errors[id]) || Object.keys(errors)[0] || '',\n );\n\n public readonly order = input<readonly string[]>([]);\n public readonly error = tuiDirectiveBinding(\n TuiErrorComponent,\n 'error',\n computed(\n (errors = this.errors() || null) =>\n errors && this.getError(errors[this.key()], this.content[this.key()]),\n ),\n {self: true, optional: true},\n );\n\n public registerOnChange(): void {}\n public registerOnTouched(): void {}\n public writeValue(): void {}\n public validate(control: AbstractControl): ValidationErrors | null {\n this.control.next(control);\n\n return null;\n }\n\n private getError(\n context: unknown,\n content?: PolymorpheusContent | Signal<PolymorpheusContent>,\n ): TuiValidationError {\n context = isSignal(context) ? context() : context;\n\n if (context instanceof TuiValidationError) {\n return context;\n }\n\n if (content === undefined && isContent(context)) {\n return getError(context);\n }\n\n if (isSignal(content)) {\n return getError(content(), context);\n }\n\n if (content instanceof Function) {\n const message = content(context);\n\n return getError(isSignal(message) ? message() : message, context);\n }\n\n return getError(content, context);\n }\n}\n\nfunction getError(content: unknown = '', context?: any): TuiValidationError {\n return new TuiValidationError(content as PolymorpheusContent, context);\n}\n\nfunction isContent(value: unknown): value is PolymorpheusContent {\n return (\n tuiIsString(value) ||\n value instanceof TemplateRef ||\n value instanceof PolymorpheusTemplate ||\n value instanceof PolymorpheusComponent\n );\n}\n","import {inject, Pipe, type PipeTransform, untracked} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {tuiSetSignal} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TuiErrorDirective} from './error.directive';\n\n@Pipe({\n name: 'tuiError',\n pure: false,\n})\nexport class TuiErrorPipe implements PipeTransform {\n private readonly control = inject(NgControl);\n private readonly directive = new TuiErrorDirective();\n\n public transform(order: readonly string[]): PolymorpheusContent {\n untracked(() => {\n this.directive.validate(this.control.control!);\n tuiSetSignal(this.directive.order, order);\n });\n\n const error = this.directive.error();\n\n if (!error) {\n return '';\n }\n\n return typeof error.message === 'function'\n ? error.message(error.context)\n : error.message;\n }\n}\n","import {TuiErrorComponent} from './error.component';\nimport {TuiErrorDirective} from './error.directive';\nimport {TuiErrorPipe} from './error.pipe';\n\nexport const TuiError = [TuiErrorComponent, TuiErrorDirective, TuiErrorPipe] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAiBa,iBAAiB,CAAA;AAV9B,IAAA,WAAA,GAAA;AAWuB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,yBAAyB,CAAC;AAC3C,QAAA,IAAA,CAAA,OAAO,GAAG,QAAQ,CAAC,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,KACvD,WAAW,CAAC,KAAK,CAAC,GAAG,IAAI,kBAAkB,CAAC,KAAK,CAAC,GAAG,KAAK,CAC7D;AAEe,QAAA,IAAA,CAAA,KAAK,GAAG,KAAK,CAAqC,IAAI,CAAC;AAC1E;+GAPY,iBAAiB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAjB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,iBAAiB,ECjB9B,YAAA,EAAA,IAAA,EAAA,Q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AZ,YAAY,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,UAAA,EAAA,IAAA,EAAA,KAAA,EAAA,CAAA,CAAA;;4FAAZ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,UAAU;AAChB,oBAAA,IAAI,EAAE,KAAK;AACd,iBAAA;;;ACNY,MAAA,QAAQ,GAAG,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,YAAY;;ACJ3E;;AAEG;;;;"}
@@ -17,8 +17,8 @@ class TuiExpand {
17
17
  this.open.set(this.expanded());
18
18
  }
19
19
  }
20
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiExpand, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiExpand, isStandalone: true, selector: "tui-expand", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "transitionend.self": "onTransitionEnd($event)" }, properties: { "class._expanded": "expanded()", "class._open": "open()" } }, queries: [{ propertyName: "content", first: true, predicate: TuiItem, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: `
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiExpand, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
21
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: TuiExpand, isStandalone: true, selector: "tui-expand", inputs: { expanded: { classPropertyName: "expanded", publicName: "expanded", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "transitionend.self": "onTransitionEnd($event)" }, properties: { "class._expanded": "expanded()", "class._open": "open()" } }, queries: [{ propertyName: "content", first: true, predicate: TuiItem, descendants: true, read: TemplateRef, isSignal: true }], ngImport: i0, template: `
22
22
  <div class="t-wrapper">
23
23
  @if (expanded() || open()) {
24
24
  <ng-container [ngTemplateOutlet]="content() || null" />
@@ -27,7 +27,7 @@ class TuiExpand {
27
27
  </div>
28
28
  `, isInline: true, styles: [":host{transition-property:grid-template-rows,padding;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:grid;grid-template-rows:0fr;transition-delay:1ms}:host:not(._expanded){padding-block:0}:host._expanded{grid-template-rows:1fr}:host._expanded>.t-wrapper{opacity:1;visibility:visible}:host._expanded._open>.t-wrapper{overflow:visible}.t-wrapper{transition-property:all;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;grid-row:1 / span 2;overflow:hidden;opacity:0;visibility:hidden}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
29
29
  }
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiExpand, decorators: [{
30
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiExpand, decorators: [{
31
31
  type: Component,
32
32
  args: [{ selector: 'tui-expand', imports: [NgTemplateOutlet], template: `
33
33
  <div class="t-wrapper">
@@ -1,7 +1,7 @@
1
1
  import * as i0 from '@angular/core';
2
2
  import { inject, computed, input, ChangeDetectionStrategy, ViewEncapsulation, Component, Pipe } from '@angular/core';
3
- import * as i1 from '@taiga-ui/core/directives';
4
- import { TuiIcons } from '@taiga-ui/core/directives';
3
+ import * as i1 from '@taiga-ui/core/directives/icons';
4
+ import { TuiIcons } from '@taiga-ui/core/directives/icons';
5
5
  import { tuiInjectIconResolver } from '@taiga-ui/core/tokens';
6
6
 
7
7
  class TuiIcon {
@@ -10,10 +10,10 @@ class TuiIcon {
10
10
  this.mask = computed(() => this.icons.resolve(this.background()));
11
11
  this.background = input('');
12
12
  }
13
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.15", type: TuiIcon, isStandalone: true, selector: "tui-icon:not([tuiBadge])", inputs: { background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--t-icon-bg": "mask()" } }, hostDirectives: [{ directive: i1.TuiIcons, inputs: ["iconStart", "icon", "iconEnd", "badge"] }], ngImport: i0, template: '', isInline: true, styles: ["tui-icon{--tui-icon-size: 1em;position:relative;display:inline-flex;inline-size:1em;block-size:1em;font-size:1.5rem;flex-shrink:0;border:0 solid transparent;vertical-align:middle;box-sizing:border-box;mask:var(--t-icon-bg) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%}@media (hover: hover) and (pointer: fine){tui-icon[data-appearance=icon]:hover{color:var(--tui-text-secondary)}}tui-icon[data-icon-end]:before{-webkit-mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}tui-icon[data-icon-end][data-icon-start=img]:before,tui-icon[data-icon-end][data-icon-start=font]:before{mask:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em)}tui-icon[data-icon-end]:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:after{transform:translate(36%,36%);--tui-icon-size: .5715em}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
13
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiIcon, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
14
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.17", type: TuiIcon, isStandalone: true, selector: "tui-icon:not([tuiBadge])", inputs: { background: { classPropertyName: "background", publicName: "background", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "style.--t-icon-bg": "mask()" } }, hostDirectives: [{ directive: i1.TuiIcons, inputs: ["iconStart", "icon", "iconEnd", "badge"] }], ngImport: i0, template: '', isInline: true, styles: ["tui-icon{--tui-icon-size: 1em;position:relative;display:inline-flex;inline-size:1em;block-size:1em;font-size:1.5rem;flex-shrink:0;border:0 solid transparent;vertical-align:middle;box-sizing:border-box;mask:var(--t-icon-bg) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;zoom:calc(100%*min(max(var(--tui-font-offset) - 10px,0px),1px)/.8px)}@media (hover: hover) and (pointer: fine){tui-icon[data-appearance=icon]:hover{color:var(--tui-text-secondary)}}tui-icon[data-icon-end]:before{-webkit-mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}tui-icon[data-icon-end][data-icon-start=img]:before,tui-icon[data-icon-end][data-icon-start=font]:before{mask:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em)}tui-icon[data-icon-end]:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:after{transform:translate(36%,36%);--tui-icon-size: .5715em}tui-icon[data-icon-start=img]:before,tui-icon[data-icon-end=img]:after{zoom:1}tui-icon[data-icon-start=font]:before,tui-icon[data-icon-end=font]:after{zoom:.667}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
15
15
  }
16
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIcon, decorators: [{
16
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiIcon, decorators: [{
17
17
  type: Component,
18
18
  args: [{ selector: 'tui-icon:not([tuiBadge])', template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, hostDirectives: [
19
19
  {
@@ -22,17 +22,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
22
22
  },
23
23
  ], host: {
24
24
  '[style.--t-icon-bg]': 'mask()',
25
- }, styles: ["tui-icon{--tui-icon-size: 1em;position:relative;display:inline-flex;inline-size:1em;block-size:1em;font-size:1.5rem;flex-shrink:0;border:0 solid transparent;vertical-align:middle;box-sizing:border-box;mask:var(--t-icon-bg) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%}@media (hover: hover) and (pointer: fine){tui-icon[data-appearance=icon]:hover{color:var(--tui-text-secondary)}}tui-icon[data-icon-end]:before{-webkit-mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}tui-icon[data-icon-end][data-icon-start=img]:before,tui-icon[data-icon-end][data-icon-start=font]:before{mask:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em)}tui-icon[data-icon-end]:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:after{transform:translate(36%,36%);--tui-icon-size: .5715em}\n"] }]
25
+ }, styles: ["tui-icon{--tui-icon-size: 1em;position:relative;display:inline-flex;inline-size:1em;block-size:1em;font-size:1.5rem;flex-shrink:0;border:0 solid transparent;vertical-align:middle;box-sizing:border-box;mask:var(--t-icon-bg) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;zoom:calc(100%*min(max(var(--tui-font-offset) - 10px,0px),1px)/.8px)}@media (hover: hover) and (pointer: fine){tui-icon[data-appearance=icon]:hover{color:var(--tui-text-secondary)}}tui-icon[data-icon-end]:before{-webkit-mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);mask-image:var(--t-icon-start),radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em);-webkit-mask-composite:source-in;mask-composite:intersect}tui-icon[data-icon-end][data-icon-start=img]:before,tui-icon[data-icon-end][data-icon-start=font]:before{mask:radial-gradient(circle at bottom .1em right .1em,transparent calc(.4em - .5px),#000 .4em)}tui-icon[data-icon-end]:after{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:before{position:absolute;top:0;left:0;inline-size:100%;block-size:100%}tui-icon[data-icon-start]:after{transform:translate(36%,36%);--tui-icon-size: .5715em}tui-icon[data-icon-start=img]:before,tui-icon[data-icon-end=img]:after{zoom:1}tui-icon[data-icon-start=font]:before,tui-icon[data-icon-end=font]:after{zoom:.667}\n"] }]
26
26
  }] });
27
27
 
28
28
  class TuiIconPipe {
29
29
  constructor() {
30
30
  this.transform = tuiInjectIconResolver();
31
31
  }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIconPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
33
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiIconPipe, isStandalone: true, name: "tuiIcon" }); }
32
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiIconPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
33
+ static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.17", ngImport: i0, type: TuiIconPipe, isStandalone: true, name: "tuiIcon" }); }
34
34
  }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiIconPipe, decorators: [{
35
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiIconPipe, decorators: [{
36
36
  type: Pipe,
37
37
  args: [{
38
38
  name: 'tuiIcon',
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-icon.mjs","sources":["../../../projects/core/components/icon/icon.component.ts","../../../projects/core/components/icon/icon.pipe.ts","../../../projects/core/components/icon/taiga-ui-core-components-icon.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiIcons} from '@taiga-ui/core/directives';\n\n@Component({\n // :not([tuiBadge]) is required to avoid double matching of TuiIcons\n selector: 'tui-icon:not([tuiBadge])',\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/icon.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: TuiIcons,\n inputs: ['iconStart: icon', 'iconEnd: badge'],\n },\n ],\n host: {\n '[style.--t-icon-bg]': 'mask()',\n },\n})\nexport class TuiIcon {\n protected readonly icons = inject(TuiIcons);\n protected readonly mask = computed(() => this.icons.resolve(this.background()));\n\n public readonly background = input('');\n}\n","import {Pipe, type PipeTransform} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectIconResolver} from '@taiga-ui/core/tokens';\n\n@Pipe({\n name: 'tuiIcon',\n})\nexport class TuiIconPipe implements PipeTransform {\n public readonly transform: TuiStringHandler<string> = tuiInjectIconResolver();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA2Ba,OAAO,CAAA;AAjBpB,IAAA,WAAA,GAAA;AAkBuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;AACxB,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AAE/D,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC;AACzC;+GALY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,iYAdN,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,8sCAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAcH,OAAO,EAAA,UAAA,EAAA,CAAA;kBAjBnB,SAAS;+BAEI,0BAA0B,EAAA,QAAA,EAC1B,EAAE,EAAA,aAAA,EAEG,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAC/B,cAAA,EAAA;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,QAAQ;AACnB,4BAAA,MAAM,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;AAChD,yBAAA;qBACJ,EACK,IAAA,EAAA;AACF,wBAAA,qBAAqB,EAAE,QAAQ;AAClC,qBAAA,EAAA,MAAA,EAAA,CAAA,8sCAAA,CAAA,EAAA;;;MClBQ,WAAW,CAAA;AAHxB,IAAA,WAAA,GAAA;QAIoB,IAAS,CAAA,SAAA,GAA6B,qBAAqB,EAAE;AAChF;+GAFY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,CAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,SAAS;AAClB,iBAAA;;;ACND;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-icon.mjs","sources":["../../../projects/core/components/icon/icon.component.ts","../../../projects/core/components/icon/icon.pipe.ts","../../../projects/core/components/icon/taiga-ui-core-components-icon.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {TuiIcons} from '@taiga-ui/core/directives/icons';\n\n@Component({\n // :not([tuiBadge]) is required to avoid double matching of TuiIcons\n selector: 'tui-icon:not([tuiBadge])',\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/icon.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n hostDirectives: [\n {\n directive: TuiIcons,\n inputs: ['iconStart: icon', 'iconEnd: badge'],\n },\n ],\n host: {\n '[style.--t-icon-bg]': 'mask()',\n },\n})\nexport class TuiIcon {\n protected readonly icons = inject(TuiIcons);\n protected readonly mask = computed(() => this.icons.resolve(this.background()));\n\n public readonly background = input('');\n}\n","import {Pipe, type PipeTransform} from '@angular/core';\nimport {type TuiStringHandler} from '@taiga-ui/cdk/types';\nimport {tuiInjectIconResolver} from '@taiga-ui/core/tokens';\n\n@Pipe({\n name: 'tuiIcon',\n})\nexport class TuiIconPipe implements PipeTransform {\n public readonly transform: TuiStringHandler<string> = tuiInjectIconResolver();\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;MA2Ba,OAAO,CAAA;AAjBpB,IAAA,WAAA,GAAA;AAkBuB,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC;AACxB,QAAA,IAAA,CAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,CAAC;AAE/D,QAAA,IAAA,CAAA,UAAU,GAAG,KAAK,CAAC,EAAE,CAAC;AACzC;+GALY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,iYAdN,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,o7CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAcH,OAAO,EAAA,UAAA,EAAA,CAAA;kBAjBnB,SAAS;+BAEI,0BAA0B,EAAA,QAAA,EAC1B,EAAE,EAAA,aAAA,EAEG,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EAC/B,cAAA,EAAA;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,QAAQ;AACnB,4BAAA,MAAM,EAAE,CAAC,iBAAiB,EAAE,gBAAgB,CAAC;AAChD,yBAAA;qBACJ,EACK,IAAA,EAAA;AACF,wBAAA,qBAAqB,EAAE,QAAQ;AAClC,qBAAA,EAAA,MAAA,EAAA,CAAA,o7CAAA,CAAA,EAAA;;;MClBQ,WAAW,CAAA;AAHxB,IAAA,WAAA,GAAA;QAIoB,IAAS,CAAA,SAAA,GAA6B,qBAAqB,EAAE;AAChF;+GAFY,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,IAAA,EAAA,CAAA,CAAA;6GAAX,WAAW,EAAA,YAAA,EAAA,IAAA,EAAA,IAAA,EAAA,SAAA,EAAA,CAAA,CAAA;;4FAAX,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,IAAI;AAAC,YAAA,IAAA,EAAA,CAAA;AACF,oBAAA,IAAI,EAAE,SAAS;AAClB,iBAAA;;;ACND;;AAEG;;;;"}
@@ -0,0 +1,103 @@
1
+ import { TuiLabel } from '@taiga-ui/core/components/label';
2
+ import { TuiTextfieldComponent, TUI_TEXTFIELD_OPTIONS, tuiAsTextfieldAccessor, TuiTextfieldOptionsDirective } from '@taiga-ui/core/components/textfield';
3
+ import { TuiDropdownContent } from '@taiga-ui/core/portals/dropdown';
4
+ import * as i0 from '@angular/core';
5
+ import { inject, computed, input, Directive } from '@angular/core';
6
+ import { NgControl } from '@angular/forms';
7
+ import * as i1 from '@taiga-ui/cdk/directives/native-validator';
8
+ import { TuiNativeValidator } from '@taiga-ui/cdk/directives/native-validator';
9
+ import { tuiInjectElement, tuiValue } from '@taiga-ui/cdk/utils/dom';
10
+ import { tuiAppearance, tuiAppearanceState, tuiAppearanceMode, tuiAppearanceFocus } from '@taiga-ui/core/directives/appearance';
11
+ import { TUI_ITEMS_HANDLERS } from '@taiga-ui/core/directives/items-handlers';
12
+
13
+ class TuiInputDirective {
14
+ constructor() {
15
+ this.el = tuiInjectElement();
16
+ this.control = inject(NgControl, { optional: true });
17
+ this.handlers = inject(TUI_ITEMS_HANDLERS);
18
+ this.textfield = inject(TuiTextfieldComponent);
19
+ this.a = tuiAppearance(inject(TUI_TEXTFIELD_OPTIONS).appearance);
20
+ this.s = tuiAppearanceState(computed(() => this.state()));
21
+ this.m = tuiAppearanceMode(computed(() => this.mode()));
22
+ this.f = tuiAppearanceFocus(computed(() => this.focused() ?? this.textfield.focused()));
23
+ this.readOnly = input(false);
24
+ this.invalid = input(null);
25
+ this.focused = input(null);
26
+ this.state = input(null);
27
+ this.value = tuiValue(this.el);
28
+ this.mode = computed(() => {
29
+ if (this.readOnly()) {
30
+ return 'readonly';
31
+ }
32
+ if (this.invalid() === false) {
33
+ return 'valid';
34
+ }
35
+ if (this.invalid()) {
36
+ return 'invalid';
37
+ }
38
+ return null;
39
+ });
40
+ }
41
+ setValue(value) {
42
+ this.el.focus();
43
+ this.el.select();
44
+ if (value == null) {
45
+ this.el.ownerDocument.execCommand('delete');
46
+ // see https://github.com/taiga-family/taiga-ui/issues/11634
47
+ // ensure non-erasable affixes actually deleted
48
+ this.el.value = '';
49
+ }
50
+ else {
51
+ this.el.ownerDocument.execCommand('insertText', false, this.handlers.stringify()(value));
52
+ }
53
+ }
54
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
55
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.17", type: TuiInputDirective, isStandalone: true, selector: "input[tuiInput]", inputs: { readOnly: { classPropertyName: "readOnly", publicName: "readOnly", isSignal: true, isRequired: false, transformFunction: null }, invalid: { classPropertyName: "invalid", publicName: "invalid", isSignal: true, isRequired: false, transformFunction: null }, focused: { classPropertyName: "focused", publicName: "focused", isSignal: true, isRequired: false, transformFunction: null }, state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiInput": "" }, listeners: { "input": "0", "focusin": "0", "focusout": "0" }, properties: { "id": "textfield.id", "readOnly": "readOnly()", "class._empty": "value() === \"\"" } }, providers: [tuiAsTextfieldAccessor(TuiInputDirective)], hostDirectives: [{ directive: i1.TuiNativeValidator }], ngImport: i0 }); }
56
+ }
57
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiInputDirective, decorators: [{
58
+ type: Directive,
59
+ args: [{
60
+ selector: 'input[tuiInput]',
61
+ providers: [tuiAsTextfieldAccessor(TuiInputDirective)],
62
+ hostDirectives: [TuiNativeValidator],
63
+ host: {
64
+ tuiInput: '',
65
+ '[id]': 'textfield.id',
66
+ '[readOnly]': 'readOnly()',
67
+ '[class._empty]': 'value() === ""',
68
+ '(input)': '0',
69
+ '(focusin)': '0',
70
+ '(focusout)': '0',
71
+ },
72
+ }]
73
+ }] });
74
+ class TuiWithInput {
75
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiWithInput, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
76
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiWithInput, isStandalone: true, hostDirectives: [{ directive: TuiInputDirective, inputs: ["invalid", "invalid", "focused", "focused", "readOnly", "readOnly", "state", "state"] }], ngImport: i0 }); }
77
+ }
78
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiWithInput, decorators: [{
79
+ type: Directive,
80
+ args: [{
81
+ hostDirectives: [
82
+ {
83
+ directive: TuiInputDirective,
84
+ inputs: ['invalid', 'focused', 'readOnly', 'state'],
85
+ },
86
+ ],
87
+ }]
88
+ }] });
89
+
90
+ const TuiInput = [
91
+ TuiLabel,
92
+ TuiTextfieldComponent,
93
+ TuiTextfieldOptionsDirective,
94
+ TuiDropdownContent,
95
+ TuiInputDirective,
96
+ ];
97
+
98
+ /**
99
+ * Generated bundle index. Do not edit.
100
+ */
101
+
102
+ export { TuiInput, TuiInputDirective, TuiWithInput };
103
+ //# sourceMappingURL=taiga-ui-core-components-input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"taiga-ui-core-components-input.mjs","sources":["../../../projects/core/components/input/input.directive.ts","../../../projects/core/components/input/input.ts","../../../projects/core/components/input/taiga-ui-core-components-input.ts"],"sourcesContent":["import {computed, Directive, inject, input} from '@angular/core';\nimport {NgControl} from '@angular/forms';\nimport {TuiNativeValidator} from '@taiga-ui/cdk/directives/native-validator';\nimport {tuiInjectElement, tuiValue} from '@taiga-ui/cdk/utils/dom';\nimport {\n TUI_TEXTFIELD_OPTIONS,\n tuiAsTextfieldAccessor,\n type TuiTextfieldAccessor,\n TuiTextfieldComponent,\n} from '@taiga-ui/core/components/textfield';\nimport {\n tuiAppearance,\n tuiAppearanceFocus,\n tuiAppearanceMode,\n tuiAppearanceState,\n} from '@taiga-ui/core/directives/appearance';\nimport {\n TUI_ITEMS_HANDLERS,\n type TuiItemsHandlers,\n} from '@taiga-ui/core/directives/items-handlers';\nimport {type TuiInteractiveState} from '@taiga-ui/core/types';\n\n@Directive({\n selector: 'input[tuiInput]',\n providers: [tuiAsTextfieldAccessor(TuiInputDirective)],\n hostDirectives: [TuiNativeValidator],\n host: {\n tuiInput: '',\n '[id]': 'textfield.id',\n '[readOnly]': 'readOnly()',\n '[class._empty]': 'value() === \"\"',\n '(input)': '0',\n '(focusin)': '0',\n '(focusout)': '0',\n },\n})\nexport class TuiInputDirective<T> implements TuiTextfieldAccessor<T> {\n protected readonly el = tuiInjectElement<HTMLInputElement>();\n protected readonly control = inject(NgControl, {optional: true});\n protected readonly handlers: TuiItemsHandlers<T> = inject(TUI_ITEMS_HANDLERS);\n protected readonly textfield = inject(TuiTextfieldComponent);\n protected readonly a = tuiAppearance(inject(TUI_TEXTFIELD_OPTIONS).appearance);\n protected readonly s = tuiAppearanceState(computed(() => this.state()));\n protected readonly m = tuiAppearanceMode(computed(() => this.mode()));\n protected readonly f = tuiAppearanceFocus(\n computed(() => this.focused() ?? this.textfield.focused()),\n );\n\n public readonly readOnly = input(false);\n public readonly invalid = input<boolean | null>(null);\n public readonly focused = input<boolean | null>(null);\n public readonly state = input<TuiInteractiveState | null>(null);\n\n public readonly value = tuiValue(this.el);\n public readonly mode = computed<string | null>(() => {\n if (this.readOnly()) {\n return 'readonly';\n }\n\n if (this.invalid() === false) {\n return 'valid';\n }\n\n if (this.invalid()) {\n return 'invalid';\n }\n\n return null;\n });\n\n public setValue(value: T | null): void {\n this.el.focus();\n this.el.select();\n\n if (value == null) {\n this.el.ownerDocument.execCommand('delete');\n\n // see https://github.com/taiga-family/taiga-ui/issues/11634\n // ensure non-erasable affixes actually deleted\n this.el.value = '';\n } else {\n this.el.ownerDocument.execCommand(\n 'insertText',\n false,\n this.handlers.stringify()(value),\n );\n }\n }\n}\n\n@Directive({\n hostDirectives: [\n {\n directive: TuiInputDirective,\n inputs: ['invalid', 'focused', 'readOnly', 'state'],\n },\n ],\n})\nexport class TuiWithInput {}\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 {TuiInputDirective} from './input.directive';\n\nexport const TuiInput = [\n TuiLabel,\n TuiTextfieldComponent,\n TuiTextfieldOptionsDirective,\n TuiDropdownContent,\n TuiInputDirective,\n] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;MAoCa,iBAAiB,CAAA;AAd9B,IAAA,WAAA,GAAA;QAeuB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;QACzC,IAAO,CAAA,OAAA,GAAG,MAAM,CAAC,SAAS,EAAE,EAAC,QAAQ,EAAE,IAAI,EAAC,CAAC;AAC7C,QAAA,IAAA,CAAA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AClC,wBAAA,SAAS,EAAE,GAAG;AACd,wBAAA,WAAW,EAAE,GAAG;AAChB,wBAAA,YAAY,EAAE,GAAG;AACpB,qBAAA;AACJ,iBAAA;;MA+DY,YAAY,CAAA;+GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAZ,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,YAAY,oDA9DZ,iBAAiB,EAAA,MAAA,EAAA,CAAA,SAAA,EAAA,SAAA,EAAA,SAAA,EAAA,SAAA,EAAA,UAAA,EAAA,UAAA,EAAA,OAAA,EAAA,OAAA,CAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FA8DjB,YAAY,EAAA,UAAA,EAAA,CAAA;kBARxB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,cAAc,EAAE;AACZ,wBAAA;AACI,4BAAA,SAAS,EAAE,iBAAiB;4BAC5B,MAAM,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC;AACtD,yBAAA;AACJ,qBAAA;AACJ,iBAAA;;;ACxFY,MAAA,QAAQ,GAAG;IACpB,QAAQ;IACR,qBAAqB;IACrB,4BAA4B;IAC5B,kBAAkB;IAClB,iBAAiB;;;ACdrB;;AAEG;;;;"}
@@ -1,40 +1,38 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, ViewEncapsulation, Component, inject, forwardRef, ContentChild, Directive } from '@angular/core';
2
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, contentChild, forwardRef, inject, Directive } from '@angular/core';
3
3
  import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
4
4
  import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
5
5
  import { TUI_DATA_LIST_HOST } from '@taiga-ui/core/components/data-list';
6
6
 
7
7
  class Styles {
8
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-label" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiLabel]{display:flex;gap:.25rem;flex-direction:column;font:var(--tui-font-text-s);color:var(--tui-text-primary)}[tuiLabel]:not([data-orientation=vertical]){flex-direction:row;inline-size:fit-content;font:var(--tui-font-text-m)}[tuiLabel]:has(tui-textfield),[tuiLabel]:has(tui-primitive-textfield),[tuiLabel]:has(tui-textarea){flex-direction:column!important;inline-size:auto!important;font:var(--tui-font-text-s)!important}[tuiLabel] input[type=checkbox],[tuiLabel] input[type=radio]{margin-inline-end:.5rem}[tuiLabel] input[type=checkbox][data-size=s],[tuiLabel] input[type=radio][data-size=s]{margin-inline-end:.25rem;margin-block-start:.125rem}[tuiLabel] small{font:var(--tui-font-text-s)}[tuiLabel] [tuiTitle]{margin-block-start:.125rem}[tuiLabel] [tuiSubtitle]{color:var(--tui-text-secondary)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
8
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
9
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-label" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiLabel]{display:flex;gap:.25rem;flex-direction:column;font:var(--tui-font-body-s);color:var(--tui-text-primary)}[tuiLabel]:not([data-orientation=vertical]){flex-direction:row;inline-size:fit-content;font:var(--tui-font-body-m)}[tuiLabel] input[type=checkbox],[tuiLabel] input[type=radio]{margin-inline-end:.5rem}[tuiLabel] input[type=checkbox][data-size=s],[tuiLabel] input[type=radio][data-size=s]{margin-inline-end:.25rem;margin-block-start:.125rem}[tuiLabel] small{font:var(--tui-font-body-s)}[tuiLabel] [tuiTitle]{margin-block-start:.125rem}[tuiLabel] [tuiSubtitle]{color:var(--tui-text-secondary)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
10
10
  }
11
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
11
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, decorators: [{
12
12
  type: Component,
13
- args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-label' }, styles: ["[tuiLabel]{display:flex;gap:.25rem;flex-direction:column;font:var(--tui-font-text-s);color:var(--tui-text-primary)}[tuiLabel]:not([data-orientation=vertical]){flex-direction:row;inline-size:fit-content;font:var(--tui-font-text-m)}[tuiLabel]:has(tui-textfield),[tuiLabel]:has(tui-primitive-textfield),[tuiLabel]:has(tui-textarea){flex-direction:column!important;inline-size:auto!important;font:var(--tui-font-text-s)!important}[tuiLabel] input[type=checkbox],[tuiLabel] input[type=radio]{margin-inline-end:.5rem}[tuiLabel] input[type=checkbox][data-size=s],[tuiLabel] input[type=radio][data-size=s]{margin-inline-end:.25rem;margin-block-start:.125rem}[tuiLabel] small{font:var(--tui-font-text-s)}[tuiLabel] [tuiTitle]{margin-block-start:.125rem}[tuiLabel] [tuiSubtitle]{color:var(--tui-text-secondary)}\n"] }]
13
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-label' }, styles: ["[tuiLabel]{display:flex;gap:.25rem;flex-direction:column;font:var(--tui-font-body-s);color:var(--tui-text-primary)}[tuiLabel]:not([data-orientation=vertical]){flex-direction:row;inline-size:fit-content;font:var(--tui-font-body-m)}[tuiLabel] input[type=checkbox],[tuiLabel] input[type=radio]{margin-inline-end:.5rem}[tuiLabel] input[type=checkbox][data-size=s],[tuiLabel] input[type=radio][data-size=s]{margin-inline-end:.25rem;margin-block-start:.125rem}[tuiLabel] small{font:var(--tui-font-body-s)}[tuiLabel] [tuiTitle]{margin-block-start:.125rem}[tuiLabel] [tuiSubtitle]{color:var(--tui-text-secondary)}\n"] }]
14
14
  }] });
15
15
  // TODO: Replace TUI_DATA_LIST_HOST with proper token once we refactor textfields
16
16
  class TuiLabel {
17
17
  constructor() {
18
+ this.textfield = contentChild(forwardRef(() => TUI_DATA_LIST_HOST));
18
19
  this.el = tuiInjectElement();
19
20
  this.nothing = tuiWithStyles(Styles);
20
21
  this.parent = inject(forwardRef(() => TUI_DATA_LIST_HOST), { optional: true });
21
22
  }
22
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
23
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiLabel, isStandalone: true, selector: "label[tuiLabel]", host: { properties: { "attr.for": "el.htmlFor || parent?.id", "attr.data-orientation": "textfield ? \"vertical\" : \"horizontal\"" } }, queries: [{ propertyName: "textfield", first: true, predicate: i0.forwardRef(() => TUI_DATA_LIST_HOST), descendants: true }], ngImport: i0 }); }
23
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
24
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.17", type: TuiLabel, isStandalone: true, selector: "label[tuiLabel]", host: { properties: { "attr.for": "el.htmlFor || parent?.id", "attr.data-orientation": "textfield() ? \"vertical\" : \"horizontal\"" } }, queries: [{ propertyName: "textfield", first: true, predicate: i0.forwardRef(() => TUI_DATA_LIST_HOST), descendants: true, isSignal: true }], ngImport: i0 }); }
24
25
  }
25
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLabel, decorators: [{
26
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLabel, decorators: [{
26
27
  type: Directive,
27
28
  args: [{
28
29
  selector: 'label[tuiLabel]',
29
30
  host: {
30
31
  '[attr.for]': 'el.htmlFor || parent?.id',
31
- '[attr.data-orientation]': 'textfield ? "vertical" : "horizontal"',
32
+ '[attr.data-orientation]': 'textfield() ? "vertical" : "horizontal"',
32
33
  },
33
34
  }]
34
- }], propDecorators: { textfield: [{
35
- type: ContentChild,
36
- args: [forwardRef(() => TUI_DATA_LIST_HOST)]
37
- }] } });
35
+ }] });
38
36
 
39
37
  /**
40
38
  * Generated bundle index. Do not edit.
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-label.mjs","sources":["../../../projects/core/components/label/label.directive.ts","../../../projects/core/components/label/taiga-ui-core-components-label.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n Directive,\n forwardRef,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DATA_LIST_HOST} from '@taiga-ui/core/components/data-list';\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/label.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-label'},\n})\nclass Styles {}\n\n// TODO: Replace TUI_DATA_LIST_HOST with proper token once we refactor textfields\n@Directive({\n selector: 'label[tuiLabel]',\n host: {\n '[attr.for]': 'el.htmlFor || parent?.id',\n '[attr.data-orientation]': 'textfield ? \"vertical\" : \"horizontal\"',\n },\n})\nexport class TuiLabel {\n @ContentChild(forwardRef(() => TUI_DATA_LIST_HOST))\n protected readonly textfield?: unknown;\n\n protected readonly el = tuiInjectElement<HTMLLabelElement>();\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly parent = inject(\n forwardRef(() => TUI_DATA_LIST_HOST),\n {optional: true},\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaA,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,+GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,qyBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,WAAW,EAAC,EAAA,MAAA,EAAA,CAAA,qyBAAA,CAAA,EAAA;;AAI9B;MAQa,QAAQ,CAAA;AAPrB,IAAA,WAAA,GAAA;QAWuB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;AAC/B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAC9B,UAAU,CAAC,MAAM,kBAAkB,CAAC,EACpC,EAAC,QAAQ,EAAE,IAAI,EAAC,CACnB;AACJ;+GAVY,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAR,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,QAAQ,8QACc,kBAAkB,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FADxC,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAPpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACF,wBAAA,YAAY,EAAE,0BAA0B;AACxC,wBAAA,yBAAyB,EAAE,uCAAuC;AACrE,qBAAA;AACJ,iBAAA;8BAGsB,SAAS,EAAA,CAAA;sBAD3B,YAAY;AAAC,gBAAA,IAAA,EAAA,CAAA,UAAU,CAAC,MAAM,kBAAkB,CAAC;;;AC/BtD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-label.mjs","sources":["../../../projects/core/components/label/label.directive.ts","../../../projects/core/components/label/taiga-ui-core-components-label.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n contentChild,\n Directive,\n forwardRef,\n inject,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {TUI_DATA_LIST_HOST} from '@taiga-ui/core/components/data-list';\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/label.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-label'},\n})\nclass Styles {}\n\n// TODO: Replace TUI_DATA_LIST_HOST with proper token once we refactor textfields\n@Directive({\n selector: 'label[tuiLabel]',\n host: {\n '[attr.for]': 'el.htmlFor || parent?.id',\n '[attr.data-orientation]': 'textfield() ? \"vertical\" : \"horizontal\"',\n },\n})\nexport class TuiLabel {\n protected readonly textfield = contentChild(forwardRef(() => TUI_DATA_LIST_HOST));\n protected readonly el = tuiInjectElement<HTMLLabelElement>();\n protected readonly nothing = tuiWithStyles(Styles);\n protected readonly parent = inject(\n forwardRef(() => TUI_DATA_LIST_HOST),\n {optional: true},\n );\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAaA,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,+GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,imBAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,WAAW,EAAC,EAAA,MAAA,EAAA,CAAA,imBAAA,CAAA,EAAA;;AAI9B;MAQa,QAAQ,CAAA;AAPrB,IAAA,WAAA,GAAA;QAQuB,IAAS,CAAA,SAAA,GAAG,YAAY,CAAC,UAAU,CAAC,MAAM,kBAAkB,CAAC,CAAC;QAC9D,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAoB;AACzC,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;AAC/B,QAAA,IAAA,CAAA,MAAM,GAAG,MAAM,CAC9B,UAAU,CAAC,MAAM,kBAAkB,CAAC,EACpC,EAAC,QAAQ,EAAE,IAAI,EAAC,CACnB;AACJ;+GARY,QAAQ,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAR,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,QAAQ,gRAC4C,kBAAkB,CAAA,EAAA,WAAA,EAAA,IAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FADtE,QAAQ,EAAA,UAAA,EAAA,CAAA;kBAPpB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,iBAAiB;AAC3B,oBAAA,IAAI,EAAE;AACF,wBAAA,YAAY,EAAE,0BAA0B;AACxC,wBAAA,yBAAyB,EAAE,yCAAyC;AACvE,qBAAA;AACJ,iBAAA;;;AC7BD;;AAEG;;;;"}
@@ -1,48 +1,37 @@
1
1
  import * as i0 from '@angular/core';
2
- import { ChangeDetectionStrategy, ViewEncapsulation, Component, input, inject, Directive } from '@angular/core';
2
+ import { ChangeDetectionStrategy, ViewEncapsulation, Component, Directive } from '@angular/core';
3
+ import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
3
4
  import { tuiWithStyles } from '@taiga-ui/cdk/utils/miscellaneous';
4
5
  import * as i1 from '@taiga-ui/core/directives/appearance';
5
6
  import { tuiAppearanceOptionsProvider, TuiWithAppearance } from '@taiga-ui/core/directives/appearance';
6
7
  import * as i2 from '@taiga-ui/core/directives/icons';
7
8
  import { TuiWithIcons } from '@taiga-ui/core/directives/icons';
8
- import { tuiCreateOptions } from '@taiga-ui/cdk/utils/di';
9
9
 
10
- const TUI_LINK_DEFAULT_OPTIONS = {
10
+ const [TUI_LINK_OPTIONS, tuiLinkOptionsProvider] = tuiCreateOptions({
11
11
  appearance: 'action',
12
- pseudo: false,
13
- };
14
- const [TUI_LINK_OPTIONS, tuiLinkOptionsProvider] = tuiCreateOptions(TUI_LINK_DEFAULT_OPTIONS);
15
-
12
+ });
16
13
  class Styles {
17
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
18
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.15", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-link" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiLink]{transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:var(--tui-text-primary);text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;transition:none}[tuiLink][tuiChevron]:after{display:inline-block}[tuiLink]:focus-visible:not([data-focus=false]){outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][data-focus=true]{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][tuiWrapper]:not(._focused):has(:focus-visible),[tuiLink][tuiWrapper]._focused{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){text-decoration-color:currentColor}}[tuiLink][data-state=hover]{text-decoration-color:currentColor}@media (hover: hover) and (pointer: fine){[tuiLink][tuiWrapper]:hover:not(._no-hover),[tuiLink][tuiWrapper][data-state=hover]{text-decoration-color:currentColor}}[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){text-decoration-color:currentColor}[tuiLink][data-state=active]{text-decoration-color:currentColor}[tuiLink][tuiWrapper]:active:not(._no-active),[tuiLink][tuiWrapper][data-state=active],[tuiLink][tuiWrapper][data-state=active]:hover{text-decoration-color:currentColor}@media (hover: hover) and (pointer: fine){[tuiLink][data-appearance=\"\"]:hover{opacity:.7}}[tuiLink][data-appearance=\"\"]:active{opacity:.7}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
14
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
15
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.17", type: Styles, isStandalone: true, selector: "ng-component", host: { classAttribute: "tui-link" }, ngImport: i0, template: '', isInline: true, styles: ["[tuiLink]{transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:inherit;border-radius:.125rem;outline-width:1px;outline-offset:-1px;text-underline-offset:.2em;text-decoration:none dashed currentColor 1px;text-decoration-color:color-mix(in lch,currentColor,transparent)}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;transition:none}[tuiLink][tuiChevron]:after{display:inline-block}@media (hover: hover) and (pointer: fine){[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){text-decoration-color:currentColor}}[tuiLink][data-state=hover]{text-decoration-color:currentColor}[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){text-decoration-color:currentColor}[tuiLink][data-state=active]{text-decoration-color:currentColor}[tuiLink][data-appearance=\"\"]{text-decoration-line:underline;text-decoration-style:solid}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
19
16
  }
20
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: Styles, decorators: [{
17
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: Styles, decorators: [{
21
18
  type: Component,
22
- args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-link' }, styles: ["[tuiLink]{transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:var(--tui-text-primary);text-decoration:none dashed currentColor;text-underline-offset:.2em;text-decoration-thickness:.7px;text-decoration-color:color-mix(in lch,currentColor,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:hover{--tui-text-secondary: var(--tui-text-primary)}}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;transition:none}[tuiLink][tuiChevron]:after{display:inline-block}[tuiLink]:focus-visible:not([data-focus=false]){outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][data-focus=true]{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}[tuiLink][tuiWrapper]:not(._focused):has(:focus-visible),[tuiLink][tuiWrapper]._focused{outline:none;background:var(--tui-service-selection-background);background:color-mix(in lch,currentColor 12%,transparent)}@media (hover: hover) and (pointer: fine){[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not(:disabled):not([data-state]){text-decoration-color:currentColor}}[tuiLink][data-state=hover]{text-decoration-color:currentColor}@media (hover: hover) and (pointer: fine){[tuiLink][tuiWrapper]:hover:not(._no-hover),[tuiLink][tuiWrapper][data-state=hover]{text-decoration-color:currentColor}}[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){text-decoration-color:currentColor}[tuiLink][data-state=active]{text-decoration-color:currentColor}[tuiLink][tuiWrapper]:active:not(._no-active),[tuiLink][tuiWrapper][data-state=active],[tuiLink][tuiWrapper][data-state=active]:hover{text-decoration-color:currentColor}@media (hover: hover) and (pointer: fine){[tuiLink][data-appearance=\"\"]:hover{opacity:.7}}[tuiLink][data-appearance=\"\"]:active{opacity:.7}\n"] }]
19
+ args: [{ template: '', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'tui-link' }, styles: ["[tuiLink]{transition-property:color,text-decoration,opacity;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;padding:0;background:transparent;border:none;cursor:pointer;font:inherit;color:inherit;border-radius:.125rem;outline-width:1px;outline-offset:-1px;text-underline-offset:.2em;text-decoration:none dashed currentColor 1px;text-decoration-color:color-mix(in lch,currentColor,transparent)}[tuiLink]:before{margin-inline-end:.25rem}[tuiLink]:after{margin-inline-start:.25rem}[tuiLink][tuiIcons]:before,[tuiLink][tuiIcons]:after{content:\"\\2060\";padding:calc(var(--tui-icon-size, 1rem) / 2);vertical-align:super;font-size:0;line-height:0;box-sizing:border-box;-webkit-mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;mask-size:calc(100% + 10 * var(--tui-stroke-width, .125rem)) 100%;transition:none}[tuiLink][tuiChevron]:after{display:inline-block}@media (hover: hover) and (pointer: fine){[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):hover:not([data-state]){text-decoration-color:currentColor}}[tuiLink][data-state=hover]{text-decoration-color:currentColor}[tuiLink]:is(a,button,select,textarea,input,label,.tui-interactive):not(:disabled):active:not([data-state]){text-decoration-color:currentColor}[tuiLink][data-state=active]{text-decoration-color:currentColor}[tuiLink][data-appearance=\"\"]{text-decoration-line:underline;text-decoration-style:solid}\n"] }]
23
20
  }] });
24
21
  class TuiLink {
25
22
  constructor() {
26
23
  this.nothing = tuiWithStyles(Styles);
27
- /**
28
- * @deprecated: use on host
29
- * [style.text-decoration-line]="'underline'"
30
- */
31
- this.pseudo = input(inject(TUI_LINK_OPTIONS).pseudo);
32
24
  }
33
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
34
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.15", type: TuiLink, isStandalone: true, selector: "a[tuiLink], button[tuiLink]", inputs: { pseudo: { classPropertyName: "pseudo", publicName: "pseudo", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "tuiLink": "" }, properties: { "style.text-decoration-line": "pseudo() ? \"underline\" : null" } }, providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)], hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiWithIcons }], ngImport: i0 }); }
25
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLink, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
26
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.17", type: TuiLink, isStandalone: true, selector: "a[tuiLink], button[tuiLink]", host: { attributes: { "tuiLink": "" } }, providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)], hostDirectives: [{ directive: i1.TuiWithAppearance }, { directive: i2.TuiWithIcons }], ngImport: i0 }); }
35
27
  }
36
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiLink, decorators: [{
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: TuiLink, decorators: [{
37
29
  type: Directive,
38
30
  args: [{
39
31
  selector: 'a[tuiLink], button[tuiLink]',
40
32
  providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)],
41
33
  hostDirectives: [TuiWithAppearance, TuiWithIcons],
42
- host: {
43
- tuiLink: '',
44
- '[style.text-decoration-line]': 'pseudo() ? "underline" : null',
45
- },
34
+ host: { tuiLink: '' },
46
35
  }]
47
36
  }] });
48
37
 
@@ -50,5 +39,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImpo
50
39
  * Generated bundle index. Do not edit.
51
40
  */
52
41
 
53
- export { TUI_LINK_DEFAULT_OPTIONS, TUI_LINK_OPTIONS, TuiLink, tuiLinkOptionsProvider };
42
+ export { TUI_LINK_OPTIONS, TuiLink, tuiLinkOptionsProvider };
54
43
  //# sourceMappingURL=taiga-ui-core-components-link.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"taiga-ui-core-components-link.mjs","sources":["../../../projects/core/components/link/link.options.ts","../../../projects/core/components/link/link.directive.ts","../../../projects/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {type TuiAppearanceOptions} from '@taiga-ui/core/directives/appearance';\n\n// TODO: remove in v5\nexport interface TuiLinkOptions extends TuiAppearanceOptions {\n /**\n * @deprecated: use on host\n * [style.text-decoration-line]=\"'underline'\"\n */\n readonly pseudo: boolean;\n}\n\nexport const TUI_LINK_DEFAULT_OPTIONS: TuiLinkOptions = {\n appearance: 'action',\n pseudo: false,\n};\n\nexport const [TUI_LINK_OPTIONS, tuiLinkOptionsProvider] = tuiCreateOptions(\n TUI_LINK_DEFAULT_OPTIONS,\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n inject,\n input,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nimport {TUI_LINK_OPTIONS} from './link.options';\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/link.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-link'},\n})\nclass Styles {}\n\n@Directive({\n selector: 'a[tuiLink], button[tuiLink]',\n providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)],\n hostDirectives: [TuiWithAppearance, TuiWithIcons],\n host: {\n tuiLink: '',\n '[style.text-decoration-line]': 'pseudo() ? \"underline\" : null',\n },\n})\nexport class TuiLink {\n protected readonly nothing = tuiWithStyles(Styles);\n\n /**\n * @deprecated: use on host\n * [style.text-decoration-line]=\"'underline'\"\n */\n public readonly pseudo = input(inject(TUI_LINK_OPTIONS).pseudo);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAYa,MAAA,wBAAwB,GAAmB;AACpD,IAAA,UAAU,EAAE,QAAQ;AACpB,IAAA,MAAM,EAAE,KAAK;;AAGV,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GAAG,gBAAgB,CACtE,wBAAwB;;ACD5B,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,8GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,o6EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;;4FAMV,MAAM,EAAA,UAAA,EAAA,CAAA;kBAPX,SAAS;AACI,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAE,EAEG,aAAA,EAAA,iBAAiB,CAAC,IAAI,EACpB,eAAA,EAAA,uBAAuB,CAAC,MAAM,EACzC,IAAA,EAAA,EAAC,KAAK,EAAE,UAAU,EAAC,EAAA,MAAA,EAAA,CAAA,o6EAAA,CAAA,EAAA;;MAahB,OAAO,CAAA;AATpB,IAAA,WAAA,GAAA;AAUuB,QAAA,IAAA,CAAA,OAAO,GAAG,aAAa,CAAC,MAAM,CAAC;AAElD;;;AAGG;QACa,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,MAAM,CAAC;AAClE;+GARY,OAAO,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAP,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,OAAO,2UAPL,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,CAAC,EAAA,cAAA,EAAA,CAAA,EAAA,SAAA,EAAA,EAAA,CAAA,iBAAA,EAAA,EAAA,EAAA,SAAA,EAAA,EAAA,CAAA,YAAA,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA,CAAA;;4FAOlD,OAAO,EAAA,UAAA,EAAA,CAAA;kBATnB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACP,oBAAA,QAAQ,EAAE,6BAA6B;AACvC,oBAAA,SAAS,EAAE,CAAC,4BAA4B,CAAC,gBAAgB,CAAC,CAAC;AAC3D,oBAAA,cAAc,EAAE,CAAC,iBAAiB,EAAE,YAAY,CAAC;AACjD,oBAAA,IAAI,EAAE;AACF,wBAAA,OAAO,EAAE,EAAE;AACX,wBAAA,8BAA8B,EAAE,+BAA+B;AAClE,qBAAA;AACJ,iBAAA;;;AClCD;;AAEG;;;;"}
1
+ {"version":3,"file":"taiga-ui-core-components-link.mjs","sources":["../../../projects/core/components/link/link.directive.ts","../../../projects/core/components/link/taiga-ui-core-components-link.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n Directive,\n ViewEncapsulation,\n} from '@angular/core';\nimport {tuiCreateOptions} from '@taiga-ui/cdk/utils/di';\nimport {tuiWithStyles} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {\n tuiAppearanceOptionsProvider,\n TuiWithAppearance,\n} from '@taiga-ui/core/directives/appearance';\nimport {TuiWithIcons} from '@taiga-ui/core/directives/icons';\n\nexport const [TUI_LINK_OPTIONS, tuiLinkOptionsProvider] = tuiCreateOptions({\n appearance: 'action',\n});\n\n@Component({\n template: '',\n styles: '@import \"@taiga-ui/core/styles/components/link.less\";',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {class: 'tui-link'},\n})\nclass Styles {}\n\n@Directive({\n selector: 'a[tuiLink], button[tuiLink]',\n providers: [tuiAppearanceOptionsProvider(TUI_LINK_OPTIONS)],\n hostDirectives: [TuiWithAppearance, TuiWithIcons],\n host: {tuiLink: ''},\n})\nexport class TuiLink {\n protected readonly nothing = tuiWithStyles(Styles);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAca,CAAC,gBAAgB,EAAE,sBAAsB,CAAC,GAAG,gBAAgB,CAAC;AACvE,IAAA,UAAU,EAAE,QAAQ;AACvB,CAAA;AAED,MAOM,MAAM,CAAA;+GAAN,MAAM,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAN,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,MAAM,8GANE,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,MAAA,EAAA,CAAA,86CAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,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