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

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 (179) hide show
  1. package/components/alert/alert.component.d.ts +2 -3
  2. package/components/alert/alert.directive.d.ts +4 -3
  3. package/components/alert/alert.interfaces.d.ts +3 -1
  4. package/components/alert/alert.service.d.ts +5 -2
  5. package/components/button/button.directive.d.ts +2 -2
  6. package/components/button/button.options.d.ts +1 -1
  7. package/components/cell/cell.directive.d.ts +9 -0
  8. package/components/cell/cell.options.d.ts +6 -0
  9. package/components/cell/index.d.ts +2 -0
  10. package/components/dialog/active-zone-adapter.directive.d.ts +11 -0
  11. package/components/dialog/dialog.component.d.ts +6 -11
  12. package/components/dialog/dialog.directive.d.ts +1 -1
  13. package/components/dialog/dialog.factory.d.ts +1 -1
  14. package/components/dialog/dialog.options.d.ts +26 -0
  15. package/components/dialog/{dialog-close.service.d.ts → dialog.providers.d.ts} +4 -1
  16. package/components/dialog/dialog.service.d.ts +1 -1
  17. package/components/dialog/index.d.ts +2 -3
  18. package/components/error/error.component.d.ts +5 -7
  19. package/components/error/error.d.ts +4 -0
  20. package/components/error/error.directive.d.ts +19 -0
  21. package/components/error/error.pipe.d.ts +10 -0
  22. package/components/error/index.d.ts +3 -0
  23. package/components/expand/expand.component.d.ts +9 -28
  24. package/components/expand/index.d.ts +0 -2
  25. package/components/header/header.directive.d.ts +17 -0
  26. package/components/header/index.d.ts +1 -0
  27. package/components/icon/icon.component.d.ts +6 -11
  28. package/components/index.d.ts +2 -1
  29. package/components/notification/notification.directive.d.ts +1 -1
  30. package/components/notification/notification.options.d.ts +1 -1
  31. package/components/root/root.component.d.ts +4 -6
  32. package/components/scrollbar/scrollbar.options.d.ts +1 -1
  33. package/components/textfield/index.d.ts +1 -3
  34. package/components/textfield/textfield-content.directive.d.ts +3 -2
  35. package/components/textfield/textfield-icon.d.ts +3 -3
  36. package/components/textfield/textfield-multi/textfield-multi.component.d.ts +4 -5
  37. package/components/textfield/textfield.component.d.ts +1 -2
  38. package/components/textfield/textfield.d.ts +2 -3
  39. package/components/textfield/textfield.directive.d.ts +1 -1
  40. package/directives/appearance/appearance.directive.d.ts +5 -13
  41. package/directives/appearance/appearance.options.d.ts +1 -1
  42. package/directives/dropdown/dropdown-content.directive.d.ts +9 -0
  43. package/directives/dropdown/dropdown.d.ts +2 -2
  44. package/directives/dropdown/index.d.ts +1 -3
  45. package/directives/hint/hint-options.directive.d.ts +3 -3
  46. package/directives/hint/hint.component.d.ts +6 -8
  47. package/directives/hint/hint.directive.d.ts +1 -1
  48. package/directives/icons/icons.bindings.d.ts +5 -0
  49. package/directives/icons/icons.directive.d.ts +8 -16
  50. package/directives/icons/index.d.ts +1 -0
  51. package/directives/index.d.ts +0 -1
  52. package/directives/popup/popup.directive.d.ts +6 -5
  53. package/directives/popup/popup.service.d.ts +1 -1
  54. package/directives/popup/popups.component.d.ts +2 -2
  55. package/directives/title/title.directive.d.ts +2 -3
  56. package/fesm2022/taiga-ui-core-animations.mjs.map +1 -1
  57. package/fesm2022/taiga-ui-core-classes.mjs +3 -3
  58. package/fesm2022/taiga-ui-core-classes.mjs.map +1 -1
  59. package/fesm2022/taiga-ui-core-components-alert.mjs +46 -32
  60. package/fesm2022/taiga-ui-core-components-alert.mjs.map +1 -1
  61. package/fesm2022/taiga-ui-core-components-button.mjs +13 -20
  62. package/fesm2022/taiga-ui-core-components-button.mjs.map +1 -1
  63. package/fesm2022/taiga-ui-core-components-calendar.mjs +16 -19
  64. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  65. package/fesm2022/taiga-ui-core-components-cell.mjs +45 -0
  66. package/fesm2022/taiga-ui-core-components-cell.mjs.map +1 -0
  67. package/fesm2022/taiga-ui-core-components-data-list.mjs +28 -29
  68. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  69. package/fesm2022/taiga-ui-core-components-dialog.mjs +101 -82
  70. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  71. package/fesm2022/taiga-ui-core-components-error.mjs +107 -24
  72. package/fesm2022/taiga-ui-core-components-error.mjs.map +1 -1
  73. package/fesm2022/taiga-ui-core-components-expand.mjs +34 -132
  74. package/fesm2022/taiga-ui-core-components-expand.mjs.map +1 -1
  75. package/fesm2022/taiga-ui-core-components-header.mjs +42 -0
  76. package/fesm2022/taiga-ui-core-components-header.mjs.map +1 -0
  77. package/fesm2022/taiga-ui-core-components-icon.mjs +22 -39
  78. package/fesm2022/taiga-ui-core-components-icon.mjs.map +1 -1
  79. package/fesm2022/taiga-ui-core-components-label.mjs +9 -12
  80. package/fesm2022/taiga-ui-core-components-label.mjs.map +1 -1
  81. package/fesm2022/taiga-ui-core-components-link.mjs +9 -12
  82. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  83. package/fesm2022/taiga-ui-core-components-loader.mjs +5 -6
  84. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  85. package/fesm2022/taiga-ui-core-components-notification.mjs +16 -30
  86. package/fesm2022/taiga-ui-core-components-notification.mjs.map +1 -1
  87. package/fesm2022/taiga-ui-core-components-root.mjs +20 -48
  88. package/fesm2022/taiga-ui-core-components-root.mjs.map +1 -1
  89. package/fesm2022/taiga-ui-core-components-scrollbar.mjs +26 -26
  90. package/fesm2022/taiga-ui-core-components-scrollbar.mjs.map +1 -1
  91. package/fesm2022/taiga-ui-core-components-spin-button.mjs +6 -6
  92. package/fesm2022/taiga-ui-core-components-spin-button.mjs.map +1 -1
  93. package/fesm2022/taiga-ui-core-components-textfield.mjs +154 -248
  94. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  95. package/fesm2022/taiga-ui-core-components.mjs +2 -1
  96. package/fesm2022/taiga-ui-core-components.mjs.map +1 -1
  97. package/fesm2022/taiga-ui-core-directives-appearance.mjs +26 -63
  98. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  99. package/fesm2022/taiga-ui-core-directives-date-format.mjs +3 -3
  100. package/fesm2022/taiga-ui-core-directives-date-format.mjs.map +1 -1
  101. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +82 -119
  102. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  103. package/fesm2022/taiga-ui-core-directives-group.mjs +9 -12
  104. package/fesm2022/taiga-ui-core-directives-group.mjs.map +1 -1
  105. package/fesm2022/taiga-ui-core-directives-hint.mjs +71 -81
  106. package/fesm2022/taiga-ui-core-directives-hint.mjs.map +1 -1
  107. package/fesm2022/taiga-ui-core-directives-icons.mjs +35 -45
  108. package/fesm2022/taiga-ui-core-directives-icons.mjs.map +1 -1
  109. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs +9 -9
  110. package/fesm2022/taiga-ui-core-directives-items-handlers.mjs.map +1 -1
  111. package/fesm2022/taiga-ui-core-directives-number-format.mjs +3 -3
  112. package/fesm2022/taiga-ui-core-directives-number-format.mjs.map +1 -1
  113. package/fesm2022/taiga-ui-core-directives-popup.mjs +20 -26
  114. package/fesm2022/taiga-ui-core-directives-popup.mjs.map +1 -1
  115. package/fesm2022/taiga-ui-core-directives-title.mjs +13 -19
  116. package/fesm2022/taiga-ui-core-directives-title.mjs.map +1 -1
  117. package/fesm2022/taiga-ui-core-directives.mjs +0 -1
  118. package/fesm2022/taiga-ui-core-directives.mjs.map +1 -1
  119. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs +3 -3
  120. package/fesm2022/taiga-ui-core-pipes-auto-color.mjs.map +1 -1
  121. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs +3 -3
  122. package/fesm2022/taiga-ui-core-pipes-calendar-sheet.mjs.map +1 -1
  123. package/fesm2022/taiga-ui-core-pipes-flag.mjs +3 -3
  124. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
  125. package/fesm2022/taiga-ui-core-pipes-format-date.mjs +3 -3
  126. package/fesm2022/taiga-ui-core-pipes-format-date.mjs.map +1 -1
  127. package/fesm2022/taiga-ui-core-pipes-format-number.mjs +3 -3
  128. package/fesm2022/taiga-ui-core-pipes-format-number.mjs.map +1 -1
  129. package/fesm2022/taiga-ui-core-pipes-initials.mjs +3 -3
  130. package/fesm2022/taiga-ui-core-pipes-initials.mjs.map +1 -1
  131. package/fesm2022/taiga-ui-core-pipes-month.mjs +3 -3
  132. package/fesm2022/taiga-ui-core-pipes-month.mjs.map +1 -1
  133. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs +3 -3
  134. package/fesm2022/taiga-ui-core-pipes-order-week-days.mjs.map +1 -1
  135. package/fesm2022/taiga-ui-core-pipes.mjs +0 -1
  136. package/fesm2022/taiga-ui-core-pipes.mjs.map +1 -1
  137. package/fesm2022/taiga-ui-core-services.mjs +15 -15
  138. package/fesm2022/taiga-ui-core-services.mjs.map +1 -1
  139. package/fesm2022/taiga-ui-core-tokens.mjs +24 -32
  140. package/fesm2022/taiga-ui-core-tokens.mjs.map +1 -1
  141. package/fesm2022/taiga-ui-core-utils-dom.mjs.map +1 -1
  142. package/fesm2022/taiga-ui-core-utils-format.mjs.map +1 -1
  143. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs +49 -3
  144. package/fesm2022/taiga-ui-core-utils-miscellaneous.mjs.map +1 -1
  145. package/package.json +10 -14
  146. package/pipes/index.d.ts +0 -1
  147. package/styles/components/button.less +0 -2
  148. package/styles/components/icon.less +32 -26
  149. package/styles/components/icons.less +14 -12
  150. package/styles/components/link.less +0 -3
  151. package/styles/mixins/mixins.less +9 -2
  152. package/styles/mixins/mixins.scss +9 -2
  153. package/styles/mixins/slider.less +21 -16
  154. package/tokens/icon-resolver.d.ts +1 -5
  155. package/tokens/index.d.ts +1 -0
  156. package/tokens/validation-errors.d.ts +4 -0
  157. package/utils/miscellaneous/index.d.ts +1 -0
  158. package/utils/miscellaneous/provide-taiga.d.ts +13 -0
  159. package/components/dialog/dialog.interfaces.d.ts +0 -34
  160. package/components/dialog/dialog.tokens.d.ts +0 -15
  161. package/components/expand/expand-content.directive.d.ts +0 -8
  162. package/components/expand/expand.d.ts +0 -6
  163. package/components/fullscreen/fullscreen.component.d.ts +0 -14
  164. package/components/fullscreen/index.d.ts +0 -1
  165. package/components/textfield/select.directive.d.ts +0 -19
  166. package/components/textfield/textfield-dropdown.directive.d.ts +0 -16
  167. package/directives/dropdown/dropdown-portal.directive.d.ts +0 -14
  168. package/directives/dropdown/dropdown.service.d.ts +0 -6
  169. package/directives/dropdown/dropdowns.component.d.ts +0 -9
  170. package/directives/surface/index.d.ts +0 -1
  171. package/directives/surface/surface.directive.d.ts +0 -8
  172. package/fesm2022/taiga-ui-core-components-fullscreen.mjs +0 -66
  173. package/fesm2022/taiga-ui-core-components-fullscreen.mjs.map +0 -1
  174. package/fesm2022/taiga-ui-core-directives-surface.mjs +0 -50
  175. package/fesm2022/taiga-ui-core-directives-surface.mjs.map +0 -1
  176. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs +0 -29
  177. package/fesm2022/taiga-ui-core-pipes-fallback-src.mjs.map +0 -1
  178. package/pipes/fallback-src/fallback-src.pipe.d.ts +0 -9
  179. package/pipes/fallback-src/index.d.ts +0 -1
@@ -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,32 +27,34 @@
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;
34
34
  }
35
35
 
36
36
  &::before {
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;
37
+ display: var(--t-icon-start);
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 {
43
- display: var(--t-icon-end, none);
45
+ display: var(--t-icon-end);
44
46
  mask: var(--t-icon-end) no-repeat center / calc(~'min(1em, 100%)' + 10 * var(--tui-stroke-width, 0.125rem))
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
- background: var(--t-icon-start) no-repeat center/contain padding-box;
52
+ background: var(--t-icon-start) no-repeat center / 1em padding-box;
51
53
  }
52
54
 
53
- &[data-icon-end='image']::after {
55
+ &[data-icon-end='img']::after {
54
56
  mask: none;
55
- background: var(--t-icon-end) no-repeat center/contain padding-box;
57
+ background: var(--t-icon-end) no-repeat center / 1em padding-box;
56
58
  }
57
59
 
58
60
  &[data-icon-start='font']::before,
@@ -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;
@@ -75,9 +75,8 @@
75
75
  gap: calc(var(--t-gap, ~'0rem') - 2 * var(--t-margin, 0rem));
76
76
 
77
77
  > img,
78
- > tui-svg,
79
78
  > tui-icon,
80
- > tui-avatar,
79
+ > [tuiAvatar],
81
80
  > tui-badge,
82
81
  > [tuiBadge],
83
82
  > [tuiRadio],
@@ -172,3 +171,11 @@
172
171
  .tui-mask(@x, @y, @r) {
173
172
  mask: radial-gradient(circle at @x @y, transparent @r, black @r);
174
173
  }
174
+
175
+ .portal-loop (@i) when (@i > 0) {
176
+ .portal-loop(@i - 1);
177
+
178
+ &:nth-of-type(@{i}) {
179
+ grid-row: ~'1000@{i}';
180
+ }
181
+ }
@@ -72,9 +72,8 @@
72
72
  gap: calc(var(--t-gap) - 2 * var(--t-margin));
73
73
 
74
74
  > img,
75
- > tui-svg,
76
75
  > tui-icon,
77
- > tui-avatar,
76
+ > [tuiAvatar],
78
77
  > tui-badge,
79
78
  > [tuiBadge],
80
79
  > [tuiRadio],
@@ -165,3 +164,11 @@
165
164
  @mixin tui-mask($x, $y, $r) {
166
165
  mask: radial-gradient(circle at $x $y, transparent $r, black $r);
167
166
  }
167
+
168
+ @mixin portal-loop($n) {
169
+ @for $i from 1 through $n {
170
+ &:nth-of-type(#{$i}) {
171
+ grid-row: #{$i + 10000};
172
+ }
173
+ }
174
+ }
@@ -1,7 +1,6 @@
1
1
  @thumb-diameters: {
2
2
  @s: 0.5rem;
3
3
  @m: 0.75rem;
4
- @l: 0.75rem;
5
4
  };
6
5
 
7
6
  @track-inset: {
@@ -10,9 +9,8 @@
10
9
  @l: 1rem;
11
10
  };
12
11
 
13
- // TODO(v5): use `l` by default (default size for new textfields)
14
- .tui-slider-ticks-labels(@input-size: m) {
15
- @thumb: @thumb-diameters[@@input-size];
12
+ .tui-slider-ticks-labels(@thumb-size: m) {
13
+ @thumb: @thumb-diameters[@@thumb-size];
16
14
 
17
15
  --t-offset: calc(@thumb / 2);
18
16
 
@@ -45,27 +43,34 @@
45
43
  }
46
44
  }
47
45
 
48
- /* TODO(v5): delete */
49
- tui-input-slider + & {
50
- margin-inline-start: calc(var(--tui-radius-m) / 2 + var(--t-offset));
46
+ tui-range + & {
47
+ --t-offset: @thumb;
51
48
  }
52
49
 
53
50
  /* TODO: add :has([tuiInputSlider]) */
54
- tui-textfield + & {
55
- --t-offset: calc(var(--tui-radius-m) / 2 + @thumb / 2);
51
+ tui-textfield[data-size='l'] + & {
52
+ --t-offset: calc(@track-inset[@l] + @thumb / 2);
56
53
  }
57
54
 
58
55
  /* TODO: add :has([tuiInputSlider]) */
59
- tui-textfield[data-size='l'] + & {
60
- --t-offset: calc(var(--tui-radius-l) / 2 + @thumb / 2);
56
+ tui-textfield[data-size='m'] + & {
57
+ --t-offset: calc(@track-inset[@m] + @thumb / 2);
61
58
  }
62
59
 
63
- tui-input-range:not([new]) + &, /* TODO(v5): delete */
64
- tui-range + & {
65
- --t-offset: @thumb;
60
+ /* TODO: add :has([tuiInputSlider]) */
61
+ tui-textfield[data-size='s'] + & {
62
+ --t-offset: calc(@track-inset[@s] + @thumb / 2);
63
+ }
64
+
65
+ tui-input-range[data-size='l'] + & {
66
+ --t-offset: calc(@track-inset[@l] + @thumb);
67
+ }
68
+
69
+ tui-input-range[data-size='m'] + & {
70
+ --t-offset: calc(@track-inset[@m] + @thumb);
66
71
  }
67
72
 
68
- tui-input-range[new] + & {
69
- --t-offset: calc(@track-inset[@@input-size] + @thumb);
73
+ tui-input-range[data-size='s'] + & {
74
+ --t-offset: calc(@track-inset[@s] + @thumb);
70
75
  }
71
76
  }
@@ -1,10 +1,6 @@
1
1
  import { InjectionToken, type Provider } from '@angular/core';
2
2
  import { type TuiStringHandler } from '@taiga-ui/cdk/types';
3
3
  export declare const TUI_ICON_RESOLVER: InjectionToken<TuiStringHandler<string>>;
4
- /**
5
- * @deprecated use {@link TUI_ICON_RESOLVER}
6
- */
7
- export declare const TUI_ICON_START_RESOLVER: InjectionToken<TuiStringHandler<string>>;
8
- export declare function tuiGetIconMode(icon?: string | null): 'font' | 'image' | 'svg' | null;
4
+ export declare function tuiGetIconMode(icon?: string | null): string | undefined;
9
5
  export declare function tuiInjectIconResolver(): TuiStringHandler<string>;
10
6
  export declare function tuiIconResolverProvider(useValue: TuiStringHandler<string>): Provider;
package/tokens/index.d.ts CHANGED
@@ -17,4 +17,5 @@ export * from './scroll-ref';
17
17
  export * from './selection-stream';
18
18
  export * from './spin-icons';
19
19
  export * from './theme';
20
+ export * from './validation-errors';
20
21
  export * from './viewport';
@@ -0,0 +1,4 @@
1
+ import { InjectionToken, type Provider, type Signal } from '@angular/core';
2
+ import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
3
+ export declare const TUI_VALIDATION_ERRORS: InjectionToken<Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>>;
4
+ export declare const tuiValidationErrorsProvider: (useValue: Record<string, PolymorpheusContent | Signal<PolymorpheusContent>>) => Provider;
@@ -2,5 +2,6 @@ export * from './font-scaling';
2
2
  export * from './is-editing-key';
3
3
  export * from './is-obscured';
4
4
  export * from './override-options';
5
+ export * from './provide-taiga';
5
6
  export * from './size-bigger';
6
7
  export * from './to-animation-options';
@@ -0,0 +1,13 @@
1
+ import { type EnvironmentProviders, InjectionToken, type Provider } from '@angular/core';
2
+ interface ExperimentalAPIs {
3
+ readonly all: boolean;
4
+ }
5
+ export interface TuiOptions {
6
+ readonly mode?: 'dark' | 'light';
7
+ readonly apis: Partial<ExperimentalAPIs> | 'stable';
8
+ readonly fontScaling: boolean;
9
+ readonly scrollbars: 'custom' | 'native';
10
+ }
11
+ export declare const TUI_OPTIONS: InjectionToken<TuiOptions>;
12
+ export declare function provideTaiga(config?: Partial<TuiOptions>): Array<EnvironmentProviders | Provider>;
13
+ export {};
@@ -1,34 +0,0 @@
1
- import { type TuiPopover, type TuiPopoverContext } from '@taiga-ui/cdk/services';
2
- import { type TuiSizeL, type TuiSizeS } from '@taiga-ui/core/types';
3
- import { type PolymorpheusContent } from '@taiga-ui/polymorpheus';
4
- import { type Observable } from 'rxjs';
5
- export type TuiDialogSize = TuiSizeL | TuiSizeS | 'auto' | 'fullscreen' | 'page';
6
- /**
7
- * Options for a dialog
8
- *
9
- * appearance - data-appearance attribute of the dialog ('' by default)
10
- * size - size of the dialog ('m' by default)
11
- * required - closing dialog throws (false by default)
12
- * closeable - show close button (true by default)
13
- * dismissible - close dialog by Esc button or click on overlay (true by default)
14
- * label - string title for the dialog ('' by default)
15
- * header - content above title ('' by default)
16
- * data - arbitrary data for dialog
17
- */
18
- export interface TuiDialogOptions<I> {
19
- readonly appearance: string;
20
- /**
21
- * TODO: rename to closable in v5.0
22
- */
23
- readonly closeable: Observable<boolean> | boolean;
24
- readonly data: I extends void ? undefined : I & {
25
- button?: string;
26
- };
27
- readonly dismissible: Observable<boolean> | boolean;
28
- readonly header: PolymorpheusContent<TuiPopover<TuiDialogOptions<I>, any>>;
29
- readonly label: string;
30
- readonly required: boolean;
31
- readonly size: TuiDialogSize;
32
- }
33
- export interface TuiDialogContext<O = void, I = undefined> extends TuiPopoverContext<O>, TuiDialogOptions<I> {
34
- }
@@ -1,15 +0,0 @@
1
- import { InjectionToken, type Provider } from '@angular/core';
2
- import { BehaviorSubject, type Observable } from 'rxjs';
3
- import { type TuiDialogOptions } from './dialog.interfaces';
4
- export declare const TUI_DIALOGS: InjectionToken<BehaviorSubject<readonly any[]>>;
5
- export declare const TUI_DIALOG_DEFAULT_OPTIONS: TuiDialogOptions<void>;
6
- /**
7
- * A stream to close dialogs
8
- * TODO: use router.events in v5
9
- */
10
- export declare const TUI_DIALOGS_CLOSE: InjectionToken<Observable<unknown>>;
11
- /**
12
- * Default parameters for dialog component
13
- */
14
- export declare const TUI_DIALOG_OPTIONS: InjectionToken<TuiDialogOptions<void>>;
15
- export declare function tuiDialogOptionsProvider(options: Partial<TuiDialogOptions<unknown>>): Provider;
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- /**
3
- * @deprecated use {@link TuiExpand} from @taiga-ui/experimental
4
- */
5
- export declare class TuiExpandContent {
6
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiExpandContent, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiExpandContent, "[tuiExpandContent]", never, {}, {}, never, never, true, never>;
8
- }
@@ -1,6 +0,0 @@
1
- import { TuiExpandComponent } from './expand.component';
2
- import { TuiExpandContent } from './expand-content.directive';
3
- /**
4
- * @deprecated use {@link TuiExpand} from @taiga-ui/experimental
5
- */
6
- export declare const TuiExpand: readonly [typeof TuiExpandComponent, typeof TuiExpandContent];
@@ -1,14 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class TuiFullscreen {
4
- private readonly root?;
5
- private readonly doc;
6
- protected readonly open: import("@angular/core").WritableSignal<boolean>;
7
- readonly opened: EventEmitter<boolean>;
8
- options?: FullscreenOptions;
9
- set fullscreen(open: boolean);
10
- protected closedByEscape(event: Event): void;
11
- private fullscreenState;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiFullscreen, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiFullscreen, "[tuiFullscreen]", never, { "options": { "alias": "tuiFullscreenOptions"; "required": false; }; "fullscreen": { "alias": "tuiFullscreen"; "required": false; }; }, { "opened": "tuiFullscreenChange"; }, never, ["*"], true, never>;
14
- }
@@ -1 +0,0 @@
1
- export * from './fullscreen.component';
@@ -1,19 +0,0 @@
1
- import { TuiTextfieldBase } from './textfield.directive';
2
- import * as i0 from "@angular/core";
3
- import * as i1 from "@taiga-ui/cdk/directives/native-validator";
4
- import * as i2 from "@taiga-ui/core/directives/appearance";
5
- /**
6
- * @deprecated use {@link TuiSelect} from @taiga-ui/kit instead, drop in v5
7
- */
8
- export declare class TuiSelect<T> extends TuiTextfieldBase<T> {
9
- private readonly nav;
10
- private readonly doc;
11
- placeholder: string;
12
- setValue(value: T): void;
13
- focus(): void;
14
- protected get ariaLabel(): string | null;
15
- protected get stringified(): string;
16
- protected onCopy(): Promise<void>;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiSelect<any>, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiSelect<any>, "select[tuiTextfield]", never, { "placeholder": { "alias": "placeholder"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.TuiNativeValidator; inputs: {}; outputs: {}; }, { directive: typeof i2.TuiAppearance; inputs: {}; outputs: {}; }]>;
19
- }
@@ -1,16 +0,0 @@
1
- import { type OnDestroy } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class TuiTextfieldDropdownDirective implements OnDestroy {
4
- private readonly directive;
5
- constructor();
6
- ngOnDestroy(): void;
7
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiTextfieldDropdownDirective, never>;
8
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiTextfieldDropdownDirective, "ng-template[tuiTextfieldDropdown]", never, {}, {}, never, never, true, never>;
9
- }
10
- /**
11
- * @deprecated remove in v5
12
- */
13
- export declare class TuiWithTextfieldDropdown {
14
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiWithTextfieldDropdown, never>;
15
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiWithTextfieldDropdown, never, never, {}, {}, never, never, true, never>;
16
- }
@@ -1,14 +0,0 @@
1
- import { type OnDestroy } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * @deprecated use {@link TuiPopup} directive instead
5
- */
6
- export declare class TuiDropdownPortal implements OnDestroy {
7
- private readonly template;
8
- private readonly service;
9
- private viewRef?;
10
- set tuiDropdown(show: boolean);
11
- ngOnDestroy(): void;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownPortal, never>;
13
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiDropdownPortal, "ng-template[tuiDropdown]", never, { "tuiDropdown": { "alias": "tuiDropdown"; "required": false; }; }, {}, never, never, true, never>;
14
- }
@@ -1,6 +0,0 @@
1
- import { TuiPortalService } from '@taiga-ui/cdk/classes';
2
- import * as i0 from "@angular/core";
3
- export declare class TuiDropdownService extends TuiPortalService {
4
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdownService, never>;
5
- static ɵprov: i0.ɵɵInjectableDeclaration<TuiDropdownService>;
6
- }
@@ -1,9 +0,0 @@
1
- import { TuiPortals } from '@taiga-ui/cdk/classes';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Host element for dynamically created portals, for example using {@link TuiDropdownDirective}.
5
- */
6
- export declare class TuiDropdowns extends TuiPortals {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiDropdowns, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<TuiDropdowns, "tui-dropdowns", never, {}, {}, never, never, true, never>;
9
- }
@@ -1 +0,0 @@
1
- export * from './surface.directive';
@@ -1,8 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "@taiga-ui/core/directives/appearance";
3
- export declare class TuiSurface {
4
- protected readonly nothing: undefined;
5
- tuiSurface: string;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<TuiSurface, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<TuiSurface, "[tuiSurface]", never, { "tuiSurface": { "alias": "tuiSurface"; "required": false; }; }, {}, never, never, true, [{ directive: typeof i1.TuiAppearance; inputs: { "tuiAppearance": "tuiSurface"; }; outputs: {}; }]>;
8
- }
@@ -1,66 +0,0 @@
1
- import { DOCUMENT } from '@angular/common';
2
- import * as i0 from '@angular/core';
3
- import { inject, signal, EventEmitter, ElementRef, Input, Output, ViewChild, ChangeDetectionStrategy, Component } from '@angular/core';
4
- import { TuiRoot } from '@taiga-ui/core/components/root';
5
-
6
- class TuiFullscreen {
7
- constructor() {
8
- this.doc = inject(DOCUMENT);
9
- this.open = signal(false);
10
- this.opened = new EventEmitter();
11
- this.options = { navigationUI: 'auto' };
12
- }
13
- set fullscreen(open) {
14
- if (this.open() === open) {
15
- return;
16
- }
17
- if (open) {
18
- this.root?.nativeElement
19
- .requestFullscreen(this.options)
20
- .then(() => this.fullscreenState(open));
21
- }
22
- else {
23
- this.doc
24
- .exitFullscreen()
25
- .then(() => this.fullscreenState(open))
26
- .catch((error) => console.error('Failed to exit fullscreen:', error));
27
- }
28
- }
29
- closedByEscape(event) {
30
- const escaped = !this.doc.fullscreenElement && event.target === this.root?.nativeElement;
31
- if (escaped) {
32
- this.fullscreenState(false);
33
- }
34
- }
35
- fullscreenState(open) {
36
- this.open.set(open);
37
- this.opened.emit(open);
38
- }
39
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiFullscreen, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
40
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.9", type: TuiFullscreen, isStandalone: true, selector: "[tuiFullscreen]", inputs: { options: ["tuiFullscreenOptions", "options"], fullscreen: ["tuiFullscreen", "fullscreen"] }, outputs: { opened: "tuiFullscreenChange" }, host: { listeners: { "document:fullscreenchange": "closedByEscape($event)" } }, viewQueries: [{ propertyName: "root", first: true, predicate: TuiRoot, descendants: true, read: ElementRef }], ngImport: i0, template: '<tui-root><ng-content /></tui-root>', isInline: true, styles: ["tui-root{scrollbar-width:none;-ms-overflow-style:none;overflow:auto}tui-root::-webkit-scrollbar,tui-root::-webkit-scrollbar-thumb{display:none}\n"], dependencies: [{ kind: "component", type: TuiRoot, selector: "tui-root" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
41
- }
42
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.9", ngImport: i0, type: TuiFullscreen, decorators: [{
43
- type: Component,
44
- args: [{ selector: '[tuiFullscreen]', imports: [TuiRoot], template: '<tui-root><ng-content /></tui-root>', changeDetection: ChangeDetectionStrategy.OnPush, host: {
45
- '(document:fullscreenchange)': 'closedByEscape($event)',
46
- }, styles: ["tui-root{scrollbar-width:none;-ms-overflow-style:none;overflow:auto}tui-root::-webkit-scrollbar,tui-root::-webkit-scrollbar-thumb{display:none}\n"] }]
47
- }], propDecorators: { root: [{
48
- type: ViewChild,
49
- args: [TuiRoot, { read: ElementRef }]
50
- }], opened: [{
51
- type: Output,
52
- args: ['tuiFullscreenChange']
53
- }], options: [{
54
- type: Input,
55
- args: ['tuiFullscreenOptions']
56
- }], fullscreen: [{
57
- type: Input,
58
- args: ['tuiFullscreen']
59
- }] } });
60
-
61
- /**
62
- * Generated bundle index. Do not edit.
63
- */
64
-
65
- export { TuiFullscreen };
66
- //# sourceMappingURL=taiga-ui-core-components-fullscreen.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"taiga-ui-core-components-fullscreen.mjs","sources":["../../../projects/core/components/fullscreen/fullscreen.component.ts","../../../projects/core/components/fullscreen/taiga-ui-core-components-fullscreen.ts"],"sourcesContent":["import {DOCUMENT} from '@angular/common';\nimport {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n EventEmitter,\n inject,\n Input,\n Output,\n signal,\n ViewChild,\n} from '@angular/core';\nimport {TuiRoot} from '@taiga-ui/core/components/root';\n\n@Component({\n selector: '[tuiFullscreen]',\n imports: [TuiRoot],\n template: '<tui-root><ng-content /></tui-root>',\n styleUrls: ['./fullscreen.style.less'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '(document:fullscreenchange)': 'closedByEscape($event)',\n },\n})\nexport class TuiFullscreen {\n @ViewChild(TuiRoot, {read: ElementRef})\n private readonly root?: ElementRef<HTMLElement>;\n\n private readonly doc = inject(DOCUMENT);\n protected readonly open = signal(false);\n\n @Output('tuiFullscreenChange')\n public readonly opened = new EventEmitter<boolean>();\n\n @Input('tuiFullscreenOptions')\n public options?: FullscreenOptions = {navigationUI: 'auto'};\n\n @Input('tuiFullscreen')\n public set fullscreen(open: boolean) {\n if (this.open() === open) {\n return;\n }\n\n if (open) {\n this.root?.nativeElement\n .requestFullscreen(this.options)\n .then(() => this.fullscreenState(open));\n } else {\n this.doc\n .exitFullscreen()\n .then(() => this.fullscreenState(open))\n .catch((error: unknown) =>\n console.error('Failed to exit fullscreen:', error),\n );\n }\n }\n\n protected closedByEscape(event: Event): void {\n const escaped =\n !this.doc.fullscreenElement && event.target === this.root?.nativeElement;\n\n if (escaped) {\n this.fullscreenState(false);\n }\n }\n\n private fullscreenState(open: boolean): void {\n this.open.set(open);\n this.opened.emit(open);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAwBa,aAAa,CAAA;AAV1B,IAAA,WAAA,GAAA;AAcqB,QAAA,IAAA,CAAA,GAAG,GAAG,MAAM,CAAC,QAAQ,CAAC;AACpB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;AAGvB,QAAA,IAAA,CAAA,MAAM,GAAG,IAAI,YAAY,EAAW;AAG7C,QAAA,IAAA,CAAA,OAAO,GAAuB,EAAC,YAAY,EAAE,MAAM,EAAC;AAmC9D,IAAA;IAjCG,IACW,UAAU,CAAC,IAAa,EAAA;AAC/B,QAAA,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,IAAI,EAAE;YACtB;QACJ;QAEA,IAAI,IAAI,EAAE;YACN,IAAI,CAAC,IAAI,EAAE;AACN,iBAAA,iBAAiB,CAAC,IAAI,CAAC,OAAO;iBAC9B,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,CAAC;QAC/C;aAAO;AACH,YAAA,IAAI,CAAC;AACA,iBAAA,cAAc;iBACd,IAAI,CAAC,MAAM,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC;AACrC,iBAAA,KAAK,CAAC,CAAC,KAAc,KAClB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CACrD;QACT;IACJ;AAEU,IAAA,cAAc,CAAC,KAAY,EAAA;AACjC,QAAA,MAAM,OAAO,GACT,CAAC,IAAI,CAAC,GAAG,CAAC,iBAAiB,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,IAAI,EAAE,aAAa;QAE5E,IAAI,OAAO,EAAE;AACT,YAAA,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC;QAC/B;IACJ;AAEQ,IAAA,eAAe,CAAC,IAAa,EAAA;AACjC,QAAA,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC;AACnB,QAAA,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;IAC1B;8GA7CS,aAAa,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAb,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,aAAa,oVACX,OAAO,EAAA,WAAA,EAAA,IAAA,EAAA,IAAA,EAAS,UAAU,EAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAR3B,qCAAqC,2NADrC,OAAO,EAAA,QAAA,EAAA,UAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA,CAAA;;2FAQR,aAAa,EAAA,UAAA,EAAA,CAAA;kBAVzB,SAAS;+BACI,iBAAiB,EAAA,OAAA,EAClB,CAAC,OAAO,CAAC,EAAA,QAAA,EACR,qCAAqC,EAAA,eAAA,EAE9B,uBAAuB,CAAC,MAAM,EAAA,IAAA,EACzC;AACF,wBAAA,6BAA6B,EAAE,wBAAwB;AAC1D,qBAAA,EAAA,MAAA,EAAA,CAAA,mJAAA,CAAA,EAAA;8BAIgB,IAAI,EAAA,CAAA;sBADpB,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,OAAO,EAAE,EAAC,IAAI,EAAE,UAAU,EAAC;gBAOtB,MAAM,EAAA,CAAA;sBADrB,MAAM;uBAAC,qBAAqB;gBAItB,OAAO,EAAA,CAAA;sBADb,KAAK;uBAAC,sBAAsB;gBAIlB,UAAU,EAAA,CAAA;sBADpB,KAAK;uBAAC,eAAe;;;ACrC1B;;AAEG;;;;"}