@taiga-ui/styles 4.70.0 → 5.0.0-rc.3
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 +51 -0
- package/components/avatar.less +188 -0
- package/components/badge.less +128 -0
- package/components/block.less +118 -0
- package/components/button.less +135 -0
- package/components/checkbox.less +84 -0
- package/components/chip.less +131 -0
- package/components/comment.less +64 -0
- package/components/compass.less +49 -0
- package/components/group.less +172 -0
- package/components/icon.less +83 -0
- package/components/icons.less +79 -0
- package/components/label.less +51 -0
- package/components/like.less +67 -0
- package/components/link.less +69 -0
- package/components/message.less +33 -0
- package/components/notification.less +184 -0
- package/components/pin.less +164 -0
- package/components/progress-bar.less +117 -0
- package/components/radio.less +59 -0
- package/components/status.less +40 -0
- package/components/switch.less +103 -0
- package/components/textfield.less +362 -0
- package/components/title.less +80 -0
- package/components/toast.less +44 -0
- package/mixins/appearance.less +56 -0
- package/mixins/appearance.scss +57 -0
- package/mixins/browsers.less +23 -0
- package/mixins/browsers.scss +23 -0
- package/mixins/date-picker.less +152 -0
- package/mixins/miscellaneous.less +168 -0
- package/mixins/miscellaneous.scss +161 -0
- package/mixins/picker.less +200 -0
- package/mixins/picker.scss +199 -0
- package/mixins/slider.less +67 -0
- package/mixins/slider.scss +67 -0
- package/package.json +9 -2
- package/taiga-ui-fonts.less +4 -0
- package/taiga-ui-theme.less +4 -0
- package/theme/appearance/accent.less +14 -0
- package/theme/appearance/action.less +38 -0
- package/theme/appearance/flat.less +23 -0
- package/theme/appearance/floating.less +21 -0
- package/theme/appearance/glass.less +30 -0
- package/theme/appearance/outline.less +78 -0
- package/theme/appearance/primary.less +48 -0
- package/theme/appearance/secondary.less +77 -0
- package/theme/appearance/status.less +125 -0
- package/theme/appearance/table.less +68 -0
- package/theme/appearance/textfield.less +80 -0
- package/theme/appearance.less +12 -0
- package/theme/palette.less +161 -0
- package/theme/variables.less +57 -0
- package/utils.less +7 -0
- package/utils.scss +6 -0
- package/variables/media.less +23 -0
- package/variables/media.scss +23 -0
- package/basic/keyframes.less +0 -19
- package/basic/main.less +0 -80
- package/markup/tui-container.less +0 -64
- package/markup/tui-form.less +0 -145
- package/markup/tui-island.less +0 -200
- package/markup/tui-list.less +0 -136
- package/markup/tui-mobile-only.less +0 -5
- package/markup/tui-required.less +0 -13
- package/markup/tui-row.less +0 -139
- package/markup/tui-skeleton.less +0 -43
- package/markup/tui-space.less +0 -52
- package/markup/tui-table.less +0 -184
- package/markup/tui-text.less +0 -61
- package/project.json +0 -35
- package/taiga-ui-global.less +0 -14
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Switch
|
|
5
|
+
* @selector [tuiSwitch]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A stylized input type="checkbox" switch
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'm') ('s' | 'm')
|
|
12
|
+
*
|
|
13
|
+
* @vars
|
|
14
|
+
* --t-icon-start — checkmark icon
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <input type="checkbox" tuiSwitch tuiAppearance data-appearance="primary" />
|
|
18
|
+
*
|
|
19
|
+
* @see-also
|
|
20
|
+
* Checkbox, Radio
|
|
21
|
+
*/
|
|
22
|
+
[tuiSwitch]:where(*&) {
|
|
23
|
+
.transition(~'background, box-shadow');
|
|
24
|
+
|
|
25
|
+
display: inline-block;
|
|
26
|
+
inline-size: 3rem;
|
|
27
|
+
block-size: 1.5rem;
|
|
28
|
+
border-radius: 2rem;
|
|
29
|
+
overflow: hidden;
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
margin: 0;
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
color: #fff !important;
|
|
34
|
+
|
|
35
|
+
&[data-size='s'] {
|
|
36
|
+
block-size: 1rem;
|
|
37
|
+
inline-size: 2rem;
|
|
38
|
+
|
|
39
|
+
&::before {
|
|
40
|
+
inline-size: 1rem;
|
|
41
|
+
transform: translateX(-1rem);
|
|
42
|
+
font-size: 0.75rem;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&::after {
|
|
46
|
+
inline-size: 1rem;
|
|
47
|
+
box-shadow: -2.625rem 0 0 0.5rem var(--tui-background-base);
|
|
48
|
+
outline-width: 0.167rem;
|
|
49
|
+
transform: scale(0.375);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:checked::after {
|
|
53
|
+
transform: scale(0.375) translateX(2.625rem);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&:checked {
|
|
58
|
+
&::before {
|
|
59
|
+
transform: none;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&::after {
|
|
63
|
+
transform: scale(0.33333) translateX(4.5rem);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:disabled._readonly._readonly {
|
|
68
|
+
opacity: 1;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&::before,
|
|
72
|
+
&::after {
|
|
73
|
+
position: absolute;
|
|
74
|
+
block-size: 100%;
|
|
75
|
+
inline-size: 1.5rem;
|
|
76
|
+
transition-property: transform;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&::before {
|
|
80
|
+
left: 0.125rem;
|
|
81
|
+
font-size: 1rem;
|
|
82
|
+
transform: translateX(-1.5rem);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&::after {
|
|
86
|
+
right: 0;
|
|
87
|
+
display: block;
|
|
88
|
+
border-radius: 100%;
|
|
89
|
+
background: none;
|
|
90
|
+
transform: scale(0.33333);
|
|
91
|
+
box-shadow: -4.5rem 0 0 0.75rem var(--tui-background-base);
|
|
92
|
+
outline: 0.375rem solid var(--tui-background-neutral-2-pressed);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:not([data-icon-start])::after {
|
|
96
|
+
outline-offset: 20rem;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
&:invalid:not([data-mode]),
|
|
100
|
+
&[data-mode~='invalid'] {
|
|
101
|
+
color: #fff;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
@@ -0,0 +1,362 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
tui-textfield:where(*&) {
|
|
4
|
+
.scrollbar-hidden();
|
|
5
|
+
.transition(color);
|
|
6
|
+
|
|
7
|
+
--t-height: var(--tui-height-l);
|
|
8
|
+
--t-padding: var(--tui-padding-l);
|
|
9
|
+
--t-label-y: -0.75rem;
|
|
10
|
+
--t-label-font: var(--tui-font-body-s);
|
|
11
|
+
--t-end: ~'0px';
|
|
12
|
+
--t-start: ~'0px';
|
|
13
|
+
--t-side: ~'0px';
|
|
14
|
+
--t-max: 0.75rem;
|
|
15
|
+
--t-space: ~'clamp(0px, calc(var(--t-side) + var(--t-end)), var(--t-max))';
|
|
16
|
+
|
|
17
|
+
position: relative;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-wrap: wrap;
|
|
20
|
+
align-items: flex-start;
|
|
21
|
+
min-block-size: var(--t-height);
|
|
22
|
+
padding: 0 var(--t-padding);
|
|
23
|
+
border-radius: var(--tui-radius-l);
|
|
24
|
+
font: var(--tui-font-ui-m);
|
|
25
|
+
line-height: 1.25rem;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
isolation: isolate;
|
|
28
|
+
|
|
29
|
+
&[tuiAppearance] {
|
|
30
|
+
outline: none;
|
|
31
|
+
|
|
32
|
+
&[data-appearance=''] {
|
|
33
|
+
color: var(--tui-text-tertiary);
|
|
34
|
+
|
|
35
|
+
&:not([data-mode~='readonly']) {
|
|
36
|
+
.appearance-hover({
|
|
37
|
+
color: var(--tui-text-secondary);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&[data-icon-start] {
|
|
44
|
+
--t-start: 2.5rem;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&[data-icon-end] {
|
|
48
|
+
--t-end: 1.75rem;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[tuiIcons] {
|
|
52
|
+
&::before {
|
|
53
|
+
z-index: 1;
|
|
54
|
+
block-size: var(--t-height);
|
|
55
|
+
inline-size: 1.5rem;
|
|
56
|
+
margin-inline-end: 1rem;
|
|
57
|
+
pointer-events: none;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&::after {
|
|
61
|
+
position: relative;
|
|
62
|
+
block-size: var(--t-height);
|
|
63
|
+
inline-size: calc(1.5rem + 2 * var(--t-padding));
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
margin-inline-start: calc(0.25rem - var(--t-padding));
|
|
66
|
+
margin-inline-end: calc(-1 * var(--t-padding));
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
&::-webkit-resizer {
|
|
71
|
+
border: 0.25rem solid transparent;
|
|
72
|
+
inline-size: 0.5rem;
|
|
73
|
+
block-size: 0.5rem;
|
|
74
|
+
box-sizing: content-box;
|
|
75
|
+
color: var(--tui-text-tertiary);
|
|
76
|
+
background: linear-gradient(
|
|
77
|
+
-45deg,
|
|
78
|
+
transparent,
|
|
79
|
+
transparent 0.125rem,
|
|
80
|
+
currentColor 0.125rem,
|
|
81
|
+
currentColor 0.1875rem,
|
|
82
|
+
transparent 0.1875rem,
|
|
83
|
+
transparent 0.25rem,
|
|
84
|
+
currentColor 0.25rem,
|
|
85
|
+
currentColor 0.3125rem,
|
|
86
|
+
transparent 0.35rem
|
|
87
|
+
);
|
|
88
|
+
background-clip: content-box;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[tuiLabel],
|
|
92
|
+
& > .t-content,
|
|
93
|
+
& > .t-template {
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&[data-size='s'] {
|
|
98
|
+
--t-height: var(--tui-height-s);
|
|
99
|
+
--t-padding: var(--tui-padding-s);
|
|
100
|
+
--t-max: ~'0px';
|
|
101
|
+
|
|
102
|
+
border-radius: var(--tui-radius-m);
|
|
103
|
+
font: var(--tui-font-ui-s);
|
|
104
|
+
line-height: 1rem;
|
|
105
|
+
|
|
106
|
+
&[data-icon-start] {
|
|
107
|
+
--t-start: 1.5rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
&[data-icon-end] {
|
|
111
|
+
--t-end: 1.5rem;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&::before {
|
|
115
|
+
font-size: 1rem;
|
|
116
|
+
margin-inline: -0.25rem 0.25rem;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&::after {
|
|
120
|
+
inline-size: calc(0.75rem + 2 * var(--t-padding));
|
|
121
|
+
margin-inline: 0 -0.5rem;
|
|
122
|
+
font-size: 1rem;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
& > .t-content {
|
|
126
|
+
gap: 0;
|
|
127
|
+
|
|
128
|
+
> *:last-child {
|
|
129
|
+
margin-inline-end: -0.25rem;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&[data-size='m'] {
|
|
135
|
+
--t-height: var(--tui-height-m);
|
|
136
|
+
--t-padding: var(--tui-padding-m);
|
|
137
|
+
--t-label-font: var(--tui-font-body-xs);
|
|
138
|
+
--t-label-y: -0.5625rem;
|
|
139
|
+
--t-max: 0.125rem;
|
|
140
|
+
|
|
141
|
+
border-radius: var(--tui-radius-m);
|
|
142
|
+
font: var(--tui-font-ui-s);
|
|
143
|
+
line-height: 1rem;
|
|
144
|
+
|
|
145
|
+
&[data-icon-start] {
|
|
146
|
+
--t-start: 2.125rem;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&[data-icon-end] {
|
|
150
|
+
--t-end: 1.75rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
&::before {
|
|
154
|
+
margin-inline: -0.125rem 0.75rem;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
&::after {
|
|
158
|
+
inline-size: calc(1.25rem + 2 * var(--t-padding));
|
|
159
|
+
margin-inline-start: calc(0.5rem - var(--t-padding));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
& > .t-content > *:last-child {
|
|
163
|
+
margin-inline-end: -0.125rem;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
&[data-size='l'] {
|
|
168
|
+
--t-label: -0.7rem;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
&:is(._disabled, [data-state='disabled']) {
|
|
172
|
+
pointer-events: none;
|
|
173
|
+
opacity: var(--tui-disabled-opacity);
|
|
174
|
+
|
|
175
|
+
[tuiAppearance]:is(._disabled, :disabled, [data-state='disabled']) {
|
|
176
|
+
opacity: 1;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
tui-icon {
|
|
180
|
+
display: none;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&._with-label {
|
|
185
|
+
& > .t-template,
|
|
186
|
+
.t-filler,
|
|
187
|
+
[tuiInput] {
|
|
188
|
+
padding-block-start: calc(var(--t-height) / 3);
|
|
189
|
+
padding-block-end: 0;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
&:is(:not([data-focus='true']), [data-mode~='readonly']) {
|
|
193
|
+
& > .t-template,
|
|
194
|
+
[tuiInput] {
|
|
195
|
+
&::placeholder,
|
|
196
|
+
&._empty {
|
|
197
|
+
color: transparent;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
& > .t-template,
|
|
204
|
+
.t-filler,
|
|
205
|
+
[tuiInput] {
|
|
206
|
+
position: absolute;
|
|
207
|
+
inset-block-start: 0;
|
|
208
|
+
inset-inline: 0;
|
|
209
|
+
inline-size: auto;
|
|
210
|
+
block-size: 100%;
|
|
211
|
+
appearance: none;
|
|
212
|
+
background: none;
|
|
213
|
+
font: inherit;
|
|
214
|
+
resize: none;
|
|
215
|
+
outline: none;
|
|
216
|
+
color: var(--tui-text-primary);
|
|
217
|
+
box-sizing: border-box;
|
|
218
|
+
border-radius: inherit;
|
|
219
|
+
border-width: 0;
|
|
220
|
+
overscroll-behavior: none;
|
|
221
|
+
padding-inline-start: calc(var(--t-start) + var(--t-padding));
|
|
222
|
+
padding-inline-end: calc(var(--t-end) + var(--t-side) + var(--t-padding) + var(--t-space));
|
|
223
|
+
white-space: nowrap;
|
|
224
|
+
overflow: hidden;
|
|
225
|
+
|
|
226
|
+
&:is(input, textarea):read-only ~ .t-filler {
|
|
227
|
+
display: none;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
&:disabled {
|
|
231
|
+
animation: tuiPresent 1s infinite;
|
|
232
|
+
opacity: 1;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
&[inputmode='none'] {
|
|
236
|
+
caret-color: transparent;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
&::-webkit-inner-spin-button,
|
|
240
|
+
&::-webkit-outer-spin-button {
|
|
241
|
+
appearance: none;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
&._with-template [tuiInput]:first-of-type {
|
|
246
|
+
color: transparent !important;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
[tuiInput]:-webkit-autofill,
|
|
250
|
+
[tuiInput][chrome-autofilled], /* Chrome on IOS */
|
|
251
|
+
[tuiInput]:not(._empty, :placeholder-shown),
|
|
252
|
+
&[multi][multi]:not(._empty) {
|
|
253
|
+
[tuiLabel],
|
|
254
|
+
&:not(tui-textfield) ~ [tuiLabel] {
|
|
255
|
+
font: var(--t-label-font);
|
|
256
|
+
line-height: var(--t-height);
|
|
257
|
+
transform: translateY(var(--t-label-y));
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Increasing specificity to override all other styles
|
|
262
|
+
[tuiLabel][tuiLabel][tuiLabel] {
|
|
263
|
+
.transition(all);
|
|
264
|
+
.text-overflow();
|
|
265
|
+
|
|
266
|
+
position: relative;
|
|
267
|
+
display: block;
|
|
268
|
+
flex: 1;
|
|
269
|
+
align-self: flex-start;
|
|
270
|
+
font-size: inherit;
|
|
271
|
+
user-select: none;
|
|
272
|
+
line-height: var(--t-height);
|
|
273
|
+
transition-duration: inherit;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
[tuiLabel],
|
|
277
|
+
[tuiInput]::placeholder,
|
|
278
|
+
[tuiInput]._empty {
|
|
279
|
+
color: var(--tui-text-secondary);
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
select {
|
|
283
|
+
option[value='']:disabled {
|
|
284
|
+
// Hide placeholder from native datalist (Windows OS only)
|
|
285
|
+
color: transparent;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
optgroup,
|
|
289
|
+
option {
|
|
290
|
+
// Windows OS only
|
|
291
|
+
background-color: var(--tui-background-elevation-3);
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
optgroup,
|
|
295
|
+
option:not(:disabled) {
|
|
296
|
+
// In Windows OS native options inherit color of host <select>
|
|
297
|
+
color: var(--tui-text-primary);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
button,
|
|
302
|
+
a,
|
|
303
|
+
tui-icon {
|
|
304
|
+
pointer-events: auto;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
& > .t-content {
|
|
308
|
+
z-index: 1;
|
|
309
|
+
display: flex;
|
|
310
|
+
block-size: var(--t-height);
|
|
311
|
+
align-items: center;
|
|
312
|
+
gap: 0.25rem;
|
|
313
|
+
margin-inline-start: auto;
|
|
314
|
+
isolation: isolate;
|
|
315
|
+
border-radius: inherit;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
textarea ~ .t-content {
|
|
319
|
+
min-inline-size: 0.5rem;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
&:is([data-mode~='readonly'], [data-state='disabled'], ._empty) [tuiButtonX],
|
|
323
|
+
[tuiInput]._empty ~ .t-content [tuiButtonX],
|
|
324
|
+
[tuiInput]:disabled ~ .t-content [tuiButtonX] {
|
|
325
|
+
display: none;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.t-filler {
|
|
329
|
+
pointer-events: none !important;
|
|
330
|
+
color: var(--tui-text-tertiary);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
[tuiFluidTypography] {
|
|
334
|
+
font-weight: bold;
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
[tuiSelectLike]:not(:read-only) {
|
|
338
|
+
cursor: pointer;
|
|
339
|
+
}
|
|
340
|
+
|
|
341
|
+
&:has(input[type='tel']) {
|
|
342
|
+
direction: ltr;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
.appearance-invalid({
|
|
346
|
+
[tuiInput]:not(._empty) ~ [tuiLabel],
|
|
347
|
+
&[multi]:not(._empty) [tuiLabel] {
|
|
348
|
+
color: var(--tui-text-negative);
|
|
349
|
+
}
|
|
350
|
+
});
|
|
351
|
+
|
|
352
|
+
&:not([data-mode~='readonly']) {
|
|
353
|
+
.appearance-focus({
|
|
354
|
+
[tuiLabel] {
|
|
355
|
+
color: var(--tui-text-primary) !important;
|
|
356
|
+
font: var(--t-label-font);
|
|
357
|
+
line-height: var(--t-height);
|
|
358
|
+
transform: translateY(var(--t-label-y));
|
|
359
|
+
}
|
|
360
|
+
});
|
|
361
|
+
}
|
|
362
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name Title
|
|
3
|
+
* @selector [tuiTitle], [tuiSubtitle]
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* Basic layout block for titles and subtitles
|
|
7
|
+
* Often used by other more complex elements
|
|
8
|
+
*
|
|
9
|
+
* @attributes
|
|
10
|
+
* data-size — optional size ('s' | 'm' | 'l')
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* <h2 tuiTitle>
|
|
14
|
+
* Title
|
|
15
|
+
* <span tuiSubtitle>Subtitle</span>
|
|
16
|
+
* </h2>
|
|
17
|
+
*
|
|
18
|
+
* @see-also
|
|
19
|
+
* Label
|
|
20
|
+
*/
|
|
21
|
+
[tuiTitle]:where(*&) {
|
|
22
|
+
position: relative;
|
|
23
|
+
display: flex;
|
|
24
|
+
min-inline-size: 0;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
text-align: start;
|
|
27
|
+
gap: 0.25rem;
|
|
28
|
+
margin: 0;
|
|
29
|
+
font: var(--tui-font-ui-m);
|
|
30
|
+
|
|
31
|
+
&[data-size='s'] {
|
|
32
|
+
gap: 0.125rem;
|
|
33
|
+
font: var(--tui-font-body-s);
|
|
34
|
+
|
|
35
|
+
[tuiSubtitle] {
|
|
36
|
+
font: var(--tui-font-body-xs);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[data-size='m'] {
|
|
41
|
+
gap: 0.125rem;
|
|
42
|
+
font: var(--tui-font-heading-h5);
|
|
43
|
+
|
|
44
|
+
[tuiSubtitle] {
|
|
45
|
+
font: var(--tui-font-body-m);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-size='l'] {
|
|
50
|
+
gap: 0.5rem;
|
|
51
|
+
font: var(--tui-font-heading-h3);
|
|
52
|
+
|
|
53
|
+
[tuiSubtitle] {
|
|
54
|
+
font: var(--tui-font-body-m);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
h1,
|
|
59
|
+
h2,
|
|
60
|
+
h3,
|
|
61
|
+
h4,
|
|
62
|
+
h5,
|
|
63
|
+
h6 {
|
|
64
|
+
margin: 0;
|
|
65
|
+
font: inherit;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[tuiSubtitle] {
|
|
69
|
+
font: var(--tui-font-ui-s);
|
|
70
|
+
margin: 0;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[tuiButton]:where(*&) [tuiTitle] {
|
|
75
|
+
margin-inline-end: auto;
|
|
76
|
+
|
|
77
|
+
[tuiSubtitle] {
|
|
78
|
+
color: var(--tui-text-secondary);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
[tuiToast]:where(*&) {
|
|
4
|
+
.transition(transform);
|
|
5
|
+
|
|
6
|
+
display: flex;
|
|
7
|
+
grid-row: 1 / span 2;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
gap: 0.75rem;
|
|
10
|
+
color: var(--tui-text-primary);
|
|
11
|
+
background: var(--tui-background-elevation-3);
|
|
12
|
+
min-block-size: 3.5rem;
|
|
13
|
+
border-radius: 1rem;
|
|
14
|
+
padding: 0.75rem 1rem;
|
|
15
|
+
box-shadow: var(--tui-shadow-medium);
|
|
16
|
+
align-items: center;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
inline-size: max-content;
|
|
19
|
+
font: var(--tui-font-ui-s);
|
|
20
|
+
max-inline-size: ~'min(calc(100vw - 2rem), 25rem)';
|
|
21
|
+
border: inherit;
|
|
22
|
+
text-decoration: none;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
|
|
25
|
+
.interactive({
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
> *,
|
|
30
|
+
&::after,
|
|
31
|
+
&::before {
|
|
32
|
+
max-inline-size: 50%;
|
|
33
|
+
margin: 0 -0.25rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&::after {
|
|
37
|
+
font-size: 1rem;
|
|
38
|
+
color: var(--tui-text-tertiary);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
[tuiAvatar] {
|
|
42
|
+
margin-inline-end: 0;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
@import 'miscellaneous.less';
|
|
2
|
+
|
|
3
|
+
.appearance-hover(@content) {
|
|
4
|
+
.interactive({
|
|
5
|
+
@media @tui-mouse {
|
|
6
|
+
&:hover:not([data-state]) {
|
|
7
|
+
@content();
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
&[data-state='hover'] {
|
|
13
|
+
@content();
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.appearance-active(@content) {
|
|
18
|
+
.interactive({
|
|
19
|
+
&:active:not([data-state]) {
|
|
20
|
+
@content();
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
&[data-state='active'] {
|
|
25
|
+
@content();
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.appearance-disabled(@content) {
|
|
30
|
+
&:disabled:not([data-state]),
|
|
31
|
+
&[data-state='disabled'] {
|
|
32
|
+
@content();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.appearance-focus(@content) {
|
|
37
|
+
&:focus-visible:not([data-focus='false']) {
|
|
38
|
+
@content();
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&[data-focus='true'] {
|
|
42
|
+
@content();
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.appearance-invalid(@content) {
|
|
47
|
+
&:is([data-mode~='invalid'], .tui-invalid, :invalid):not(
|
|
48
|
+
[data-mode~='readonly'],
|
|
49
|
+
[data-mode~='valid'],
|
|
50
|
+
[data-state='disabled'],
|
|
51
|
+
:disabled,
|
|
52
|
+
._disabled
|
|
53
|
+
) {
|
|
54
|
+
@content();
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@import 'miscellaneous';
|
|
2
|
+
@import '../variables/media';
|
|
3
|
+
|
|
4
|
+
@mixin appearance-hover {
|
|
5
|
+
@include interactive {
|
|
6
|
+
@media ($tui-mouse) {
|
|
7
|
+
&:hover:not([data-state]) {
|
|
8
|
+
@content;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&[data-state='hover'] {
|
|
14
|
+
@content;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@mixin appearance-active {
|
|
19
|
+
@include interactive {
|
|
20
|
+
&:active:not([data-state]) {
|
|
21
|
+
@content;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&[data-state='active'] {
|
|
26
|
+
@content;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@mixin appearance-disabled {
|
|
31
|
+
&:disabled:not([data-state]),
|
|
32
|
+
&[data-state='disabled'] {
|
|
33
|
+
@content;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin appearance-focus {
|
|
38
|
+
&:focus-visible:not([data-focus='false']) {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&[data-focus='true'] {
|
|
43
|
+
@content;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
@mixin appearance-invalid {
|
|
48
|
+
&:is([data-mode~='invalid'], .tui-invalid, :invalid):not(
|
|
49
|
+
[data-mode~='readonly'],
|
|
50
|
+
[data-mode~='valid'],
|
|
51
|
+
[data-state='disabled'],
|
|
52
|
+
:disabled,
|
|
53
|
+
._disabled
|
|
54
|
+
) {
|
|
55
|
+
@content;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.firefox-only(@ruleset) {
|
|
2
|
+
@supports (-moz-appearance: none) {
|
|
3
|
+
@ruleset();
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.safari-only(@ruleset) {
|
|
8
|
+
@supports (-webkit-hyphens: none) {
|
|
9
|
+
@ruleset();
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.ios-only(@ruleset) {
|
|
14
|
+
@supports (-webkit-touch-callout: none) {
|
|
15
|
+
@ruleset();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.chrome-only(@ruleset) {
|
|
20
|
+
@supports (not (-moz-appearance: none)) and (not (-webkit-hyphens: none)) {
|
|
21
|
+
@ruleset();
|
|
22
|
+
}
|
|
23
|
+
}
|