@taiga-ui/core 4.52.0-canary.763e67d → 4.52.0-canary.7c53ccc

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 (79) hide show
  1. package/components/input/input.directive.d.ts +1 -2
  2. package/components/notification/notification.directive.d.ts +2 -2
  3. package/components/root/root.component.d.ts +1 -1
  4. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +1 -2
  5. package/components/textfield/textfield.component.d.ts +6 -6
  6. package/directives/appearance/appearance.directive.d.ts +1 -1
  7. package/directives/appearance/appearance.options.d.ts +1 -2
  8. package/fesm2022/taiga-ui-core-components-button.mjs +2 -2
  9. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  10. package/fesm2022/taiga-ui-core-components-calendar.mjs +6 -10
  11. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-core-components-cell.mjs +2 -2
  13. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-core-components-data-list.mjs +2 -2
  15. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-core-components-error.mjs +2 -2
  17. package/fesm2022/taiga-ui-core-components-icon.mjs +2 -2
  18. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  19. package/fesm2022/taiga-ui-core-components-input.mjs +3 -4
  20. package/fesm2022/taiga-ui-core-components-input.mjs.map +1 -1
  21. package/fesm2022/taiga-ui-core-components-label.mjs +2 -2
  22. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-core-components-link.mjs +2 -2
  24. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-core-components-loader.mjs +2 -2
  26. package/fesm2022/taiga-ui-core-components-notification.mjs +6 -6
  27. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-core-components-root.mjs +4 -6
  29. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +2 -2
  31. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-core-components-spin-button.mjs +2 -2
  33. package/fesm2022/taiga-ui-core-components-textfield.mjs +16 -18
  34. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  35. package/fesm2022/taiga-ui-core-components-title.mjs +2 -2
  36. package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-core-directives-icons.mjs +2 -2
  39. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-core-portals-dialog.mjs +2 -2
  41. package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-core-portals-dropdown.mjs +11 -27
  43. package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-core-portals-hint.mjs +17 -74
  45. package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-core-portals-modal.mjs +2 -2
  47. package/fesm2022/taiga-ui-core-portals-modal.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-core-services.mjs +5 -30
  49. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-core-tokens.mjs +29 -15
  51. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  52. package/package.json +29 -29
  53. package/portals/dropdown/dropdown-options.directive.d.ts +0 -4
  54. package/portals/hint/hint-options.directive.d.ts +1 -20
  55. package/portals/hint/hint-position.directive.d.ts +3 -3
  56. package/portals/hint/hint.d.ts +1 -2
  57. package/portals/hint/hint.directive.d.ts +1 -1
  58. package/services/index.d.ts +0 -1
  59. package/styles/components/button.less +9 -19
  60. package/styles/components/icon.less +11 -0
  61. package/styles/components/icons.less +2 -1
  62. package/styles/components/label.less +3 -12
  63. package/styles/components/link.less +1 -2
  64. package/styles/components/notification.less +27 -61
  65. package/styles/components/textfield.less +123 -172
  66. package/styles/components/title.less +8 -8
  67. package/styles/mixins/date-picker.less +1 -1
  68. package/styles/mixins/picker.less +1 -1
  69. package/styles/mixins/picker.scss +1 -1
  70. package/styles/mixins/slider.less +4 -10
  71. package/styles/mixins/slider.scss +23 -21
  72. package/styles/theme/appearance/table.less +9 -15
  73. package/styles/theme/appearance/textfield.less +30 -27
  74. package/styles/theme/variables.less +16 -17
  75. package/styles/variables/media.less +13 -18
  76. package/styles/variables/media.scss +13 -13
  77. package/tokens/breakpoint.d.ts +4 -0
  78. package/tokens/index.d.ts +1 -0
  79. package/services/breakpoint.service.d.ts +0 -16
@@ -2,7 +2,7 @@
2
2
 
3
3
  /**
4
4
  * @name Notification
5
- * @selector tui-notification, [tuiNotification]
5
+ * @selector [tuiNotification]
6
6
  *
7
7
  * @description
8
8
  * A colored rounded block of information with optional icon, title, subtitle and actions
@@ -11,17 +11,16 @@
11
11
  * data-size — size (default: 'l') ('s' | 'm' | 'l')
12
12
  *
13
13
  * @example
14
- * <tui-notification tuiAppearance data-appearance="negative">
14
+ * <div tuiNotification tuiAppearance data-appearance="negative">
15
15
  * <span tuiTitle>
16
16
  * Error
17
17
  * <span tuiSubtitle>Something went wrong</span>
18
18
  * </span>
19
- * </tui-notification>
19
+ * </div>
20
20
  *
21
21
  * @see-also
22
22
  * Icons, Appearance
23
23
  */
24
- tui-notification,
25
24
  [tuiNotification] {
26
25
  .button-clear();
27
26
 
@@ -30,7 +29,7 @@ tui-notification,
30
29
  max-block-size: 100%;
31
30
  color: var(--tui-text-primary);
32
31
  padding: 1rem;
33
- font: var(--tui-font-text-m);
32
+ font: var(--tui-font-body-m);
34
33
  line-height: 1.5rem;
35
34
  border-radius: var(--tui-radius-l);
36
35
  box-sizing: border-box;
@@ -39,6 +38,10 @@ tui-notification,
39
38
  border-inline-start: var(--t-start) solid transparent;
40
39
  border-inline-end: var(--t-end) solid transparent;
41
40
 
41
+ .interactive({
42
+ cursor: pointer;
43
+ });
44
+
42
45
  --t-start: 0;
43
46
  --t-end: 0;
44
47
 
@@ -52,29 +55,23 @@ tui-notification,
52
55
 
53
56
  &::before {
54
57
  position: absolute;
55
- left: -1rem;
56
58
  inset-inline-start: -1rem;
57
59
  }
58
60
 
59
61
  &::after {
60
62
  .center-top();
61
63
 
62
- right: -0.5rem;
64
+ inset-inline-end: -0.5rem;
63
65
  font-size: 1rem;
64
66
  margin: 0;
65
67
  margin-inline-end: -0.25rem;
66
68
  margin-inline-start: auto;
67
69
  color: var(--tui-text-tertiary) !important;
68
-
69
- @supports (inset-inline-end: 0) {
70
- right: unset;
71
- inset-inline-end: -0.5rem;
72
- }
73
70
  }
74
71
 
75
72
  &[data-size='s'] {
76
73
  padding: 0.375rem 0.625rem;
77
- font: var(--tui-font-text-s);
74
+ font: var(--tui-font-body-s);
78
75
  line-height: 1.25rem;
79
76
  border-radius: var(--tui-radius-m);
80
77
 
@@ -83,19 +80,13 @@ tui-notification,
83
80
  }
84
81
 
85
82
  &::before {
86
- top: 0.5rem;
87
- left: -0.875rem;
83
+ inset-block-start: 0.5rem;
88
84
  inset-inline-start: -0.875rem;
89
85
  font-size: 1rem;
90
86
  }
91
87
 
92
88
  &::after {
93
- right: -0.875rem;
94
-
95
- @supports (inset-inline-end: 0) {
96
- right: unset;
97
- inset-inline-end: -0.875rem;
98
- }
89
+ inset-inline-end: -0.875rem;
99
90
  }
100
91
 
101
92
  tui-icon {
@@ -103,12 +94,12 @@ tui-notification,
103
94
  }
104
95
 
105
96
  [tuiTitle] {
106
- font: var(--tui-font-text-s);
97
+ font: var(--tui-font-body-s);
107
98
  font-weight: bold;
108
99
  }
109
100
 
110
101
  [tuiSubtitle] {
111
- font: var(--tui-font-text-s);
102
+ font: var(--tui-font-body-s);
112
103
  }
113
104
 
114
105
  [tuiSubtitle] + * {
@@ -117,19 +108,14 @@ tui-notification,
117
108
  }
118
109
 
119
110
  > [tuiIconButton] {
120
- top: 0;
121
- right: 0;
122
-
123
- @supports (inset-inline-end: 0) {
124
- right: unset;
125
- inset-inline-end: 0;
126
- }
111
+ inset-block-start: 0;
112
+ inset-inline-end: 0;
127
113
  }
128
114
  }
129
115
 
130
116
  &[data-size='m'] {
131
117
  padding: 0.75rem;
132
- font: var(--tui-font-text-s);
118
+ font: var(--tui-font-body-s);
133
119
  line-height: 1.25rem;
134
120
  border-radius: var(--tui-radius-m);
135
121
 
@@ -138,18 +124,12 @@ tui-notification,
138
124
  }
139
125
 
140
126
  &::before {
141
- left: -0.875rem;
142
127
  inset-inline-start: -0.875rem;
143
128
  font-size: 1.25rem;
144
129
  }
145
130
 
146
131
  &::after {
147
- right: -0.75rem;
148
-
149
- @supports (inset-inline-end: 0) {
150
- right: unset;
151
- inset-inline-end: -0.75rem;
152
- }
132
+ inset-inline-end: -0.75rem;
153
133
  }
154
134
 
155
135
  tui-icon {
@@ -157,12 +137,12 @@ tui-notification,
157
137
  }
158
138
 
159
139
  [tuiTitle] {
160
- font: var(--tui-font-text-ui-m);
140
+ font: var(--tui-font-ui-m);
161
141
  font-weight: bold;
162
142
  }
163
143
 
164
144
  [tuiSubtitle] {
165
- font: var(--tui-font-text-s);
145
+ font: var(--tui-font-body-s);
166
146
  }
167
147
 
168
148
  [tuiSubtitle] + * {
@@ -171,48 +151,34 @@ tui-notification,
171
151
  }
172
152
 
173
153
  > [tuiIconButton] {
174
- top: 0.375rem;
175
- right: 0.5rem;
176
-
177
- @supports (inset-inline-end: 0) {
178
- right: unset;
179
- inset-inline-end: 0.5rem;
180
- }
154
+ inset-block-start: 0.375rem;
155
+ inset-inline-end: 0.5rem;
181
156
  }
182
157
  }
183
158
 
184
159
  [tuiTitle] {
185
160
  gap: 0.125rem;
186
- font: var(--tui-font-text-ui-l);
161
+ font: var(--tui-font-ui-l);
187
162
  font-weight: bold;
188
163
  }
189
164
 
190
165
  [tuiSubtitle] {
191
- font: var(--tui-font-text-m);
166
+ font: var(--tui-font-body-m);
192
167
 
193
168
  + * {
194
169
  display: flex;
195
170
  align-items: center;
196
171
  gap: 1.25rem;
197
172
  margin-block-start: 0.625rem;
198
- font: var(--tui-font-text-s);
173
+ font: var(--tui-font-body-s);
199
174
  }
200
175
  }
201
176
 
202
177
  > [tuiIconButton] {
203
178
  position: absolute;
204
- top: 0.75rem;
205
- right: 0.75rem;
179
+ inset-block-start: 0.75rem;
180
+ inset-inline-end: 0.75rem;
206
181
  box-shadow: none !important;
207
182
  background: transparent !important;
208
-
209
- @supports (inset-inline-end: 0) {
210
- right: unset;
211
- inset-inline-end: 0.75rem;
212
- }
213
183
  }
214
184
  }
215
-
216
- [tuiNotification] {
217
- cursor: pointer;
218
- }
@@ -7,27 +7,35 @@ tui-textfield {
7
7
  --t-height: var(--tui-height-l);
8
8
  --t-padding: var(--tui-padding-l);
9
9
  --t-label-y: -0.75rem;
10
- --t-label-font: var(--tui-font-text-s);
10
+ --t-label-font: var(--tui-font-body-s);
11
11
  --t-end: ~'0rem';
12
12
  --t-start: ~'0rem';
13
13
 
14
14
  position: relative;
15
15
  display: flex;
16
16
  flex-wrap: wrap;
17
- align-items: center;
18
- cursor: pointer;
17
+ align-items: flex-start;
19
18
  min-block-size: var(--t-height);
20
19
  padding: 0 var(--t-padding);
21
20
  border-radius: var(--tui-radius-l);
22
- font: var(--tui-font-text-ui-m);
21
+ font: var(--tui-font-ui-m);
23
22
  line-height: 1.25rem;
24
23
  box-sizing: border-box;
25
24
  gap: 0 0.25rem;
26
25
  isolation: isolate;
27
26
 
28
- // Increasing specificity to override custom appearance
29
- &[tuiIcons]:read-only {
30
- color: var(--tui-text-tertiary);
27
+ &[tuiAppearance] {
28
+ outline: none;
29
+
30
+ &[data-appearance=''] {
31
+ color: var(--tui-text-tertiary);
32
+
33
+ &:not([data-mode~='readonly']) {
34
+ .appearance-hover({
35
+ color: var(--tui-text-secondary);
36
+ });
37
+ }
38
+ }
31
39
  }
32
40
 
33
41
  &[data-icon-start] {
@@ -38,12 +46,21 @@ tui-textfield {
38
46
  --t-end: 2.25rem;
39
47
  }
40
48
 
41
- &[tuiIcons]::after {
42
- position: relative;
43
- block-size: auto;
44
- align-self: stretch;
45
- border-inline: var(--t-padding) solid transparent;
46
- margin: 0 calc(-1 * var(--t-padding));
49
+ &[tuiIcons] {
50
+ &::before {
51
+ z-index: 1;
52
+ block-size: var(--t-height);
53
+ margin-inline-end: 0.5rem;
54
+ pointer-events: none;
55
+ }
56
+
57
+ &::after {
58
+ position: relative;
59
+ block-size: var(--t-height);
60
+ cursor: pointer;
61
+ border-inline: var(--t-padding) solid transparent;
62
+ margin: 0 calc(-1 * var(--t-padding));
63
+ }
47
64
  }
48
65
 
49
66
  &::-webkit-resizer {
@@ -67,33 +84,19 @@ tui-textfield {
67
84
  background-clip: content-box;
68
85
  }
69
86
 
70
- label,
87
+ [tuiLabel],
71
88
  & > .t-content,
72
89
  & > .t-template {
73
90
  pointer-events: none;
74
91
  }
75
92
 
76
- input,
77
- select,
78
- textarea {
79
- font: inherit;
80
- resize: none;
81
- outline: none;
82
- padding-block: 1.125rem;
83
- color: var(--tui-text-primary);
84
-
85
- &[inputmode='none'] {
86
- caret-color: transparent;
87
- }
88
- }
89
-
90
93
  &[data-size='s'] {
91
94
  --t-height: var(--tui-height-s);
92
95
  --t-padding: var(--tui-padding-s);
93
96
 
94
97
  border-radius: var(--tui-radius-m);
95
98
  gap: 0;
96
- font: var(--tui-font-text-ui-s);
99
+ font: var(--tui-font-ui-s);
97
100
  line-height: 1rem;
98
101
 
99
102
  &[data-icon-start] {
@@ -110,16 +113,11 @@ tui-textfield {
110
113
  }
111
114
 
112
115
  &::after {
113
- margin-inline: calc(0.625rem - var(--t-padding)) calc(-0.125rem - var(--t-padding));
116
+ margin-inline-start: calc(0.625rem - var(--t-padding));
117
+ margin-inline-end: calc(-0.125rem - var(--t-padding));
114
118
  font-size: 1rem;
115
119
  }
116
120
 
117
- input,
118
- select,
119
- textarea {
120
- padding-block: 0.5rem;
121
- }
122
-
123
121
  & > .t-content {
124
122
  margin-inline-end: -0.375rem;
125
123
  }
@@ -128,11 +126,11 @@ tui-textfield {
128
126
  &[data-size='m'] {
129
127
  --t-height: var(--tui-height-m);
130
128
  --t-padding: var(--tui-padding-m);
131
- --t-label-font: var(--tui-font-text-xs);
129
+ --t-label-font: var(--tui-font-body-xs);
132
130
  --t-label-y: -0.5625rem;
133
131
 
134
132
  border-radius: var(--tui-radius-m);
135
- font: var(--tui-font-text-ui-s);
133
+ font: var(--tui-font-ui-s);
136
134
  line-height: 1rem;
137
135
 
138
136
  &[data-icon-start] {
@@ -148,13 +146,8 @@ tui-textfield {
148
146
  }
149
147
 
150
148
  &::after {
151
- margin-inline: calc(0.25rem - var(--t-padding)) calc(-0.125rem - var(--t-padding));
152
- }
153
-
154
- input,
155
- select,
156
- textarea {
157
- padding-block: 0.875rem;
149
+ margin-inline-start: calc(0.25rem - var(--t-padding));
150
+ margin-inline-end: calc(-0.125rem - var(--t-padding));
158
151
  }
159
152
 
160
153
  & > .t-content {
@@ -166,149 +159,92 @@ tui-textfield {
166
159
  --t-label: -0.7rem;
167
160
  }
168
161
 
169
- /*
170
- TODO: refactor to the following way after Chrome 105+ & Safari 15.4+
171
- &:hover:has(input:not(:read-only)),
172
- &:hover:has(textarea:not(:read-only)),
173
- &:hover:has(select:not([data-mode='readonly'])) {
174
- color: var(--tui-text-secondary);
175
- }
176
- */
177
- &[tuiIcons]:hover {
178
- color: var(--tui-text-secondary);
179
-
180
- &:has(input:read-only):not([multi]),
181
- &:has(textarea:read-only),
182
- &:has(select[data-mode~='readonly']) {
183
- color: var(--tui-text-tertiary);
184
- }
185
- }
186
-
187
- &::before {
188
- z-index: 1;
189
- margin-inline-end: 0.5rem;
162
+ &:is(._disabled, [data-state='disabled']) {
190
163
  pointer-events: none;
191
- }
192
-
193
- &:has(:disabled:not(.t-filler, button, option, [tuiChip]))::before,
194
- &:has(:disabled:not(.t-filler, button, option, [tuiChip]))::after,
195
- &:has(:disabled:not(.t-filler, button, option, [tuiChip])) > .t-template {
196
164
  opacity: var(--tui-disabled-opacity);
197
- }
198
165
 
199
- // TODO: Fallback until Safari 15.4
200
- &._disabled::before,
201
- &._disabled::after,
202
- &._disabled > .t-template {
203
- opacity: var(--tui-disabled-opacity);
166
+ [tuiAppearance]:is(._disabled, :disabled, [data-state='disabled']) {
167
+ opacity: 1;
168
+ }
169
+
170
+ tui-icon {
171
+ display: none;
172
+ }
204
173
  }
205
174
 
206
175
  &._with-label {
207
176
  & > .t-template,
208
- input:not([type='range']),
209
- select:defined,
210
- textarea:defined {
211
- padding-block: calc(var(--t-height) / 3) 0;
177
+ .t-filler,
178
+ [tuiInput] {
179
+ padding-block-start: calc(var(--t-height) / 3);
180
+ padding-block-end: 0;
212
181
  }
213
- }
214
182
 
215
- &:not([data-focus='true'])._with-label {
216
- & > .t-template,
217
- input:not([type='range']),
218
- select:defined,
219
- textarea:defined {
220
- &::placeholder,
221
- &._empty {
222
- color: transparent;
183
+ &:is(:not([data-focus='true']), [data-mode~='readonly']) {
184
+ & > .t-template,
185
+ [tuiInput] {
186
+ &::placeholder,
187
+ &._empty {
188
+ color: transparent;
189
+ }
223
190
  }
224
191
  }
225
192
  }
226
193
 
227
194
  & > .t-template,
228
- input:defined,
229
- select:defined,
230
- textarea:defined {
231
- .fullsize();
232
-
195
+ .t-filler,
196
+ [tuiInput] {
197
+ position: absolute;
198
+ inset: 0 auto auto 0;
199
+ inline-size: stretch;
200
+ block-size: 100%;
233
201
  appearance: none;
202
+ background: none;
203
+ font: inherit;
204
+ resize: none;
205
+ outline: none;
206
+ color: var(--tui-text-primary);
234
207
  box-sizing: border-box;
235
208
  border-radius: inherit;
236
209
  border-width: 0;
237
210
  overscroll-behavior: none;
238
211
  // StackBlitz changes "0rem" to "0" breaking calc
239
- padding-inline: calc(var(--t-start, ~'0rem') + var(--t-padding))
240
- calc(var(--t-end, ~'0rem') + var(--t-side, ~'0rem') + var(--t-padding));
212
+ padding-inline-start: calc(var(--t-start, ~'0rem') + var(--t-padding));
213
+ padding-inline-end: calc(var(--t-end, ~'0rem') + var(--t-side, ~'0rem') + var(--t-padding));
214
+
215
+ &:is(input, textarea):read-only ~ .t-filler {
216
+ display: none;
217
+ }
241
218
 
242
219
  &:disabled {
243
220
  animation: tuiPresent 1s infinite;
221
+ opacity: 1;
222
+ }
223
+
224
+ &[inputmode='none'] {
225
+ caret-color: transparent;
244
226
  }
245
227
  }
246
228
 
247
229
  & > .t-template {
248
230
  display: flex;
231
+ block-size: 100%;
249
232
  align-items: center;
250
- color: var(--tui-text-primary);
251
233
  }
252
234
 
253
- &._with-template input:first-of-type,
254
- &._with-template select,
255
- &._with-template textarea {
235
+ &._with-template [tuiInput] {
256
236
  color: transparent !important;
257
237
  }
258
238
 
259
- input:not([type='range']),
260
- select:defined,
261
- textarea:defined {
262
- pointer-events: auto;
263
- background: none;
264
-
265
- &:not(select):read-only ~ .t-filler {
266
- display: none;
267
- }
268
-
269
- &:disabled {
270
- & ~ label,
271
- & ~ .t-content {
272
- opacity: var(--tui-disabled-opacity);
273
-
274
- > tui-icon {
275
- display: none;
276
- }
277
- }
278
- }
279
-
280
- &:-webkit-autofill,
281
- &:not(._empty):not(:placeholder-shown) {
282
- & ~ label {
283
- font: var(--t-label-font);
284
- line-height: var(--t-height);
285
- transform: translateY(var(--t-label-y));
286
- }
287
-
288
- &:not(:disabled)[data-mode~='invalid'] ~ label,
289
- &:invalid:not(:disabled):not([data-mode]) ~ label {
290
- color: var(--tui-text-negative);
291
- }
292
-
293
- &:not(:disabled):not([data-mode~='readonly']) ~ .t-content .t-clear {
294
- display: flex;
295
- }
296
- }
297
-
298
- &:not([data-mode~='readonly']) {
299
- .appearance-focus({
300
- &::placeholder,
301
- &._empty {
302
- color: var(--tui-text-tertiary);
303
- }
304
-
305
- & ~ label {
306
- color: var(--tui-text-primary) !important;
307
- font: var(--t-label-font);
308
- line-height: var(--t-height);
309
- transform: translateY(var(--t-label-y));
310
- }
311
- });
239
+ [tuiInput]:-webkit-autofill,
240
+ [tuiInput][chrome-autofilled], /* Chrome on IOS */
241
+ [tuiInput]:not(._empty, :placeholder-shown),
242
+ &[multi][multi]:not(._empty) {
243
+ [tuiLabel],
244
+ &:not(tui-textfield) ~ [tuiLabel] {
245
+ font: var(--t-label-font);
246
+ line-height: var(--t-height);
247
+ transform: translateY(var(--t-label-y));
312
248
  }
313
249
  }
314
250
 
@@ -322,22 +258,18 @@ tui-textfield {
322
258
  flex: 1;
323
259
  align-self: flex-start;
324
260
  font-size: inherit;
261
+ user-select: none;
325
262
  line-height: var(--t-height);
326
263
  transition-duration: inherit;
327
264
  }
328
265
 
329
- label:defined,
330
- input:defined::placeholder,
331
- textarea:defined::placeholder,
332
- select:defined._empty {
266
+ [tuiLabel],
267
+ [tuiInput]::placeholder,
268
+ [tuiInput]._empty {
333
269
  color: var(--tui-text-secondary);
334
270
  }
335
271
 
336
272
  select {
337
- &:not([data-mode~='readonly']) {
338
- cursor: pointer;
339
- }
340
-
341
273
  option[value='']:disabled {
342
274
  // Hide placeholder from native datalist (Windows OS only)
343
275
  color: transparent;
@@ -357,7 +289,8 @@ tui-textfield {
357
289
  }
358
290
 
359
291
  button,
360
- a {
292
+ a,
293
+ tui-icon {
361
294
  pointer-events: auto;
362
295
  }
363
296
 
@@ -370,26 +303,21 @@ tui-textfield {
370
303
  margin-inline-start: auto;
371
304
  isolation: isolate;
372
305
  border-radius: inherit;
373
-
374
- > tui-icon {
375
- pointer-events: auto;
376
- }
377
306
  }
378
307
 
379
308
  textarea ~ .t-content {
380
309
  min-inline-size: 0.5rem;
381
310
  }
382
311
 
383
- .t-clear {
384
- z-index: 1;
312
+ &:is([data-mode~='readonly'], [data-state='disabled'], ._empty) .t-clear,
313
+ [tuiInput]._empty ~ .t-content .t-clear,
314
+ [tuiInput]:disabled ~ .t-content .t-clear {
385
315
  display: none;
386
- pointer-events: auto;
387
316
  }
388
317
 
389
- & > .t-filler:defined {
318
+ .t-filler {
390
319
  pointer-events: none !important;
391
320
  color: var(--tui-text-tertiary);
392
- opacity: 1;
393
321
  }
394
322
 
395
323
  [tuiFluidTypography] {
@@ -403,4 +331,27 @@ tui-textfield {
403
331
  &:has(input[type='tel']) {
404
332
  direction: ltr;
405
333
  }
334
+
335
+ .appearance-invalid({
336
+ [tuiInput]:not(._empty) ~ [tuiLabel],
337
+ &[multi]:not(._empty) [tuiLabel] {
338
+ color: var(--tui-text-negative);
339
+ }
340
+ });
341
+
342
+ &:not([data-mode~='readonly']) {
343
+ .appearance-focus({
344
+ [tuiInput]::placeholder,
345
+ [tuiInput]._empty {
346
+ color: var(--tui-text-tertiary);
347
+ }
348
+
349
+ [tuiLabel] {
350
+ color: var(--tui-text-primary) !important;
351
+ font: var(--t-label-font);
352
+ line-height: var(--t-height);
353
+ transform: translateY(var(--t-label-y));
354
+ }
355
+ });
356
+ }
406
357
  }