@taiga-ui/core 5.0.0-canary.b5906eb → 5.0.0-canary.ba4fa64

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 (81) hide show
  1. package/components/data-list/index.d.ts +1 -0
  2. package/components/data-list/option-content.directive.d.ts +1 -1
  3. package/components/data-list/option-with-content.directive.d.ts +9 -0
  4. package/components/data-list/option-with-value.directive.d.ts +2 -1
  5. package/components/data-list/option.directive.d.ts +0 -4
  6. package/components/textfield/textfield-multi/textfield-item.component.d.ts +1 -0
  7. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +2 -0
  8. package/fesm2022/taiga-ui-core-classes.mjs +3 -3
  9. package/fesm2022/taiga-ui-core-components-button.mjs +8 -7
  10. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  11. package/fesm2022/taiga-ui-core-components-calendar.mjs +23 -33
  12. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  13. package/fesm2022/taiga-ui-core-components-cell.mjs +7 -7
  14. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -1
  15. package/fesm2022/taiga-ui-core-components-data-list.mjs +43 -34
  16. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  17. package/fesm2022/taiga-ui-core-components-error.mjs +10 -12
  18. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  19. package/fesm2022/taiga-ui-core-components-expand.mjs +3 -3
  20. package/fesm2022/taiga-ui-core-components-icon.mjs +8 -12
  21. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-core-components-input.mjs +6 -6
  23. package/fesm2022/taiga-ui-core-components-label.mjs +9 -7
  24. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  25. package/fesm2022/taiga-ui-core-components-link.mjs +8 -7
  26. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  27. package/fesm2022/taiga-ui-core-components-loader.mjs +3 -3
  28. package/fesm2022/taiga-ui-core-components-notification.mjs +18 -19
  29. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-core-components-root.mjs +3 -3
  31. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +24 -30
  32. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  33. package/fesm2022/taiga-ui-core-components-spin-button.mjs +3 -3
  34. package/fesm2022/taiga-ui-core-components-textfield.mjs +39 -29
  35. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-core-components-title.mjs +9 -7
  37. package/fesm2022/taiga-ui-core-components-title.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-core-directives-appearance.mjs +14 -16
  39. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-core-directives-button-x.mjs +3 -3
  41. package/fesm2022/taiga-ui-core-directives-date-format.mjs +3 -3
  42. package/fesm2022/taiga-ui-core-directives-group.mjs +9 -7
  43. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-core-directives-icons.mjs +12 -10
  45. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +12 -18
  47. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-core-directives-number-format.mjs +3 -3
  49. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +3 -3
  50. package/fesm2022/taiga-ui-core-portals-alert.mjs +9 -9
  51. package/fesm2022/taiga-ui-core-portals-dialog.mjs +13 -15
  52. package/fesm2022/taiga-ui-core-portals-dialog.mjs.map +1 -1
  53. package/fesm2022/taiga-ui-core-portals-dropdown.mjs +57 -69
  54. package/fesm2022/taiga-ui-core-portals-dropdown.mjs.map +1 -1
  55. package/fesm2022/taiga-ui-core-portals-hint.mjs +42 -50
  56. package/fesm2022/taiga-ui-core-portals-hint.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-core-portals-modal.mjs +6 -6
  58. package/fesm2022/taiga-ui-core-portals-popup.mjs +11 -15
  59. package/fesm2022/taiga-ui-core-portals-popup.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-core-services.mjs +7 -9
  61. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-core-tokens.mjs +17 -33
  63. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  64. package/package.json +12 -12
  65. package/styles/components/appearance.less +2 -1
  66. package/styles/components/button.less +3 -3
  67. package/styles/components/group.less +1 -1
  68. package/styles/components/icon.less +1 -1
  69. package/styles/components/icons.less +1 -1
  70. package/styles/components/label.less +1 -1
  71. package/styles/components/link.less +2 -1
  72. package/styles/components/notification.less +2 -2
  73. package/styles/components/textfield.less +19 -14
  74. package/styles/components/title.less +6 -6
  75. package/styles/mixins/slider.less +12 -15
  76. package/styles/mixins/slider.scss +12 -17
  77. package/styles/theme/appearance/action.less +0 -14
  78. package/styles/theme/appearance/floating.less +5 -0
  79. package/tokens/i18n.d.ts +4 -0
  80. package/tokens/index.d.ts +0 -1
  81. package/tokens/theme.d.ts +0 -2
@@ -1,6 +1,6 @@
1
1
  @import '@taiga-ui/core/styles/taiga-ui-local.less';
2
2
 
3
- tui-textfield {
3
+ tui-textfield:where(*&) {
4
4
  .scrollbar-hidden();
5
5
  .transition(color);
6
6
 
@@ -10,6 +10,7 @@ tui-textfield {
10
10
  --t-label-font: var(--tui-font-body-s);
11
11
  --t-end: ~'0rem';
12
12
  --t-start: ~'0rem';
13
+ --t-side: ~'0rem';
13
14
 
14
15
  position: relative;
15
16
  display: flex;
@@ -24,6 +25,12 @@ tui-textfield {
24
25
  gap: 0 0.25rem;
25
26
  isolation: isolate;
26
27
 
28
+ // TODO: Remove in next PR
29
+ &[data-size='s'],
30
+ &:has([tuiInputPin]) {
31
+ gap: 0;
32
+ }
33
+
27
34
  &[tuiAppearance] {
28
35
  outline: none;
29
36
 
@@ -95,31 +102,29 @@ tui-textfield {
95
102
  --t-padding: var(--tui-padding-s);
96
103
 
97
104
  border-radius: var(--tui-radius-m);
98
- gap: 0;
99
105
  font: var(--tui-font-ui-s);
100
106
  line-height: 1rem;
101
107
 
102
108
  &[data-icon-start] {
103
- --t-start: 1.25rem;
109
+ --t-start: 1.5rem;
104
110
  }
105
111
 
106
112
  &[data-icon-end] {
107
- --t-end: 1.25rem;
113
+ --t-end: 1.5rem;
108
114
  }
109
115
 
110
116
  &::before {
111
- margin-inline: -0.125rem 0.5rem;
112
117
  font-size: 1rem;
113
118
  }
114
119
 
115
120
  &::after {
116
- margin-inline-start: calc(0.625rem - var(--t-padding));
117
- margin-inline-end: calc(-0.125rem - var(--t-padding));
121
+ margin-inline-start: calc(0.5rem - var(--t-padding));
118
122
  font-size: 1rem;
119
123
  }
120
124
 
121
125
  & > .t-content {
122
- margin-inline-end: -0.375rem;
126
+ gap: 0;
127
+ margin-inline-end: -0.25rem;
123
128
  }
124
129
  }
125
130
 
@@ -225,6 +230,11 @@ tui-textfield {
225
230
  &[inputmode='none'] {
226
231
  caret-color: transparent;
227
232
  }
233
+
234
+ &::-webkit-inner-spin-button,
235
+ &::-webkit-outer-spin-button {
236
+ appearance: none;
237
+ }
228
238
  }
229
239
 
230
240
  & > .t-template {
@@ -300,7 +310,7 @@ tui-textfield {
300
310
  display: flex;
301
311
  block-size: var(--t-height);
302
312
  align-items: center;
303
- gap: inherit;
313
+ gap: 0.25rem;
304
314
  margin-inline-start: auto;
305
315
  isolation: isolate;
306
316
  border-radius: inherit;
@@ -342,11 +352,6 @@ tui-textfield {
342
352
 
343
353
  &:not([data-mode~='readonly']) {
344
354
  .appearance-focus({
345
- [tuiInput]::placeholder,
346
- [tuiInput]._empty {
347
- color: var(--tui-text-tertiary);
348
- }
349
-
350
355
  [tuiLabel] {
351
356
  color: var(--tui-text-primary) !important;
352
357
  font: var(--t-label-font);
@@ -18,7 +18,7 @@
18
18
  * @see-also
19
19
  * Label
20
20
  */
21
- [tuiTitle] {
21
+ [tuiTitle]:where(*&) {
22
22
  position: relative;
23
23
  display: flex;
24
24
  min-inline-size: 0;
@@ -64,14 +64,14 @@
64
64
  margin: 0;
65
65
  font: inherit;
66
66
  }
67
- }
68
67
 
69
- [tuiSubtitle] {
70
- font: var(--tui-font-ui-s);
71
- margin: 0;
68
+ [tuiSubtitle] {
69
+ font: var(--tui-font-ui-s);
70
+ margin: 0;
71
+ }
72
72
  }
73
73
 
74
- [tuiButton] [tuiTitle] {
74
+ [tuiButton]:where(*&) [tuiTitle] {
75
75
  margin-inline-end: auto;
76
76
 
77
77
  [tuiSubtitle] {
@@ -1,18 +1,15 @@
1
- @thumb-diameters: {
2
- @s: 0.5rem;
3
- @m: 0.75rem;
4
- };
5
-
6
1
  @track-inset: {
7
2
  @s: 0.625rem;
8
3
  @m: 0.75rem;
9
4
  @l: 1rem;
10
5
  };
11
6
 
12
- .tui-slider-ticks-labels(@thumb-size: m) {
13
- @thumb: @thumb-diameters[@@thumb-size];
7
+ @thumb-diameter: var(--tui-thumb-size, 0.75rem);
8
+ @thumb-radius: calc(@thumb-diameter / 2);
9
+ @track-thickness: max(calc(@thumb-radius - 0.25rem), 0.125rem);
14
10
 
15
- --t-offset: calc(@thumb / 2);
11
+ .tui-slider-ticks-labels() {
12
+ --t-offset: @thumb-radius;
16
13
 
17
14
  display: flex;
18
15
  font: var(--tui-font-body-s);
@@ -38,33 +35,33 @@
38
35
  }
39
36
 
40
37
  tui-range + & {
41
- --t-offset: @thumb;
38
+ --t-offset: @thumb-diameter;
42
39
  }
43
40
 
44
41
  /* TODO: add :has([tuiInputSlider]) */
45
42
  tui-textfield[data-size='l'] + & {
46
- --t-offset: calc(@track-inset[@l] + @thumb / 2);
43
+ --t-offset: calc(@track-inset[@l] + @thumb-radius);
47
44
  }
48
45
 
49
46
  /* TODO: add :has([tuiInputSlider]) */
50
47
  tui-textfield[data-size='m'] + & {
51
- --t-offset: calc(@track-inset[@m] + @thumb / 2);
48
+ --t-offset: calc(@track-inset[@m] + @thumb-radius);
52
49
  }
53
50
 
54
51
  /* TODO: add :has([tuiInputSlider]) */
55
52
  tui-textfield[data-size='s'] + & {
56
- --t-offset: calc(@track-inset[@s] + @thumb / 2);
53
+ --t-offset: calc(@track-inset[@s] + @thumb-radius);
57
54
  }
58
55
 
59
56
  tui-input-range[data-size='l'] + & {
60
- --t-offset: calc(@track-inset[@l] + @thumb);
57
+ --t-offset: calc(@track-inset[@l] + @thumb-diameter);
61
58
  }
62
59
 
63
60
  tui-input-range[data-size='m'] + & {
64
- --t-offset: calc(@track-inset[@m] + @thumb);
61
+ --t-offset: calc(@track-inset[@m] + @thumb-diameter);
65
62
  }
66
63
 
67
64
  tui-input-range[data-size='s'] + & {
68
- --t-offset: calc(@track-inset[@s] + @thumb);
65
+ --t-offset: calc(@track-inset[@s] + @thumb-diameter);
69
66
  }
70
67
  }
@@ -1,20 +1,15 @@
1
- $thumb-diameters: (
2
- 's': 0.5rem,
3
- 'm': 0.75rem,
4
- 'l': 0.75rem,
5
- );
6
-
7
1
  $track-inset: (
8
2
  's': 0.625rem,
9
3
  'm': 0.75rem,
10
4
  'l': 1rem,
11
5
  );
12
6
 
13
- // TODO(v5): use `l` by default (default size for new textfields)
14
- @mixin tui-slider-ticks-labels($input-size: m) {
15
- $thumb: map-get($thumb-diameters, $input-size);
7
+ $thumb-diameter: var(--tui-thumb-size, 0.75rem);
8
+ $thumb-radius: calc($thumb-diameter / 2);
9
+ $track-thickness: max(calc($thumb-radius - 0.25rem), 0.125rem);
16
10
 
17
- --t-offset: calc($thumb / 2);
11
+ @mixin tui-slider-ticks-labels() {
12
+ --t-offset: $thumb-radius;
18
13
 
19
14
  display: flex;
20
15
  font: var(--tui-font-body-s);
@@ -40,33 +35,33 @@ $track-inset: (
40
35
  }
41
36
 
42
37
  tui-range + & {
43
- --t-offset: $thumb;
38
+ --t-offset: $thumb-diameter;
44
39
  }
45
40
 
46
41
  /* TODO: add :has([tuiInputSlider]) */
47
42
  tui-textfield[data-size='l'] + & {
48
- --t-offset: calc(map-get($track-inset, 'l') + $thumb / 2);
43
+ --t-offset: calc(map-get($track-inset, 'l') + $thumb-radius);
49
44
  }
50
45
 
51
46
  /* TODO: add :has([tuiInputSlider]) */
52
47
  tui-textfield[data-size='m'] + & {
53
- --t-offset: calc(map-get($track-inset, 'm') + $thumb / 2);
48
+ --t-offset: calc(map-get($track-inset, 'm') + $thumb-radius);
54
49
  }
55
50
 
56
51
  /* TODO: add :has([tuiInputSlider]) */
57
52
  tui-textfield[data-size='s'] + & {
58
- --t-offset: calc(map-get($track-inset, 's') + $thumb / 2);
53
+ --t-offset: calc(map-get($track-inset, 's') + $thumb-radius);
59
54
  }
60
55
 
61
56
  tui-input-range[data-size='l'] + & {
62
- --t-offset: calc(map-get($track-inset, 'l') + $thumb);
57
+ --t-offset: calc(map-get($track-inset, 'l') + $thumb-diameter);
63
58
  }
64
59
 
65
60
  tui-input-range[data-size='m'] + & {
66
- --t-offset: calc(map-get($track-inset, 'm') + $thumb);
61
+ --t-offset: calc(map-get($track-inset, 'm') + $thumb-diameter);
67
62
  }
68
63
 
69
64
  tui-input-range[data-size='s'] + & {
70
- --t-offset: calc(map-get($track-inset, 's') + $thumb);
65
+ --t-offset: calc(map-get($track-inset, 's') + $thumb-diameter);
71
66
  }
72
67
  }
@@ -1,17 +1,3 @@
1
- /* TODO @deprecated remove in v5 */
2
- [tuiAppearance][data-appearance='link'] {
3
- color: var(--tui-text-action);
4
- background: transparent;
5
-
6
- .appearance-hover({
7
- color: var(--tui-text-action-hover);
8
- });
9
-
10
- .appearance-active({
11
- color: var(--tui-text-action-hover);
12
- });
13
- }
14
-
15
1
  [tuiAppearance][data-appearance='action'] {
16
2
  color: var(--tui-text-action);
17
3
  background: transparent;
@@ -5,6 +5,11 @@
5
5
  color: var(--tui-text-primary);
6
6
  box-shadow: 0 0.25rem 1.25rem rgba(0, 0, 0, 0.1);
7
7
 
8
+ &::before,
9
+ &::after {
10
+ transition-property: color;
11
+ }
12
+
8
13
  .appearance-hover({
9
14
  box-shadow: 0 0.875rem 2.625rem rgba(0, 0, 0, 0.14);
10
15
  });
package/tokens/i18n.d.ts CHANGED
@@ -7,6 +7,10 @@ export declare const TUI_MONTHS: InjectionToken<import("@angular/core").Signal<r
7
7
  * i18n 'close' word
8
8
  */
9
9
  export declare const TUI_CLOSE_WORD: InjectionToken<import("@angular/core").Signal<string>>;
10
+ /**
11
+ * i18n 'back' word
12
+ */
13
+ export declare const TUI_BACK_WORD: InjectionToken<import("@angular/core").Signal<string>>;
10
14
  /**
11
15
  * i18n 'clear' word
12
16
  */
package/tokens/index.d.ts CHANGED
@@ -13,6 +13,5 @@ export * from './media';
13
13
  export * from './number-format';
14
14
  export * from './reduced-motion';
15
15
  export * from './selection-stream';
16
- export * from './theme';
17
16
  export * from './validation-errors';
18
17
  export * from './viewport';
package/tokens/theme.d.ts DELETED
@@ -1,2 +0,0 @@
1
- import { InjectionToken } from '@angular/core';
2
- export declare const TUI_THEME: InjectionToken<string>;