@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,51 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Appearance
|
|
5
|
+
* @selector [tuiAppearance]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Base directive to apply different styles to interactive elements
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-appearance — current appearance
|
|
12
|
+
* data-state — manual interactive state override ('active' | 'disabled' | 'hover')
|
|
13
|
+
* data-focus — manual :focus-visible state override
|
|
14
|
+
* data-mode — arbitrary manual mode like 'checked', 'invalid' or 'checked invalid'
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* <button tuiAppearance data-appearance='primary'></button>
|
|
18
|
+
*
|
|
19
|
+
* @see-also
|
|
20
|
+
* Button
|
|
21
|
+
*/
|
|
22
|
+
[tuiAppearance]:where(*&) {
|
|
23
|
+
.transition(all);
|
|
24
|
+
|
|
25
|
+
position: relative;
|
|
26
|
+
appearance: none;
|
|
27
|
+
outline: 0.125rem solid transparent;
|
|
28
|
+
outline-offset: -0.125rem;
|
|
29
|
+
transition-property: color, background-color, opacity, box-shadow, border-color, border-radius, filter;
|
|
30
|
+
|
|
31
|
+
&::before,
|
|
32
|
+
&::after {
|
|
33
|
+
transition-property: none;
|
|
34
|
+
transition-duration: inherit;
|
|
35
|
+
transition-timing-function: ease-in-out;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.appearance-focus({
|
|
39
|
+
outline-color: var(--tui-border-focus);
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
.appearance-disabled({
|
|
43
|
+
cursor: initial;
|
|
44
|
+
opacity: var(--tui-disabled-opacity);
|
|
45
|
+
|
|
46
|
+
&::before,
|
|
47
|
+
&::after {
|
|
48
|
+
cursor: initial;
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
}
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Avatar
|
|
5
|
+
* @selector [tuiAvatar]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* An avatar component which can be used with icons, text or images
|
|
9
|
+
* and is applicable to static elements as well as buttons and links
|
|
10
|
+
*
|
|
11
|
+
* @attributes
|
|
12
|
+
* data-size — size (default: 'l') ('xs' | 's' | 'm' | 'l' | 'xl' | 'xxl')
|
|
13
|
+
* data-shape — shape (default: 'round') ('round' | 'square')
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* <span tuiAvatar tuiIcons style="--t-icon-start: url('icon.svg')"></span>
|
|
17
|
+
* <button tuiAvatar>
|
|
18
|
+
* <img src="path/to/image" alt="Avatar" />
|
|
19
|
+
* </button>
|
|
20
|
+
*
|
|
21
|
+
* @see-also
|
|
22
|
+
* Icons, Icon, Appearance
|
|
23
|
+
*/
|
|
24
|
+
[tuiAvatar]:where(*&) {
|
|
25
|
+
--t-size: var(--tui-height-l);
|
|
26
|
+
--t-radius: 0.75rem;
|
|
27
|
+
--t-corner-offset: calc((var(--t-radius) * 1.4142 - var(--t-radius)) * 1 / 1.4142);
|
|
28
|
+
|
|
29
|
+
position: relative;
|
|
30
|
+
display: inline-flex;
|
|
31
|
+
flex-shrink: 0;
|
|
32
|
+
inline-size: var(--t-size);
|
|
33
|
+
block-size: var(--t-size);
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
border-radius: var(--t-radius);
|
|
38
|
+
border: none;
|
|
39
|
+
background: var(--tui-background-neutral-1);
|
|
40
|
+
color: var(--tui-text-secondary);
|
|
41
|
+
vertical-align: middle;
|
|
42
|
+
box-sizing: border-box;
|
|
43
|
+
padding: 0.25rem;
|
|
44
|
+
font: var(--tui-font-body-l);
|
|
45
|
+
font-weight: bold;
|
|
46
|
+
opacity: 0.999; // Kick in hardware rendering layer to avoid artifacts on the edges
|
|
47
|
+
|
|
48
|
+
&::before {
|
|
49
|
+
inline-size: auto;
|
|
50
|
+
block-size: auto;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&:not(._initials)::before {
|
|
54
|
+
position: absolute;
|
|
55
|
+
inset: 0;
|
|
56
|
+
font-size: calc(var(--t-size) * 0.6);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&[data-size='xs'] {
|
|
60
|
+
--t-size: var(--tui-height-xs);
|
|
61
|
+
--t-radius: 0.5rem;
|
|
62
|
+
|
|
63
|
+
font: var(--tui-font-ui-2xs);
|
|
64
|
+
font-size: 0.5625rem;
|
|
65
|
+
|
|
66
|
+
&._initials::before {
|
|
67
|
+
font: var(--tui-font-ui-2xs);
|
|
68
|
+
font-weight: bold;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&[data-size='s'] {
|
|
73
|
+
--t-size: var(--tui-height-s);
|
|
74
|
+
--t-radius: 0.5rem;
|
|
75
|
+
|
|
76
|
+
font: var(--tui-font-ui-2xs);
|
|
77
|
+
font-weight: bold;
|
|
78
|
+
|
|
79
|
+
&._initials::before {
|
|
80
|
+
font: var(--tui-font-body-s);
|
|
81
|
+
font-weight: bold;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&[data-size='m'] {
|
|
86
|
+
--t-size: calc(var(--tui-height-m) - 0.25rem);
|
|
87
|
+
--t-radius: 0.75rem;
|
|
88
|
+
|
|
89
|
+
font: var(--tui-font-ui-m);
|
|
90
|
+
font-weight: bold;
|
|
91
|
+
|
|
92
|
+
&._initials::before {
|
|
93
|
+
font: var(--tui-font-body-m);
|
|
94
|
+
font-weight: bold;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&[data-size='xl'] {
|
|
99
|
+
--t-size: 5rem;
|
|
100
|
+
--t-radius: 0.75rem;
|
|
101
|
+
|
|
102
|
+
font: var(--tui-font-heading-h4);
|
|
103
|
+
|
|
104
|
+
&._initials::before {
|
|
105
|
+
font: var(--tui-font-heading-h3);
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&[data-size='xxl'] {
|
|
110
|
+
--t-size: 6rem;
|
|
111
|
+
--t-radius: 1rem;
|
|
112
|
+
|
|
113
|
+
font: var(--tui-font-heading-h3);
|
|
114
|
+
|
|
115
|
+
&._initials::before {
|
|
116
|
+
font: var(--tui-font-heading-h3);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&[data-size='xxxl'] {
|
|
121
|
+
--t-size: 8rem;
|
|
122
|
+
--t-radius: 1.25rem;
|
|
123
|
+
|
|
124
|
+
font: var(--tui-font-heading-h3);
|
|
125
|
+
|
|
126
|
+
&._initials::before {
|
|
127
|
+
font: var(--tui-font-heading-h2);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&:not([data-shape='square']) {
|
|
132
|
+
--t-radius: calc(var(--t-size) / 2);
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&._initials {
|
|
136
|
+
&::before {
|
|
137
|
+
content: attr(data-icon-start);
|
|
138
|
+
mask: none;
|
|
139
|
+
background: none;
|
|
140
|
+
font: var(--tui-font-heading-h6);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&._badge {
|
|
145
|
+
mask: radial-gradient(
|
|
146
|
+
circle at calc(100% - var(--t-corner-offset)) calc(100% - var(--t-corner-offset)),
|
|
147
|
+
black 0.23rem,
|
|
148
|
+
transparent 0.25rem,
|
|
149
|
+
transparent 0.375rem,
|
|
150
|
+
black 0.39rem
|
|
151
|
+
);
|
|
152
|
+
mask-clip: no-clip;
|
|
153
|
+
|
|
154
|
+
&::after {
|
|
155
|
+
content: '';
|
|
156
|
+
position: absolute;
|
|
157
|
+
top: calc(100% - var(--t-corner-offset));
|
|
158
|
+
left: calc(100% - var(--t-corner-offset));
|
|
159
|
+
display: block;
|
|
160
|
+
inline-size: 0.55rem;
|
|
161
|
+
block-size: 0.55rem;
|
|
162
|
+
border-radius: 100%;
|
|
163
|
+
background: var(--t-badge);
|
|
164
|
+
transform: translate3d(-50%, -50%, 0);
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&._fallback {
|
|
169
|
+
img,
|
|
170
|
+
video {
|
|
171
|
+
display: none;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
img,
|
|
176
|
+
video,
|
|
177
|
+
picture {
|
|
178
|
+
.fullsize();
|
|
179
|
+
|
|
180
|
+
object-fit: cover;
|
|
181
|
+
box-sizing: border-box;
|
|
182
|
+
border-radius: inherit;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
&:has(img, video):not(._fallback) {
|
|
186
|
+
background: none;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Badge
|
|
5
|
+
* @selector [tuiBadge]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A basic badge that can be used on it's own or on buttons/links
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'l') ('s' | 'm' | 'l' | 'xl')
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <div[tuiBadge]>99+</div>
|
|
15
|
+
*
|
|
16
|
+
* @see-also
|
|
17
|
+
* Icons, Appearance, Chip, Block
|
|
18
|
+
*/
|
|
19
|
+
[tuiBadge]:where(*&) {
|
|
20
|
+
--t-icon-size: 1rem;
|
|
21
|
+
--t-padding: 0 0.5rem;
|
|
22
|
+
--t-size: var(--tui-height-xs);
|
|
23
|
+
--t-margin: -0.25rem;
|
|
24
|
+
|
|
25
|
+
.button-base();
|
|
26
|
+
|
|
27
|
+
border-radius: 6rem;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
background: #959595;
|
|
30
|
+
color: var(--tui-background-base);
|
|
31
|
+
padding: var(--t-padding);
|
|
32
|
+
block-size: var(--t-size);
|
|
33
|
+
min-inline-size: var(--t-size);
|
|
34
|
+
inline-size: fit-content;
|
|
35
|
+
font: var(--tui-font-body-s);
|
|
36
|
+
|
|
37
|
+
&[tuiStatus]::before {
|
|
38
|
+
inline-size: 0.375rem;
|
|
39
|
+
block-size: 0.375rem;
|
|
40
|
+
margin: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
> tui-icon,
|
|
44
|
+
&[tuiIcons]::before,
|
|
45
|
+
&[tuiIcons]::after {
|
|
46
|
+
font-size: var(--t-icon-size) !important;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-appearance='error'], /* TODO @deprecated remove in v5 */
|
|
50
|
+
&[data-appearance='negative'] {
|
|
51
|
+
--t-status: var(--tui-status-negative);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&[data-appearance='success'], /* TODO @deprecated remove in v5 */
|
|
55
|
+
&[data-appearance='positive'] {
|
|
56
|
+
--t-status: var(--tui-status-positive);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&[data-appearance='warning'] {
|
|
60
|
+
--t-status: var(--tui-status-warning);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
&[data-appearance='info'] {
|
|
64
|
+
--t-status: var(--tui-status-info);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&[data-appearance='neutral'] {
|
|
68
|
+
--t-status: var(--tui-status-neutral);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&[data-size='s'] {
|
|
72
|
+
--t-padding: 0 0.3125rem;
|
|
73
|
+
--t-size: 1rem;
|
|
74
|
+
--t-icon-size: 0.625rem;
|
|
75
|
+
--t-margin: -0.125rem;
|
|
76
|
+
|
|
77
|
+
font: var(--tui-font-ui-2xs);
|
|
78
|
+
line-height: 0.875rem;
|
|
79
|
+
|
|
80
|
+
&[tuiStatus]::before {
|
|
81
|
+
inline-size: 0.25rem;
|
|
82
|
+
block-size: 0.25rem;
|
|
83
|
+
margin-inline-end: -0.125rem;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[data-size='m'] {
|
|
88
|
+
--t-padding: 0 0.375rem;
|
|
89
|
+
--t-size: 1.25rem;
|
|
90
|
+
--t-icon-size: 0.75rem;
|
|
91
|
+
--t-margin: -0.125rem;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&[data-size='xl'] {
|
|
95
|
+
--t-margin: -0.25rem;
|
|
96
|
+
--t-padding: 0 0.75rem;
|
|
97
|
+
--t-size: var(--tui-height-s);
|
|
98
|
+
|
|
99
|
+
font: var(--tui-font-body-m);
|
|
100
|
+
|
|
101
|
+
&[tuiStatus]::before {
|
|
102
|
+
inline-size: 0.5rem;
|
|
103
|
+
block-size: 0.5rem;
|
|
104
|
+
margin-inline-end: -0.125rem;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&[tuiAppearance][data-appearance='error'], /* TODO @deprecated remove in v5 */
|
|
109
|
+
&[tuiAppearance][data-appearance='success'], /* TODO @deprecated remove in v5 */
|
|
110
|
+
&[tuiAppearance][data-appearance='negative'],
|
|
111
|
+
&[tuiAppearance][data-appearance='positive'],
|
|
112
|
+
&[tuiAppearance][data-appearance='warning'],
|
|
113
|
+
&[tuiAppearance][data-appearance='info'],
|
|
114
|
+
&[tuiAppearance][data-appearance='neutral'] {
|
|
115
|
+
color: var(--tui-text-primary);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
img[tuiBadge]:where(*&) {
|
|
120
|
+
padding: 0;
|
|
121
|
+
inline-size: var(--t-size);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
tui-icon[tuiBadge]:where(*&)::before {
|
|
125
|
+
.fullsize();
|
|
126
|
+
|
|
127
|
+
--t-margin: 0;
|
|
128
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Block
|
|
5
|
+
* @selector [tuiBlock]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A general purpose container, typically used for labels and inputs
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'l') ('s' | 'm' | 'l')
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <label tuiBlock>
|
|
15
|
+
* Click me
|
|
16
|
+
* <input tuiBlock />
|
|
17
|
+
* </label>
|
|
18
|
+
*
|
|
19
|
+
* @see-also
|
|
20
|
+
* Icons, Appearance, Link, Button
|
|
21
|
+
*/
|
|
22
|
+
[tuiBlock]:where(*&) {
|
|
23
|
+
--t-height: var(--tui-height-l);
|
|
24
|
+
--t-radius: var(--tui-radius-l);
|
|
25
|
+
|
|
26
|
+
position: relative;
|
|
27
|
+
display: inline-flex;
|
|
28
|
+
gap: 0.75rem;
|
|
29
|
+
color: var(--tui-text-primary);
|
|
30
|
+
border-radius: var(--t-radius);
|
|
31
|
+
min-block-size: var(--t-height);
|
|
32
|
+
margin: 0;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
font: var(--tui-font-body-m);
|
|
37
|
+
padding: var(--tui-padding-l);
|
|
38
|
+
isolation: isolate;
|
|
39
|
+
|
|
40
|
+
&[data-size='s'] {
|
|
41
|
+
gap: 0.5rem;
|
|
42
|
+
font: var(--tui-font-ui-s);
|
|
43
|
+
padding: 0.5rem;
|
|
44
|
+
|
|
45
|
+
--t-height: var(--tui-height-s);
|
|
46
|
+
--t-radius: var(--tui-radius-m);
|
|
47
|
+
|
|
48
|
+
[tuiSubtitle] {
|
|
49
|
+
font: var(--tui-font-ui-2xs);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
[tuiTooltip] {
|
|
53
|
+
margin: 0 0.125rem;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&[data-size='m'] {
|
|
58
|
+
gap: 0.625rem;
|
|
59
|
+
font: var(--tui-font-ui-m);
|
|
60
|
+
padding: var(--tui-padding-m);
|
|
61
|
+
|
|
62
|
+
--t-height: var(--tui-height-m);
|
|
63
|
+
--t-radius: var(--tui-radius-m);
|
|
64
|
+
|
|
65
|
+
input:not([tuiBlock]) {
|
|
66
|
+
margin: 0.125rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
[tuiTooltip] {
|
|
70
|
+
margin: 0.125rem;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
&._disabled {
|
|
75
|
+
pointer-events: none;
|
|
76
|
+
opacity: var(--tui-disabled-opacity);
|
|
77
|
+
|
|
78
|
+
:focus {
|
|
79
|
+
visibility: hidden;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&[data-appearance=''] {
|
|
84
|
+
justify-content: center;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
input[tuiBlock] {
|
|
88
|
+
.fullsize();
|
|
89
|
+
|
|
90
|
+
z-index: -1;
|
|
91
|
+
min-block-size: 0;
|
|
92
|
+
pointer-events: none;
|
|
93
|
+
border-radius: inherit;
|
|
94
|
+
padding: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[tuiAvatar] {
|
|
98
|
+
margin: -0.25rem;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[tuiTitle] {
|
|
102
|
+
flex: 1;
|
|
103
|
+
gap: 0;
|
|
104
|
+
font: inherit;
|
|
105
|
+
color: var(--tui-text-primary);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
[tuiSubtitle] {
|
|
109
|
+
color: var(--tui-text-secondary);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
[tuiTooltip] {
|
|
113
|
+
vertical-align: bottom;
|
|
114
|
+
margin: 0.25rem;
|
|
115
|
+
font-size: 1rem;
|
|
116
|
+
border: none;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Button
|
|
5
|
+
* @selector [tuiButton], [tuiIconButton]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Plain button design, applicable to both links and buttons
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'l') ('xs' | 's' | 'm' | 'l')
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <button tuiButton>Click me</button>
|
|
15
|
+
*
|
|
16
|
+
* @see-also
|
|
17
|
+
* Icons, Appearance, Link
|
|
18
|
+
*/
|
|
19
|
+
[tuiButton]:where(*&),
|
|
20
|
+
[tuiIconButton]:where(*&) {
|
|
21
|
+
--t-size: var(--tui-height-l);
|
|
22
|
+
--t-radius: var(--tui-radius-l);
|
|
23
|
+
--t-gap: 0.25rem;
|
|
24
|
+
--t-padding: 0 1.25rem;
|
|
25
|
+
--t-margin: -0.25rem;
|
|
26
|
+
|
|
27
|
+
.button-base();
|
|
28
|
+
|
|
29
|
+
block-size: var(--t-size);
|
|
30
|
+
justify-content: center;
|
|
31
|
+
border-radius: var(--t-radius);
|
|
32
|
+
padding: var(--t-padding);
|
|
33
|
+
user-select: none;
|
|
34
|
+
cursor: pointer;
|
|
35
|
+
font: var(--tui-font-body-m);
|
|
36
|
+
font-weight: bold;
|
|
37
|
+
|
|
38
|
+
> .t-loader {
|
|
39
|
+
.center-all();
|
|
40
|
+
|
|
41
|
+
.t-text {
|
|
42
|
+
position: absolute;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&[data-size='xs'] {
|
|
47
|
+
--t-size: var(--tui-height-xs);
|
|
48
|
+
--t-radius: var(--tui-radius-xs);
|
|
49
|
+
--t-gap: 0.125rem;
|
|
50
|
+
--t-padding: 0 0.375rem;
|
|
51
|
+
--t-margin: -0.125rem;
|
|
52
|
+
|
|
53
|
+
font: var(--tui-font-body-s);
|
|
54
|
+
|
|
55
|
+
tui-icon,
|
|
56
|
+
&::before,
|
|
57
|
+
&::after {
|
|
58
|
+
font-size: 1rem;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
&[data-size='s'] {
|
|
63
|
+
--t-size: var(--tui-height-s);
|
|
64
|
+
--t-radius: var(--tui-radius-s);
|
|
65
|
+
--t-gap: 0.125rem;
|
|
66
|
+
--t-padding: 0 0.625rem;
|
|
67
|
+
--t-margin: -0.125rem;
|
|
68
|
+
|
|
69
|
+
font: var(--tui-font-body-s);
|
|
70
|
+
|
|
71
|
+
tui-icon,
|
|
72
|
+
&:not([tuiIconButton][data-appearance='icon'], [tuiIconButton][data-appearance^='action-'])::before,
|
|
73
|
+
&:not([tuiIconButton][data-appearance='icon'], [tuiIconButton][data-appearance^='action-'])::after {
|
|
74
|
+
font-size: 1rem;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&[data-size='m'] {
|
|
79
|
+
--t-size: var(--tui-height-m);
|
|
80
|
+
--t-radius: var(--tui-radius-m);
|
|
81
|
+
--t-gap: 0.125rem;
|
|
82
|
+
--t-padding: 0 1rem;
|
|
83
|
+
--t-margin: -0.375rem;
|
|
84
|
+
|
|
85
|
+
font: var(--tui-font-body-m);
|
|
86
|
+
font-weight: bold;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&._loading {
|
|
90
|
+
--tui-disabled-opacity: 1;
|
|
91
|
+
|
|
92
|
+
-webkit-text-fill-color: transparent;
|
|
93
|
+
|
|
94
|
+
> *,
|
|
95
|
+
&::before,
|
|
96
|
+
&::after {
|
|
97
|
+
opacity: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
> .t-loader {
|
|
101
|
+
opacity: 1;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
&[tuiButtonVertical] {
|
|
106
|
+
// StackBlitz changes "0rem" to "0" breaking calc
|
|
107
|
+
--t-margin: ~'0rem' !important;
|
|
108
|
+
--t-line-height: 1rem;
|
|
109
|
+
|
|
110
|
+
flex-direction: column;
|
|
111
|
+
flex-shrink: 1;
|
|
112
|
+
block-size: auto;
|
|
113
|
+
padding: 0.75rem;
|
|
114
|
+
gap: 0.375rem;
|
|
115
|
+
min-inline-size: 5rem;
|
|
116
|
+
white-space: pre-line;
|
|
117
|
+
font: var(--tui-font-ui-s);
|
|
118
|
+
|
|
119
|
+
& > * {
|
|
120
|
+
max-block-size: calc(var(--t-line-height) * 2);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
[tuiIconButton]:where(*&) {
|
|
126
|
+
gap: 0;
|
|
127
|
+
inline-size: var(--t-size);
|
|
128
|
+
min-inline-size: var(--t-size);
|
|
129
|
+
font-size: 0 !important;
|
|
130
|
+
padding: 0;
|
|
131
|
+
|
|
132
|
+
&&[data-icon-start]::after {
|
|
133
|
+
display: none;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Checkbox
|
|
5
|
+
* @selector [tuiCheckbox]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A stylized input type="checkbox"
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'm') ('s' | 'm')
|
|
12
|
+
*
|
|
13
|
+
* @vars
|
|
14
|
+
* --t-icon-start — checkmark icon
|
|
15
|
+
* --t-icon-end — indeterminate state icon
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* <input type="checkbox" tuiCheckbox tuiIcons tuiAppearance data-appearance='secondary' />
|
|
19
|
+
*
|
|
20
|
+
* @see-also
|
|
21
|
+
* Switch, Radio, Appearance
|
|
22
|
+
*/
|
|
23
|
+
[tuiCheckbox]:where(*&) {
|
|
24
|
+
--t-size: 1.5rem;
|
|
25
|
+
--t-radius: var(--tui-radius-s);
|
|
26
|
+
|
|
27
|
+
inline-size: var(--t-size);
|
|
28
|
+
block-size: var(--t-size);
|
|
29
|
+
border-radius: var(--t-radius);
|
|
30
|
+
cursor: pointer;
|
|
31
|
+
margin: 0;
|
|
32
|
+
flex-shrink: 0;
|
|
33
|
+
|
|
34
|
+
&::before {
|
|
35
|
+
position: absolute;
|
|
36
|
+
block-size: 100%;
|
|
37
|
+
inline-size: 100%;
|
|
38
|
+
font-size: 1rem;
|
|
39
|
+
mask-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg"></svg>');
|
|
40
|
+
transform: scale(0);
|
|
41
|
+
transition:
|
|
42
|
+
transform var(--tui-duration) ease-in-out,
|
|
43
|
+
mask 0s var(--tui-duration) ease-in-out;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&::after {
|
|
47
|
+
display: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&:disabled._readonly._readonly {
|
|
51
|
+
opacity: 1;
|
|
52
|
+
pointer-events: none;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:checked,
|
|
56
|
+
&:indeterminate {
|
|
57
|
+
&::before {
|
|
58
|
+
mask-image: var(--t-icon-start);
|
|
59
|
+
transform: scale(1);
|
|
60
|
+
transition:
|
|
61
|
+
transform var(--tui-duration) ease-in-out,
|
|
62
|
+
mask 0s ease-in-out;
|
|
63
|
+
transition-duration: inherit;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
&:indeterminate::before {
|
|
68
|
+
mask-image: var(--t-icon-end);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
&[data-size='s'] {
|
|
72
|
+
--t-size: 1rem;
|
|
73
|
+
--t-radius: var(--tui-radius-xs);
|
|
74
|
+
|
|
75
|
+
&::before {
|
|
76
|
+
font-size: 0.875rem;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:invalid:not([data-mode]),
|
|
81
|
+
&[data-mode~='invalid'] {
|
|
82
|
+
color: #fff;
|
|
83
|
+
}
|
|
84
|
+
}
|