@taiga-ui/core 4.33.0 → 4.34.0-canary.7b7adbb

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 (32) hide show
  1. package/animations/animations.d.ts +1 -0
  2. package/components/link/link.directive.d.ts +4 -0
  3. package/components/link/link.options.d.ts +4 -0
  4. package/components/textfield/textfield.component.d.ts +2 -0
  5. package/esm2022/animations/animations.mjs +23 -1
  6. package/esm2022/components/data-list/data-list.component.mjs +3 -3
  7. package/esm2022/components/dialog/dialogs.component.mjs +3 -3
  8. package/esm2022/components/link/link.directive.mjs +7 -3
  9. package/esm2022/components/link/link.options.mjs +1 -1
  10. package/esm2022/components/root/root.component.mjs +2 -2
  11. package/esm2022/components/textfield/textfield.component.mjs +17 -4
  12. package/esm2022/directives/dropdown/dropdown-open.directive.mjs +3 -2
  13. package/fesm2022/taiga-ui-core-animations.mjs +23 -1
  14. package/fesm2022/taiga-ui-core-animations.mjs.map +1 -1
  15. package/fesm2022/taiga-ui-core-components-data-list.mjs +2 -2
  16. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  17. package/fesm2022/taiga-ui-core-components-dialog.mjs +2 -2
  18. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  19. package/fesm2022/taiga-ui-core-components-link.mjs +6 -2
  20. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  21. package/fesm2022/taiga-ui-core-components-root.mjs +1 -1
  22. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  23. package/fesm2022/taiga-ui-core-components-textfield.mjs +17 -4
  24. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +2 -1
  26. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  27. package/package.json +9 -9
  28. package/styles/components/link.less +15 -1
  29. package/styles/components/textfield.less +32 -18
  30. package/styles/mixins/mixins.less +10 -0
  31. package/styles/mixins/mixins.scss +9 -0
  32. package/styles/theme/appearance/textfield.less +0 -1
@@ -50,8 +50,8 @@ tui-textfield {
50
50
  }
51
51
 
52
52
  label,
53
- .t-content,
54
- .t-template {
53
+ & > .t-content,
54
+ & > .t-template {
55
55
  pointer-events: none;
56
56
  }
57
57
 
@@ -98,7 +98,7 @@ tui-textfield {
98
98
  padding-block-end: 0.5rem;
99
99
  }
100
100
 
101
- .t-content {
101
+ & > .t-content {
102
102
  margin-inline-end: -0.325rem;
103
103
  }
104
104
  }
@@ -134,7 +134,7 @@ tui-textfield {
134
134
  padding-block-end: 0.875rem;
135
135
  }
136
136
 
137
- .t-content {
137
+ & > .t-content {
138
138
  margin-inline-end: -0.125rem;
139
139
  }
140
140
  }
@@ -164,19 +164,19 @@ tui-textfield {
164
164
 
165
165
  &:has(:disabled:not(.t-filler, button, option))::before,
166
166
  &:has(:disabled:not(.t-filler, button, option))::after,
167
- &:has(:disabled:not(.t-filler, button, option)) .t-template {
167
+ &:has(:disabled:not(.t-filler, button, option)) > .t-template {
168
168
  opacity: var(--tui-disabled-opacity);
169
169
  }
170
170
 
171
171
  // TODO: Fallback until Safari 15.4
172
172
  &._disabled::before,
173
173
  &._disabled::after,
174
- &._disabled .t-template {
174
+ &._disabled > .t-template {
175
175
  opacity: var(--tui-disabled-opacity);
176
176
  }
177
177
 
178
178
  &:has(label:not(:empty)) {
179
- .t-template,
179
+ & > .t-template,
180
180
  input:not([type='range']),
181
181
  select:defined,
182
182
  textarea:defined {
@@ -192,7 +192,7 @@ tui-textfield {
192
192
 
193
193
  // TODO: Fallback until Safari 15.4
194
194
  &._with-label {
195
- .t-template,
195
+ & > .t-template,
196
196
  input:not([type='range']),
197
197
  select:defined,
198
198
  textarea:defined {
@@ -206,7 +206,7 @@ tui-textfield {
206
206
  }
207
207
  }
208
208
 
209
- .t-template,
209
+ & > .t-template,
210
210
  input:defined,
211
211
  select:defined,
212
212
  textarea:defined {
@@ -222,7 +222,7 @@ tui-textfield {
222
222
  padding-inline-end: calc(var(--t-right, ~'0rem') + var(--t-side) + var(--t-padding));
223
223
  }
224
224
 
225
- .t-template {
225
+ & > .t-template {
226
226
  display: flex;
227
227
  align-items: center;
228
228
  color: var(--tui-text-primary);
@@ -315,13 +315,27 @@ tui-textfield {
315
315
  color: var(--tui-text-secondary);
316
316
  }
317
317
 
318
- select:not([data-mode~='readonly']) {
319
- cursor: pointer;
320
- }
318
+ select {
319
+ &:not([data-mode~='readonly']) {
320
+ cursor: pointer;
321
+ }
321
322
 
322
- select option:not(:disabled) {
323
- // In Windows OS native options inherit color of host <select>
324
- color: var(--tui-text-primary);
323
+ option[value='']:disabled {
324
+ // Hide placeholder from native datalist (Windows OS only)
325
+ color: transparent;
326
+ }
327
+
328
+ optgroup,
329
+ option {
330
+ // Windows OS only
331
+ background-color: var(--tui-background-elevation-3);
332
+ }
333
+
334
+ optgroup,
335
+ option:not(:disabled) {
336
+ // In Windows OS native options inherit color of host <select>
337
+ color: var(--tui-text-primary);
338
+ }
325
339
  }
326
340
 
327
341
  button,
@@ -329,7 +343,7 @@ tui-textfield {
329
343
  pointer-events: auto;
330
344
  }
331
345
 
332
- .t-content {
346
+ & > .t-content {
333
347
  display: flex;
334
348
  block-size: var(--t-height);
335
349
  align-items: center;
@@ -353,7 +367,7 @@ tui-textfield {
353
367
  pointer-events: auto;
354
368
  }
355
369
 
356
- .t-filler:defined {
370
+ & > .t-filler:defined {
357
371
  pointer-events: none;
358
372
  background: none;
359
373
  color: var(--tui-text-tertiary);
@@ -89,6 +89,7 @@
89
89
  }
90
90
  }
91
91
 
92
+ // TODO remove @speed in 5.0
92
93
  // transition
93
94
  .transition(@param: all, @speed: var(--tui-duration, 300ms)) {
94
95
  transition-property: @param;
@@ -158,3 +159,12 @@
158
159
  min-inline-size: 0;
159
160
  max-inline-size: max-content;
160
161
  }
162
+
163
+ .tui-line-clamp(@count: 3) {
164
+ display: -webkit-box;
165
+ -webkit-box-orient: vertical;
166
+ -webkit-line-clamp: @count;
167
+ line-clamp: @count;
168
+ overflow: hidden;
169
+ text-overflow: ellipsis;
170
+ }
@@ -152,3 +152,12 @@
152
152
  min-inline-size: 0;
153
153
  max-inline-size: max-content;
154
154
  }
155
+
156
+ @mixin tui-line-clamp($count: 3) {
157
+ display: -webkit-box;
158
+ -webkit-box-orient: vertical;
159
+ -webkit-line-clamp: $count;
160
+ line-clamp: $count;
161
+ overflow: hidden;
162
+ text-overflow: ellipsis;
163
+ }
@@ -70,7 +70,6 @@
70
70
  [tuiTheme='dark'] [tuiAppearance][data-appearance='textfield'],
71
71
  [tuiTheme='dark'][tuiAppearance][data-appearance='textfield'] {
72
72
  background-color: var(--tui-background-neutral-1);
73
- color-scheme: dark;
74
73
 
75
74
  .appearance-hover({
76
75
  background-color: var(--tui-background-neutral-1-hover);