@taiga-ui/styles 5.0.0-canary.830cc36 → 5.0.0-canary.9babef3
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.
- package/components/appearance.less +1 -1
- package/components/avatar.less +6 -5
- package/components/badge.less +1 -5
- package/components/block.less +1 -1
- package/components/button.less +8 -3
- package/components/checkbox.less +1 -1
- package/components/chip.less +1 -1
- package/components/comment.less +1 -1
- package/components/compass.less +3 -3
- package/components/icon.less +1 -1
- package/components/label.less +1 -1
- package/components/like.less +1 -1
- package/components/link.less +1 -1
- package/components/message.less +1 -1
- package/components/notification.less +5 -5
- package/components/pin.less +21 -19
- package/components/progress-bar.less +1 -1
- package/components/radio.less +1 -1
- package/components/switch.less +9 -9
- package/components/textfield.less +20 -21
- package/components/toast.less +4 -2
- package/mixins/appearance.scss +2 -2
- package/mixins/date-picker.less +2 -2
- package/mixins/date-picker.scss +3 -3
- package/mixins/hitbox.less +17 -0
- package/mixins/hitbox.scss +17 -0
- package/mixins/miscellaneous.less +9 -8
- package/mixins/miscellaneous.scss +19 -17
- package/package.json +20 -2
- package/taiga-ui-fonts.less +1 -3
- package/theme/appearance/table.less +0 -1
- package/theme/appearance.less +0 -1
- package/theme/variables.less +1 -1
- package/utils.less +1 -0
- package/utils.scss +7 -6
- package/theme/appearance/glass.less +0 -30
package/components/avatar.less
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name Avatar
|
|
@@ -147,7 +147,8 @@
|
|
|
147
147
|
|
|
148
148
|
&._badge {
|
|
149
149
|
mask: radial-gradient(
|
|
150
|
-
circle at calc(
|
|
150
|
+
circle at ~'calc(max(var(--tui-inline), 0) * 100% - var(--tui-inline) * var(--t-corner-offset))'
|
|
151
|
+
calc(100% - var(--t-corner-offset)),
|
|
151
152
|
black 0.23rem,
|
|
152
153
|
transparent 0.25rem,
|
|
153
154
|
transparent 0.375rem,
|
|
@@ -158,14 +159,14 @@
|
|
|
158
159
|
&::after {
|
|
159
160
|
content: '';
|
|
160
161
|
position: absolute;
|
|
161
|
-
top: calc(100% - var(--t-corner-offset));
|
|
162
|
-
left: calc(100% - var(--t-corner-offset));
|
|
163
162
|
display: block;
|
|
163
|
+
inset-block-start: calc(100% - var(--t-corner-offset));
|
|
164
|
+
inset-inline-start: calc(100% - var(--t-corner-offset));
|
|
164
165
|
inline-size: 0.55rem;
|
|
165
166
|
block-size: 0.55rem;
|
|
166
167
|
border-radius: 100%;
|
|
167
168
|
background: var(--t-badge);
|
|
168
|
-
transform: translate3d(-50
|
|
169
|
+
transform: translate3d(calc(var(--tui-inline) * -50%), -50%, 0);
|
|
169
170
|
}
|
|
170
171
|
}
|
|
171
172
|
|
package/components/badge.less
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name Badge
|
|
@@ -46,12 +46,10 @@
|
|
|
46
46
|
font-size: var(--t-icon-size) !important;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
&[data-appearance='error'], /* TODO @deprecated remove in v5 */
|
|
50
49
|
&[data-appearance='negative'] {
|
|
51
50
|
--t-status: var(--tui-status-negative);
|
|
52
51
|
}
|
|
53
52
|
|
|
54
|
-
&[data-appearance='success'], /* TODO @deprecated remove in v5 */
|
|
55
53
|
&[data-appearance='positive'] {
|
|
56
54
|
--t-status: var(--tui-status-positive);
|
|
57
55
|
}
|
|
@@ -104,8 +102,6 @@
|
|
|
104
102
|
}
|
|
105
103
|
}
|
|
106
104
|
|
|
107
|
-
&[tuiAppearance][data-appearance='error'], /* TODO @deprecated remove in v5 */
|
|
108
|
-
&[tuiAppearance][data-appearance='success'], /* TODO @deprecated remove in v5 */
|
|
109
105
|
&[tuiAppearance][data-appearance='negative'],
|
|
110
106
|
&[tuiAppearance][data-appearance='positive'],
|
|
111
107
|
&[tuiAppearance][data-appearance='warning'],
|
package/components/block.less
CHANGED
package/components/button.less
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name Button
|
|
@@ -69,8 +69,8 @@
|
|
|
69
69
|
font: var(--tui-typography-body-s);
|
|
70
70
|
|
|
71
71
|
tui-icon,
|
|
72
|
-
&:not([tuiIconButton][data-appearance='icon'], [tuiIconButton][data-appearance^='action
|
|
73
|
-
&:not([tuiIconButton][data-appearance='icon'], [tuiIconButton][data-appearance^='action
|
|
72
|
+
&:not([tuiIconButton][data-appearance='icon'], [tuiIconButton][data-appearance^='action'])::before,
|
|
73
|
+
&:not([tuiIconButton][data-appearance='icon'], [tuiIconButton][data-appearance^='action'])::after {
|
|
74
74
|
font-size: 1rem;
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -120,6 +120,11 @@
|
|
|
120
120
|
max-block-size: calc(var(--t-line-height) * 2);
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
|
+
|
|
124
|
+
&:is(a):not([href]) {
|
|
125
|
+
opacity: var(--tui-disabled-opacity);
|
|
126
|
+
pointer-events: none;
|
|
127
|
+
}
|
|
123
128
|
}
|
|
124
129
|
|
|
125
130
|
[tuiIconButton]:where(*&) {
|
package/components/checkbox.less
CHANGED
package/components/chip.less
CHANGED
package/components/comment.less
CHANGED
package/components/compass.less
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name Compass
|
|
@@ -30,8 +30,8 @@ tui-compass:where(*&) {
|
|
|
30
30
|
&::before {
|
|
31
31
|
content: '';
|
|
32
32
|
position: absolute;
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
inset-block-start: 0;
|
|
34
|
+
inset-inline-start: 0.125rem;
|
|
35
35
|
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"><path d="M0 8.99993C4 8 8 8 12 8.99993C9.91509 5.73239 8.5 3 6 0C3.5 3 2 5.5 0 8.99993Z"/></svg>');
|
|
36
36
|
transform: rotate(var(--t-degrees)) translateY(-0.625rem) translateZ(-1rem);
|
|
37
37
|
inline-size: 0.75rem;
|
package/components/icon.less
CHANGED
package/components/label.less
CHANGED
package/components/like.less
CHANGED
package/components/link.less
CHANGED
package/components/message.less
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name Notification
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
display: flow-root;
|
|
29
29
|
max-block-size: 100%;
|
|
30
30
|
color: var(--tui-text-primary);
|
|
31
|
-
padding:
|
|
31
|
+
padding: var(--tui-padding-l);
|
|
32
32
|
font: var(--tui-typography-body-m);
|
|
33
33
|
border-radius: var(--tui-radius-l);
|
|
34
34
|
box-sizing: border-box;
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
&[data-size='s'] {
|
|
72
|
-
padding: 0.375rem 0.
|
|
72
|
+
padding: 0.375rem 0.5rem;
|
|
73
73
|
font: var(--tui-typography-body-s);
|
|
74
74
|
border-radius: var(--tui-radius-m);
|
|
75
75
|
|
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
|
|
80
80
|
&::before {
|
|
81
81
|
inset-block-start: 0.5rem;
|
|
82
|
-
inset-inline-start: -
|
|
82
|
+
inset-inline-start: -1rem;
|
|
83
83
|
font-size: 1rem;
|
|
84
84
|
}
|
|
85
85
|
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
&[data-size='m'] {
|
|
115
|
-
padding:
|
|
115
|
+
padding: var(--tui-padding-m);
|
|
116
116
|
font: var(--tui-typography-body-s);
|
|
117
117
|
border-radius: var(--tui-radius-m);
|
|
118
118
|
|
package/components/pin.less
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name Pin
|
|
@@ -16,7 +16,11 @@
|
|
|
16
16
|
[tuiPin]:where(*&) {
|
|
17
17
|
--t-size: 2rem;
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
@bubble-width: 1.875rem;
|
|
20
|
+
@bubble-shift: translate(calc(var(--tui-inline) * -@bubble-width), -@bubble-width);
|
|
21
|
+
@ground-shift: translate(calc(var(--tui-inline) * -50%), -50%);
|
|
22
|
+
|
|
23
|
+
.transition(~'inline-size, block-size, border, margin');
|
|
20
24
|
.button-clear();
|
|
21
25
|
|
|
22
26
|
position: relative;
|
|
@@ -35,7 +39,7 @@
|
|
|
35
39
|
background: var(--tui-background-accent-2);
|
|
36
40
|
box-shadow: 0 0 0 0.125rem var(--tui-background-elevation-2);
|
|
37
41
|
border: 0 solid var(--tui-background-accent-2);
|
|
38
|
-
transform:
|
|
42
|
+
transform: @ground-shift;
|
|
39
43
|
|
|
40
44
|
.interactive({
|
|
41
45
|
cursor: pointer;
|
|
@@ -64,7 +68,7 @@
|
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
> tui-icon {
|
|
67
|
-
.transition(~'
|
|
71
|
+
.transition(~'inline-size, block-size');
|
|
68
72
|
|
|
69
73
|
font-size: 1.25rem;
|
|
70
74
|
align-self: center;
|
|
@@ -87,12 +91,12 @@
|
|
|
87
91
|
}
|
|
88
92
|
|
|
89
93
|
&::before {
|
|
90
|
-
transform: scale(0.99)
|
|
94
|
+
transform: scale(0.99) @bubble-shift;
|
|
91
95
|
opacity: 1;
|
|
92
96
|
}
|
|
93
97
|
|
|
94
98
|
&::after {
|
|
95
|
-
|
|
99
|
+
inset-block-start: 4.5rem;
|
|
96
100
|
opacity: 1;
|
|
97
101
|
}
|
|
98
102
|
}
|
|
@@ -115,12 +119,12 @@
|
|
|
115
119
|
}
|
|
116
120
|
|
|
117
121
|
&::before {
|
|
118
|
-
transform: scale(0.99)
|
|
122
|
+
transform: scale(0.99) @bubble-shift;
|
|
119
123
|
opacity: 1;
|
|
120
124
|
}
|
|
121
125
|
|
|
122
126
|
&::after {
|
|
123
|
-
|
|
127
|
+
inset-block-start: 4.5rem;
|
|
124
128
|
opacity: 1;
|
|
125
129
|
}
|
|
126
130
|
}
|
|
@@ -130,35 +134,33 @@
|
|
|
130
134
|
|
|
131
135
|
content: '';
|
|
132
136
|
position: absolute;
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
right: -0.25rem;
|
|
136
|
-
bottom: -0.625rem;
|
|
137
|
+
inset-block: 50% -0.625rem;
|
|
138
|
+
inset-inline: 50% -0.25rem;
|
|
137
139
|
box-sizing: border-box;
|
|
138
|
-
border-width: 2.2rem
|
|
140
|
+
border-width: 2.2rem @bubble-width;
|
|
139
141
|
border-style: solid;
|
|
140
142
|
border-color: inherit;
|
|
141
143
|
opacity: 0;
|
|
142
|
-
transform: scale(0.57)
|
|
143
|
-
transform-origin: top
|
|
144
|
+
transform: scale(0.57) @bubble-shift;
|
|
145
|
+
transform-origin: top var(--tui-inline-start);
|
|
144
146
|
pointer-events: none;
|
|
145
147
|
mask: url('data:image/svg+xml,<svg width="60" height="66" viewBox="0 0 60 66" xmlns="http://www.w3.org/2000/svg"><path d="M0 30.0917C0 13.4726 13.4313 0 30.0002 0C46.5687 0 60 13.4726 60 30.0917C60 44.2105 50.4927 56.0529 37.4162 59.2986C32.5552 60.5551 31.0408 65.275 31.0408 65.275C30.8892 65.697 30.4909 66 30.0183 66C29.5453 66 29.147 65.697 28.9938 65.275C28.9938 65.275 27.481 60.5551 22.6199 59.2986C9.46433 56.0206 0 43.5901 0 30.0917ZM30 57.75C45.3259 57.75 57.75 45.3259 57.75 30C57.75 14.6741 45.3259 2.25 30 2.25C14.6741 2.25 2.25 14.6741 2.25 30C2.25 45.3259 14.6741 57.75 30 57.75Z" /></svg>')
|
|
146
148
|
no-repeat;
|
|
147
149
|
}
|
|
148
150
|
|
|
149
151
|
&::after {
|
|
150
|
-
.transition(~'
|
|
152
|
+
.transition(~'inset-block-start, opacity');
|
|
151
153
|
|
|
152
154
|
content: '';
|
|
153
155
|
position: absolute;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
+
inset-block-start: 50%;
|
|
157
|
+
inset-inline-start: 50%;
|
|
156
158
|
border: 0.1875rem solid currentColor;
|
|
157
159
|
border-color: inherit;
|
|
158
160
|
border-radius: 100%;
|
|
159
161
|
box-sizing: border-box;
|
|
160
162
|
box-shadow: inherit;
|
|
161
|
-
transform:
|
|
163
|
+
transform: @ground-shift;
|
|
162
164
|
opacity: 0;
|
|
163
165
|
}
|
|
164
166
|
}
|
package/components/radio.less
CHANGED
package/components/switch.less
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* @name Switch
|
|
@@ -38,19 +38,19 @@
|
|
|
38
38
|
|
|
39
39
|
&::before {
|
|
40
40
|
inline-size: 1rem;
|
|
41
|
-
transform: translateX(-1rem);
|
|
41
|
+
transform: translateX(calc(var(--tui-inline) * -1rem));
|
|
42
42
|
font-size: 0.75rem;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
&::after {
|
|
46
46
|
inline-size: 1rem;
|
|
47
|
-
box-shadow: -2.625rem 0 0 0.5rem var(--tui-background-base);
|
|
47
|
+
box-shadow: calc(var(--tui-inline) * -2.625rem) 0 0 0.5rem var(--tui-background-base);
|
|
48
48
|
outline-width: 0.167rem;
|
|
49
49
|
transform: scale(0.375);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
&:checked::after {
|
|
53
|
-
transform: scale(0.375) translateX(2.625rem);
|
|
53
|
+
transform: scale(0.375) translateX(calc(var(--tui-inline) * 2.625rem));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
&::after {
|
|
63
|
-
transform: scale(0.33333) translateX(4.5rem);
|
|
63
|
+
transform: scale(0.33333) translateX(calc(var(--tui-inline) * 4.5rem));
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
|
|
@@ -78,18 +78,18 @@
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
&::before {
|
|
81
|
-
|
|
81
|
+
inset-inline-start: 0.125rem;
|
|
82
82
|
font-size: 1rem;
|
|
83
|
-
transform: translateX(-1.5rem);
|
|
83
|
+
transform: translateX(calc(var(--tui-inline) * -1.5rem));
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
&::after {
|
|
87
|
-
right: 0;
|
|
88
87
|
display: block;
|
|
88
|
+
inset-inline-end: 0;
|
|
89
89
|
border-radius: 100%;
|
|
90
90
|
background: none;
|
|
91
91
|
transform: scale(0.33333);
|
|
92
|
-
box-shadow: -4.5rem 0 0 0.75rem var(--tui-background-base);
|
|
92
|
+
box-shadow: calc(var(--tui-inline) * -4.5rem) 0 0 0.75rem var(--tui-background-base);
|
|
93
93
|
outline: 0.375rem solid var(--tui-background-neutral-2-pressed);
|
|
94
94
|
}
|
|
95
95
|
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
tui-textfield:where(*&) {
|
|
4
4
|
.scrollbar-hidden();
|
|
5
5
|
.transition(color);
|
|
6
6
|
|
|
7
|
-
--t-height: var(--tui-height-l);
|
|
7
|
+
--t-height: calc(var(--tui-height-l) + 2.5 * var(--t-label) * var(--tui-font-offset));
|
|
8
8
|
--t-padding: var(--tui-padding-l);
|
|
9
|
+
--t-label: 0;
|
|
9
10
|
--t-label-y: -0.75rem;
|
|
10
|
-
--t-label-font: var(--tui-typography-
|
|
11
|
+
--t-label-font: var(--tui-typography-ui-s);
|
|
11
12
|
--t-end: ~'0px';
|
|
12
13
|
--t-start: ~'0px';
|
|
13
14
|
--t-side: ~'0px';
|
|
@@ -22,7 +23,6 @@ tui-textfield:where(*&) {
|
|
|
22
23
|
padding: 0 var(--t-padding);
|
|
23
24
|
border-radius: var(--tui-radius-l);
|
|
24
25
|
font: var(--tui-typography-ui-m);
|
|
25
|
-
line-height: 1.25rem;
|
|
26
26
|
box-sizing: border-box;
|
|
27
27
|
isolation: isolate;
|
|
28
28
|
|
|
@@ -101,7 +101,6 @@ tui-textfield:where(*&) {
|
|
|
101
101
|
|
|
102
102
|
border-radius: var(--tui-radius-m);
|
|
103
103
|
font: var(--tui-typography-ui-s);
|
|
104
|
-
line-height: 1rem;
|
|
105
104
|
|
|
106
105
|
&[data-icon-start] {
|
|
107
106
|
--t-start: 1.5rem;
|
|
@@ -132,15 +131,14 @@ tui-textfield:where(*&) {
|
|
|
132
131
|
}
|
|
133
132
|
|
|
134
133
|
&[data-size='m'] {
|
|
135
|
-
--t-height: var(--tui-height-m);
|
|
134
|
+
--t-height: calc(var(--tui-height-m) + 2.5 * var(--t-label) * var(--tui-font-offset));
|
|
136
135
|
--t-padding: var(--tui-padding-m);
|
|
137
|
-
--t-label-font: var(--tui-typography-
|
|
136
|
+
--t-label-font: var(--tui-typography-ui-xs);
|
|
138
137
|
--t-label-y: -0.5625rem;
|
|
139
138
|
--t-max: 0.125rem;
|
|
140
139
|
|
|
141
140
|
border-radius: var(--tui-radius-m);
|
|
142
141
|
font: var(--tui-typography-ui-s);
|
|
143
|
-
line-height: 1rem;
|
|
144
142
|
|
|
145
143
|
&[data-icon-start] {
|
|
146
144
|
--t-start: 2.125rem;
|
|
@@ -164,10 +162,6 @@ tui-textfield:where(*&) {
|
|
|
164
162
|
}
|
|
165
163
|
}
|
|
166
164
|
|
|
167
|
-
&[data-size='l'] {
|
|
168
|
-
--t-label: -0.7rem;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
165
|
&:is(._disabled, [data-state='disabled']) {
|
|
172
166
|
pointer-events: none;
|
|
173
167
|
opacity: var(--tui-disabled-opacity);
|
|
@@ -182,9 +176,12 @@ tui-textfield:where(*&) {
|
|
|
182
176
|
}
|
|
183
177
|
|
|
184
178
|
&._with-label {
|
|
179
|
+
--t-label: 1;
|
|
180
|
+
|
|
185
181
|
& > .t-template,
|
|
186
182
|
.t-filler,
|
|
187
183
|
[tuiInput] {
|
|
184
|
+
inset-block-end: 0;
|
|
188
185
|
padding-block-start: calc(var(--t-height) / 3);
|
|
189
186
|
padding-block-end: 0;
|
|
190
187
|
}
|
|
@@ -204,10 +201,9 @@ tui-textfield:where(*&) {
|
|
|
204
201
|
.t-filler,
|
|
205
202
|
[tuiInput] {
|
|
206
203
|
position: absolute;
|
|
207
|
-
inset-block-start: 0;
|
|
208
204
|
inset-inline: 0;
|
|
209
205
|
inline-size: auto;
|
|
210
|
-
block-size:
|
|
206
|
+
block-size: var(--t-height);
|
|
211
207
|
appearance: none;
|
|
212
208
|
background: none;
|
|
213
209
|
font: inherit;
|
|
@@ -253,8 +249,7 @@ tui-textfield:where(*&) {
|
|
|
253
249
|
[tuiLabel],
|
|
254
250
|
&:not(tui-textfield) ~ [tuiLabel] {
|
|
255
251
|
font: var(--t-label-font);
|
|
256
|
-
|
|
257
|
-
transform: translateY(var(--t-label-y));
|
|
252
|
+
transform: translateY(calc(var(--t-label-y) - var(--tui-font-offset) / 2));
|
|
258
253
|
}
|
|
259
254
|
}
|
|
260
255
|
|
|
@@ -265,13 +260,18 @@ tui-textfield:where(*&) {
|
|
|
265
260
|
|
|
266
261
|
position: relative;
|
|
267
262
|
display: block;
|
|
263
|
+
max-inline-size: calc(100% - var(--t-start));
|
|
268
264
|
flex: 1;
|
|
269
265
|
align-self: flex-start;
|
|
270
|
-
font
|
|
266
|
+
font: inherit;
|
|
271
267
|
user-select: none;
|
|
272
|
-
|
|
273
|
-
|
|
268
|
+
padding: calc(var(--t-height) / 2 - 0.625em) 0;
|
|
269
|
+
line-height: 1.25 !important;
|
|
274
270
|
transition-duration: inherit;
|
|
271
|
+
|
|
272
|
+
+ .t-content {
|
|
273
|
+
margin-inline-start: 0;
|
|
274
|
+
}
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
[tuiLabel],
|
|
@@ -355,8 +355,7 @@ tui-textfield:where(*&) {
|
|
|
355
355
|
[tuiLabel] {
|
|
356
356
|
color: var(--tui-text-primary) !important;
|
|
357
357
|
font: var(--t-label-font);
|
|
358
|
-
|
|
359
|
-
transform: translateY(var(--t-label-y));
|
|
358
|
+
transform: translateY(calc(var(--t-label-y) - var(--tui-font-offset) / 2));
|
|
360
359
|
}
|
|
361
360
|
});
|
|
362
361
|
}
|
package/components/toast.less
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../utils.less';
|
|
2
2
|
|
|
3
3
|
[tuiToast]:where(*&) {
|
|
4
4
|
.transition(transform);
|
|
@@ -20,13 +20,15 @@
|
|
|
20
20
|
max-inline-size: ~'min(calc(100vw - 2rem), 25rem)';
|
|
21
21
|
border: inherit;
|
|
22
22
|
text-decoration: none;
|
|
23
|
+
white-space: pre-line;
|
|
24
|
+
text-align: start;
|
|
23
25
|
overflow: hidden;
|
|
24
26
|
|
|
25
27
|
.interactive({
|
|
26
28
|
cursor: pointer;
|
|
27
29
|
});
|
|
28
30
|
|
|
29
|
-
>
|
|
31
|
+
> *:not(tui-shrink-wrap),
|
|
30
32
|
&::after,
|
|
31
33
|
&::before {
|
|
32
34
|
max-inline-size: 50%;
|
package/mixins/appearance.scss
CHANGED
package/mixins/date-picker.less
CHANGED
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
&:not(:last-child)::before {
|
|
95
|
-
|
|
95
|
+
inset-inline-end: -1rem;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
&::after {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
&:not(:first-child)::before {
|
|
112
|
-
|
|
112
|
+
inset-inline-start: -1rem;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&::after {
|
package/mixins/date-picker.scss
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'miscellaneous';
|
|
1
|
+
@import 'miscellaneous.scss';
|
|
2
2
|
|
|
3
3
|
@mixin date-picker {
|
|
4
4
|
.t-row {
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
&:not(:last-child)::before {
|
|
95
|
-
|
|
95
|
+
inset-inline-end: -1rem;
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
&::after {
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
}
|
|
110
110
|
|
|
111
111
|
&:not(:first-child)::before {
|
|
112
|
-
|
|
112
|
+
inset-inline-start: -1rem;
|
|
113
113
|
}
|
|
114
114
|
|
|
115
115
|
&::after {
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@import '../variables/media.less';
|
|
2
|
+
|
|
3
|
+
.tui-hitbox(@size) {
|
|
4
|
+
@media @tui-mobile {
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: visible;
|
|
7
|
+
|
|
8
|
+
&::after {
|
|
9
|
+
content: '';
|
|
10
|
+
position: absolute;
|
|
11
|
+
display: block !important;
|
|
12
|
+
inline-size: max(100%, @size);
|
|
13
|
+
block-size: max(100%, @size);
|
|
14
|
+
background: transparent;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
@import '../variables/media.scss';
|
|
2
|
+
|
|
3
|
+
@mixin hitbox($size) {
|
|
4
|
+
@media ($tui-mobile) {
|
|
5
|
+
position: relative;
|
|
6
|
+
overflow: visible;
|
|
7
|
+
|
|
8
|
+
&::after {
|
|
9
|
+
content: '';
|
|
10
|
+
position: absolute;
|
|
11
|
+
display: block !important;
|
|
12
|
+
inline-size: max(100%, $size);
|
|
13
|
+
block-size: max(100%, $size);
|
|
14
|
+
background: transparent;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -6,23 +6,26 @@
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
// TODO: rename to center-horizontal
|
|
9
10
|
// centering with translate
|
|
10
11
|
.center-left() {
|
|
11
12
|
position: absolute;
|
|
13
|
+
// stylelint-disable-next-line -- TODO: fix later
|
|
12
14
|
left: 50%;
|
|
13
15
|
transform: translate(-50%, 0);
|
|
14
16
|
}
|
|
15
17
|
|
|
18
|
+
// TODO: rename to center-vertical
|
|
16
19
|
.center-top() {
|
|
17
20
|
position: absolute;
|
|
21
|
+
// stylelint-disable-next-line -- TODO: fix later
|
|
18
22
|
top: 50%;
|
|
19
23
|
transform: translate(0, -50%);
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
.center-all() {
|
|
23
27
|
position: absolute;
|
|
24
|
-
|
|
25
|
-
left: 50%;
|
|
28
|
+
inset: 50% auto auto 50%;
|
|
26
29
|
transform: translate(-50%, -50%);
|
|
27
30
|
}
|
|
28
31
|
|
|
@@ -30,8 +33,8 @@
|
|
|
30
33
|
// @deprecated TODO remove in 5.0 in favor of inset: 0
|
|
31
34
|
.fullsize(@position: absolute, @mode: height) {
|
|
32
35
|
position: @position;
|
|
33
|
-
|
|
34
|
-
|
|
36
|
+
inset-block-start: 0;
|
|
37
|
+
inset-inline-start: 0;
|
|
35
38
|
|
|
36
39
|
& when (@mode = height) {
|
|
37
40
|
inline-size: 100%;
|
|
@@ -39,8 +42,8 @@
|
|
|
39
42
|
}
|
|
40
43
|
|
|
41
44
|
& when (@mode = inset) {
|
|
42
|
-
|
|
43
|
-
|
|
45
|
+
inset-block-end: 0;
|
|
46
|
+
inset-inline-end: 0;
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
|
|
@@ -104,10 +107,8 @@
|
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
.scrollbar-hidden() {
|
|
107
|
-
/* stylelint-disable*/
|
|
108
110
|
scrollbar-width: none;
|
|
109
111
|
-ms-overflow-style: none;
|
|
110
|
-
/* stylelint-enable*/
|
|
111
112
|
|
|
112
113
|
&::-webkit-scrollbar,
|
|
113
114
|
&::-webkit-scrollbar-thumb {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import 'browsers';
|
|
1
|
+
@import 'browsers.scss';
|
|
2
2
|
|
|
3
3
|
@mixin interactive {
|
|
4
4
|
&:is(a, button, select, textarea, input, label, .tui-interactive):not(:disabled) {
|
|
@@ -6,40 +6,43 @@
|
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
|
|
9
|
+
// TODO: rename to center-horizontal
|
|
9
10
|
// centering with translate
|
|
10
11
|
@mixin center-left() {
|
|
11
12
|
position: absolute;
|
|
13
|
+
// stylelint-disable-next-line -- TODO: fix later
|
|
12
14
|
left: 50%;
|
|
13
15
|
transform: translate(-50%, 0);
|
|
14
16
|
}
|
|
15
17
|
|
|
18
|
+
// TODO: rename to center-vertical
|
|
16
19
|
@mixin center-top() {
|
|
17
20
|
position: absolute;
|
|
21
|
+
// stylelint-disable-next-line -- TODO: fix later
|
|
18
22
|
top: 50%;
|
|
19
23
|
transform: translate(0, -50%);
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
@mixin center-all() {
|
|
23
27
|
position: absolute;
|
|
24
|
-
|
|
25
|
-
left: 50%;
|
|
28
|
+
inset: 50% auto auto 50%;
|
|
26
29
|
transform: translate(-50%, -50%);
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
//.fullsize
|
|
30
33
|
@mixin fullsize($position: absolute, $mode: height) {
|
|
31
34
|
position: $position;
|
|
32
|
-
|
|
33
|
-
|
|
35
|
+
inset-block-start: 0;
|
|
36
|
+
inset-inline-start: 0;
|
|
34
37
|
|
|
35
38
|
@if ($mode == height) {
|
|
36
|
-
|
|
37
|
-
|
|
39
|
+
inline-size: 100%;
|
|
40
|
+
block-size: 100%;
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
@if ($mode == inset) {
|
|
41
|
-
|
|
42
|
-
|
|
44
|
+
inset-block-end: 0;
|
|
45
|
+
inset-inline-end: 0;
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
|
|
@@ -64,7 +67,7 @@
|
|
|
64
67
|
white-space: nowrap;
|
|
65
68
|
overflow: hidden;
|
|
66
69
|
vertical-align: middle;
|
|
67
|
-
max-
|
|
70
|
+
max-inline-size: 100%;
|
|
68
71
|
gap: calc(var(--t-gap) - 2 * var(--t-margin));
|
|
69
72
|
|
|
70
73
|
> img,
|
|
@@ -75,8 +78,8 @@
|
|
|
75
78
|
> [tuiRadio],
|
|
76
79
|
> [tuiSwitch],
|
|
77
80
|
> [tuiCheckbox],
|
|
78
|
-
&[tuiIcons]
|
|
79
|
-
&[tuiIcons]
|
|
81
|
+
&[tuiIcons]::before,
|
|
82
|
+
&[tuiIcons]::after {
|
|
80
83
|
margin: var(--t-margin);
|
|
81
84
|
}
|
|
82
85
|
}
|
|
@@ -101,10 +104,8 @@
|
|
|
101
104
|
}
|
|
102
105
|
|
|
103
106
|
@mixin scrollbar-hidden() {
|
|
104
|
-
/* stylelint-disable*/
|
|
105
107
|
scrollbar-width: none;
|
|
106
108
|
-ms-overflow-style: none;
|
|
107
|
-
/* stylelint-enable*/
|
|
108
109
|
|
|
109
110
|
&::-webkit-scrollbar,
|
|
110
111
|
&::-webkit-scrollbar-thumb {
|
|
@@ -117,8 +118,8 @@
|
|
|
117
118
|
position: absolute;
|
|
118
119
|
clip: rect(1px, 1px, 1px, 1px);
|
|
119
120
|
clip-path: inset(50%);
|
|
120
|
-
|
|
121
|
-
|
|
121
|
+
block-size: 1px;
|
|
122
|
+
inline-size: 1px;
|
|
122
123
|
margin: -1px;
|
|
123
124
|
overflow: hidden;
|
|
124
125
|
padding: 0;
|
|
@@ -143,6 +144,7 @@
|
|
|
143
144
|
|
|
144
145
|
@mixin text-truncate() {
|
|
145
146
|
@include text-overflow();
|
|
147
|
+
|
|
146
148
|
flex: 1;
|
|
147
149
|
min-inline-size: 0;
|
|
148
150
|
max-inline-size: max-content;
|
|
@@ -150,7 +152,7 @@
|
|
|
150
152
|
|
|
151
153
|
@mixin tui-line-clamp($count: 3) {
|
|
152
154
|
display: -webkit-box;
|
|
153
|
-
-webkit-box-orient:
|
|
155
|
+
-webkit-box-orient: block-axis;
|
|
154
156
|
-webkit-line-clamp: $count;
|
|
155
157
|
line-clamp: $count;
|
|
156
158
|
overflow: hidden;
|
package/package.json
CHANGED
|
@@ -1,12 +1,30 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@taiga-ui/styles",
|
|
3
|
-
"version": "5.0.0-canary.
|
|
3
|
+
"version": "5.0.0-canary.9babef3",
|
|
4
4
|
"description": "Framework-agnostic package with styles for Taiga UI",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/taiga-family/taiga-ui"
|
|
8
|
+
},
|
|
5
9
|
"license": "Apache-2.0",
|
|
10
|
+
"contributors": [
|
|
11
|
+
{
|
|
12
|
+
"name": "Alex Inkin",
|
|
13
|
+
"email": "alexander@inkin.ru"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "Vladimir Potekhin",
|
|
17
|
+
"email": "vladimir.potekh@gmail.com"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"name": "Nikita Barsukov",
|
|
21
|
+
"email": "nikita.s.barsukov@gmail.com"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
6
24
|
"exports": {
|
|
7
25
|
"./*": "./*"
|
|
8
26
|
},
|
|
9
27
|
"peerDependencies": {
|
|
10
|
-
"@taiga-ui/design-tokens": "~0.
|
|
28
|
+
"@taiga-ui/design-tokens": "~0.290.0"
|
|
11
29
|
}
|
|
12
30
|
}
|
package/taiga-ui-fonts.less
CHANGED
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
// stylelint-disable
|
|
2
|
-
// https://github.com/stackblitz/core/issues/2104#issuecomment-1397086512
|
|
3
|
-
//noinspection CssUnknownTarget
|
|
1
|
+
// stylelint-disable-next-line -- https://github.com/stackblitz/core/issues/2104#issuecomment-1397086512
|
|
4
2
|
@import (optional) url(https://fonts.googleapis.com/css2?family=Manrope:wght@500;800&display=swap);
|
package/theme/appearance.less
CHANGED
package/theme/variables.less
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
var(--tui-typography-family-text);
|
|
28
28
|
--tui-typography-body-s: normal calc(var(--tui-font-offset) + 0.875rem) / calc(20 / 14)
|
|
29
29
|
var(--tui-typography-family-text);
|
|
30
|
-
--tui-typography-body-xs: normal calc(var(--tui-font-offset) + 0.
|
|
30
|
+
--tui-typography-body-xs: normal calc(var(--tui-font-offset) + 0.75rem) / calc(16 / 12)
|
|
31
31
|
var(--tui-typography-family-text);
|
|
32
32
|
// Reduced
|
|
33
33
|
--tui-typography-ui-l: normal calc(var(--tui-font-offset) + 1.0625rem) / calc(24 / 17)
|
package/utils.less
CHANGED
package/utils.scss
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
@import 'mixins/browsers';
|
|
2
|
-
@import 'mixins/date-picker';
|
|
3
|
-
@import 'mixins/miscellaneous';
|
|
4
|
-
@import 'mixins/slider';
|
|
5
|
-
@import 'mixins/appearance';
|
|
6
|
-
@import '
|
|
1
|
+
@import 'mixins/browsers.scss';
|
|
2
|
+
@import 'mixins/date-picker.scss';
|
|
3
|
+
@import 'mixins/miscellaneous.scss';
|
|
4
|
+
@import 'mixins/slider.scss';
|
|
5
|
+
@import 'mixins/appearance.scss';
|
|
6
|
+
@import 'mixins/hitbox.scss';
|
|
7
|
+
@import 'variables/media.scss';
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
@import '../../utils.less';
|
|
2
|
-
|
|
3
|
-
[tuiAppearance][data-appearance='glass'] {
|
|
4
|
-
background: rgba(0, 0, 0, 0.4);
|
|
5
|
-
color: #fff;
|
|
6
|
-
backdrop-filter: blur(1rem);
|
|
7
|
-
|
|
8
|
-
--tui-border-focus: rgba(255, 255, 255, 0.64);
|
|
9
|
-
|
|
10
|
-
.appearance-hover({
|
|
11
|
-
background: rgba(0, 0, 0, 0.48);
|
|
12
|
-
});
|
|
13
|
-
|
|
14
|
-
.appearance-active({
|
|
15
|
-
background: rgba(0, 0, 0, 0.6);
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
[tuiTheme='dark'] [tuiAppearance][data-appearance='glass'],
|
|
20
|
-
[tuiTheme='dark'][tuiAppearance][data-appearance='glass'] {
|
|
21
|
-
background: rgba(255, 255, 255, 0.3);
|
|
22
|
-
|
|
23
|
-
.appearance-hover({
|
|
24
|
-
background: rgba(255, 255, 255, 0.4);
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
.appearance-active({
|
|
28
|
-
background: rgba(255, 255, 255, 0.5);
|
|
29
|
-
});
|
|
30
|
-
}
|