@taiga-ui/legacy 4.52.0-canary.2c75afa → 4.52.0-canary.2d877cf

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 (225) hide show
  1. package/README.md +1 -1
  2. package/components/dialog/dialog.service.d.ts +1 -1
  3. package/components/dialog/dialog.tokens.d.ts +1 -3
  4. package/components/index.d.ts +0 -17
  5. package/components/mobile-dialog/mobile-dialog.options.d.ts +1 -3
  6. package/components/mobile-dialog/mobile-dialog.service.d.ts +1 -1
  7. package/components/pdf-viewer/pdf-viewer.options.d.ts +1 -3
  8. package/components/pdf-viewer/pdf-viewer.service.d.ts +1 -1
  9. package/fesm2022/taiga-ui-legacy-components-dialog.mjs +14 -19
  10. package/fesm2022/taiga-ui-legacy-components-dialog.mjs.map +1 -1
  11. package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs +11 -16
  12. package/fesm2022/taiga-ui-legacy-components-mobile-dialog.mjs.map +1 -1
  13. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs +13 -18
  14. package/fesm2022/taiga-ui-legacy-components-pdf-viewer.mjs.map +1 -1
  15. package/fesm2022/taiga-ui-legacy-components.mjs +0 -17
  16. package/fesm2022/taiga-ui-legacy-components.mjs.map +1 -1
  17. package/fesm2022/taiga-ui-legacy.mjs +0 -4
  18. package/fesm2022/taiga-ui-legacy.mjs.map +1 -1
  19. package/index.d.ts +0 -4
  20. package/package.json +12 -114
  21. package/classes/abstract-native-select.d.ts +0 -22
  22. package/classes/abstract-textfield-host.d.ts +0 -19
  23. package/classes/control.d.ts +0 -60
  24. package/classes/controller.d.ts +0 -9
  25. package/classes/index.d.ts +0 -9
  26. package/classes/interactive.d.ts +0 -34
  27. package/classes/multiple-control.d.ts +0 -11
  28. package/classes/named-day.d.ts +0 -11
  29. package/classes/nullable-control.d.ts +0 -10
  30. package/classes/stringifiable-item.d.ts +0 -11
  31. package/components/arrow/arrow.component.d.ts +0 -17
  32. package/components/arrow/arrow.options.d.ts +0 -19
  33. package/components/arrow/arrow.providers.d.ts +0 -23
  34. package/components/arrow/index.d.ts +0 -3
  35. package/components/input/index.d.ts +0 -3
  36. package/components/input/input.component.d.ts +0 -32
  37. package/components/input/input.directive.d.ts +0 -12
  38. package/components/input/input.module.d.ts +0 -16
  39. package/components/input-date-range/index.d.ts +0 -3
  40. package/components/input-date-range/input-date-range.component.d.ts +0 -66
  41. package/components/input-date-range/input-date-range.directive.d.ts +0 -16
  42. package/components/input-date-range/input-date-range.module.d.ts +0 -21
  43. package/components/input-date-time/index.d.ts +0 -3
  44. package/components/input-date-time/input-date-time.component.d.ts +0 -87
  45. package/components/input-date-time/input-date-time.directive.d.ts +0 -17
  46. package/components/input-date-time/input-date-time.module.d.ts +0 -23
  47. package/components/input-date-time/native-date-time/native-date-time.directive.d.ts +0 -13
  48. package/components/input-month-range/index.d.ts +0 -3
  49. package/components/input-month-range/input-month-range.component.d.ts +0 -38
  50. package/components/input-month-range/input-month-range.directive.d.ts +0 -23
  51. package/components/input-month-range/input-month-range.module.d.ts +0 -18
  52. package/components/input-number/index.d.ts +0 -4
  53. package/components/input-number/input-number.component.d.ts +0 -62
  54. package/components/input-number/input-number.directive.d.ts +0 -16
  55. package/components/input-number/input-number.module.d.ts +0 -18
  56. package/components/input-number/input-number.options.d.ts +0 -29
  57. package/components/input-range/index.d.ts +0 -2
  58. package/components/input-range/input-range.component.d.ts +0 -56
  59. package/components/input-range/input-range.module.d.ts +0 -19
  60. package/components/input-slider/index.d.ts +0 -2
  61. package/components/input-slider/input-slider.component.d.ts +0 -42
  62. package/components/input-slider/input-slider.module.d.ts +0 -18
  63. package/components/input-tag/index.d.ts +0 -3
  64. package/components/input-tag/input-tag.component.d.ts +0 -103
  65. package/components/input-tag/input-tag.module.d.ts +0 -22
  66. package/components/input-tag/input-tag.options.d.ts +0 -27
  67. package/components/multi-select/hide-selected.pipe.d.ts +0 -11
  68. package/components/multi-select/index.d.ts +0 -10
  69. package/components/multi-select/multi-select-group/multi-select-group.component.d.ts +0 -23
  70. package/components/multi-select/multi-select-group/multi-select-group.directive.d.ts +0 -8
  71. package/components/multi-select/multi-select.component.d.ts +0 -71
  72. package/components/multi-select/multi-select.directive.d.ts +0 -14
  73. package/components/multi-select/multi-select.module.d.ts +0 -30
  74. package/components/multi-select/multi-select.options.d.ts +0 -14
  75. package/components/multi-select/native-multi-select/native-multi-select-group.component.d.ts +0 -9
  76. package/components/multi-select/native-multi-select/native-multi-select.component.d.ts +0 -8
  77. package/components/multi-select/native-multi-select/native-multi-select.d.ts +0 -11
  78. package/components/multi-select-option/index.d.ts +0 -2
  79. package/components/multi-select-option/multi-select-option.component.d.ts +0 -9
  80. package/components/multi-select-option/multi-select-option.module.d.ts +0 -9
  81. package/components/primitive-textfield/index.d.ts +0 -7
  82. package/components/primitive-textfield/primitive-textfield-options.d.ts +0 -21
  83. package/components/primitive-textfield/primitive-textfield-types.d.ts +0 -11
  84. package/components/primitive-textfield/primitive-textfield.component.d.ts +0 -73
  85. package/components/primitive-textfield/primitive-textfield.directive.d.ts +0 -14
  86. package/components/primitive-textfield/primitive-textfield.module.d.ts +0 -21
  87. package/components/primitive-textfield/textfield/textfield.component.d.ts +0 -13
  88. package/components/primitive-textfield/value-decoration/value-decoration.component.d.ts +0 -22
  89. package/components/select/index.d.ts +0 -6
  90. package/components/select/native-select/native-select-group.component.d.ts +0 -17
  91. package/components/select/native-select/native-select.component.d.ts +0 -16
  92. package/components/select/select.component.d.ts +0 -45
  93. package/components/select/select.directive.d.ts +0 -16
  94. package/components/select/select.module.d.ts +0 -24
  95. package/components/select/select.options.d.ts +0 -25
  96. package/components/select-option/index.d.ts +0 -2
  97. package/components/select-option/select-option.component.d.ts +0 -27
  98. package/components/select-option/select-option.module.d.ts +0 -10
  99. package/components/tag/index.d.ts +0 -3
  100. package/components/tag/tag.component.d.ts +0 -44
  101. package/components/tag/tag.module.d.ts +0 -16
  102. package/components/tag/tag.options.d.ts +0 -27
  103. package/components/textarea/index.d.ts +0 -3
  104. package/components/textarea/textarea.component.d.ts +0 -54
  105. package/components/textarea/textarea.directive.d.ts +0 -12
  106. package/components/textarea/textarea.module.d.ts +0 -21
  107. package/components/tooltip/index.d.ts +0 -2
  108. package/components/tooltip/tooltip.component.d.ts +0 -12
  109. package/components/tooltip/tooltip.module.d.ts +0 -13
  110. package/directives/index.d.ts +0 -5
  111. package/directives/legacy-dropdown-open-monitor/index.d.ts +0 -1
  112. package/directives/legacy-dropdown-open-monitor/legacy-dropdown-open-monitor.d.ts +0 -11
  113. package/directives/textfield-controller/index.d.ts +0 -14
  114. package/directives/textfield-controller/textfield-appearance.directive.d.ts +0 -9
  115. package/directives/textfield-controller/textfield-cleaner.directive.d.ts +0 -9
  116. package/directives/textfield-controller/textfield-controller.module.d.ts +0 -17
  117. package/directives/textfield-controller/textfield-controller.provider.d.ts +0 -4
  118. package/directives/textfield-controller/textfield-custom-content.directive.d.ts +0 -10
  119. package/directives/textfield-controller/textfield-filler.directive.d.ts +0 -9
  120. package/directives/textfield-controller/textfield-icon-left.directive.d.ts +0 -12
  121. package/directives/textfield-controller/textfield-icon.directive.d.ts +0 -12
  122. package/directives/textfield-controller/textfield-label-outside.directive.d.ts +0 -9
  123. package/directives/textfield-controller/textfield-postfix.directive.d.ts +0 -9
  124. package/directives/textfield-controller/textfield-prefix.directive.d.ts +0 -9
  125. package/directives/textfield-controller/textfield-size.directive.d.ts +0 -10
  126. package/directives/textfield-controller/textfield.controller.d.ts +0 -41
  127. package/directives/textfield-controller/textfield.options.d.ts +0 -19
  128. package/directives/unfinished-validator/index.d.ts +0 -2
  129. package/directives/unfinished-validator/unfinished-validator.directive.d.ts +0 -10
  130. package/directives/unfinished-validator/unfinished.validator.d.ts +0 -4
  131. package/directives/value-accessor/index.d.ts +0 -3
  132. package/directives/value-accessor/value-accessor.directive.d.ts +0 -5
  133. package/directives/value-accessor/value-accessor.module.d.ts +0 -7
  134. package/directives/value-accessor/value-accessor.provider.d.ts +0 -2
  135. package/directives/wrapper/README.md +0 -19
  136. package/directives/wrapper/index.d.ts +0 -2
  137. package/directives/wrapper/wrapper.directive.d.ts +0 -22
  138. package/directives/wrapper/wrapper.module.d.ts +0 -10
  139. package/fesm2022/taiga-ui-legacy-classes.mjs +0 -413
  140. package/fesm2022/taiga-ui-legacy-classes.mjs.map +0 -1
  141. package/fesm2022/taiga-ui-legacy-components-arrow.mjs +0 -85
  142. package/fesm2022/taiga-ui-legacy-components-arrow.mjs.map +0 -1
  143. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs +0 -346
  144. package/fesm2022/taiga-ui-legacy-components-input-date-range.mjs.map +0 -1
  145. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs +0 -459
  146. package/fesm2022/taiga-ui-legacy-components-input-date-time.mjs.map +0 -1
  147. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs +0 -221
  148. package/fesm2022/taiga-ui-legacy-components-input-month-range.mjs.map +0 -1
  149. package/fesm2022/taiga-ui-legacy-components-input-number.mjs +0 -383
  150. package/fesm2022/taiga-ui-legacy-components-input-number.mjs.map +0 -1
  151. package/fesm2022/taiga-ui-legacy-components-input-range.mjs +0 -261
  152. package/fesm2022/taiga-ui-legacy-components-input-range.mjs.map +0 -1
  153. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs +0 -199
  154. package/fesm2022/taiga-ui-legacy-components-input-slider.mjs.map +0 -1
  155. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs +0 -524
  156. package/fesm2022/taiga-ui-legacy-components-input-tag.mjs.map +0 -1
  157. package/fesm2022/taiga-ui-legacy-components-input.mjs +0 -156
  158. package/fesm2022/taiga-ui-legacy-components-input.mjs.map +0 -1
  159. package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs +0 -47
  160. package/fesm2022/taiga-ui-legacy-components-multi-select-option.mjs.map +0 -1
  161. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs +0 -686
  162. package/fesm2022/taiga-ui-legacy-components-multi-select.mjs.map +0 -1
  163. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs +0 -454
  164. package/fesm2022/taiga-ui-legacy-components-primitive-textfield.mjs.map +0 -1
  165. package/fesm2022/taiga-ui-legacy-components-select-option.mjs +0 -88
  166. package/fesm2022/taiga-ui-legacy-components-select-option.mjs.map +0 -1
  167. package/fesm2022/taiga-ui-legacy-components-select.mjs +0 -353
  168. package/fesm2022/taiga-ui-legacy-components-select.mjs.map +0 -1
  169. package/fesm2022/taiga-ui-legacy-components-tag.mjs +0 -225
  170. package/fesm2022/taiga-ui-legacy-components-tag.mjs.map +0 -1
  171. package/fesm2022/taiga-ui-legacy-components-textarea.mjs +0 -262
  172. package/fesm2022/taiga-ui-legacy-components-textarea.mjs.map +0 -1
  173. package/fesm2022/taiga-ui-legacy-components-tooltip.mjs +0 -53
  174. package/fesm2022/taiga-ui-legacy-components-tooltip.mjs.map +0 -1
  175. package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs +0 -49
  176. package/fesm2022/taiga-ui-legacy-directives-legacy-dropdown-open-monitor.mjs.map +0 -1
  177. package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs +0 -401
  178. package/fesm2022/taiga-ui-legacy-directives-textfield-controller.mjs.map +0 -1
  179. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs +0 -48
  180. package/fesm2022/taiga-ui-legacy-directives-unfinished-validator.mjs.map +0 -1
  181. package/fesm2022/taiga-ui-legacy-directives-value-accessor.mjs +0 -44
  182. package/fesm2022/taiga-ui-legacy-directives-value-accessor.mjs.map +0 -1
  183. package/fesm2022/taiga-ui-legacy-directives-wrapper.mjs +0 -99
  184. package/fesm2022/taiga-ui-legacy-directives-wrapper.mjs.map +0 -1
  185. package/fesm2022/taiga-ui-legacy-directives.mjs +0 -10
  186. package/fesm2022/taiga-ui-legacy-directives.mjs.map +0 -1
  187. package/fesm2022/taiga-ui-legacy-tokens.mjs +0 -384
  188. package/fesm2022/taiga-ui-legacy-tokens.mjs.map +0 -1
  189. package/fesm2022/taiga-ui-legacy-utils.mjs +0 -262
  190. package/fesm2022/taiga-ui-legacy-utils.mjs.map +0 -1
  191. package/styles/mixins/mixins.less +0 -239
  192. package/styles/mixins/mixins.scss +0 -224
  193. package/styles/mixins/textfield.less +0 -324
  194. package/styles/mixins/textfield.scss +0 -308
  195. package/styles/taiga-ui-local.less +0 -3
  196. package/styles/taiga-ui-local.scss +0 -3
  197. package/tokens/countries-masks.d.ts +0 -9
  198. package/tokens/focusable-item-accessor.d.ts +0 -25
  199. package/tokens/fonts-ready.d.ts +0 -6
  200. package/tokens/icons.d.ts +0 -6
  201. package/tokens/index.d.ts +0 -14
  202. package/tokens/is-apple.d.ts +0 -6
  203. package/tokens/is-chromium.d.ts +0 -6
  204. package/tokens/is-firefox.d.ts +0 -6
  205. package/tokens/is-stackblitz.d.ts +0 -5
  206. package/tokens/month-formatter.d.ts +0 -10
  207. package/tokens/sanitizer.d.ts +0 -6
  208. package/tokens/textfield-appearance.d.ts +0 -7
  209. package/tokens/textfield-host.d.ts +0 -23
  210. package/tokens/touch-supported.d.ts +0 -5
  211. package/tokens/value-accessor.d.ts +0 -7
  212. package/utils/capitalize-first-letter.d.ts +0 -4
  213. package/utils/date-mode-maskito-adapter.d.ts +0 -6
  214. package/utils/format-phone.d.ts +0 -30
  215. package/utils/get-border.d.ts +0 -5
  216. package/utils/get-max-allowed-phone-length.d.ts +0 -24
  217. package/utils/get-safe-area-size.d.ts +0 -7
  218. package/utils/icons-path-factory.d.ts +0 -13
  219. package/utils/index.d.ts +0 -13
  220. package/utils/is-presumed-html-string.d.ts +0 -4
  221. package/utils/iso-to-country-code.d.ts +0 -13
  222. package/utils/not-kz-region.d.ts +0 -20
  223. package/utils/process-icon.d.ts +0 -4
  224. package/utils/specific-dropdown-controllers.d.ts +0 -4
  225. package/utils/status.d.ts +0 -4
@@ -1,225 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { InjectionToken, inject, EventEmitter, ElementRef, ViewChild, Output, Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
3
- import { tuiInjectElement } from '@taiga-ui/cdk/utils/dom';
4
- import { TUI_COMMON_ICONS } from '@taiga-ui/core/tokens';
5
- import { tuiStringHashToHsl } from '@taiga-ui/core/utils/format';
6
- import { tuiSizeBigger } from '@taiga-ui/core/utils/miscellaneous';
7
- import { tuiProvideOptions } from '@taiga-ui/cdk/utils/miscellaneous';
8
- import * as i1 from '@angular/forms';
9
- import { FormsModule } from '@angular/forms';
10
- import * as i2 from '@taiga-ui/polymorpheus';
11
- import { PolymorpheusOutlet, PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
12
- import * as i3 from '@taiga-ui/core/components/icon';
13
- import { TuiIcon } from '@taiga-ui/core/components/icon';
14
- import * as i4 from '@taiga-ui/core/components/loader';
15
- import { TuiLoader } from '@taiga-ui/core/components/loader';
16
- import { CommonModule } from '@angular/common';
17
-
18
- /**
19
- * @deprecated: drop in v5.0 use {@link TuiChip}
20
- * https://taiga-ui.dev/components/chip
21
- */
22
- const TUI_TAG_DEFAULT_OPTIONS = {
23
- size: 'm',
24
- status: 'default',
25
- autoColor: false,
26
- };
27
- /**
28
- * @deprecated: drop in v5.0 use {@link TuiChip}
29
- * https://taiga-ui.dev/components/chip
30
- */
31
- const TUI_TAG_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_TAG_OPTIONS' : '', {
32
- factory: () => TUI_TAG_DEFAULT_OPTIONS,
33
- });
34
- /**
35
- * @deprecated: drop in v5.0 use {@link TuiChip}
36
- * https://taiga-ui.dev/components/chip
37
- */
38
- function tuiTagOptionsProvider(options) {
39
- return tuiProvideOptions(TUI_TAG_OPTIONS, options, TUI_TAG_DEFAULT_OPTIONS);
40
- }
41
-
42
- /**
43
- * @deprecated: drop in v5.0 use {@link TuiChip}
44
- * https://taiga-ui.dev/components/chip
45
- */
46
- class TuiTagComponent {
47
- constructor() {
48
- this.el = tuiInjectElement();
49
- this.options = inject(TUI_TAG_OPTIONS);
50
- this.editing = false;
51
- this.icons = inject(TUI_COMMON_ICONS);
52
- this.editedText = null;
53
- this.value = '';
54
- this.editable = false;
55
- this.separator = ',';
56
- this.maxLength = null;
57
- this.size = this.options.size;
58
- this.showLoader = false;
59
- this.status = this.options.status;
60
- this.hoverable = false;
61
- this.removable = false;
62
- this.disabled = false;
63
- this.autoColor = this.options.autoColor;
64
- this.edited = new EventEmitter();
65
- }
66
- set input(input) {
67
- if (input) {
68
- input.nativeElement.focus();
69
- }
70
- }
71
- get backgroundColor() {
72
- return this.autoColor ? tuiStringHashToHsl(this.value) : null;
73
- }
74
- get canRemove() {
75
- return this.removable && !this.disabled && !this.showLoader;
76
- }
77
- get displayText() {
78
- return this.editedText ?? this.value;
79
- }
80
- get loaderSize() {
81
- return tuiSizeBigger(this.size) ? 's' : 'xs';
82
- }
83
- edit(event) {
84
- if (!this.canEdit) {
85
- return;
86
- }
87
- event.preventDefault();
88
- this.editing = true;
89
- this.editedText = this.value;
90
- }
91
- remove(event) {
92
- if (!this.canRemove) {
93
- return;
94
- }
95
- event.preventDefault();
96
- event.stopPropagation();
97
- this.edited.emit('');
98
- }
99
- onInput(value) {
100
- const newTags = value.split(this.separator);
101
- if (newTags.length > 1) {
102
- this.save(String(newTags));
103
- return;
104
- }
105
- this.editedText = value;
106
- }
107
- onKeyDown(event) {
108
- event.stopPropagation();
109
- switch (event.key.toLowerCase()) {
110
- case 'enter':
111
- event.preventDefault();
112
- this.save(this.editedText || '');
113
- break;
114
- case 'esc':
115
- case 'escape':
116
- event.preventDefault();
117
- this.stopEditing();
118
- this.el.focus();
119
- break;
120
- default:
121
- break;
122
- }
123
- }
124
- onBlur() {
125
- if (this.editedText !== null) {
126
- this.save(this.editedText);
127
- }
128
- }
129
- get canEdit() {
130
- return this.editable && !this.disabled && !this.showLoader;
131
- }
132
- stopEditing() {
133
- this.editing = false;
134
- this.editedText = null;
135
- }
136
- save(value) {
137
- this.stopEditing();
138
- this.edited.emit(value.trim());
139
- }
140
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
141
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiTagComponent, isStandalone: false, selector: "tui-tag, a[tuiTag], button[tuiTag]", inputs: { value: "value", editable: "editable", separator: "separator", maxLength: "maxLength", size: "size", showLoader: "showLoader", status: "status", hoverable: "hoverable", removable: "removable", disabled: "disabled", autoColor: "autoColor", leftContent: "leftContent" }, outputs: { edited: "edited" }, host: { listeners: { "keydown.delete": "remove($event)", "keydown.backspace": "remove($event)", "keydown.enter": "edit($event)" }, properties: { "attr.data-size": "size", "attr.data-status": "status", "class._editing": "editing", "class._hoverable": "hoverable", "class._autocolor": "autoColor", "class._disabled": "disabled" } }, viewQueries: [{ propertyName: "input", first: true, predicate: ["input"], descendants: true, read: ElementRef }], ngImport: i0, template: "<div\n class=\"t-tag\"\n [style.backgroundColor]=\"backgroundColor\"\n (dblclick)=\"edit($event)\"\n>\n @if (leftContent) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"leftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <span\n automation-id=\"tui-tag__text\"\n class=\"t-text\"\n [textContent]=\"displayText\"\n ></span>\n @if (showLoader) {\n <tui-loader\n class=\"t-content\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n />\n }\n @if (canRemove) {\n <tui-icon\n automation-id=\"tui-tag__remove\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"remove($event)\"\n (mousedown.stop.prevent.zoneless)=\"(0)\"\n />\n }\n</div>\n@if (editing) {\n <input\n #input\n automation-id=\"tui-tag__edit\"\n type=\"text\"\n class=\"t-edit\"\n [attr.maxLength]=\"maxLength\"\n [ngModel]=\"editedText\"\n [ngModelOptions]=\"{standalone: true}\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (ngModelChange)=\"onInput($event)\"\n />\n}\n", styles: [":host{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;font:var(--tui-font-text-s);line-height:1.25rem;max-inline-size:100%;cursor:default;outline:none;text-decoration:none;padding:0;border:0}:host:after{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-sizing:border-box;border-radius:inherit;pointer-events:none}:host._hoverable:hover[data-status=custom]:after,:host._hoverable:active[data-status=custom]:after{background-color:var(--tui-background-neutral-1)}:host:focus:after{border:2px solid var(--tui-border-focus)}:host[data-size=s]{font:var(--tui-font-text-xs);line-height:1.25rem;border-radius:var(--tui-radius-xs)}:host[data-size=m]{border-radius:var(--tui-radius-xs)}:host[data-size=l]{border-radius:var(--tui-radius-s)}:host[data-status=primary]{background-color:var(--tui-background-accent-1);color:var(--tui-text-primary-on-accent-1)}:host[data-status=primary]._hoverable:hover{background-color:var(--tui-background-accent-1-hover)}:host[data-status=primary]._hoverable:active{background-color:var(--tui-background-accent-1-pressed)}:host[data-status=error]{background-color:var(--tui-status-negative-pale);color:var(--tui-text-primary)}:host[data-status=error]._hoverable:hover,:host[data-status=error]._hoverable:active{background-color:var(--tui-status-negative-pale-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=error]{background-color:var(--tui-status-negative-pale);color:var(--tui-text-primary)}:host-context([tuiTheme=\"dark\"]) :host[data-status=error]._hoverable:hover,:host-context([tuiTheme=\"dark\"]) :host[data-status=error]._hoverable:active{background-color:var(--tui-status-negative-pale-hover)}:host[data-status=success]{background-color:var(--tui-status-positive-pale);color:var(--tui-text-primary)}:host[data-status=success]._hoverable:hover,:host[data-status=success]._hoverable:active{background-color:var(--tui-status-positive-pale-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=success]{background-color:var(--tui-status-positive-pale);color:var(--tui-text-primary)}:host-context([tuiTheme=\"dark\"]) :host[data-status=success]._hoverable:hover,:host-context([tuiTheme=\"dark\"]) :host[data-status=success]._hoverable:active{background-color:var(--tui-status-positive-pale-hover)}:host[data-status=warning]{background-color:var(--tui-status-warning-pale);color:var(--tui-text-primary)}:host[data-status=warning]._hoverable:hover,:host[data-status=warning]._hoverable:active{background-color:var(--tui-status-warning-pale-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=warning]{background-color:var(--tui-status-warning-pale);color:var(--tui-text-primary)}:host-context([tuiTheme=\"dark\"]) :host[data-status=warning]._hoverable:hover,:host-context([tuiTheme=\"dark\"]) :host[data-status=warning]._hoverable:active{background-color:var(--tui-status-warning-pale-hover)}:host[data-status=default]{color:#fff;background-color:var(--tui-text-tertiary)}:host[data-status=default]._hoverable:hover{background-color:var(--tui-background-accent-opposite-pressed)}:host[data-status=default]._hoverable:active{background-color:var(--tui-background-accent-opposite-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=default]{color:var(--tui-text-primary);background-color:var(--tui-background-neutral-1)}:host-context([tuiTheme=\"dark\"]) :host[data-status=default]._hoverable:hover{background-color:var(--tui-background-neutral-1-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=default]._hoverable:active{background-color:var(--tui-background-neutral-1-pressed)}:host-context([tuiTheme=\"dark\"]) :host[data-status=default]:focus:after{border:2px solid var(--tui-background-base)}:host._editing{background:transparent!important}:host._disabled,:host :host-context(*:disabled){pointer-events:none;opacity:var(--tui-disabled-opacity)}:host._hoverable{cursor:pointer}:host._autocolor{color:#000c}.t-text{white-space:pre;overflow:hidden;text-overflow:ellipsis;padding-inline-end:.02em}.t-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;inline-size:auto;align-items:center;font:inherit;border-radius:inherit}:host[data-size=s] .t-tag{block-size:1.25rem;padding:0 .375rem}:host[data-size=m] .t-tag{block-size:var(--tui-height-xs);padding:0 .5rem}:host[data-size=l] .t-tag{block-size:var(--tui-height-s);padding:0 .75rem}:host._editing .t-tag{visibility:hidden}.t-edit{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;font:inherit;color:var(--tui-text-primary);inline-size:100%;block-size:100%;box-sizing:border-box;padding:0 .5rem}.t-edit:-webkit-autofill,.t-edit:-webkit-autofill:hover,.t-edit:-webkit-autofill:focus{-webkit-text-fill-color:var(--tui-text-primary)!important;border-color:var(--tui-service-autofill-background);box-shadow:0 0 0 100rem var(--tui-service-autofill-background) inset!important}:host[data-size=s] .t-edit{padding:0 .375rem}:host[data-size=m] .t-edit{padding:0 .5rem}:host[data-size=l] .t-edit{padding:0 .75rem}.t-icon{font-size:1rem;block-size:100%;cursor:pointer;pointer-events:all;opacity:var(--tui-disabled-opacity);margin-inline-start:.25rem;margin-inline-end:-.25rem}.t-icon:hover{opacity:1}:host[data-size=s] .t-icon{margin-inline-start:0;block-size:.75rem}:host[data-size=s] .t-icon:before{font-size:.75rem}.t-content{inline-size:1rem;block-size:1rem;margin-inline-end:.25rem}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "component", type: i3.TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: i4.TuiLoader, selector: "tui-loader", inputs: ["size", "inheritColor", "overlay", "textContent", "loading"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
142
- }
143
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTagComponent, decorators: [{
144
- type: Component,
145
- args: [{ standalone: false, selector: 'tui-tag, a[tuiTag], button[tuiTag]', changeDetection: ChangeDetectionStrategy.OnPush, host: {
146
- '[attr.data-size]': 'size',
147
- '[attr.data-status]': 'status',
148
- '[class._editing]': 'editing',
149
- '[class._hoverable]': 'hoverable',
150
- '[class._autocolor]': 'autoColor',
151
- '[class._disabled]': 'disabled',
152
- '(keydown.delete)': 'remove($event)',
153
- '(keydown.backspace)': 'remove($event)',
154
- '(keydown.enter)': 'edit($event)',
155
- }, template: "<div\n class=\"t-tag\"\n [style.backgroundColor]=\"backgroundColor\"\n (dblclick)=\"edit($event)\"\n>\n @if (leftContent) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"leftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <span\n automation-id=\"tui-tag__text\"\n class=\"t-text\"\n [textContent]=\"displayText\"\n ></span>\n @if (showLoader) {\n <tui-loader\n class=\"t-content\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n />\n }\n @if (canRemove) {\n <tui-icon\n automation-id=\"tui-tag__remove\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"remove($event)\"\n (mousedown.stop.prevent.zoneless)=\"(0)\"\n />\n }\n</div>\n@if (editing) {\n <input\n #input\n automation-id=\"tui-tag__edit\"\n type=\"text\"\n class=\"t-edit\"\n [attr.maxLength]=\"maxLength\"\n [ngModel]=\"editedText\"\n [ngModelOptions]=\"{standalone: true}\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (ngModelChange)=\"onInput($event)\"\n />\n}\n", styles: [":host{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:relative;display:inline-block;font:var(--tui-font-text-s);line-height:1.25rem;max-inline-size:100%;cursor:default;outline:none;text-decoration:none;padding:0;border:0}:host:after{transition-property:background;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;position:absolute;top:0;left:0;inline-size:100%;block-size:100%;content:\"\";box-sizing:border-box;border-radius:inherit;pointer-events:none}:host._hoverable:hover[data-status=custom]:after,:host._hoverable:active[data-status=custom]:after{background-color:var(--tui-background-neutral-1)}:host:focus:after{border:2px solid var(--tui-border-focus)}:host[data-size=s]{font:var(--tui-font-text-xs);line-height:1.25rem;border-radius:var(--tui-radius-xs)}:host[data-size=m]{border-radius:var(--tui-radius-xs)}:host[data-size=l]{border-radius:var(--tui-radius-s)}:host[data-status=primary]{background-color:var(--tui-background-accent-1);color:var(--tui-text-primary-on-accent-1)}:host[data-status=primary]._hoverable:hover{background-color:var(--tui-background-accent-1-hover)}:host[data-status=primary]._hoverable:active{background-color:var(--tui-background-accent-1-pressed)}:host[data-status=error]{background-color:var(--tui-status-negative-pale);color:var(--tui-text-primary)}:host[data-status=error]._hoverable:hover,:host[data-status=error]._hoverable:active{background-color:var(--tui-status-negative-pale-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=error]{background-color:var(--tui-status-negative-pale);color:var(--tui-text-primary)}:host-context([tuiTheme=\"dark\"]) :host[data-status=error]._hoverable:hover,:host-context([tuiTheme=\"dark\"]) :host[data-status=error]._hoverable:active{background-color:var(--tui-status-negative-pale-hover)}:host[data-status=success]{background-color:var(--tui-status-positive-pale);color:var(--tui-text-primary)}:host[data-status=success]._hoverable:hover,:host[data-status=success]._hoverable:active{background-color:var(--tui-status-positive-pale-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=success]{background-color:var(--tui-status-positive-pale);color:var(--tui-text-primary)}:host-context([tuiTheme=\"dark\"]) :host[data-status=success]._hoverable:hover,:host-context([tuiTheme=\"dark\"]) :host[data-status=success]._hoverable:active{background-color:var(--tui-status-positive-pale-hover)}:host[data-status=warning]{background-color:var(--tui-status-warning-pale);color:var(--tui-text-primary)}:host[data-status=warning]._hoverable:hover,:host[data-status=warning]._hoverable:active{background-color:var(--tui-status-warning-pale-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=warning]{background-color:var(--tui-status-warning-pale);color:var(--tui-text-primary)}:host-context([tuiTheme=\"dark\"]) :host[data-status=warning]._hoverable:hover,:host-context([tuiTheme=\"dark\"]) :host[data-status=warning]._hoverable:active{background-color:var(--tui-status-warning-pale-hover)}:host[data-status=default]{color:#fff;background-color:var(--tui-text-tertiary)}:host[data-status=default]._hoverable:hover{background-color:var(--tui-background-accent-opposite-pressed)}:host[data-status=default]._hoverable:active{background-color:var(--tui-background-accent-opposite-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=default]{color:var(--tui-text-primary);background-color:var(--tui-background-neutral-1)}:host-context([tuiTheme=\"dark\"]) :host[data-status=default]._hoverable:hover{background-color:var(--tui-background-neutral-1-hover)}:host-context([tuiTheme=\"dark\"]) :host[data-status=default]._hoverable:active{background-color:var(--tui-background-neutral-1-pressed)}:host-context([tuiTheme=\"dark\"]) :host[data-status=default]:focus:after{border:2px solid var(--tui-background-base)}:host._editing{background:transparent!important}:host._disabled,:host :host-context(*:disabled){pointer-events:none;opacity:var(--tui-disabled-opacity)}:host._hoverable{cursor:pointer}:host._autocolor{color:#000c}.t-text{white-space:pre;overflow:hidden;text-overflow:ellipsis;padding-inline-end:.02em}.t-tag{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;position:relative;display:flex;inline-size:auto;align-items:center;font:inherit;border-radius:inherit}:host[data-size=s] .t-tag{block-size:1.25rem;padding:0 .375rem}:host[data-size=m] .t-tag{block-size:var(--tui-height-xs);padding:0 .5rem}:host[data-size=l] .t-tag{block-size:var(--tui-height-s);padding:0 .75rem}:host._editing .t-tag{visibility:hidden}.t-edit{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;outline:none;-webkit-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;font:inherit;color:var(--tui-text-primary);inline-size:100%;block-size:100%;box-sizing:border-box;padding:0 .5rem}.t-edit:-webkit-autofill,.t-edit:-webkit-autofill:hover,.t-edit:-webkit-autofill:focus{-webkit-text-fill-color:var(--tui-text-primary)!important;border-color:var(--tui-service-autofill-background);box-shadow:0 0 0 100rem var(--tui-service-autofill-background) inset!important}:host[data-size=s] .t-edit{padding:0 .375rem}:host[data-size=m] .t-edit{padding:0 .5rem}:host[data-size=l] .t-edit{padding:0 .75rem}.t-icon{font-size:1rem;block-size:100%;cursor:pointer;pointer-events:all;opacity:var(--tui-disabled-opacity);margin-inline-start:.25rem;margin-inline-end:-.25rem}.t-icon:hover{opacity:1}:host[data-size=s] .t-icon{margin-inline-start:0;block-size:.75rem}:host[data-size=s] .t-icon:before{font-size:.75rem}.t-content{inline-size:1rem;block-size:1rem;margin-inline-end:.25rem}\n"] }]
156
- }], propDecorators: { value: [{
157
- type: Input
158
- }], editable: [{
159
- type: Input
160
- }], separator: [{
161
- type: Input
162
- }], maxLength: [{
163
- type: Input
164
- }], size: [{
165
- type: Input
166
- }], showLoader: [{
167
- type: Input
168
- }], status: [{
169
- type: Input
170
- }], hoverable: [{
171
- type: Input
172
- }], removable: [{
173
- type: Input
174
- }], disabled: [{
175
- type: Input
176
- }], autoColor: [{
177
- type: Input
178
- }], leftContent: [{
179
- type: Input
180
- }], edited: [{
181
- type: Output
182
- }], input: [{
183
- type: ViewChild,
184
- args: ['input', { read: ElementRef }]
185
- }] } });
186
-
187
- /**
188
- * @deprecated: drop in v5.0 use {@link TuiChip}
189
- * https://taiga-ui.dev/components/chip
190
- */
191
- class TuiTagModule {
192
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTagModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
193
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiTagModule, declarations: [TuiTagComponent], imports: [CommonModule,
194
- FormsModule,
195
- PolymorpheusOutlet,
196
- PolymorpheusTemplate,
197
- TuiIcon,
198
- TuiLoader], exports: [TuiTagComponent] }); }
199
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTagModule, imports: [CommonModule,
200
- FormsModule,
201
- TuiIcon,
202
- TuiLoader] }); }
203
- }
204
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTagModule, decorators: [{
205
- type: NgModule,
206
- args: [{
207
- imports: [
208
- CommonModule,
209
- FormsModule,
210
- PolymorpheusOutlet,
211
- PolymorpheusTemplate,
212
- TuiIcon,
213
- TuiLoader,
214
- ],
215
- declarations: [TuiTagComponent],
216
- exports: [TuiTagComponent],
217
- }]
218
- }] });
219
-
220
- /**
221
- * Generated bundle index. Do not edit.
222
- */
223
-
224
- export { TUI_TAG_DEFAULT_OPTIONS, TUI_TAG_OPTIONS, TuiTagComponent, TuiTagModule, tuiTagOptionsProvider };
225
- //# sourceMappingURL=taiga-ui-legacy-components-tag.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-legacy-components-tag.mjs","sources":["../../../projects/legacy/components/tag/tag.options.ts","../../../projects/legacy/components/tag/tag.component.ts","../../../projects/legacy/components/tag/tag.template.html","../../../projects/legacy/components/tag/tag.module.ts","../../../projects/legacy/components/tag/taiga-ui-legacy-components-tag.ts"],"sourcesContent":["import {InjectionToken, type Provider} from '@angular/core';\nimport {tuiProvideOptions} from '@taiga-ui/cdk/utils/miscellaneous';\nimport {type TuiSizeL, type TuiSizeS} from '@taiga-ui/core/types';\nimport {type TuiStatus} from '@taiga-ui/legacy/utils';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChip}\n * https://taiga-ui.dev/components/chip\n */\nexport interface TuiTagOptions {\n readonly autoColor: boolean;\n readonly size: TuiSizeL | TuiSizeS;\n readonly status: TuiStatus;\n}\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChip}\n * https://taiga-ui.dev/components/chip\n */\nexport const TUI_TAG_DEFAULT_OPTIONS: TuiTagOptions = {\n size: 'm',\n status: 'default',\n autoColor: false,\n};\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChip}\n * https://taiga-ui.dev/components/chip\n */\nexport const TUI_TAG_OPTIONS = new InjectionToken(ngDevMode ? 'TUI_TAG_OPTIONS' : '', {\n factory: () => TUI_TAG_DEFAULT_OPTIONS,\n});\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChip}\n * https://taiga-ui.dev/components/chip\n */\nexport function tuiTagOptionsProvider(options: Partial<TuiTagOptions>): Provider {\n return tuiProvideOptions(TUI_TAG_OPTIONS, options, TUI_TAG_DEFAULT_OPTIONS);\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n Output,\n ViewChild,\n} from '@angular/core';\nimport {tuiInjectElement} from '@taiga-ui/cdk/utils/dom';\nimport {TUI_COMMON_ICONS} from '@taiga-ui/core/tokens';\nimport {type TuiSizeL, type TuiSizeS, type TuiSizeXS} from '@taiga-ui/core/types';\nimport {tuiStringHashToHsl} from '@taiga-ui/core/utils/format';\nimport {tuiSizeBigger} from '@taiga-ui/core/utils/miscellaneous';\nimport {type TuiStatus} from '@taiga-ui/legacy/utils';\nimport {type PolymorpheusContent} from '@taiga-ui/polymorpheus';\n\nimport {TUI_TAG_OPTIONS} from './tag.options';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChip}\n * https://taiga-ui.dev/components/chip\n */\n@Component({\n standalone: false,\n selector: 'tui-tag, a[tuiTag], button[tuiTag]',\n templateUrl: './tag.template.html',\n styleUrl: './tag.style.less',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.data-size]': 'size',\n '[attr.data-status]': 'status',\n '[class._editing]': 'editing',\n '[class._hoverable]': 'hoverable',\n '[class._autocolor]': 'autoColor',\n '[class._disabled]': 'disabled',\n '(keydown.delete)': 'remove($event)',\n '(keydown.backspace)': 'remove($event)',\n '(keydown.enter)': 'edit($event)',\n },\n})\nexport class TuiTagComponent {\n private readonly el = tuiInjectElement();\n private readonly options = inject(TUI_TAG_OPTIONS);\n\n protected editing = false;\n\n protected readonly icons = inject(TUI_COMMON_ICONS);\n protected editedText: string | null = null;\n\n @Input()\n public value = '';\n\n @Input()\n public editable = false;\n\n @Input()\n public separator: RegExp | string = ',';\n\n @Input()\n public maxLength: number | null = null;\n\n @Input()\n public size: TuiSizeL | TuiSizeS = this.options.size;\n\n @Input()\n public showLoader = false;\n\n @Input()\n public status: TuiStatus = this.options.status;\n\n @Input()\n public hoverable = false;\n\n @Input()\n public removable = false;\n\n @Input()\n public disabled = false;\n\n @Input()\n public autoColor: boolean = this.options.autoColor;\n\n @Input()\n public leftContent: PolymorpheusContent;\n\n @Output()\n public readonly edited = new EventEmitter<string>();\n\n @ViewChild('input', {read: ElementRef})\n protected set input(input: ElementRef<HTMLInputElement>) {\n if (input) {\n input.nativeElement.focus();\n }\n }\n\n protected get backgroundColor(): string | null {\n return this.autoColor ? tuiStringHashToHsl(this.value) : null;\n }\n\n protected get canRemove(): boolean {\n return this.removable && !this.disabled && !this.showLoader;\n }\n\n protected get displayText(): string {\n return this.editedText ?? this.value;\n }\n\n protected get loaderSize(): TuiSizeXS {\n return tuiSizeBigger(this.size) ? 's' : 'xs';\n }\n\n protected edit(event: Event): void {\n if (!this.canEdit) {\n return;\n }\n\n event.preventDefault();\n this.editing = true;\n this.editedText = this.value;\n }\n\n protected remove(event: Event): void {\n if (!this.canRemove) {\n return;\n }\n\n event.preventDefault();\n event.stopPropagation();\n this.edited.emit('');\n }\n\n protected onInput(value: string): void {\n const newTags = value.split(this.separator);\n\n if (newTags.length > 1) {\n this.save(String(newTags));\n\n return;\n }\n\n this.editedText = value;\n }\n\n protected onKeyDown(event: KeyboardEvent): void {\n event.stopPropagation();\n\n switch (event.key.toLowerCase()) {\n case 'enter':\n event.preventDefault();\n this.save(this.editedText || '');\n break;\n case 'esc':\n case 'escape':\n event.preventDefault();\n this.stopEditing();\n this.el.focus();\n break;\n default:\n break;\n }\n }\n\n protected onBlur(): void {\n if (this.editedText !== null) {\n this.save(this.editedText);\n }\n }\n\n private get canEdit(): boolean {\n return this.editable && !this.disabled && !this.showLoader;\n }\n\n private stopEditing(): void {\n this.editing = false;\n this.editedText = null;\n }\n\n private save(value: string): void {\n this.stopEditing();\n this.edited.emit(value.trim());\n }\n}\n","<div\n class=\"t-tag\"\n [style.backgroundColor]=\"backgroundColor\"\n (dblclick)=\"edit($event)\"\n>\n @if (leftContent) {\n <div class=\"t-content\">\n <ng-container *polymorpheusOutlet=\"leftContent as text\">\n {{ text }}\n </ng-container>\n </div>\n }\n <span\n automation-id=\"tui-tag__text\"\n class=\"t-text\"\n [textContent]=\"displayText\"\n ></span>\n @if (showLoader) {\n <tui-loader\n class=\"t-content\"\n [inheritColor]=\"true\"\n [size]=\"loaderSize\"\n />\n }\n @if (canRemove) {\n <tui-icon\n automation-id=\"tui-tag__remove\"\n class=\"t-icon\"\n [icon]=\"icons.close\"\n (click)=\"remove($event)\"\n (mousedown.stop.prevent.zoneless)=\"(0)\"\n />\n }\n</div>\n@if (editing) {\n <input\n #input\n automation-id=\"tui-tag__edit\"\n type=\"text\"\n class=\"t-edit\"\n [attr.maxLength]=\"maxLength\"\n [ngModel]=\"editedText\"\n [ngModelOptions]=\"{standalone: true}\"\n (blur)=\"onBlur()\"\n (keydown)=\"onKeyDown($event)\"\n (ngModelChange)=\"onInput($event)\"\n />\n}\n","import {CommonModule} from '@angular/common';\nimport {NgModule} from '@angular/core';\nimport {FormsModule} from '@angular/forms';\nimport {TuiIcon} from '@taiga-ui/core/components/icon';\nimport {TuiLoader} from '@taiga-ui/core/components/loader';\nimport {PolymorpheusOutlet, PolymorpheusTemplate} from '@taiga-ui/polymorpheus';\n\nimport {TuiTagComponent} from './tag.component';\n\n/**\n * @deprecated: drop in v5.0 use {@link TuiChip}\n * https://taiga-ui.dev/components/chip\n */\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n PolymorpheusOutlet,\n PolymorpheusTemplate,\n TuiIcon,\n TuiLoader,\n ],\n declarations: [TuiTagComponent],\n exports: [TuiTagComponent],\n})\nexport class TuiTagModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAeA;;;AAGG;AACU,MAAA,uBAAuB,GAAkB;AAClD,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,MAAM,EAAE,SAAS;AACjB,IAAA,SAAS,EAAE,KAAK;;AAGpB;;;AAGG;AACU,MAAA,eAAe,GAAG,IAAI,cAAc,CAAC,SAAS,GAAG,iBAAiB,GAAG,EAAE,EAAE;AAClF,IAAA,OAAO,EAAE,MAAM,uBAAuB;AACzC,CAAA;AAED;;;AAGG;AACG,SAAU,qBAAqB,CAAC,OAA+B,EAAA;IACjE,OAAO,iBAAiB,CAAC,eAAe,EAAE,OAAO,EAAE,uBAAuB,CAAC;AAC/E;;ACnBA;;;AAGG;MAmBU,eAAe,CAAA;AAlB5B,IAAA,WAAA,GAAA;QAmBqB,IAAE,CAAA,EAAA,GAAG,gBAAgB,EAAE;AACvB,QAAA,IAAA,CAAA,OAAO,GAAG,MAAM,CAAC,eAAe,CAAC;QAExC,IAAO,CAAA,OAAA,GAAG,KAAK;AAEN,QAAA,IAAA,CAAA,KAAK,GAAG,MAAM,CAAC,gBAAgB,CAAC;QACzC,IAAU,CAAA,UAAA,GAAkB,IAAI;QAGnC,IAAK,CAAA,KAAA,GAAG,EAAE;QAGV,IAAQ,CAAA,QAAA,GAAG,KAAK;QAGhB,IAAS,CAAA,SAAA,GAAoB,GAAG;QAGhC,IAAS,CAAA,SAAA,GAAkB,IAAI;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A;AAEhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAVjB,YAAY;YACZ,WAAW;YAGX,OAAO;YACP,SAAS,CAAA,EAAA,CAAA,CAAA;;4FAKJ,YAAY,EAAA,UAAA,EAAA,CAAA;kBAZxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,OAAO,EAAE;wBACL,YAAY;wBACZ,WAAW;wBACX,kBAAkB;wBAClB,oBAAoB;wBACpB,OAAO;wBACP,SAAS;AACZ,qBAAA;oBACD,YAAY,EAAE,CAAC,eAAe,CAAC;oBAC/B,OAAO,EAAE,CAAC,eAAe,CAAC;AAC7B,iBAAA;;;ACxBD;;AAEG;;;;"}
@@ -1,262 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { inject, ElementRef, Input, ContentChild, ViewChild, ChangeDetectionStrategy, Component, Directive, NgModule } from '@angular/core';
3
- import { TUI_IS_IOS } from '@taiga-ui/cdk/tokens';
4
- import { tuiIsFocused } from '@taiga-ui/cdk/utils/focus';
5
- import { TUI_TEXTFIELD_OPTIONS } from '@taiga-ui/core/components/textfield';
6
- import { TuiHintOptionsDirective } from '@taiga-ui/core/directives/hint';
7
- import { AbstractTuiControl, tuiAsControl, AbstractTuiTextfieldHost } from '@taiga-ui/legacy/classes';
8
- import { TUI_ICON_START_PADDINGS, TuiTextfieldComponent, TuiPrimitiveTextfieldModule } from '@taiga-ui/legacy/components/primitive-textfield';
9
- import * as i7 from '@taiga-ui/legacy/directives';
10
- import { TUI_TEXTFIELD_WATCHED_CONTROLLER, TEXTFIELD_CONTROLLER_PROVIDER, TuiWrapperModule } from '@taiga-ui/legacy/directives';
11
- import { tuiAsFocusableItemAccessor, tuiAsTextfieldHost } from '@taiga-ui/legacy/tokens';
12
- import { tuiGetBorder } from '@taiga-ui/legacy/utils';
13
- import * as i1 from '@angular/forms';
14
- import { FormsModule } from '@angular/forms';
15
- import * as i2 from '@taiga-ui/polymorpheus';
16
- import { PolymorpheusOutlet, PolymorpheusTemplate } from '@taiga-ui/polymorpheus';
17
- import * as i3 from '@taiga-ui/core/directives/appearance';
18
- import { TuiAppearance } from '@taiga-ui/core/directives/appearance';
19
- import * as i4 from '@taiga-ui/core/components/icon';
20
- import { TuiIcon } from '@taiga-ui/core/components/icon';
21
- import * as i5 from '@taiga-ui/core/components/scrollbar';
22
- import { TuiScrollbar } from '@taiga-ui/core/components/scrollbar';
23
- import * as i6 from '@taiga-ui/legacy/components/tooltip';
24
- import { TuiTooltipModule } from '@taiga-ui/legacy/components/tooltip';
25
- import * as i8 from '@angular/common';
26
- import { CommonModule } from '@angular/common';
27
-
28
- const DEFAULT_ROWS = 20;
29
- const LINE_HEIGHT_M = 20;
30
- const LINE_HEIGHT_L = 24;
31
- /**
32
- * TODO(v5): delete it
33
- * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead
34
- */
35
- class TuiTextareaComponent extends AbstractTuiControl {
36
- constructor() {
37
- super(...arguments);
38
- this.options = inject(TUI_TEXTFIELD_OPTIONS);
39
- this.isIOS = inject(TUI_IS_IOS);
40
- this.controller = inject(TUI_TEXTFIELD_WATCHED_CONTROLLER);
41
- this.hintOptions = inject(TuiHintOptionsDirective, { optional: true });
42
- this.rows = DEFAULT_ROWS;
43
- this.maxLength = null;
44
- this.expandable = false;
45
- }
46
- get nativeFocusableElement() {
47
- if (this.computedDisabled) {
48
- return null;
49
- }
50
- return (this.textfield?.nativeElement || this.focusableElement?.nativeElement || null);
51
- }
52
- get focused() {
53
- return tuiIsFocused(this.nativeFocusableElement);
54
- }
55
- get computeMaxHeight() {
56
- return this.expandable ? this.rows * this.lineHeight : null;
57
- }
58
- onValueChange(value) {
59
- this.value = value;
60
- }
61
- get labelOutside() {
62
- return this.options.appearance() === 'table' || this.controller.labelOutside;
63
- }
64
- get size() {
65
- return this.controller.size;
66
- }
67
- get borderStart() {
68
- return this.iconLeftContent ? TUI_ICON_START_PADDINGS[this.size] : 0;
69
- }
70
- get borderEnd() {
71
- return tuiGetBorder(!!this.iconContent, this.hasCleaner, this.hasTooltip, this.hasCustomContent, this.size);
72
- }
73
- get hasTooltip() {
74
- return (!!this.hintOptions?.content &&
75
- (this.controller.options.hintOnDisabled || !this.computedDisabled));
76
- }
77
- get hasValue() {
78
- return this.value !== '';
79
- }
80
- get hasCounter() {
81
- return !!this.maxLength && this.interactive;
82
- }
83
- get appearance() {
84
- return this.options.appearance() === 'table'
85
- ? 'table'
86
- : this.controller.appearance;
87
- }
88
- get hasCleaner() {
89
- return this.controller.cleaner && this.hasValue && this.interactive;
90
- }
91
- get hasPlaceholder() {
92
- return this.placeholderRaisable || (!this.hasValue && !this.hasExampleText);
93
- }
94
- get hasCustomContent() {
95
- return !!this.controller.customContent;
96
- }
97
- get iconLeftContent() {
98
- return this.controller.iconStart;
99
- }
100
- get iconContent() {
101
- return this.controller.icon;
102
- }
103
- get iconCleaner() {
104
- return this.controller.options.iconCleaner;
105
- }
106
- get hasExampleText() {
107
- return (!!this.textfield?.nativeElement.placeholder &&
108
- this.focused &&
109
- !this.hasValue &&
110
- !this.readOnly);
111
- }
112
- get placeholderRaised() {
113
- return (this.placeholderRaisable &&
114
- ((this.computedFocused && !this.readOnly) || this.hasValue));
115
- }
116
- get fittedContent() {
117
- return this.value.slice(0, this.maxLength || Infinity);
118
- }
119
- get extraContent() {
120
- return this.value.slice(this.maxLength || Infinity);
121
- }
122
- onFocused(focused) {
123
- this.updateFocused(focused);
124
- }
125
- onMouseDown(event) {
126
- if (event.target === this.nativeFocusableElement) {
127
- return;
128
- }
129
- event.preventDefault();
130
- if (this.nativeFocusableElement) {
131
- this.nativeFocusableElement.focus();
132
- }
133
- }
134
- getFallbackValue() {
135
- return '';
136
- }
137
- get lineHeight() {
138
- return this.controller.size === 'm' ? LINE_HEIGHT_M : LINE_HEIGHT_L;
139
- }
140
- get placeholderRaisable() {
141
- return this.size !== 's' && !this.controller.labelOutside;
142
- }
143
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
144
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.15", type: TuiTextareaComponent, isStandalone: false, selector: "tui-textarea", inputs: { rows: "rows", maxLength: "maxLength", expandable: "expandable" }, host: { listeners: { "focusin": "onFocused(true)", "focusout": "onFocused(false)" }, properties: { "attr.data-size": "size", "class._ios": "isIOS", "class._expandable": "expandable", "class._has-counter": "hasCounter", "class._label-outside": "labelOutside", "class._has-tooltip": "hasTooltip", "class._has-value": "hasValue", "style.--t-border-end.rem": "borderEnd", "style.--t-border-start.rem": "borderStart" } }, providers: [
145
- tuiAsFocusableItemAccessor(TuiTextareaComponent),
146
- tuiAsControl(TuiTextareaComponent),
147
- TEXTFIELD_CONTROLLER_PROVIDER,
148
- ], queries: [{ propertyName: "textfield", first: true, predicate: TuiTextfieldComponent, descendants: true, read: ElementRef }], viewQueries: [{ propertyName: "focusableElement", first: true, predicate: ["focusableElement"], descendants: true }], usesInheritance: true, ngImport: i0, template: "@if (hintOptions?.change$ | async) {}\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n @if (hasCounter) {\n <div\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n }\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n @if (hasPlaceholder) {\n <div\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content />\n </div>\n }\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [ngModelOptions]=\"{standalone: true}\"\n [readOnly]=\"readOnly\"\n [tabIndex]=\"computedFocusable ? 0 : -1\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\" />\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n @if (iconLeftContent) {\n <div class=\"t-icon t-icon_left t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n @if (hasCustomContent) {\n <tui-icon\n *polymorpheusOutlet=\"controller.customContent as src\"\n [icon]=\"src\"\n />\n }\n @if (hasCleaner) {\n <tui-icon\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n class=\"t-cleaner\"\n [icon]=\"src.toString()\"\n (click.stop)=\"onValueChange('')\"\n />\n }\n @if (hasTooltip) {\n <tui-tooltip\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n />\n }\n @if (iconContent) {\n <div class=\"t-icon t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;flex-direction:column;min-block-size:var(--tui-textarea-height);border-radius:var(--tui-radius-m);color:var(--tui-text-primary)}:host :host-context(*:disabled){pointer-events:none}:host[data-size=s]{--tui-height: var(--tui-height-s);--tui-textarea-height: 4.5625rem;font:var(--tui-font-text-s)}:host[data-size=m]{--tui-height: var(--tui-height-m);--tui-textarea-height: 5.5rem;font:var(--tui-font-text-s)}:host[data-size=l]{--tui-height: var(--tui-height-l);--tui-textarea-height: 6.75rem;font:var(--tui-font-text-m)}:host[data-size=m]._has-counter{--tui-textarea-height: 6.625rem}:host[data-size=l]._has-counter{--tui-textarea-height: 7.875rem}@supports (-webkit-hyphens: none){:host .t-pseudo-content,:host .t-input{text-wrap:balance;white-space:break-spaces}}.t-outline{min-block-size:inherit}.t-content{display:block;margin-block-start:0;margin-block-end:0;min-block-size:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-block-size:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}:host._label-outside._has-counter:not(._expandable) .t-content{bottom:1rem}.t-wrapper{position:relative;inline-size:100%;block-size:100%;min-block-size:inherit;box-sizing:border-box;padding:calc((var(--tui-height) - 1.25rem) / 2) 0}:host[data-size=l]._label-outside .t-wrapper{padding:calc((var(--tui-height) - 1.5rem) / 2) 0}:host[data-size=m]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.25rem) / 2) 0}:host[data-size=l]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.625rem) / 2) 0}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-block-end:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-block-end:1rem}.t-input-wrapper{min-block-size:inherit;inline-size:100%;flex:1}.t-relative{position:relative;min-block-size:inherit}.t-box{display:flex;min-block-size:calc(100% - 1rem);inline-size:100%;box-sizing:content-box}:host:not(._expandable) .t-box{block-size:calc(100% - 1rem)}:host:not(._expandable)._label-outside .t-box{block-size:100%}:host._has-counter._expandable .t-box{margin-block-end:1.25rem}:host[data-size=m]:not(._label-outside) .t-box{border-block-start:1rem solid transparent}:host[data-size=l]:not(._label-outside) .t-box{border-block-start:1.25rem solid transparent}.t-pseudo-content{white-space:pre-wrap;overflow-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:0 solid transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0)}:host[data-size=s] .t-pseudo-content,:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-status-negative-pale)}.t-input{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;inline-size:100%;block-size:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border-style:solid;border-color:transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{-webkit-text-fill-color:var(--tui-text-primary)!important;border-color:var(--tui-service-autofill-background);box-shadow:0 0 0 100rem var(--tui-service-autofill-background) inset!important}.t-input:not(:last-of-type){display:none}.t-input::placeholder{color:var(--tui-text-tertiary);opacity:0}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=s] .t-input,:host[data-size=m] .t-input{padding:0 .75rem;font:var(--tui-font-text-s)}:host[data-size=l] .t-input{padding:0 1rem;font:var(--tui-font-text-m)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-inline-start:.8125rem}}.t-pseudo-content,.t-input{word-break:break-word}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;inline-size:100%;-webkit-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-secondary);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;top:calc(var(--tui-height) / 2 - .625rem);left:0;max-inline-size:100%;border:0 solid transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0);box-sizing:border-box}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-text-negative)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-tertiary)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-primary)}:host[data-size=s] .t-placeholder{padding:0 .75rem}:host[data-size=m] .t-placeholder{padding:0 .75rem}:host[data-size=l] .t-placeholder{padding:0 1rem}:host._label-outside .t-placeholder{overflow:initial;block-size:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:calc((var(--tui-height) - 1.5rem) / 2) 1rem}:host[data-size=m] .t-icons{padding:calc((var(--tui-height) - 1.5rem) / 2) .625rem}.t-icons>:not(:first-child){margin-inline-start:.25rem}.t-icon{position:relative;display:flex;inline-size:1.5rem;block-size:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{margin-inline-end:auto}.t-cleaner{position:relative;display:flex;inline-size:1.5rem;block-size:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-cleaner:before{font-size:1rem}.t-caret{display:inline-block;block-size:1rem;inline-size:0}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-block-start:auto;text-align:end;color:var(--tui-text-tertiary)}:host._readonly .t-textfield-icon ::ng-deep [tuiAppearance][data-appearance=icon]{pointer-events:none}@media (hover: hover) and (pointer: fine){:host:not(._readonly):not(._disabled):hover .t-textfield-icon ::ng-deep [tuiAppearance][data-appearance=icon]:before{color:var(--tui-text-secondary)}}\n"], dependencies: [{ kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i2.PolymorpheusOutlet, selector: "[polymorpheusOutlet]", inputs: ["polymorpheusOutlet", "polymorpheusOutletContext"] }, { kind: "directive", type: i3.TuiAppearance, selector: "[tuiAppearance]", inputs: ["tuiAppearance", "tuiAppearanceState", "tuiAppearanceFocus", "tuiAppearanceMode"] }, { kind: "component", type: i4.TuiIcon, selector: "tui-icon:not([tuiBadge])", inputs: ["background"] }, { kind: "component", type: i5.TuiScrollbar, selector: "tui-scrollbar", inputs: ["hidden"] }, { kind: "component", type: i6.TuiTooltipComponent, selector: "tui-tooltip", inputs: ["content", "direction", "appearance", "showDelay", "hideDelay", "describeId", "context"] }, { kind: "directive", type: i7.TuiWrapperDirective, selector: "[tuiWrapper]", inputs: ["disabled", "readOnly", "hover", "active", "focus", "invalid", "appearance"] }, { kind: "pipe", type: i8.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
149
- }
150
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaComponent, decorators: [{
151
- type: Component,
152
- args: [{ standalone: false, selector: 'tui-textarea', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
153
- tuiAsFocusableItemAccessor(TuiTextareaComponent),
154
- tuiAsControl(TuiTextareaComponent),
155
- TEXTFIELD_CONTROLLER_PROVIDER,
156
- ], host: {
157
- '[attr.data-size]': 'size',
158
- '[class._ios]': 'isIOS',
159
- '[class._expandable]': 'expandable',
160
- '[class._has-counter]': 'hasCounter',
161
- '[class._label-outside]': 'labelOutside',
162
- '[class._has-tooltip]': 'hasTooltip',
163
- '[class._has-value]': 'hasValue',
164
- '[style.--t-border-end.rem]': 'borderEnd',
165
- '[style.--t-border-start.rem]': 'borderStart',
166
- '(focusin)': 'onFocused(true)',
167
- '(focusout)': 'onFocused(false)',
168
- }, template: "@if (hintOptions?.change$ | async) {}\n<div\n automation-id=\"tui-text-area__wrapper\"\n tuiWrapper\n class=\"t-outline\"\n [appearance]=\"appearance\"\n [disabled]=\"disabled\"\n [focus]=\"computedFocused\"\n [hover]=\"pseudoHover\"\n [invalid]=\"computedInvalid\"\n [readOnly]=\"readOnly\"\n>\n @if (hasCounter) {\n <div\n automation-id=\"tui-text-area__counter\"\n class=\"t-counter\"\n >\n {{ value.length }}/{{ maxLength }}\n </div>\n }\n\n <label\n class=\"t-content\"\n (mousedown)=\"onMouseDown($event)\"\n >\n <div class=\"t-wrapper\">\n @if (hasPlaceholder) {\n <div\n automation-id=\"tui-text-area__placeholder\"\n class=\"t-placeholder\"\n [class.t-placeholder_raised]=\"placeholderRaised\"\n >\n <ng-content />\n </div>\n }\n <tui-scrollbar\n automation-id=\"tui-text-area__scrollbar\"\n class=\"t-box\"\n [style.maxHeight.px]=\"computeMaxHeight\"\n >\n <div class=\"t-input-wrapper\">\n <div class=\"t-relative\">\n <div\n aria-hidden=\"true\"\n class=\"t-pseudo-content\"\n >\n <span [textContent]=\"fittedContent || nativeFocusableElement?.placeholder\"></span>\n <span\n class=\"t-pseudo-content__extra\"\n [textContent]=\"extraContent\"\n ></span>\n <span class=\"t-caret\"></span>\n </div>\n <textarea\n #focusableElement\n automation-id=\"tui-text-area__native\"\n class=\"t-input\"\n [disabled]=\"computedDisabled\"\n [id]=\"id\"\n [ngModelOptions]=\"{standalone: true}\"\n [readOnly]=\"readOnly\"\n [tabIndex]=\"computedFocusable ? 0 : -1\"\n [(ngModel)]=\"value\"\n ></textarea>\n <ng-content select=\"textarea\" />\n </div>\n </div>\n </tui-scrollbar>\n </div>\n <div class=\"t-icons\">\n @if (iconLeftContent) {\n <div class=\"t-icon t-icon_left t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconLeftContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n @if (hasCustomContent) {\n <tui-icon\n *polymorpheusOutlet=\"controller.customContent as src\"\n [icon]=\"src\"\n />\n }\n @if (hasCleaner) {\n <tui-icon\n *polymorpheusOutlet=\"iconCleaner as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n class=\"t-cleaner\"\n [icon]=\"src.toString()\"\n (click.stop)=\"onValueChange('')\"\n />\n }\n @if (hasTooltip) {\n <tui-tooltip\n automation-id=\"tui-text-area__tooltip\"\n [content]=\"hintOptions?.content\"\n [describeId]=\"id\"\n />\n }\n @if (iconContent) {\n <div class=\"t-icon t-textfield-icon\">\n <tui-icon\n *polymorpheusOutlet=\"iconContent as src; context: {$implicit: size}\"\n tuiAppearance=\"icon\"\n [icon]=\"src.toString()\"\n />\n </div>\n }\n </div>\n </label>\n</div>\n", styles: [":host{position:relative;z-index:0;display:flex;flex-direction:column;min-block-size:var(--tui-textarea-height);border-radius:var(--tui-radius-m);color:var(--tui-text-primary)}:host :host-context(*:disabled){pointer-events:none}:host[data-size=s]{--tui-height: var(--tui-height-s);--tui-textarea-height: 4.5625rem;font:var(--tui-font-text-s)}:host[data-size=m]{--tui-height: var(--tui-height-m);--tui-textarea-height: 5.5rem;font:var(--tui-font-text-s)}:host[data-size=l]{--tui-height: var(--tui-height-l);--tui-textarea-height: 6.75rem;font:var(--tui-font-text-m)}:host[data-size=m]._has-counter{--tui-textarea-height: 6.625rem}:host[data-size=l]._has-counter{--tui-textarea-height: 7.875rem}@supports (-webkit-hyphens: none){:host .t-pseudo-content,:host .t-input{text-wrap:balance;white-space:break-spaces}}.t-outline{min-block-size:inherit}.t-content{display:block;margin-block-start:0;margin-block-end:0;min-block-size:inherit;box-sizing:border-box;overflow:hidden;cursor:text}:host._disabled .t-content{cursor:auto;opacity:var(--tui-disabled-opacity)}:host:not(._expandable) .t-content{position:absolute;top:0;left:0;bottom:1px;right:0;min-block-size:auto}:host._has-counter:not(._expandable) .t-content{bottom:1.6875rem}:host._label-outside._has-counter:not(._expandable) .t-content{bottom:1rem}.t-wrapper{position:relative;inline-size:100%;block-size:100%;min-block-size:inherit;box-sizing:border-box;padding:calc((var(--tui-height) - 1.25rem) / 2) 0}:host[data-size=l]._label-outside .t-wrapper{padding:calc((var(--tui-height) - 1.5rem) / 2) 0}:host[data-size=m]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.25rem) / 2) 0}:host[data-size=l]:not(._label-outside) .t-wrapper{padding:calc((var(--tui-height) - 2.625rem) / 2) 0}:host-context(table)[data-size=m]._label-outside .t-wrapper{padding-block-end:.75rem}:host-context(table)[data-size=l]._label-outside .t-wrapper{padding-block-end:1rem}.t-input-wrapper{min-block-size:inherit;inline-size:100%;flex:1}.t-relative{position:relative;min-block-size:inherit}.t-box{display:flex;min-block-size:calc(100% - 1rem);inline-size:100%;box-sizing:content-box}:host:not(._expandable) .t-box{block-size:calc(100% - 1rem)}:host:not(._expandable)._label-outside .t-box{block-size:100%}:host._has-counter._expandable .t-box{margin-block-end:1.25rem}:host[data-size=m]:not(._label-outside) .t-box{border-block-start:1rem solid transparent}:host[data-size=l]:not(._label-outside) .t-box{border-block-start:1.25rem solid transparent}.t-pseudo-content{white-space:pre-wrap;overflow-wrap:break-word;pointer-events:none;color:transparent;overflow:hidden;border:0 solid transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0)}:host[data-size=s] .t-pseudo-content,:host[data-size=m] .t-pseudo-content{padding:0 .75rem}:host[data-size=l] .t-pseudo-content{padding:0 1rem}.t-pseudo-content__extra{background-color:var(--tui-status-negative-pale)}.t-input{padding:0;margin:0;border-width:0;border-radius:inherit;background:none;font-size:inherit;line-height:inherit;font-weight:inherit;color:inherit;caret-color:currentColor;-webkit-appearance:none;appearance:none;word-break:keep-all;-webkit-text-fill-color:currentColor;position:absolute;top:0;left:0;inline-size:100%;block-size:100%;box-sizing:border-box;resize:none;overflow:hidden;outline:none;border-style:solid;border-color:transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0)}.t-input:-webkit-autofill,.t-input:-webkit-autofill:hover,.t-input:-webkit-autofill:focus{-webkit-text-fill-color:var(--tui-text-primary)!important;border-color:var(--tui-service-autofill-background);box-shadow:0 0 0 100rem var(--tui-service-autofill-background) inset!important}.t-input:not(:last-of-type){display:none}.t-input::placeholder{color:var(--tui-text-tertiary);opacity:0}:host._focused .t-input:not(:read-only)::placeholder{opacity:1}:host[data-size=s] .t-input,:host[data-size=m] .t-input{padding:0 .75rem;font:var(--tui-font-text-s)}:host[data-size=l] .t-input{padding:0 1rem;font:var(--tui-font-text-m)}@supports (-webkit-marquee-repetition: infinite) and (object-fit: fill){:host._ios .t-input{padding-inline-start:.8125rem}}.t-pseudo-content,.t-input{word-break:break-word}.t-placeholder{transition-property:transform,font-size,color,letter-spacing;transition-duration:var(--tui-duration, .3s);transition-timing-function:ease-in-out;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:block;inline-size:100%;-webkit-user-select:none;user-select:none;font:var(--tui-font-text-s);color:var(--tui-text-secondary);pointer-events:none;will-change:transform;transform:translateY(0);position:absolute;top:calc(var(--tui-height) / 2 - .625rem);left:0;max-inline-size:100%;border:0 solid transparent;border-inline-start-width:var(--t-border-start, 0);border-inline-end-width:var(--t-border-end, 0);box-sizing:border-box}@supports (-webkit-hyphens: none){.t-placeholder{will-change:unset;transition-property:transform,color,letter-spacing}}.t-placeholder_raised{transform:translateY(-.625rem)}:host[data-size=m] .t-placeholder_raised{font:var(--tui-font-text-xs);line-height:1.25rem;transform:translateY(-.5rem);letter-spacing:.025rem}:host._invalid:not(._focused) .t-placeholder_raised,:host._invalid:not(._focused):hover .t-placeholder_raised{color:var(--tui-text-negative)}:host._focused .t-placeholder,:host[data-size=m]._focused._label-outside .t-placeholder,:host[data-size=l]._focused._label-outside .t-placeholder{color:var(--tui-text-tertiary)}:host[data-size=l] .t-placeholder{font:var(--tui-font-text-m);line-height:1.25rem}:host[data-size=l] .t-placeholder_raised{font-size:.8156rem}:host[data-size=m]._focused:not(._label-outside) .t-placeholder,:host[data-size=l]._focused:not(._label-outside) .t-placeholder{color:var(--tui-text-primary)}:host[data-size=s] .t-placeholder{padding:0 .75rem}:host[data-size=m] .t-placeholder{padding:0 .75rem}:host[data-size=l] .t-placeholder{padding:0 1rem}:host._label-outside .t-placeholder{overflow:initial;block-size:auto;white-space:initial}.t-icons{position:absolute;top:0;left:0;bottom:0;right:0;display:flex;justify-content:flex-end;pointer-events:none;padding:calc((var(--tui-height) - 1.5rem) / 2) 1rem}:host[data-size=m] .t-icons{padding:calc((var(--tui-height) - 1.5rem) / 2) .625rem}.t-icons>:not(:first-child){margin-inline-start:.25rem}.t-icon{position:relative;display:flex;inline-size:1.5rem;block-size:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none}.t-icon_left{margin-inline-end:auto}.t-cleaner{position:relative;display:flex;inline-size:1.5rem;block-size:1.5rem;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;pointer-events:none;pointer-events:auto}:host._readonly .t-cleaner,:host._disabled .t-cleaner{pointer-events:none}.t-cleaner:before{font-size:1rem}.t-caret{display:inline-block;block-size:1rem;inline-size:0}.t-counter{position:absolute;right:.75rem;bottom:.5rem;font:var(--tui-font-text-s);pointer-events:none;margin-block-start:auto;text-align:end;color:var(--tui-text-tertiary)}:host._readonly .t-textfield-icon ::ng-deep [tuiAppearance][data-appearance=icon]{pointer-events:none}@media (hover: hover) and (pointer: fine){:host:not(._readonly):not(._disabled):hover .t-textfield-icon ::ng-deep [tuiAppearance][data-appearance=icon]:before{color:var(--tui-text-secondary)}}\n"] }]
169
- }], propDecorators: { focusableElement: [{
170
- type: ViewChild,
171
- args: ['focusableElement']
172
- }], textfield: [{
173
- type: ContentChild,
174
- args: [TuiTextfieldComponent, { read: ElementRef }]
175
- }], rows: [{
176
- type: Input
177
- }], maxLength: [{
178
- type: Input
179
- }], expandable: [{
180
- type: Input
181
- }] } });
182
-
183
- /**
184
- * TODO(v5): delete it
185
- * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead
186
- */
187
- class TuiTextareaDirective extends AbstractTuiTextfieldHost {
188
- onValueChange(value) {
189
- this.host.onValueChange(value);
190
- }
191
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
192
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.15", type: TuiTextareaDirective, isStandalone: false, selector: "tui-textarea", providers: [tuiAsTextfieldHost(TuiTextareaDirective)], usesInheritance: true, ngImport: i0 }); }
193
- }
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaDirective, decorators: [{
195
- type: Directive,
196
- args: [{
197
- standalone: false,
198
- selector: 'tui-textarea',
199
- providers: [tuiAsTextfieldHost(TuiTextareaDirective)],
200
- }]
201
- }] });
202
-
203
- /**
204
- * TODO(v5): delete it
205
- * @deprecated use new version of {@link https://taiga-ui.dev/components/textarea Textarea} (from @taiga-ui/kit) instead
206
- */
207
- class TuiTextareaModule {
208
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
209
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaModule, declarations: [TuiTextareaComponent, TuiTextareaDirective], imports: [CommonModule,
210
- FormsModule,
211
- PolymorpheusOutlet,
212
- PolymorpheusTemplate,
213
- TuiAppearance,
214
- TuiIcon,
215
- TuiPrimitiveTextfieldModule,
216
- TuiScrollbar,
217
- TuiTooltipModule,
218
- TuiWrapperModule], exports: [TuiTextareaComponent,
219
- TuiTextareaDirective,
220
- TuiTextfieldComponent,
221
- PolymorpheusOutlet,
222
- PolymorpheusTemplate] }); }
223
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaModule, imports: [CommonModule,
224
- FormsModule,
225
- TuiIcon,
226
- TuiPrimitiveTextfieldModule,
227
- TuiScrollbar,
228
- TuiTooltipModule,
229
- TuiWrapperModule] }); }
230
- }
231
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.15", ngImport: i0, type: TuiTextareaModule, decorators: [{
232
- type: NgModule,
233
- args: [{
234
- imports: [
235
- CommonModule,
236
- FormsModule,
237
- PolymorpheusOutlet,
238
- PolymorpheusTemplate,
239
- TuiAppearance,
240
- TuiIcon,
241
- TuiPrimitiveTextfieldModule,
242
- TuiScrollbar,
243
- TuiTooltipModule,
244
- TuiWrapperModule,
245
- ],
246
- declarations: [TuiTextareaComponent, TuiTextareaDirective],
247
- exports: [
248
- TuiTextareaComponent,
249
- TuiTextareaDirective,
250
- TuiTextfieldComponent,
251
- PolymorpheusOutlet,
252
- PolymorpheusTemplate,
253
- ],
254
- }]
255
- }] });
256
-
257
- /**
258
- * Generated bundle index. Do not edit.
259
- */
260
-
261
- export { DEFAULT_ROWS, LINE_HEIGHT_L, LINE_HEIGHT_M, TuiTextareaComponent, TuiTextareaDirective, TuiTextareaModule };
262
- //# sourceMappingURL=taiga-ui-legacy-components-textarea.mjs.map