@taiga-ui/core 4.4.1 → 4.5.0

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 (105) hide show
  1. package/components/calendar/calendar-sheet.component.d.ts +1 -1
  2. package/components/spin-button/spin-button.component.d.ts +1 -1
  3. package/components/textfield/index.d.ts +1 -0
  4. package/components/textfield/textfield-content.directive.d.ts +6 -0
  5. package/components/textfield/textfield.component.d.ts +2 -1
  6. package/components/textfield/textfield.directive.d.ts +1 -1
  7. package/directives/appearance/appearance.directive.d.ts +6 -3
  8. package/directives/dropdown/dropdown.directive.d.ts +1 -1
  9. package/esm2022/components/alert/alert.component.mjs +3 -3
  10. package/esm2022/components/alert/alerts.component.mjs +3 -3
  11. package/esm2022/components/button/button.directive.mjs +2 -2
  12. package/esm2022/components/calendar/calendar-sheet.component.mjs +3 -3
  13. package/esm2022/components/calendar/calendar-year.component.mjs +3 -3
  14. package/esm2022/components/calendar/calendar.component.mjs +3 -3
  15. package/esm2022/components/data-list/data-list.component.mjs +3 -3
  16. package/esm2022/components/dialog/dialog.component.mjs +3 -3
  17. package/esm2022/components/dialog/dialogs.component.mjs +3 -3
  18. package/esm2022/components/icon/icon.component.mjs +3 -3
  19. package/esm2022/components/label/label.directive.mjs +2 -2
  20. package/esm2022/components/loader/loader.component.mjs +3 -3
  21. package/esm2022/components/notification/notification.directive.mjs +2 -2
  22. package/esm2022/components/root/root.component.mjs +3 -3
  23. package/esm2022/components/scrollbar/scroll-controls.component.mjs +5 -5
  24. package/esm2022/components/scrollbar/scrollbar.component.mjs +3 -3
  25. package/esm2022/components/scrollbar/scrollbar.directive.mjs +3 -3
  26. package/esm2022/components/scrollbar/scrollbar.service.mjs +3 -3
  27. package/esm2022/components/textfield/index.mjs +2 -1
  28. package/esm2022/components/textfield/select.directive.mjs +3 -3
  29. package/esm2022/components/textfield/textfield-content.directive.mjs +19 -0
  30. package/esm2022/components/textfield/textfield.component.mjs +7 -4
  31. package/esm2022/components/textfield/textfield.directive.mjs +5 -5
  32. package/esm2022/directives/appearance/appearance.bindings.mjs +4 -4
  33. package/esm2022/directives/appearance/appearance.directive.mjs +19 -9
  34. package/esm2022/directives/dropdown/dropdown-hover.directive.mjs +3 -3
  35. package/esm2022/directives/dropdown/dropdown.bindings.mjs +3 -3
  36. package/esm2022/directives/dropdown/dropdown.component.mjs +3 -3
  37. package/esm2022/directives/dropdown/dropdown.directive.mjs +4 -2
  38. package/esm2022/directives/group/group.directive.mjs +2 -2
  39. package/esm2022/directives/hint/hint-describe.directive.mjs +3 -3
  40. package/esm2022/directives/hint/hint.component.mjs +3 -3
  41. package/esm2022/directives/hint/hints.component.mjs +3 -3
  42. package/esm2022/directives/icons/icons.directive.mjs +2 -2
  43. package/esm2022/directives/surface/surface.directive.mjs +2 -2
  44. package/esm2022/directives/title/title.directive.mjs +2 -2
  45. package/esm2022/pipes/order-week-days/order-week-days.pipe.mjs +2 -5
  46. package/esm2022/services/breakpoint.service.mjs +3 -3
  47. package/fesm2022/taiga-ui-core-components-alert.mjs +4 -4
  48. package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
  49. package/fesm2022/taiga-ui-core-components-button.mjs +2 -2
  50. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  51. package/fesm2022/taiga-ui-core-components-calendar.mjs +6 -6
  52. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-core-components-data-list.mjs +2 -2
  54. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-core-components-dialog.mjs +4 -4
  56. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-core-components-icon.mjs +2 -2
  58. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-core-components-label.mjs +2 -2
  60. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-core-components-loader.mjs +2 -2
  62. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-core-components-notification.mjs +2 -2
  64. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-core-components-root.mjs +2 -2
  66. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  67. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +8 -8
  68. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-core-components-textfield.mjs +28 -10
  70. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-core-directives-appearance.mjs +21 -11
  72. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +8 -8
  74. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-core-directives-group.mjs +2 -2
  76. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  77. package/fesm2022/taiga-ui-core-directives-hint.mjs +6 -6
  78. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-directives-icons.mjs +2 -2
  80. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-core-directives-surface.mjs +2 -2
  82. package/fesm2022/taiga-ui-core-directives-surface.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-core-directives-title.mjs +2 -2
  84. package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +1 -4
  86. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-core-services.mjs +2 -2
  88. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  89. package/package.json +3 -3
  90. package/pipes/order-week-days/order-week-days.pipe.d.ts +1 -3
  91. package/styles/components/button.less +5 -5
  92. package/styles/components/group.less +2 -2
  93. package/styles/components/icon.less +10 -3
  94. package/styles/components/icons.less +2 -2
  95. package/styles/components/label.less +2 -2
  96. package/styles/components/notification.less +2 -2
  97. package/styles/components/textfield.less +15 -2
  98. package/styles/components/title.less +1 -1
  99. package/styles/mixins/mixins.less +5 -5
  100. package/styles/mixins/picker.less +18 -18
  101. package/styles/mixins/slider.less +2 -2
  102. package/styles/mixins/slider.scss +2 -2
  103. package/styles/theme/appearance/textfield.less +6 -3
  104. package/styles/theme/wrapper.less +2 -2
  105. package/tokens/i18n.d.ts +3 -3
@@ -26,7 +26,7 @@
26
26
 
27
27
  .button-base();
28
28
 
29
- height: var(--t-size);
29
+ block-size: var(--t-size);
30
30
  justify-content: center;
31
31
  border-radius: var(--t-radius);
32
32
  padding: var(--t-padding);
@@ -116,22 +116,22 @@
116
116
 
117
117
  flex-direction: column;
118
118
  flex-shrink: 1;
119
- height: auto;
119
+ block-size: auto;
120
120
  padding: 0.75rem;
121
121
  gap: 0.375rem;
122
- min-width: 5rem;
122
+ min-inline-size: 5rem;
123
123
  white-space: pre-line;
124
124
  font: var(--tui-font-text-ui-s);
125
125
 
126
126
  & > * {
127
- max-height: calc(var(--t-line-height) * 2);
127
+ max-block-size: calc(var(--t-line-height) * 2);
128
128
  }
129
129
  }
130
130
  }
131
131
 
132
132
  [tuiIconButton] {
133
133
  gap: 0;
134
- width: var(--t-size);
134
+ inline-size: var(--t-size);
135
135
  font-size: 0 !important;
136
136
  padding: 0;
137
137
 
@@ -31,7 +31,7 @@
31
31
  & > * {
32
32
  z-index: 1;
33
33
  flex: 1 1 0;
34
- min-width: 0;
34
+ min-inline-size: 0;
35
35
 
36
36
  &._disabled,
37
37
  &._disabled:hover {
@@ -127,7 +127,7 @@
127
127
  --t-group-clip: inset(-1px -1px 1px -1px);
128
128
 
129
129
  & > * {
130
- min-height: auto;
130
+ min-block-size: auto;
131
131
  flex: 0 0 auto;
132
132
 
133
133
  &:not(:last-child) {
@@ -20,21 +20,28 @@
20
20
  tui-icon {
21
21
  position: relative;
22
22
  display: inline-block;
23
- width: 1em;
24
- height: 1em;
23
+ inline-size: 1em;
24
+ block-size: 1em;
25
25
  font-size: 1.5rem;
26
26
  flex-shrink: 0;
27
27
  vertical-align: middle;
28
28
  box-sizing: border-box;
29
29
  mask: var(--t-icon-bg) no-repeat center/contain;
30
30
 
31
+ @media (hover: hover) {
32
+ &[data-appearance='icon']:hover {
33
+ color: var(--tui-text-secondary);
34
+ }
35
+ }
36
+
31
37
  &::after,
32
38
  &[tuiIcons]::after {
33
39
  .fullsize();
34
40
 
35
41
  content: '';
36
42
  display: block;
37
- mask: var(--t-icon) no-repeat center/contain intersect;
43
+ mask: var(--t-icon) no-repeat center/contain;
44
+ mask-composite: intersect;
38
45
  background: currentColor;
39
46
  }
40
47
  }
@@ -23,8 +23,8 @@
23
23
  &::after {
24
24
  content: '';
25
25
  display: var(--t-icon-start);
26
- width: 1em;
27
- height: 1em;
26
+ inline-size: 1em;
27
+ block-size: 1em;
28
28
  line-height: 1em;
29
29
  font-size: 1.5rem;
30
30
  flex-shrink: 0;
@@ -23,7 +23,7 @@
23
23
 
24
24
  &:not([data-orientation='vertical']) {
25
25
  flex-direction: row;
26
- width: fit-content;
26
+ inline-size: fit-content;
27
27
  font: var(--tui-font-text-m);
28
28
  }
29
29
 
@@ -32,7 +32,7 @@
32
32
  &:has(tui-primitive-textfield),
33
33
  &:has(tui-textarea) {
34
34
  flex-direction: column !important;
35
- width: auto !important;
35
+ inline-size: auto !important;
36
36
  font: var(--tui-font-text-s) !important;
37
37
  }
38
38
 
@@ -27,7 +27,7 @@ tui-notification,
27
27
 
28
28
  position: relative;
29
29
  display: flex;
30
- max-height: 100%;
30
+ max-block-size: 100%;
31
31
  color: var(--tui-text-primary);
32
32
  gap: 0.5rem;
33
33
  padding: 1rem;
@@ -35,7 +35,7 @@ tui-notification,
35
35
  border-radius: var(--tui-radius-l);
36
36
  box-sizing: border-box;
37
37
  overflow: hidden;
38
- text-align: left;
38
+ text-align: start;
39
39
  text-decoration: none;
40
40
 
41
41
  &::after {
@@ -10,7 +10,7 @@ tui-textfield {
10
10
  align-items: center;
11
11
  pointer-events: none;
12
12
  cursor: pointer;
13
- height: var(--t-height);
13
+ block-size: var(--t-height);
14
14
  color: var(--tui-text-tertiary);
15
15
  padding: 0 var(--tui-padding-l);
16
16
  border-radius: var(--tui-radius-l);
@@ -102,8 +102,20 @@ tui-textfield {
102
102
  }
103
103
  }
104
104
 
105
+ /*
106
+ TODO: refactor to the following way after Chrome 105+ & Safari 15.4+
107
+ &:hover:has(input:not(:read-only)),
108
+ &:hover:has(select:not([data-mode='readonly'])) {
109
+ color: var(--tui-text-secondary);
110
+ }
111
+ */
105
112
  &:hover {
106
113
  color: var(--tui-text-secondary);
114
+
115
+ &:has(input:read-only),
116
+ &:has(select[data-mode='readonly']) {
117
+ color: var(--tui-text-tertiary);
118
+ }
107
119
  }
108
120
 
109
121
  &::before {
@@ -153,7 +165,7 @@ tui-textfield {
153
165
  .t-template,
154
166
  input:defined,
155
167
  select:defined {
156
- .fullsize();
168
+ .fullsize(absolute, inset);
157
169
 
158
170
  appearance: none;
159
171
  box-sizing: border-box;
@@ -185,6 +197,7 @@ tui-textfield {
185
197
  }
186
198
  }
187
199
 
200
+ &:-webkit-autofill,
188
201
  &:not(._empty):not(:placeholder-shown) {
189
202
  & ~ label {
190
203
  font-size: 0.83em;
@@ -22,7 +22,7 @@
22
22
  position: relative;
23
23
  display: flex;
24
24
  flex-direction: column;
25
- text-align: left;
25
+ text-align: start;
26
26
  gap: 0.25rem;
27
27
  margin: 0;
28
28
  font: var(--tui-font-text-ui-m);
@@ -38,8 +38,8 @@
38
38
  left: 0;
39
39
 
40
40
  & when (@mode = height) {
41
- width: 100%;
42
- height: 100%;
41
+ inline-size: 100%;
42
+ block-size: 100%;
43
43
  }
44
44
 
45
45
  & when (@mode = inset) {
@@ -69,7 +69,7 @@
69
69
  white-space: nowrap;
70
70
  overflow: hidden;
71
71
  vertical-align: middle;
72
- max-width: 100%;
72
+ max-inline-size: 100%;
73
73
  gap: calc(var(--t-gap, var(--t-0, 0rem)) - 2 * var(--t-margin, 0rem));
74
74
 
75
75
  > img,
@@ -123,8 +123,8 @@
123
123
  position: absolute;
124
124
  clip: rect(1px, 1px, 1px, 1px);
125
125
  clip-path: inset(50%);
126
- height: 1px;
127
- width: 1px;
126
+ block-size: 1px;
127
+ inline-size: 1px;
128
128
  margin: -1px;
129
129
  overflow: hidden;
130
130
  padding: 0;
@@ -10,7 +10,7 @@
10
10
  position: relative;
11
11
  display: flex;
12
12
  justify-content: space-between;
13
- height: 2.25rem;
13
+ block-size: 2.25rem;
14
14
  isolation: isolate;
15
15
  }
16
16
 
@@ -39,7 +39,7 @@
39
39
  display: flex;
40
40
  align-items: center;
41
41
  justify-content: center;
42
- width: @itemSize;
42
+ inline-size: @itemSize;
43
43
  text-align: center;
44
44
  outline: none;
45
45
  cursor: pointer;
@@ -63,8 +63,8 @@
63
63
 
64
64
  content: '';
65
65
  bottom: 0.3125rem;
66
- height: 0.125rem;
67
- width: 0.75rem;
66
+ block-size: 0.125rem;
67
+ inline-size: 0.75rem;
68
68
  border-radius: 0.375rem;
69
69
  background: var(--tui-text-primary);
70
70
  }
@@ -80,13 +80,13 @@
80
80
 
81
81
  &:not(:last-child)::before {
82
82
  right: -0.1875rem;
83
- border-top-right-radius: 0;
84
- border-bottom-right-radius: 0;
83
+ border-start-end-radius: 0;
84
+ border-end-end-radius: 0;
85
85
  }
86
86
 
87
87
  &:not([data-range='start']):not(:first-child)::before {
88
- border-top-left-radius: 0;
89
- border-bottom-left-radius: 0;
88
+ border-start-start-radius: 0;
89
+ border-end-start-radius: 0;
90
90
  }
91
91
 
92
92
  &:last-child:first-child::before {
@@ -94,13 +94,13 @@
94
94
  }
95
95
 
96
96
  &:first-child > .t-item {
97
- border-top-left-radius: var(--tui-radius-m);
98
- border-bottom-left-radius: var(--tui-radius-m);
97
+ border-start-start-radius: var(--tui-radius-m);
98
+ border-end-start-radius: var(--tui-radius-m);
99
99
  }
100
100
 
101
101
  &:last-child > .t-item {
102
- border-top-right-radius: var(--tui-radius-m);
103
- border-bottom-right-radius: var(--tui-radius-m);
102
+ border-start-end-radius: var(--tui-radius-m);
103
+ border-end-end-radius: var(--tui-radius-m);
104
104
  }
105
105
 
106
106
  & > .t-item {
@@ -143,16 +143,16 @@
143
143
  }
144
144
 
145
145
  &:not(:first-child)::before {
146
- border-top-left-radius: 0;
147
- border-bottom-left-radius: 0;
146
+ border-start-start-radius: 0;
147
+ border-end-start-radius: 0;
148
148
  }
149
149
  }
150
150
 
151
151
  &[data-range='end'] > .t-item {
152
152
  &::before {
153
153
  left: 0.625rem;
154
- border-top-left-radius: 0;
155
- border-bottom-left-radius: 0;
154
+ border-start-start-radius: 0;
155
+ border-end-start-radius: 0;
156
156
  }
157
157
 
158
158
  &::after {
@@ -165,8 +165,8 @@
165
165
  &[data-range='start'] > .t-item {
166
166
  &::before {
167
167
  right: 0.625rem;
168
- border-top-right-radius: 0;
169
- border-bottom-right-radius: 0;
168
+ border-start-end-radius: 0;
169
+ border-end-end-radius: 0;
170
170
  }
171
171
 
172
172
  &::after {
@@ -18,13 +18,13 @@
18
18
  &:first-child {
19
19
  left: -@first-tick-center;
20
20
  flex: 1;
21
- text-align: left;
21
+ text-align: start;
22
22
  }
23
23
 
24
24
  &:last-child {
25
25
  right: -@first-tick-center;
26
26
  flex: 1;
27
- text-align: right;
27
+ text-align: end;
28
28
  }
29
29
  }
30
30
 
@@ -18,13 +18,13 @@ $thumb-diameters: (
18
18
  &:first-child {
19
19
  left: -$first-tick-center;
20
20
  flex: 1;
21
- text-align: left;
21
+ text-align: start;
22
22
  }
23
23
 
24
24
  &:last-child {
25
25
  right: -$first-tick-center;
26
26
  flex: 1;
27
- text-align: right;
27
+ text-align: end;
28
28
  }
29
29
  }
30
30
 
@@ -1,7 +1,7 @@
1
1
  @import '@taiga-ui/core/styles/taiga-ui-local.less';
2
2
 
3
3
  [tuiAppearance][data-appearance='textfield'] {
4
- .transition(~'box-shadow, background, outline-color');
4
+ .transition(~'box-shadow, background, outline-color, border-color');
5
5
 
6
6
  --t-shadow: 0 0.125rem 0.1875rem rgba(0, 0, 0, 0.1);
7
7
 
@@ -31,14 +31,16 @@
31
31
  outline-color: var(--tui-status-negative);
32
32
  }
33
33
 
34
- &[data-mode='readonly'] {
34
+ &[data-mode='readonly'],
35
+ input&:read-only:not([data-mode]) {
35
36
  box-shadow: none;
36
37
  outline-color: var(--tui-border-normal) !important;
37
38
  }
38
39
 
39
40
  &:-webkit-autofill {
40
41
  -webkit-text-fill-color: var(--tui-text-primary) !important;
41
- border-color: var(--tui-service-autofill-background);
42
+ caret-color: var(--tui-text-primary) !important;
43
+ border-color: var(--tui-service-autofill-background) !important;
42
44
  box-shadow: 0 0 0 100rem var(--tui-service-autofill-background) inset !important;
43
45
  }
44
46
  }
@@ -46,6 +48,7 @@
46
48
  [tuiTheme='dark'] [tuiAppearance][data-appearance='textfield'],
47
49
  [tuiTheme='dark'][tuiAppearance][data-appearance='textfield'] {
48
50
  background-color: var(--tui-background-neutral-1);
51
+ color-scheme: dark;
49
52
 
50
53
  .appearance-hover({
51
54
  background-color: var(--tui-background-neutral-1-hover);
@@ -9,8 +9,8 @@
9
9
 
10
10
  position: relative;
11
11
  display: block;
12
- height: 100%;
13
- width: 100%;
12
+ block-size: 100%;
13
+ inline-size: 100%;
14
14
  appearance: none;
15
15
  border-radius: inherit;
16
16
 
package/tokens/i18n.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Localized months names
3
3
  */
4
- export declare const TUI_MONTHS: import("@angular/core").InjectionToken<import("rxjs").Observable<[January: string, February: string, March: string, April: string, May: string, June: string, July: string, August: string, September: string, October: string, November: string, December: string]>>;
4
+ export declare const TUI_MONTHS: import("@angular/core").InjectionToken<import("rxjs").Observable<readonly [January: string, February: string, March: string, April: string, May: string, June: string, July: string, August: string, September: string, October: string, November: string, December: string]>>;
5
5
  /**
6
6
  * i18n 'close' word
7
7
  */
@@ -17,8 +17,8 @@ export declare const TUI_DEFAULT_ERROR_MESSAGE: import("@angular/core").Injectio
17
17
  /**
18
18
  * spin i18n texts
19
19
  */
20
- export declare const TUI_SPIN_TEXTS: import("@angular/core").InjectionToken<import("rxjs").Observable<[previous: string, next: string]>>;
20
+ export declare const TUI_SPIN_TEXTS: import("@angular/core").InjectionToken<import("rxjs").Observable<readonly [previous: string, next: string]>>;
21
21
  /**
22
22
  * calendars i18n texts
23
23
  */
24
- export declare const TUI_SHORT_WEEK_DAYS: import("@angular/core").InjectionToken<import("rxjs").Observable<[Monday: string, Tuesday: string, Wednesday: string, Thursday: string, Friday: string, Saturday: string, Sunday: string]>>;
24
+ export declare const TUI_SHORT_WEEK_DAYS: import("@angular/core").InjectionToken<import("rxjs").Observable<readonly [Monday: string, Tuesday: string, Wednesday: string, Thursday: string, Friday: string, Saturday: string, Sunday: string]>>;