@taiga-ui/core 4.52.0-canary.a4e325d → 4.52.0-canary.e444d19

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 (93) hide show
  1. package/components/icon/icon.component.d.ts +6 -11
  2. package/directives/icons/icons.directive.d.ts +3 -3
  3. package/fesm2022/taiga-ui-core-animations.mjs.map +1 -1
  4. package/fesm2022/taiga-ui-core-classes.mjs +3 -3
  5. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  6. package/fesm2022/taiga-ui-core-components-alert.mjs +16 -16
  7. package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
  8. package/fesm2022/taiga-ui-core-components-button.mjs +7 -7
  9. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  10. package/fesm2022/taiga-ui-core-components-calendar.mjs +16 -19
  11. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  12. package/fesm2022/taiga-ui-core-components-data-list.mjs +24 -25
  13. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  14. package/fesm2022/taiga-ui-core-components-dialog.mjs +19 -20
  15. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  16. package/fesm2022/taiga-ui-core-components-error.mjs +5 -6
  17. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  18. package/fesm2022/taiga-ui-core-components-expand.mjs +9 -9
  19. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  20. package/fesm2022/taiga-ui-core-components-fullscreen.mjs +3 -3
  21. package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +1 -1
  22. package/fesm2022/taiga-ui-core-components-icon.mjs +22 -39
  23. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  24. package/fesm2022/taiga-ui-core-components-label.mjs +6 -6
  25. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-core-components-link.mjs +7 -7
  27. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-core-components-loader.mjs +5 -6
  29. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-core-components-notification.mjs +6 -6
  31. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-core-components-root.mjs +5 -6
  33. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +26 -26
  35. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  36. package/fesm2022/taiga-ui-core-components-spin-button.mjs +6 -6
  37. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  38. package/fesm2022/taiga-ui-core-components-textfield.mjs +50 -52
  39. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  40. package/fesm2022/taiga-ui-core-directives-appearance.mjs +9 -9
  41. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  42. package/fesm2022/taiga-ui-core-directives-date-format.mjs +3 -3
  43. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  44. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +57 -57
  45. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  46. package/fesm2022/taiga-ui-core-directives-group.mjs +6 -6
  47. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  48. package/fesm2022/taiga-ui-core-directives-hint.mjs +51 -51
  49. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  50. package/fesm2022/taiga-ui-core-directives-icons.mjs +10 -10
  51. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  52. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +9 -9
  53. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  54. package/fesm2022/taiga-ui-core-directives-number-format.mjs +3 -3
  55. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  56. package/fesm2022/taiga-ui-core-directives-popup.mjs +9 -9
  57. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
  58. package/fesm2022/taiga-ui-core-directives-surface.mjs +6 -6
  59. package/fesm2022/taiga-ui-core-directives-surface.mjs.map +1 -1
  60. package/fesm2022/taiga-ui-core-directives-title.mjs +6 -6
  61. package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
  62. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +3 -3
  63. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
  64. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +3 -3
  65. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
  66. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +3 -3
  67. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +1 -1
  68. package/fesm2022/taiga-ui-core-pipes-flag.mjs +3 -3
  69. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
  70. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +3 -3
  71. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
  72. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +3 -3
  73. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  74. package/fesm2022/taiga-ui-core-pipes-initials.mjs +3 -3
  75. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
  76. package/fesm2022/taiga-ui-core-pipes-month.mjs +3 -3
  77. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
  78. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +3 -3
  79. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
  80. package/fesm2022/taiga-ui-core-services.mjs +15 -15
  81. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  82. package/fesm2022/taiga-ui-core-tokens.mjs +18 -27
  83. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  84. package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  86. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  87. package/package.json +1 -1
  88. package/styles/components/icon.less +32 -26
  89. package/styles/components/icons.less +10 -8
  90. package/styles/components/link.less +0 -3
  91. package/styles/mixins/mixins.less +1 -1
  92. package/styles/mixins/mixins.scss +1 -1
  93. package/tokens/icon-resolver.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/core",
3
- "version": "4.52.0-canary.a4e325d",
3
+ "version": "4.52.0-canary.e444d19",
4
4
  "description": "Core library for creating Angular components and applications using Taiga UI",
5
5
  "keywords": [
6
6
  "angular",
@@ -9,18 +9,20 @@
9
9
  *
10
10
  * @vars
11
11
  * --t-icon — depending on the data-icon, it can serve as either a mask (`svg`),
12
- a background (`image`), or content (`font`) for the icon.
12
+ a background (`img`), or content (`font`) for the icon.
13
13
  * --t-icon-bg — mask for the background
14
14
  *
15
15
  * @example
16
- * <tui-icon data-icon="svg" style="--t-icon: url('icon.svg')"></tui-icon>
16
+ * <tui-icon tuiIcons style="--t-icon: url('icon.svg')"></tui-icon>
17
17
  *
18
18
  * @see-also
19
19
  * Icons
20
20
  */
21
21
  tui-icon {
22
+ --tui-icon-size: 1em;
23
+
22
24
  position: relative;
23
- display: inline-block;
25
+ display: inline-flex;
24
26
  inline-size: 1em;
25
27
  block-size: 1em;
26
28
  font-size: 1.5rem;
@@ -28,8 +30,7 @@ tui-icon {
28
30
  border: 0 solid transparent;
29
31
  vertical-align: middle;
30
32
  box-sizing: border-box;
31
- mask: var(--t-icon-bg) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
32
- ~'min(1em, 100%)' padding-box;
33
+ mask: var(--t-icon-bg) no-repeat center / calc(100% + 10 * var(--tui-stroke-width, 0.125rem)) 100%;
33
34
 
34
35
  @media @tui-mouse {
35
36
  &[data-appearance='icon']:hover {
@@ -37,30 +38,35 @@ tui-icon {
37
38
  }
38
39
  }
39
40
 
40
- &::before,
41
- &[tuiIcons]::before {
42
- .fullsize();
41
+ &[data-icon-end] {
42
+ &::before {
43
+ mask-image:
44
+ var(--t-icon-start),
45
+ radial-gradient(circle at bottom 0.1em right 0.1em, transparent calc(0.4em - 0.5px), #000 0.4em);
46
+ mask-composite: intersect;
47
+ }
43
48
 
44
- content: '';
45
- display: block;
46
- mask:
47
- var(--t-icon) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
48
- ~'min(1em, 100%)',
49
- 100% padding-box;
50
- background: currentColor;
51
- }
49
+ &[data-icon-start='img'],
50
+ &[data-icon-start='font'] {
51
+ &::before {
52
+ mask: radial-gradient(circle at bottom 0.1em right 0.1em, transparent calc(0.4em - 0.5px), #000 0.4em);
53
+ }
54
+ }
52
55
 
53
- &[data-icon='image']::before {
54
- mask: none;
55
- background: var(--t-icon) no-repeat center/contain;
56
+ &::after {
57
+ .fullsize();
58
+ }
56
59
  }
57
60
 
58
- &[data-icon='font']::before {
59
- content: var(--t-icon);
60
- mask: none;
61
- background: none;
62
- font: 1em/1 var(--tui-font-icon, inherit);
63
- text-align: center;
64
- text-transform: none;
61
+ &[data-icon-start] {
62
+ &::before {
63
+ .fullsize();
64
+ }
65
+
66
+ &::after {
67
+ transform: translate(36%, 36%);
68
+
69
+ --tui-icon-size: 0.5715em;
70
+ }
65
71
  }
66
72
  }
@@ -7,12 +7,12 @@
7
7
  *
8
8
  * @vars
9
9
  * --t-icon-start — depending on the data-icon-start, it can serve as either a mask (`svg`),
10
- a background (`image`), or content (`font`) for the ::before element
10
+ a background (`img`), or content (`font`) for the ::before element
11
11
  * --t-icon-end — depending on the data-icon-end, it can serve as either a mask (`svg`),
12
- a background (`image`), or content (`font`) for the ::after element
12
+ a background (`img`), or content (`font`) for the ::after element
13
13
  *
14
14
  * @example
15
- * <button tuiIcons data-icon-start="svg" style="--t-icon-start: url('icon.svg')"></button>
15
+ * <button tuiIcons style="--t-icon-start: url('icon.svg')"></button>
16
16
  *
17
17
  * @see-also
18
18
  * Button, Icon, Link
@@ -27,7 +27,7 @@
27
27
  inline-size: 1em;
28
28
  block-size: 1em;
29
29
  line-height: 1em;
30
- font-size: 1.5rem;
30
+ font-size: var(--tui-icon-size, 1.5rem);
31
31
  flex-shrink: 0;
32
32
  box-sizing: content-box;
33
33
  background: currentColor;
@@ -35,8 +35,10 @@
35
35
 
36
36
  &::before {
37
37
  display: var(--t-icon-start, none);
38
- mask: var(--t-icon-start) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
39
- ~'min(1em, 100%)' padding-box;
38
+ mask:
39
+ var(--t-icon-start) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
40
+ ~'min(1em, 100%)',
41
+ 100% padding-box;
40
42
  }
41
43
 
42
44
  &::after {
@@ -45,12 +47,12 @@
45
47
  ~'min(1em, 100%)' padding-box;
46
48
  }
47
49
 
48
- &[data-icon-start='image']::before {
50
+ &[data-icon-start='img']::before {
49
51
  mask: none;
50
52
  background: var(--t-icon-start) no-repeat center/contain padding-box;
51
53
  }
52
54
 
53
- &[data-icon-end='image']::after {
55
+ &[data-icon-end='img']::after {
54
56
  mask: none;
55
57
  background: var(--t-icon-end) no-repeat center/contain padding-box;
56
58
  }
@@ -14,9 +14,6 @@
14
14
  * Icons, Appearance, Button
15
15
  */
16
16
  [tuiLink] {
17
- // TODO: Remove in v5
18
- --tui-text-tertiary: var(--tui-text-secondary);
19
-
20
17
  .transition(~'color, text-decoration, opacity');
21
18
 
22
19
  padding: 0;
@@ -77,7 +77,7 @@
77
77
  > img,
78
78
  > tui-svg,
79
79
  > tui-icon,
80
- > tui-avatar,
80
+ > [tuiAvatar],
81
81
  > tui-badge,
82
82
  > [tuiBadge],
83
83
  > [tuiRadio],
@@ -74,7 +74,7 @@
74
74
  > img,
75
75
  > tui-svg,
76
76
  > tui-icon,
77
- > tui-avatar,
77
+ > [tuiAvatar],
78
78
  > tui-badge,
79
79
  > [tuiBadge],
80
80
  > [tuiRadio],
@@ -5,6 +5,6 @@ export declare const TUI_ICON_RESOLVER: InjectionToken<TuiStringHandler<string>>
5
5
  * @deprecated use {@link TUI_ICON_RESOLVER}
6
6
  */
7
7
  export declare const TUI_ICON_START_RESOLVER: InjectionToken<TuiStringHandler<string>>;
8
- export declare function tuiGetIconMode(icon?: string | null): 'font' | 'image' | 'svg' | null;
8
+ export declare function tuiGetIconMode(icon?: string | null): string | undefined;
9
9
  export declare function tuiInjectIconResolver(): TuiStringHandler<string>;
10
10
  export declare function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider;