@taiga-ui/core 3.2.0 → 3.3.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.
@@ -377,7 +377,7 @@
377
377
  return TuiRootComponent;
378
378
  }());
379
379
  TuiRootComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiRootComponent, deps: [{ token: tokens.TUI_ANIMATIONS_DURATION }, { token: i0.ElementRef }, { token: i3.TUI_DIALOGS }, { token: i3.TUI_IS_MOBILE }, { token: tokens.TUI_ASSERT_ENABLED }, { token: tokens.TUI_IS_MOBILE_RES }, { token: i5.DOCUMENT }, { token: tokens.TUI_THEME }], target: i0__namespace.ɵɵFactoryTarget.Component });
380
- TuiRootComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRootComponent, selector: "tui-root", host: { attributes: { "data-tui-version": "3.2.0" }, listeners: { "$.class._mobile": "isMobileRes$" }, properties: { "style.--tui-duration": "duration + \"ms\"" } }, providers: [providers.TUI_IS_MOBILE_RES_PROVIDER], ngImport: i0__namespace, template: "<tui-scroll-controls\n *ngIf=\"scrollbars$ | async\"\n class=\"t-scrollbar\"\n></tui-scroll-controls>\n<tui-svg-defs-host></tui-svg-defs-host>\n<tui-dropdown-host>\n <div class=\"t-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"tuiOverContent\"></ng-content>\n <tui-dialog-host></tui-dialog-host>\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n <tui-alert-host></tui-alert-host>\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n</tui-dropdown-host>\n<ng-content select=\"tuiOverPortals\"></ng-content>\n<tui-hints-host></tui-hints-host>\n<ng-content select=\"tuiOverHints\"></ng-content>\n", styles: ["@-webkit-keyframes tuiPresent{to{content:\"1\"}}@keyframes tuiPresent{to{content:\"1\"}}:host{position:relative;display:block;flex:1;-webkit-tap-highlight-color:transparent}.t-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;margin:0}.t-content{position:relative;z-index:0;height:100%}\n"], components: [{ type: i1__namespace.TuiScrollControlsComponent, selector: "tui-scroll-controls" }, { type: i2__namespace.TuiSvgDefsHostComponent, selector: "tui-svg-defs-host" }, { type: i3__namespace.TuiDropdownHostComponent, selector: "tui-dropdown-host" }, { type: i3__namespace.TuiDialogHostComponent, selector: "tui-dialog-host" }, { type: i3__namespace.TuiAlertHostComponent, selector: "tui-alert-host" }, { type: i4__namespace.TuiHintsHostComponent, selector: "tui-hints-host" }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
380
+ TuiRootComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRootComponent, selector: "tui-root", host: { attributes: { "data-tui-version": "3.3.0" }, listeners: { "$.class._mobile": "isMobileRes$" }, properties: { "style.--tui-duration": "duration + \"ms\"" } }, providers: [providers.TUI_IS_MOBILE_RES_PROVIDER], ngImport: i0__namespace, template: "<tui-scroll-controls\n *ngIf=\"scrollbars$ | async\"\n class=\"t-scrollbar\"\n></tui-scroll-controls>\n<tui-svg-defs-host></tui-svg-defs-host>\n<tui-dropdown-host>\n <div class=\"t-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"tuiOverContent\"></ng-content>\n <tui-dialog-host></tui-dialog-host>\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n <tui-alert-host></tui-alert-host>\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n</tui-dropdown-host>\n<ng-content select=\"tuiOverPortals\"></ng-content>\n<tui-hints-host></tui-hints-host>\n<ng-content select=\"tuiOverHints\"></ng-content>\n", styles: ["@-webkit-keyframes tuiPresent{to{content:\"1\"}}@keyframes tuiPresent{to{content:\"1\"}}:host{position:relative;display:block;flex:1;-webkit-tap-highlight-color:transparent}.t-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;margin:0}.t-content{position:relative;z-index:0;height:100%}\n"], components: [{ type: i1__namespace.TuiScrollControlsComponent, selector: "tui-scroll-controls" }, { type: i2__namespace.TuiSvgDefsHostComponent, selector: "tui-svg-defs-host" }, { type: i3__namespace.TuiDropdownHostComponent, selector: "tui-dropdown-host" }, { type: i3__namespace.TuiDialogHostComponent, selector: "tui-dialog-host" }, { type: i3__namespace.TuiAlertHostComponent, selector: "tui-alert-host" }, { type: i4__namespace.TuiHintsHostComponent, selector: "tui-hints-host" }], directives: [{ type: i5__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
381
381
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: TuiRootComponent, decorators: [{
382
382
  type: i0.Component,
383
383
  args: [{
@@ -27,7 +27,7 @@ export class TuiRootComponent {
27
27
  }
28
28
  }
29
29
  TuiRootComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRootComponent, deps: [{ token: TUI_ANIMATIONS_DURATION }, { token: ElementRef }, { token: TUI_DIALOGS }, { token: TUI_IS_MOBILE }, { token: TUI_ASSERT_ENABLED }, { token: TUI_IS_MOBILE_RES }, { token: DOCUMENT }, { token: TUI_THEME }], target: i0.ɵɵFactoryTarget.Component });
30
- TuiRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRootComponent, selector: "tui-root", host: { attributes: { "data-tui-version": "3.2.0" }, listeners: { "$.class._mobile": "isMobileRes$" }, properties: { "style.--tui-duration": "duration + \"ms\"" } }, providers: [TUI_IS_MOBILE_RES_PROVIDER], ngImport: i0, template: "<tui-scroll-controls\n *ngIf=\"scrollbars$ | async\"\n class=\"t-scrollbar\"\n></tui-scroll-controls>\n<tui-svg-defs-host></tui-svg-defs-host>\n<tui-dropdown-host>\n <div class=\"t-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"tuiOverContent\"></ng-content>\n <tui-dialog-host></tui-dialog-host>\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n <tui-alert-host></tui-alert-host>\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n</tui-dropdown-host>\n<ng-content select=\"tuiOverPortals\"></ng-content>\n<tui-hints-host></tui-hints-host>\n<ng-content select=\"tuiOverHints\"></ng-content>\n", styles: ["@-webkit-keyframes tuiPresent{to{content:\"1\"}}@keyframes tuiPresent{to{content:\"1\"}}:host{position:relative;display:block;flex:1;-webkit-tap-highlight-color:transparent}.t-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;margin:0}.t-content{position:relative;z-index:0;height:100%}\n"], components: [{ type: i1.TuiScrollControlsComponent, selector: "tui-scroll-controls" }, { type: i2.TuiSvgDefsHostComponent, selector: "tui-svg-defs-host" }, { type: i3.TuiDropdownHostComponent, selector: "tui-dropdown-host" }, { type: i3.TuiDialogHostComponent, selector: "tui-dialog-host" }, { type: i3.TuiAlertHostComponent, selector: "tui-alert-host" }, { type: i4.TuiHintsHostComponent, selector: "tui-hints-host" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
30
+ TuiRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRootComponent, selector: "tui-root", host: { attributes: { "data-tui-version": "3.3.0" }, listeners: { "$.class._mobile": "isMobileRes$" }, properties: { "style.--tui-duration": "duration + \"ms\"" } }, providers: [TUI_IS_MOBILE_RES_PROVIDER], ngImport: i0, template: "<tui-scroll-controls\n *ngIf=\"scrollbars$ | async\"\n class=\"t-scrollbar\"\n></tui-scroll-controls>\n<tui-svg-defs-host></tui-svg-defs-host>\n<tui-dropdown-host>\n <div class=\"t-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"tuiOverContent\"></ng-content>\n <tui-dialog-host></tui-dialog-host>\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n <tui-alert-host></tui-alert-host>\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n</tui-dropdown-host>\n<ng-content select=\"tuiOverPortals\"></ng-content>\n<tui-hints-host></tui-hints-host>\n<ng-content select=\"tuiOverHints\"></ng-content>\n", styles: ["@-webkit-keyframes tuiPresent{to{content:\"1\"}}@keyframes tuiPresent{to{content:\"1\"}}:host{position:relative;display:block;flex:1;-webkit-tap-highlight-color:transparent}.t-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;margin:0}.t-content{position:relative;z-index:0;height:100%}\n"], components: [{ type: i1.TuiScrollControlsComponent, selector: "tui-scroll-controls" }, { type: i2.TuiSvgDefsHostComponent, selector: "tui-svg-defs-host" }, { type: i3.TuiDropdownHostComponent, selector: "tui-dropdown-host" }, { type: i3.TuiDialogHostComponent, selector: "tui-dialog-host" }, { type: i3.TuiAlertHostComponent, selector: "tui-alert-host" }, { type: i4.TuiHintsHostComponent, selector: "tui-hints-host" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
31
31
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRootComponent, decorators: [{
32
32
  type: Component,
33
33
  args: [{
@@ -32,7 +32,7 @@ class TuiRootComponent {
32
32
  }
33
33
  }
34
34
  TuiRootComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRootComponent, deps: [{ token: TUI_ANIMATIONS_DURATION }, { token: ElementRef }, { token: TUI_DIALOGS }, { token: TUI_IS_MOBILE }, { token: TUI_ASSERT_ENABLED }, { token: TUI_IS_MOBILE_RES }, { token: DOCUMENT }, { token: TUI_THEME }], target: i0.ɵɵFactoryTarget.Component });
35
- TuiRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRootComponent, selector: "tui-root", host: { attributes: { "data-tui-version": "3.2.0" }, listeners: { "$.class._mobile": "isMobileRes$" }, properties: { "style.--tui-duration": "duration + \"ms\"" } }, providers: [TUI_IS_MOBILE_RES_PROVIDER], ngImport: i0, template: "<tui-scroll-controls\n *ngIf=\"scrollbars$ | async\"\n class=\"t-scrollbar\"\n></tui-scroll-controls>\n<tui-svg-defs-host></tui-svg-defs-host>\n<tui-dropdown-host>\n <div class=\"t-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"tuiOverContent\"></ng-content>\n <tui-dialog-host></tui-dialog-host>\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n <tui-alert-host></tui-alert-host>\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n</tui-dropdown-host>\n<ng-content select=\"tuiOverPortals\"></ng-content>\n<tui-hints-host></tui-hints-host>\n<ng-content select=\"tuiOverHints\"></ng-content>\n", styles: ["@-webkit-keyframes tuiPresent{to{content:\"1\"}}@keyframes tuiPresent{to{content:\"1\"}}:host{position:relative;display:block;flex:1;-webkit-tap-highlight-color:transparent}.t-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;margin:0}.t-content{position:relative;z-index:0;height:100%}\n"], components: [{ type: i1.TuiScrollControlsComponent, selector: "tui-scroll-controls" }, { type: i2.TuiSvgDefsHostComponent, selector: "tui-svg-defs-host" }, { type: i3.TuiDropdownHostComponent, selector: "tui-dropdown-host" }, { type: i3.TuiDialogHostComponent, selector: "tui-dialog-host" }, { type: i3.TuiAlertHostComponent, selector: "tui-alert-host" }, { type: i4.TuiHintsHostComponent, selector: "tui-hints-host" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
35
+ TuiRootComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: TuiRootComponent, selector: "tui-root", host: { attributes: { "data-tui-version": "3.3.0" }, listeners: { "$.class._mobile": "isMobileRes$" }, properties: { "style.--tui-duration": "duration + \"ms\"" } }, providers: [TUI_IS_MOBILE_RES_PROVIDER], ngImport: i0, template: "<tui-scroll-controls\n *ngIf=\"scrollbars$ | async\"\n class=\"t-scrollbar\"\n></tui-scroll-controls>\n<tui-svg-defs-host></tui-svg-defs-host>\n<tui-dropdown-host>\n <div class=\"t-content\">\n <ng-content></ng-content>\n </div>\n <ng-content select=\"tuiOverContent\"></ng-content>\n <tui-dialog-host></tui-dialog-host>\n <ng-content select=\"tuiOverDialogs\"></ng-content>\n <tui-alert-host></tui-alert-host>\n <ng-content select=\"tuiOverAlerts\"></ng-content>\n</tui-dropdown-host>\n<ng-content select=\"tuiOverPortals\"></ng-content>\n<tui-hints-host></tui-hints-host>\n<ng-content select=\"tuiOverHints\"></ng-content>\n", styles: ["@-webkit-keyframes tuiPresent{to{content:\"1\"}}@keyframes tuiPresent{to{content:\"1\"}}:host{position:relative;display:block;flex:1;-webkit-tap-highlight-color:transparent}.t-scrollbar{position:fixed;top:0;left:0;bottom:0;right:0;margin:0}.t-content{position:relative;z-index:0;height:100%}\n"], components: [{ type: i1.TuiScrollControlsComponent, selector: "tui-scroll-controls" }, { type: i2.TuiSvgDefsHostComponent, selector: "tui-svg-defs-host" }, { type: i3.TuiDropdownHostComponent, selector: "tui-dropdown-host" }, { type: i3.TuiDialogHostComponent, selector: "tui-dialog-host" }, { type: i3.TuiAlertHostComponent, selector: "tui-alert-host" }, { type: i4.TuiHintsHostComponent, selector: "tui-hints-host" }], directives: [{ type: i5.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "async": i5.AsyncPipe }, changeDetection: i0.ChangeDetectionStrategy.OnPush });
36
36
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0, type: TuiRootComponent, decorators: [{
37
37
  type: Component,
38
38
  args: [{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taiga-ui/core",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "Core library for creating Angular components and applications using Taiga UI",
5
5
  "keywords": [
6
6
  "angular",
@@ -15,7 +15,7 @@
15
15
  "repository": "https://github.com/tinkoff/taiga-ui",
16
16
  "license": "Apache-2.0",
17
17
  "dependencies": {
18
- "@taiga-ui/i18n": "^3.2.0",
18
+ "@taiga-ui/i18n": "^3.3.0",
19
19
  "tslib": "^2.0.0"
20
20
  },
21
21
  "peerDependencies": {
@@ -27,8 +27,8 @@
27
27
  "@angular/router": ">=9.0.0",
28
28
  "@ng-web-apis/common": ">=2.0.0",
29
29
  "@ng-web-apis/mutation-observer": ">=2.0.0",
30
- "@taiga-ui/cdk": ">=3.2.0",
31
- "@taiga-ui/i18n": ">=3.2.0",
30
+ "@taiga-ui/cdk": ">=3.3.0",
31
+ "@taiga-ui/i18n": ">=3.3.0",
32
32
  "@tinkoff/ng-event-plugins": ">=3.0.0",
33
33
  "@tinkoff/ng-polymorpheus": ">=4.0.0",
34
34
  "rxjs": ">=6.0.0"
@@ -53,8 +53,33 @@
53
53
  line-height: inherit;
54
54
  }
55
55
 
56
- @mixin clearinput() {
56
+ @mixin autofill($mode: default) {
57
+ &:-webkit-autofill,
58
+ &:-webkit-autofill:hover,
59
+ &:-webkit-autofill:focus {
60
+ caret-color: var(--tui-base-09);
61
+ border-radius: inherit;
62
+ color: inherit !important;
63
+ background-color: transparent !important;
64
+
65
+ @if ($mode == default) {
66
+ -webkit-text-fill-color: var(--tui-text-01) !important;
67
+ border-color: var(--tui-autofill);
68
+ -webkit-box-shadow: 0 0 0 100rem var(--tui-autofill) inset !important; // to overlay native background
69
+ }
70
+
71
+ @if ($mode == dark) {
72
+ -webkit-text-fill-color: var(--tui-text-01-night) !important;
73
+ border-color: var(--tui-autofill-night);
74
+ -webkit-box-shadow: 0 0 0 100rem var(--tui-autofill-night) inset !important;
75
+ }
76
+ }
77
+ }
78
+
79
+ @mixin clearinput($mode: default) {
80
+ @include autofill($mode);
57
81
  padding: 0;
82
+ margin: 0;
58
83
  border: 0;
59
84
  border-radius: inherit;
60
85
  background: none;
@@ -67,16 +92,6 @@
67
92
  appearance: none;
68
93
  word-break: keep-all;
69
94
  -webkit-text-fill-color: currentColor; // for Safari
70
-
71
- &:-webkit-autofill,
72
- &:-webkit-autofill:hover,
73
- &:-webkit-autofill:focus {
74
- border-radius: inherit;
75
- -webkit-text-fill-color: inherit !important;
76
- color: inherit !important;
77
- background-color: transparent !important;
78
- -webkit-box-shadow: 0 0 0 1000px var(--tui-autofill) inset !important; // to overlay native background
79
- }
80
95
  }
81
96
 
82
97
  @mixin visually-hidden() {
@@ -101,7 +116,7 @@
101
116
  height: 1rem;
102
117
  border-radius: 6.25rem;
103
118
  background-clip: padding-box;
104
- border: 0.375rem solid transparent;
119
+ border: 2.667rem solid transparent;
105
120
  }
106
121
 
107
122
  &::-webkit-scrollbar {
@@ -131,12 +146,12 @@
131
146
 
132
147
  // Dropdown
133
148
  @if ($mode == 2) {
134
- box-shadow: 0 0.5rem 1rem rgba(51, 51, 51, 0.2);
149
+ box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.16);
135
150
  }
136
151
 
137
152
  // Modal
138
153
  @if ($mode == 3) {
139
- box-shadow: 0 1.125rem 1.875rem rgba(51, 51, 51, 0.52);
154
+ box-shadow: 0 1.125rem 1.875rem rgba(0, 0, 0, 0.48);
140
155
  }
141
156
 
142
157
  // Sidebar
@@ -156,7 +171,7 @@
156
171
 
157
172
  // Modal mobile
158
173
  @if ($mode == 7) {
159
- box-shadow: 0 -1rem 1.75rem rgba(51, 51, 51, 0.24);
174
+ box-shadow: 0 -1rem 1.75rem rgba(0, 0, 0, 0.24);
160
175
  }
161
176
  }
162
177
 
@@ -260,16 +275,16 @@
260
275
  }
261
276
 
262
277
  // typical properties for text overflow with ellipsis
263
- @mixin text-overflow() {
264
- white-space: nowrap;
278
+ @mixin text-overflow($type: nowrap) {
279
+ white-space: $type;
265
280
  overflow: hidden;
266
281
  text-overflow: ellipsis;
267
282
  }
268
283
 
269
284
  /* stylelint-disable selector-max-specificity */
270
285
  @mixin text-overflow-with-fade(
271
- $color: rgba(255, 255, 255, 1),
272
- $transparentColor: rgba(255, 255, 255, 0),
286
+ $color: var(--tui-base-01),
287
+ $transparentColor: transparent,
273
288
  $width: 1.875rem
274
289
  ) {
275
290
  position: relative;
@@ -357,6 +372,7 @@
357
372
 
358
373
  // hide an element visually without hiding it from screen readers
359
374
  @mixin sr-only() {
375
+ position: absolute;
360
376
  clip: rect(1px, 1px, 1px, 1px);
361
377
  clip-path: inset(50%);
362
378
  height: 1px;
@@ -364,5 +380,4 @@
364
380
  margin: -1px;
365
381
  overflow: hidden;
366
382
  padding: 0;
367
- position: absolute;
368
383
  }
@@ -1,20 +1,20 @@
1
1
  @mixin picker($itemSize) {
2
2
  :host {
3
- @include text-body-m();
4
3
  display: block;
4
+ font: var(--tui-font-text-m);
5
5
  }
6
6
 
7
7
  .t-row {
8
8
  @include createStackingContext();
9
9
  display: flex;
10
10
  justify-content: space-between;
11
- height: 36px;
11
+ height: 2.25rem;
12
12
  }
13
13
 
14
14
  .t-item {
15
15
  position: relative;
16
16
  flex: 1;
17
- line-height: 32px;
17
+ line-height: 2rem;
18
18
  border-radius: var(--tui-radius-m);
19
19
 
20
20
  &:before,
@@ -57,10 +57,10 @@
57
57
  &_today:after {
58
58
  @include center-left();
59
59
  content: '';
60
- bottom: 5px;
61
- height: 2px;
62
- width: 12px;
63
- border-radius: 6px;
60
+ bottom: 0.3125rem;
61
+ height: 0.125rem;
62
+ width: 0.75rem;
63
+ border-radius: 0.375rem;
64
64
  background-color: var(--tui-text-02);
65
65
  }
66
66
 
@@ -123,25 +123,25 @@
123
123
 
124
124
  &[data-range='end'] > .t-item {
125
125
  &:before {
126
- left: 4px;
126
+ left: 0.25rem;
127
127
  }
128
128
 
129
129
  &:after {
130
- left: -32px;
130
+ left: -2rem;
131
131
  right: 100%;
132
- transform: translateX(23px) scaleY(0.6) scaleX(0.4) rotate(45deg);
132
+ transform: translateX(1.4375rem) scaleY(0.6) scaleX(0.4) rotate(45deg);
133
133
  }
134
134
  }
135
135
 
136
136
  &[data-range='start'] > .t-item {
137
137
  &:before {
138
- right: 4px;
138
+ right: 0.25rem;
139
139
  }
140
140
 
141
141
  &:after {
142
142
  left: 100%;
143
- right: -32px;
144
- transform: translateX(-23px) scaleY(0.6) scaleX(0.4) rotate(45deg);
143
+ right: -2rem;
144
+ transform: translateX(-1.4375rem) scaleY(0.6) scaleX(0.4) rotate(45deg);
145
145
  }
146
146
  }
147
147
 
@@ -31,4 +31,21 @@ $thumb-diameters: (
31
31
  tui-input-slider + & {
32
32
  margin-left: calc(var(--tui-radius-m) / 2 + #{$first-tick-center});
33
33
  }
34
+
35
+ tui-input-range + &,
36
+ tui-range + & {
37
+ $thumb: map-get($thumb-diameters, $input-size);
38
+ margin-left: $thumb;
39
+ margin-right: $thumb;
40
+
41
+ & > * {
42
+ &:first-child {
43
+ left: -$thumb;
44
+ }
45
+
46
+ &:last-child {
47
+ right: -$thumb;
48
+ }
49
+ }
50
+ }
34
51
  }
@@ -3,6 +3,8 @@
3
3
  color: var(--tui-text-01);
4
4
  }
5
5
 
6
+ // TODO: 4.0 delete all deprecations below
7
+
6
8
  // headings
7
9
 
8
10
  // deprecated
@@ -1,8 +1,11 @@
1
+ $line-height-l: 1.25rem;
2
+
1
3
  @mixin textfield-host() {
2
4
  @include text-basic();
3
5
  position: relative;
4
6
  display: block;
5
7
  border-radius: var(--tui-radius-m);
8
+ text-align: left;
6
9
 
7
10
  &[data-size='s'] {
8
11
  height: var(--tui-height-s);
@@ -20,7 +23,8 @@
20
23
  height: var(--tui-height-l);
21
24
  min-height: var(--tui-height-l);
22
25
  max-height: var(--tui-height-l);
23
- font-size: 15px;
26
+ font: var(--tui-font-text-m);
27
+ line-height: $line-height-l;
24
28
  }
25
29
  }
26
30
 
@@ -28,17 +32,26 @@
28
32
  display: flex;
29
33
  height: 100%;
30
34
  width: 100%;
31
- padding: 0 12px;
35
+ padding: 0 var(--tui-padding-m);
32
36
  box-sizing: border-box;
33
37
  align-items: center;
34
38
  overflow: hidden;
35
39
 
36
40
  :host[data-size='s'] & {
37
- padding-right: 8px;
41
+ padding: 0 var(--tui-padding-s);
38
42
  }
39
43
 
40
44
  :host[data-size='l'] & {
41
- padding-left: 16px;
45
+ padding: 0 var(--tui-padding-l);
46
+ }
47
+
48
+ &:after {
49
+ content: '';
50
+ margin-right: -0.25rem;
51
+ }
52
+
53
+ :host[data-size='m'] &:after {
54
+ display: none;
42
55
  }
43
56
  }
44
57
 
@@ -46,75 +59,101 @@
46
59
  @include text-basic();
47
60
  @include clearinput();
48
61
  @include fullsize();
49
- padding: 0 12px;
62
+ padding: 0 var(--tui-padding-m);
63
+ border: solid transparent;
64
+ border-width: 0 var(--border-end, 0) 0 var(--border-start, 0);
65
+ border-inline-start-width: var(--border-start, 0);
66
+ border-inline-end-width: var(--border-end, 0);
67
+ text-indent: var(--text-indent);
68
+ text-align: inherit;
50
69
  box-sizing: border-box;
51
70
  white-space: nowrap;
52
71
  overflow: hidden;
53
72
  text-transform: inherit;
73
+ resize: none;
74
+ text-overflow: ellipsis;
54
75
 
55
- :host[data-size='s'] & {
56
- padding: 0 8px 0 12px;
76
+ :host[data-mode='onDark'] &,
77
+ :host-context(tui-primitive-textfield[data-mode='onDark']),
78
+ :host-context(tui-text-area[data-mode='onDark']) {
79
+ @include autofill(dark);
57
80
  }
58
81
 
59
- :host[data-size='l'] & {
60
- padding: 0 16px;
82
+ :host[data-size='s'] &,
83
+ :host-context(tui-primitive-textfield[data-size='s']):not(tui-primitive-textfield),
84
+ :host-context(tui-text-area[data-size='s']):not(tui-text-area) {
85
+ padding: 0 var(--tui-padding-s);
61
86
  }
62
87
 
63
- :host._disabled & {
88
+ :host[data-size='l'] &,
89
+ :host-context(tui-primitive-textfield[data-size='l']):not(tui-primitive-textfield),
90
+ :host-context(tui-text-area[data-size='l']):not(tui-text-area) {
91
+ padding: 0 var(--tui-padding-l);
92
+ }
93
+
94
+ :host._disabled &,
95
+ :host-context(tui-primitive-textfield._disabled),
96
+ :host-context(tui-text-area._disabled) {
64
97
  // $bad TODO: research why you can reach disabled textfield with mask inside a label without that
65
98
  pointer-events: none;
66
99
  }
67
100
 
68
- :host[data-size='l']:not(._label-outside) & {
69
- padding-top: 20px;
101
+ :host[data-size='l']:not(._label-outside) &,
102
+ :host-context(tui-primitive-textfield[data-size='l']:not(._label-outside)):not(tui-primitive-textfield) {
103
+ padding-top: $line-height-l;
70
104
 
71
105
  // Workaround for raising placeholder in temporary autofill
72
- &:-webkit-autofill + .content .placeholder {
73
- width: 114%; // compensation of scale(0.87)
74
- transform: translateY(-10px) scale(0.87);
106
+ &:-webkit-autofill + .t-content .t-placeholder {
107
+ font-size: 0.8156rem;
108
+ transform: translateY(-0.625rem);
75
109
  }
76
110
  }
77
111
 
78
- :host[data-size='m']:not(._label-outside) & {
79
- padding-top: 18px;
112
+ :host[data-size='m']:not(._label-outside) &,
113
+ :host-context(tui-primitive-textfield[data-size='m']:not(._label-outside)):not(tui-primitive-textfield) {
114
+ padding-top: 1.125rem;
80
115
 
81
116
  // Workaround for raising placeholder in temporary autofill
82
- &:-webkit-autofill + .content .placeholder {
83
- width: 118%; // compensation of scale(0.85)
84
- transform: translateY(-8px) scale(0.85);
117
+ &:-webkit-autofill + .t-content .t-placeholder {
118
+ font-size: 0.69rem;
119
+ transform: translateY(-0.5rem);
85
120
  }
86
121
  }
122
+
123
+ :host._hidden input&,
124
+ :host-context(tui-primitive-textfield._hidden) {
125
+ opacity: 0;
126
+ text-indent: -10em; // Hide blinking caret even in IE
127
+ -webkit-user-select: none; // Hide blinking caret in mobile safari
128
+ }
87
129
  }
88
130
 
89
131
  @mixin textfield-wrapper() {
90
132
  flex: 1;
91
133
  min-width: 0;
92
- padding-right: $space;
134
+ padding-right: 0.25rem;
135
+ padding-inline-end: 0.25rem;
136
+ padding-inline-start: 0;
93
137
  }
94
138
 
95
139
  @mixin textfield-placeholder() {
96
- @include transition('transform, min-width, color, letter-spacing');
140
+ @include transition('transform, font-size, color, letter-spacing');
97
141
  @include text-basic();
98
142
  @include text-overflow();
99
143
  display: block;
100
144
  width: 100%;
101
- height: 20px;
102
- font-size: 13px;
103
- box-sizing: border-box;
104
145
  user-select: none;
105
- pointer-events: none;
106
146
  color: var(--tui-text-02);
107
- transform-origin: left;
108
- letter-spacing: normal;
109
- text-transform: none;
147
+ pointer-events: none;
148
+ will-change: transform;
149
+ transform: translateY(0);
110
150
 
111
151
  &_raised {
112
- width: 114%; // compensation of scale(0.87)
113
- transform: translateY(-10px) scale(0.87);
152
+ transform: translateY(-0.625rem);
114
153
 
115
154
  :host[data-size='m'] & {
116
- width: 118%;
117
- transform: translateY(-8px) scale(0.85);
155
+ font: var(--tui-font-text-xs);
156
+ transform: translateY(-0.5rem);
118
157
  letter-spacing: 0.025rem;
119
158
  }
120
159
 
@@ -136,7 +175,11 @@
136
175
  }
137
176
 
138
177
  :host[data-size='l'] & {
139
- font-size: 15px;
178
+ font-size: 0.9375rem;
179
+
180
+ &_raised {
181
+ font-size: 0.8156rem;
182
+ }
140
183
  }
141
184
 
142
185
  :host[data-size='m']._focused:not(._label-outside) &,
@@ -164,6 +207,7 @@
164
207
 
165
208
  @supports (-webkit-hyphens: none) {
166
209
  & {
210
+ will-change: unset;
167
211
  transition-property: transform, color, letter-spacing;
168
212
  }
169
213
  }
@@ -171,8 +215,8 @@
171
215
 
172
216
  @mixin input-icon() {
173
217
  display: flex;
174
- width: 24px;
175
- height: 24px;
218
+ width: 1.5rem;
219
+ height: 1.5rem;
176
220
  align-items: center;
177
221
  justify-content: center;
178
222
  color: var(--tui-text-03);
@@ -208,92 +252,43 @@
208
252
  }
209
253
  }
210
254
 
211
- @mixin example-text() {
212
- display: flex;
213
- align-items: center;
214
- height: 20px;
215
- margin: -20px 0;
216
- padding: 10px 0;
217
- box-sizing: content-box;
218
- color: var(--tui-text-03);
219
- letter-spacing: normal;
220
- text-transform: none;
221
-
222
- :host[data-size='m']._label-outside & {
223
- margin-top: -19px;
224
- }
225
-
226
- :host[data-mode='onDark'] & {
227
- color: var(--tui-text-03-night);
228
- }
229
- }
230
-
231
255
  @mixin textfield() {
232
256
  :host {
233
257
  @include textfield-host();
234
258
  }
235
259
 
236
- .input {
260
+ .t-input {
237
261
  @include textfield-input();
238
262
  }
239
263
 
240
- .ghost {
241
- visibility: hidden;
242
- white-space: pre;
243
- text-overflow: clip;
244
- }
245
-
246
- .filler {
247
- vertical-align: middle;
248
- }
249
-
250
- .content {
264
+ .t-content {
251
265
  @include textfield-content();
252
266
  }
253
267
 
254
- .wrapper {
268
+ .t-wrapper {
255
269
  @include textfield-wrapper();
256
270
  }
257
271
 
258
- .value-decoration {
259
- @include example-text();
260
- }
261
-
262
- .value-decoration-inner {
263
- @include text-overflow();
264
- min-width: 0;
265
- }
266
-
267
- .postfix {
268
- @include transition('color');
269
- color: var(--tui-text-01);
270
-
271
- &_shifted {
272
- margin-left: 0.5ch;
273
- }
274
-
275
- :host[data-mode='onDark'] & {
276
- color: var(--tui-text-01-night);
277
- }
278
- }
279
-
280
- .placeholder {
272
+ .t-placeholder {
281
273
  @include textfield-placeholder();
282
274
  }
283
275
 
284
- .cleaner {
276
+ .t-cleaner {
285
277
  @include icon-button();
286
278
  }
287
279
 
288
280
  // $bad TODO: Refactor this and interactive icons together
289
- .icon {
281
+ .t-icon {
290
282
  @include input-icon();
291
283
 
292
284
  &_left {
293
285
  margin: 0 2 * $space 0 -$space;
286
+ margin-inline-start: -$space;
287
+ margin-inline-end: 2 * $space;
294
288
 
295
289
  :host[data-size='s'] & {
296
290
  margin-right: $space;
291
+ margin-inline-end: $space;
297
292
  }
298
293
  }
299
294
  }
@@ -1,7 +1,9 @@
1
1
  @mixin wrapper-hover {
2
- &:hover:not(._no-hover),
3
- &[data-state='hover'] {
4
- @content;
2
+ @media (hover: hover) {
3
+ &:hover:not(._no-hover),
4
+ &[data-state='hover'] {
5
+ @content;
6
+ }
5
7
  }
6
8
  }
7
9
 
@@ -1,3 +1,24 @@
1
+ $tui-media-retina: '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)';
2
+ $tui-media-retina-mobile: '(-webkit-min-device-pixel-ratio: 2) and (max-width: 37.4625em), (min-resolution: 192dpi) and (max-width: 37.4625em)';
3
+ $tui-media-retina-tablet: '(-webkit-min-device-pixel-ratio: 2) and (max-width: 63.9625em), (min-resolution: 192dpi) and (max-width: 63.9625em)';
4
+ $tui-media-retina-desktop: '(-webkit-min-device-pixel-ratio: 2) and (max-width: 84.9625em), (min-resolution: 192dpi) and (max-width: 84.9625em)';
5
+
6
+ $tui-mobile: 'screen and (max-width: 47.9625em)';
7
+ $tui-mobile-min: 'screen and (min-width: 22.5em)';
8
+ $tui-mobile-interval: '(min-width: 22.5em) and (max-width: 47.9625em)';
9
+
10
+ $tui-tablet: 'screen and (max-width: 63.9625em)';
11
+ $tui-tablet-min: 'screen and (min-width: 48em)';
12
+ $tui-tablet-interval: '(min-width: 48em) and (max-width: 63.9625em)';
13
+
14
+ $tui-desktop: 'screen and (max-width: 79.9625em)';
15
+ $tui-desktop-min: 'screen and (min-width: 64em)';
16
+ $tui-desktop-interval: '(min-width: 64em) and (max-width: 79.9625em)';
17
+
18
+ $tui-desktop-lg-min: 'screen and (min-width: 80em)';
19
+
20
+ // TODO: 4.0 delete all deprecations below
21
+ // deprecated
1
22
  $media-retina: '(-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi)';
2
23
  $media-retina-mobile: '(-webkit-min-device-pixel-ratio: 2) and (max-width: 599px), (min-resolution: 192dpi) and (max-width: 599px)';
3
24
  $media-retina-tablet: '(-webkit-min-device-pixel-ratio: 2) and (max-width: 1023px), (min-resolution: 192dpi) and (max-width: 1023px)';