@taiga-ui/core 4.7.0 → 4.8.1-canary.d818d28

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 (50) hide show
  1. package/components/data-list/data-list.component.d.ts +2 -1
  2. package/components/dialog/dialog.component.d.ts +14 -4
  3. package/components/loader/loader.component.d.ts +2 -8
  4. package/components/textfield/textfield.component.d.ts +6 -7
  5. package/directives/appearance/appearance.directive.d.ts +3 -1
  6. package/directives/appearance/appearance.options.d.ts +2 -1
  7. package/directives/dropdown/dropdown-context.directive.d.ts +1 -1
  8. package/esm2022/components/calendar/calendar-sheet.component.mjs +3 -3
  9. package/esm2022/components/calendar/calendar-year.component.mjs +3 -3
  10. package/esm2022/components/data-list/data-list.component.mjs +10 -5
  11. package/esm2022/components/dialog/dialog.component.mjs +13 -19
  12. package/esm2022/components/link/link.directive.mjs +2 -2
  13. package/esm2022/components/loader/loader.component.mjs +10 -27
  14. package/esm2022/components/root/root.component.mjs +1 -1
  15. package/esm2022/components/textfield/textfield-dropdown.directive.mjs +2 -2
  16. package/esm2022/components/textfield/textfield.component.mjs +15 -17
  17. package/esm2022/directives/appearance/appearance.bindings.mjs +1 -1
  18. package/esm2022/directives/appearance/appearance.directive.mjs +15 -6
  19. package/esm2022/directives/appearance/appearance.options.mjs +1 -1
  20. package/esm2022/directives/dropdown/dropdown-context.directive.mjs +9 -9
  21. package/esm2022/directives/dropdown/dropdown-open.directive.mjs +6 -5
  22. package/esm2022/directives/dropdown/dropdown.component.mjs +3 -3
  23. package/esm2022/pipes/flag/flag.pipe.mjs +1 -1
  24. package/fesm2022/taiga-ui-core-components-calendar.mjs +4 -4
  25. package/fesm2022/taiga-ui-core-components-calendar.mjs.map +1 -1
  26. package/fesm2022/taiga-ui-core-components-data-list.mjs +9 -5
  27. package/fesm2022/taiga-ui-core-components-data-list.mjs.map +1 -1
  28. package/fesm2022/taiga-ui-core-components-dialog.mjs +11 -16
  29. package/fesm2022/taiga-ui-core-components-dialog.mjs.map +1 -1
  30. package/fesm2022/taiga-ui-core-components-link.mjs +2 -2
  31. package/fesm2022/taiga-ui-core-components-link.mjs.map +1 -1
  32. package/fesm2022/taiga-ui-core-components-loader.mjs +9 -26
  33. package/fesm2022/taiga-ui-core-components-loader.mjs.map +1 -1
  34. package/fesm2022/taiga-ui-core-components-root.mjs +1 -1
  35. package/fesm2022/taiga-ui-core-components-textfield.mjs +15 -18
  36. package/fesm2022/taiga-ui-core-components-textfield.mjs.map +1 -1
  37. package/fesm2022/taiga-ui-core-directives-appearance.mjs +14 -5
  38. package/fesm2022/taiga-ui-core-directives-appearance.mjs.map +1 -1
  39. package/fesm2022/taiga-ui-core-directives-dropdown.mjs +15 -14
  40. package/fesm2022/taiga-ui-core-directives-dropdown.mjs.map +1 -1
  41. package/fesm2022/taiga-ui-core-pipes-flag.mjs.map +1 -1
  42. package/package.json +324 -324
  43. package/pipes/flag/flag.pipe.d.ts +6 -3
  44. package/styles/components/appearance.less +4 -0
  45. package/styles/components/link.less +1 -0
  46. package/styles/components/textfield.less +10 -10
  47. package/styles/mixins/date-picker.less +4 -4
  48. package/styles/mixins/mixins.less +17 -0
  49. package/styles/mixins/mixins.scss +17 -0
  50. package/styles/theme/appearance/textfield.less +0 -1
@@ -1,11 +1,14 @@
1
1
  import type { PipeTransform } from '@angular/core';
2
+ import type { TuiLooseUnion } from '@taiga-ui/cdk/types';
2
3
  import type { TuiCountryIsoCode } from '@taiga-ui/i18n/types';
3
4
  import * as i0 from "@angular/core";
5
+ type IsoCode = TuiLooseUnion<TuiCountryIsoCode>;
4
6
  export declare class TuiFlagPipe implements PipeTransform {
5
7
  private readonly staticPath;
6
- transform(countryIsoCode: TuiCountryIsoCode | string): string;
7
- transform(countryIsoCode: TuiCountryIsoCode | string | undefined): string | null;
8
- transform(countryIsoCode?: TuiCountryIsoCode | string | null): string | null;
8
+ transform(countryIsoCode: IsoCode): string;
9
+ transform(countryIsoCode: IsoCode | undefined): string | null;
10
+ transform(countryIsoCode?: IsoCode | null): string | null;
9
11
  static ɵfac: i0.ɵɵFactoryDeclaration<TuiFlagPipe, never>;
10
12
  static ɵpipe: i0.ɵɵPipeDeclaration<TuiFlagPipe, "tuiFlag", true>;
11
13
  }
14
+ export {};
@@ -27,6 +27,10 @@
27
27
  outline: 0.125rem solid transparent;
28
28
  outline-offset: -0.125rem;
29
29
 
30
+ &.tui-appearance-initializing {
31
+ transition: none !important;
32
+ }
33
+
30
34
  .appearance-focus({
31
35
  outline-color: var(--tui-border-focus);
32
36
  });
@@ -46,6 +46,7 @@
46
46
  vertical-align: super;
47
47
  font-size: 0;
48
48
  line-height: 0;
49
+ box-sizing: border-box;
49
50
  }
50
51
 
51
52
  .appearance-focus({
@@ -4,6 +4,7 @@ tui-textfield {
4
4
  .transition(color);
5
5
 
6
6
  --t-height: var(--tui-height-l);
7
+ --t-padding: var(--tui-padding-l);
7
8
 
8
9
  position: relative;
9
10
  display: flex;
@@ -12,7 +13,7 @@ tui-textfield {
12
13
  cursor: pointer;
13
14
  block-size: var(--t-height);
14
15
  color: var(--tui-text-tertiary);
15
- padding: 0 var(--tui-padding-l);
16
+ padding: 0 var(--t-padding);
16
17
  border-radius: var(--tui-radius-l);
17
18
  font: var(--tui-font-text-m);
18
19
  box-sizing: border-box;
@@ -36,8 +37,8 @@ tui-textfield {
36
37
 
37
38
  &[data-size='s'] {
38
39
  --t-height: var(--tui-height-s);
40
+ --t-padding: var(--tui-padding-s);
39
41
 
40
- padding: 0 var(--tui-padding-s);
41
42
  border-radius: var(--tui-radius-m);
42
43
  font: var(--tui-font-text-s);
43
44
 
@@ -72,8 +73,8 @@ tui-textfield {
72
73
 
73
74
  &[data-size='m'] {
74
75
  --t-height: var(--tui-height-m);
76
+ --t-padding: var(--tui-padding-m);
75
77
 
76
- padding: 0 var(--tui-padding-m);
77
78
  border-radius: var(--tui-radius-m);
78
79
  font: var(--tui-font-text-s);
79
80
 
@@ -175,11 +176,11 @@ tui-textfield {
175
176
 
176
177
  appearance: none;
177
178
  box-sizing: border-box;
178
- border: none;
179
- border-inline-start: var(--t-left, 0) solid transparent !important;
180
- border-inline-end: calc(var(--t-right, var(--t-0, 0rem)) + var(--t-side)) solid transparent !important;
181
179
  border-radius: inherit;
182
180
  padding: inherit;
181
+ border: none;
182
+ text-indent: var(--t-left, 0);
183
+ padding-inline-end: calc(var(--t-right, var(--t-0, 0rem)) + var(--t-side) + var(--t-padding));
183
184
  }
184
185
 
185
186
  .t-template {
@@ -194,8 +195,7 @@ tui-textfield {
194
195
  input:defined,
195
196
  select:defined {
196
197
  pointer-events: auto;
197
- background: transparent no-repeat center right 1rem / 2rem;
198
- background-clip: border-box, padding-box;
198
+ background: transparent;
199
199
 
200
200
  &:read-only ~ .t-filler {
201
201
  display: none;
@@ -206,7 +206,7 @@ tui-textfield {
206
206
  & ~ .t-content {
207
207
  opacity: var(--tui-disabled-opacity);
208
208
 
209
- tui-icon {
209
+ > tui-icon {
210
210
  display: none;
211
211
  }
212
212
  }
@@ -286,7 +286,7 @@ tui-textfield {
286
286
  margin-inline-start: auto;
287
287
  isolation: isolate;
288
288
 
289
- tui-icon {
289
+ > tui-icon {
290
290
  pointer-events: auto;
291
291
  }
292
292
  }
@@ -58,7 +58,7 @@
58
58
  }
59
59
 
60
60
  &[data-range]::before {
61
- background: var(--tui-background-base-alt);
61
+ background: var(--tui-background-neutral-1);
62
62
  }
63
63
 
64
64
  :host._picking &[data-range]::before {
@@ -66,7 +66,7 @@
66
66
  }
67
67
 
68
68
  &[data-range='middle'] {
69
- border-color: var(--tui-background-base-alt);
69
+ border-color: var(--tui-background-neutral-1);
70
70
 
71
71
  :host._picking & {
72
72
  border-color: var(--tui-background-neutral-1-hover);
@@ -84,7 +84,7 @@
84
84
  }
85
85
 
86
86
  &[data-range='start'] {
87
- border-inline-end-color: var(--tui-background-base-alt);
87
+ border-inline-end-color: var(--tui-background-neutral-1);
88
88
  color: var(--tui-text-primary-on-accent-1);
89
89
 
90
90
  :host._picking & {
@@ -101,7 +101,7 @@
101
101
  }
102
102
 
103
103
  &[data-range='end'] {
104
- border-inline-start-color: var(--tui-background-base-alt);
104
+ border-inline-start-color: var(--tui-background-neutral-1);
105
105
  color: var(--tui-text-primary-on-accent-1);
106
106
 
107
107
  :host._picking & {
@@ -129,3 +129,20 @@
129
129
  overflow: hidden;
130
130
  padding: 0;
131
131
  }
132
+
133
+ // prevent scrolling to focused element on IOS
134
+ .tui-prevent-ios-scroll() {
135
+ &:focus {
136
+ animation: tuiPreventIOSScroll 0.001s;
137
+ }
138
+
139
+ @keyframes tuiPreventIOSScroll {
140
+ 0% {
141
+ opacity: 0;
142
+ }
143
+
144
+ 100% {
145
+ opacity: 1;
146
+ }
147
+ }
148
+ }
@@ -128,3 +128,20 @@
128
128
  overflow: hidden;
129
129
  padding: 0;
130
130
  }
131
+
132
+ // prevent scrolling to focused element on IOS
133
+ @mixin tui-prevent-ios-scroll() {
134
+ &:focus {
135
+ animation: tuiPreventIOSScroll 0.001s;
136
+ }
137
+
138
+ @keyframes tuiPreventIOSScroll {
139
+ 0% {
140
+ opacity: 0;
141
+ }
142
+
143
+ 100% {
144
+ opacity: 1;
145
+ }
146
+ }
147
+ }
@@ -40,7 +40,6 @@
40
40
  &:-webkit-autofill {
41
41
  -webkit-text-fill-color: var(--tui-text-primary) !important;
42
42
  caret-color: var(--tui-text-primary) !important;
43
- border-color: var(--tui-service-autofill-background) !important;
44
43
  box-shadow: 0 0 0 100rem var(--tui-service-autofill-background) inset !important;
45
44
  transition: background-color 600000s 0s;
46
45