@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,69 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Link
|
|
5
|
+
* @selector [tuiLink]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* Plain link design, applicable to both links and buttons
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <a tuiLink>Click me</a>
|
|
12
|
+
*
|
|
13
|
+
* @see-also
|
|
14
|
+
* Icons, Appearance, Button
|
|
15
|
+
*/
|
|
16
|
+
[tuiLink]:where(*&) {
|
|
17
|
+
.transition(~'color, text-decoration, opacity');
|
|
18
|
+
|
|
19
|
+
padding: 0;
|
|
20
|
+
background: transparent;
|
|
21
|
+
border: none;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
font: inherit;
|
|
24
|
+
color: inherit;
|
|
25
|
+
border-radius: 0.125rem;
|
|
26
|
+
outline-width: 1px;
|
|
27
|
+
outline-offset: -1px;
|
|
28
|
+
text-underline-offset: 0.2em;
|
|
29
|
+
text-decoration: none dashed currentColor 1px;
|
|
30
|
+
text-decoration-color: color-mix(in lch, currentColor, transparent);
|
|
31
|
+
|
|
32
|
+
&::before {
|
|
33
|
+
margin-inline-end: 0.25rem;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&::after {
|
|
37
|
+
margin-inline-start: 0.25rem;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[tuiIcons]::before,
|
|
41
|
+
&[tuiIcons]::after {
|
|
42
|
+
content: '\2060';
|
|
43
|
+
padding: calc(var(--tui-icon-size, 1rem) / 2);
|
|
44
|
+
vertical-align: super;
|
|
45
|
+
font-size: 0;
|
|
46
|
+
line-height: 0;
|
|
47
|
+
box-sizing: border-box;
|
|
48
|
+
mask-size: calc(100% + 10 * var(--tui-stroke-width)) 100%;
|
|
49
|
+
transition: none;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&[tuiChevron]::after {
|
|
53
|
+
display: inline-block;
|
|
54
|
+
vertical-align: initial;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.appearance-hover({
|
|
58
|
+
text-decoration-color: currentColor;
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
.appearance-active({
|
|
62
|
+
text-decoration-color: currentColor;
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
&[data-appearance=''] {
|
|
66
|
+
text-decoration-line: underline;
|
|
67
|
+
text-decoration-style: solid;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Message
|
|
5
|
+
* @selector [tuiMessage]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A message component that can be used on buttons/links/inputs
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <span tuiMessage>Message text</span>
|
|
12
|
+
*
|
|
13
|
+
* @see-also
|
|
14
|
+
* Chip, Badge, Block
|
|
15
|
+
*/
|
|
16
|
+
[tuiMessage]:where(*&) {
|
|
17
|
+
display: inline-flex;
|
|
18
|
+
padding: 0.5rem 0.625rem;
|
|
19
|
+
min-block-size: 2.25rem;
|
|
20
|
+
block-size: auto;
|
|
21
|
+
box-sizing: border-box;
|
|
22
|
+
inline-size: fit-content;
|
|
23
|
+
isolation: isolate;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
text-align: start;
|
|
26
|
+
font: var(--tui-font-ui-m);
|
|
27
|
+
border-radius: var(--tui-radius-l);
|
|
28
|
+
|
|
29
|
+
> [tuiLink] {
|
|
30
|
+
color: inherit !important;
|
|
31
|
+
text-decoration: underline solid !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Notification
|
|
5
|
+
* @selector [tuiNotification]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A colored rounded block of information with optional icon, title, subtitle and actions
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'l') ('s' | 'm' | 'l')
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <div tuiNotification tuiAppearance data-appearance="negative">
|
|
15
|
+
* <span tuiTitle>
|
|
16
|
+
* Error
|
|
17
|
+
* <span tuiSubtitle>Something went wrong</span>
|
|
18
|
+
* </span>
|
|
19
|
+
* </div>
|
|
20
|
+
*
|
|
21
|
+
* @see-also
|
|
22
|
+
* Icons, Appearance
|
|
23
|
+
*/
|
|
24
|
+
[tuiNotification]:where(*&) {
|
|
25
|
+
.button-clear();
|
|
26
|
+
|
|
27
|
+
position: relative;
|
|
28
|
+
display: flow-root;
|
|
29
|
+
max-block-size: 100%;
|
|
30
|
+
color: var(--tui-text-primary);
|
|
31
|
+
padding: 1rem;
|
|
32
|
+
font: var(--tui-font-body-m);
|
|
33
|
+
line-height: 1.5rem;
|
|
34
|
+
border-radius: var(--tui-radius-l);
|
|
35
|
+
box-sizing: border-box;
|
|
36
|
+
text-align: start;
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
border-inline-start: var(--t-start) solid transparent;
|
|
39
|
+
border-inline-end: var(--t-end) solid transparent;
|
|
40
|
+
|
|
41
|
+
.interactive({
|
|
42
|
+
cursor: pointer;
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
--t-start: 0;
|
|
46
|
+
--t-end: 0;
|
|
47
|
+
|
|
48
|
+
&[data-icon-start] {
|
|
49
|
+
--t-start: 2rem;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&[data-icon-end] {
|
|
53
|
+
--t-end: 1.5rem;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&::before {
|
|
57
|
+
position: absolute;
|
|
58
|
+
inset-inline-start: -1rem;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&::after {
|
|
62
|
+
.center-top();
|
|
63
|
+
|
|
64
|
+
inset-inline-end: -0.5rem;
|
|
65
|
+
font-size: 1rem;
|
|
66
|
+
margin: 0;
|
|
67
|
+
margin-inline-end: -0.25rem;
|
|
68
|
+
margin-inline-start: auto;
|
|
69
|
+
color: var(--tui-text-tertiary) !important;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&[data-size='s'] {
|
|
73
|
+
padding: 0.375rem 0.625rem;
|
|
74
|
+
font: var(--tui-font-body-s);
|
|
75
|
+
line-height: 1.25rem;
|
|
76
|
+
border-radius: var(--tui-radius-m);
|
|
77
|
+
|
|
78
|
+
&[data-icon-start] {
|
|
79
|
+
--t-start: 1.5rem;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&::before {
|
|
83
|
+
inset-block-start: 0.5rem;
|
|
84
|
+
inset-inline-start: -0.875rem;
|
|
85
|
+
font-size: 1rem;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&::after {
|
|
89
|
+
inset-inline-end: -0.875rem;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
tui-icon {
|
|
93
|
+
font-size: 1rem;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[tuiTitle] {
|
|
97
|
+
font: var(--tui-font-body-s);
|
|
98
|
+
font-weight: bold;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[tuiSubtitle] {
|
|
102
|
+
font: var(--tui-font-body-s);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
[tuiSubtitle] + * {
|
|
106
|
+
gap: 1rem;
|
|
107
|
+
margin: 0.375rem 0 0.25rem;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
> [tuiIconButton] {
|
|
111
|
+
inset-block-start: 0;
|
|
112
|
+
inset-inline-end: 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&[data-size='m'] {
|
|
117
|
+
padding: 0.75rem;
|
|
118
|
+
font: var(--tui-font-body-s);
|
|
119
|
+
line-height: 1.25rem;
|
|
120
|
+
border-radius: var(--tui-radius-m);
|
|
121
|
+
|
|
122
|
+
&[data-icon-start] {
|
|
123
|
+
--t-start: 1.625rem;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&::before {
|
|
127
|
+
inset-inline-start: -0.875rem;
|
|
128
|
+
font-size: 1.25rem;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
&::after {
|
|
132
|
+
inset-inline-end: -0.75rem;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
tui-icon {
|
|
136
|
+
font-size: 1.25rem;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
[tuiTitle] {
|
|
140
|
+
font: var(--tui-font-ui-m);
|
|
141
|
+
font-weight: bold;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
[tuiSubtitle] {
|
|
145
|
+
font: var(--tui-font-body-s);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
[tuiSubtitle] + * {
|
|
149
|
+
gap: 1rem;
|
|
150
|
+
margin: 0.625rem 0 0.25rem;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
> [tuiIconButton] {
|
|
154
|
+
inset-block-start: 0.375rem;
|
|
155
|
+
inset-inline-end: 0.5rem;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
[tuiTitle] {
|
|
160
|
+
gap: 0.125rem;
|
|
161
|
+
font: var(--tui-font-ui-l);
|
|
162
|
+
font-weight: bold;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[tuiSubtitle] {
|
|
166
|
+
font: var(--tui-font-body-m);
|
|
167
|
+
|
|
168
|
+
+ * {
|
|
169
|
+
display: flex;
|
|
170
|
+
align-items: center;
|
|
171
|
+
gap: 1.25rem;
|
|
172
|
+
margin-block-start: 0.625rem;
|
|
173
|
+
font: var(--tui-font-body-s);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
> [tuiIconButton] {
|
|
178
|
+
position: absolute;
|
|
179
|
+
inset-block-start: 0.75rem;
|
|
180
|
+
inset-inline-end: 0.75rem;
|
|
181
|
+
box-shadow: none !important;
|
|
182
|
+
background: transparent !important;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Pin
|
|
5
|
+
* @selector tui-pin,[tuiPin]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A toggleable pin to be used on maps
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* <button tuiPin><img src="avatar.jpg" /></button>
|
|
12
|
+
*
|
|
13
|
+
* @see-also
|
|
14
|
+
* Compass
|
|
15
|
+
*/
|
|
16
|
+
[tuiPin]:where(*&) {
|
|
17
|
+
--t-size: 2rem;
|
|
18
|
+
|
|
19
|
+
.transition(~'width, height, border, margin');
|
|
20
|
+
.button-clear();
|
|
21
|
+
|
|
22
|
+
position: relative;
|
|
23
|
+
display: flex;
|
|
24
|
+
inline-size: var(--t-size);
|
|
25
|
+
block-size: var(--t-size);
|
|
26
|
+
align-items: stretch;
|
|
27
|
+
flex-direction: column;
|
|
28
|
+
justify-content: center;
|
|
29
|
+
text-align: center;
|
|
30
|
+
border-radius: 100%;
|
|
31
|
+
font: var(--tui-font-body-s);
|
|
32
|
+
font-weight: bold;
|
|
33
|
+
box-sizing: border-box;
|
|
34
|
+
color: var(--tui-text-primary-on-accent-2);
|
|
35
|
+
background: var(--tui-background-accent-2);
|
|
36
|
+
box-shadow: 0 0 0 0.125rem var(--tui-background-elevation-2);
|
|
37
|
+
border: 0 solid var(--tui-background-accent-2);
|
|
38
|
+
transform: translate(-50%, -50%);
|
|
39
|
+
|
|
40
|
+
.interactive({
|
|
41
|
+
cursor: pointer;
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
&:empty {
|
|
45
|
+
--t-size: 0.75rem;
|
|
46
|
+
|
|
47
|
+
&::before {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
> input {
|
|
53
|
+
.fullsize();
|
|
54
|
+
|
|
55
|
+
appearance: none;
|
|
56
|
+
border-radius: 100%;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
> img {
|
|
60
|
+
max-block-size: 100%;
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
border-radius: 100%;
|
|
63
|
+
background: var(--tui-background-base);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
> tui-icon {
|
|
67
|
+
.transition(~'width, height');
|
|
68
|
+
|
|
69
|
+
font-size: 1.25rem;
|
|
70
|
+
align-self: center;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&:has(:checked) {
|
|
74
|
+
--t-size: 3.5rem;
|
|
75
|
+
|
|
76
|
+
font: var(--tui-font-body-m);
|
|
77
|
+
font-weight: bold;
|
|
78
|
+
border-width: 0;
|
|
79
|
+
margin-block-start: -2.75rem;
|
|
80
|
+
|
|
81
|
+
> img {
|
|
82
|
+
padding: 0.125rem;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
> tui-icon {
|
|
86
|
+
font-size: 2.125rem;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&::before {
|
|
90
|
+
transform: scale(0.99) translate(-1.875rem, -1.875rem);
|
|
91
|
+
opacity: 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&::after {
|
|
95
|
+
top: 4.5rem;
|
|
96
|
+
opacity: 1;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// TODO: Fallback until Safari 15.4
|
|
101
|
+
&._open {
|
|
102
|
+
--t-size: 3.5rem;
|
|
103
|
+
|
|
104
|
+
font: var(--tui-font-body-m);
|
|
105
|
+
font-weight: bold;
|
|
106
|
+
border-width: 0;
|
|
107
|
+
margin-block-start: -2.75rem;
|
|
108
|
+
|
|
109
|
+
> img {
|
|
110
|
+
padding: 0.125rem;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
> tui-icon {
|
|
114
|
+
font-size: 2.125rem;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&::before {
|
|
118
|
+
transform: scale(0.99) translate(-1.875rem, -1.875rem);
|
|
119
|
+
opacity: 1;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
&::after {
|
|
123
|
+
top: 4.5rem;
|
|
124
|
+
opacity: 1;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&::before {
|
|
129
|
+
.transition(~'transform, opacity');
|
|
130
|
+
|
|
131
|
+
content: '';
|
|
132
|
+
position: absolute;
|
|
133
|
+
top: 50%;
|
|
134
|
+
left: 50%;
|
|
135
|
+
right: -0.25rem;
|
|
136
|
+
bottom: -0.625rem;
|
|
137
|
+
box-sizing: border-box;
|
|
138
|
+
border-width: 2.2rem 2rem;
|
|
139
|
+
border-style: solid;
|
|
140
|
+
border-color: inherit;
|
|
141
|
+
opacity: 0;
|
|
142
|
+
transform: scale(0.57) translate(-1.875rem, -1.875rem);
|
|
143
|
+
transform-origin: top left;
|
|
144
|
+
pointer-events: none;
|
|
145
|
+
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
|
+
no-repeat;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
&::after {
|
|
150
|
+
.transition(~'top, opacity');
|
|
151
|
+
|
|
152
|
+
content: '';
|
|
153
|
+
position: absolute;
|
|
154
|
+
top: 50%;
|
|
155
|
+
left: 50%;
|
|
156
|
+
border: 0.1875rem solid currentColor;
|
|
157
|
+
border-color: inherit;
|
|
158
|
+
border-radius: 100%;
|
|
159
|
+
box-sizing: border-box;
|
|
160
|
+
box-shadow: inherit;
|
|
161
|
+
transform: translate(-50%, -50%);
|
|
162
|
+
opacity: 0;
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name ProgressBar
|
|
5
|
+
* @selector [tuiProgressBar]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A stylized native progress element
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'm') ('xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' )
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <progress tuiProgressBar value="33"></progress>
|
|
15
|
+
*/
|
|
16
|
+
.clearProgress() {
|
|
17
|
+
-webkit-appearance: none;
|
|
18
|
+
-moz-appearance: none;
|
|
19
|
+
appearance: none;
|
|
20
|
+
border: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/* used to style inner value bar */
|
|
24
|
+
.progressValue(@ruleset) {
|
|
25
|
+
&::-webkit-progress-value {
|
|
26
|
+
@ruleset(); // Chromium Edge | Chrome | Opera | Safari
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&::-moz-progress-bar {
|
|
30
|
+
@ruleset(); // Mozilla
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/*
|
|
35
|
+
* Edge and IE animate the progress bar right out of the box
|
|
36
|
+
* Chrome | Opera | Safari animation is controlled by its mixins
|
|
37
|
+
* No possibility for firefox animation (https://snook.ca/archives/html_and_css/animating-progress)
|
|
38
|
+
*/
|
|
39
|
+
.progressAnimation() {
|
|
40
|
+
&::-webkit-progress-value {
|
|
41
|
+
transition: inline-size var(--tui-duration) linear;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@keyframes tuiIndeterminateAnimation {
|
|
46
|
+
50% {
|
|
47
|
+
background-position: left;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
[tuiProgressBar]:where(*&) {
|
|
52
|
+
@track-color: var(--tui-background-neutral-2);
|
|
53
|
+
@progress-color: var(--tui-progress-color, currentColor);
|
|
54
|
+
|
|
55
|
+
.clearProgress();
|
|
56
|
+
.progressAnimation();
|
|
57
|
+
.progressValue({ background: @progress-color; border-radius: inherit });
|
|
58
|
+
|
|
59
|
+
--t-height: 0.75rem;
|
|
60
|
+
|
|
61
|
+
display: block;
|
|
62
|
+
inline-size: 100%;
|
|
63
|
+
block-size: var(--t-height);
|
|
64
|
+
color: var(--tui-background-accent-1);
|
|
65
|
+
background: @track-color;
|
|
66
|
+
clip-path: inset(0 0.5px round var(--tui-radius-m)); // 0.5px is a hack to prevent jagged edges on low dpi screens
|
|
67
|
+
overflow: hidden;
|
|
68
|
+
border-radius: 1rem;
|
|
69
|
+
flex-shrink: 0;
|
|
70
|
+
|
|
71
|
+
&[data-size='xxs'] {
|
|
72
|
+
--t-height: 0.125rem;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[data-size='xs'] {
|
|
76
|
+
--t-height: 0.25rem;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&[data-size='s'] {
|
|
80
|
+
--t-height: 0.5rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&[data-size='l'] {
|
|
84
|
+
--t-height: 1rem;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&[data-size='xl'] {
|
|
88
|
+
--t-height: 1.25rem;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
&[data-size='xxl'] {
|
|
92
|
+
--t-height: 1.5rem;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&:indeterminate {
|
|
96
|
+
.progressValue({ background: transparent });
|
|
97
|
+
|
|
98
|
+
background: linear-gradient(to right, @track-color 0 45%, @progress-color 45% 55%, @track-color 55% 100%) right;
|
|
99
|
+
background-size: 225%;
|
|
100
|
+
animation: tuiIndeterminateAnimation 3s infinite ease-in-out;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&::-webkit-progress-inner-element {
|
|
104
|
+
border-radius: inherit;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&::-webkit-progress-bar {
|
|
108
|
+
background: transparent;
|
|
109
|
+
border-radius: inherit;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
label[tuiProgressLabel] &:not(:first-child) {
|
|
113
|
+
.fullsize();
|
|
114
|
+
|
|
115
|
+
background: transparent;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
@import '@taiga-ui/styles/utils.less';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* @name Radio
|
|
5
|
+
* @selector [tuiRadio]
|
|
6
|
+
*
|
|
7
|
+
* @description
|
|
8
|
+
* A stylized input type="radio"
|
|
9
|
+
*
|
|
10
|
+
* @attributes
|
|
11
|
+
* data-size — size (default: 'm') ('s' | 'm')
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* <input type="radio" tuiRadio />
|
|
15
|
+
*
|
|
16
|
+
* @see-also
|
|
17
|
+
* Checkbox, Switch, Appearance
|
|
18
|
+
*/
|
|
19
|
+
[tuiRadio]:where(*&) {
|
|
20
|
+
--t-size: 1.5rem;
|
|
21
|
+
|
|
22
|
+
.transition(~'background, box-shadow');
|
|
23
|
+
|
|
24
|
+
inline-size: var(--t-size);
|
|
25
|
+
block-size: var(--t-size);
|
|
26
|
+
cursor: pointer;
|
|
27
|
+
margin: 0;
|
|
28
|
+
flex-shrink: 0;
|
|
29
|
+
border-radius: 100%;
|
|
30
|
+
color: var(--tui-text-primary-on-accent-1);
|
|
31
|
+
|
|
32
|
+
&:disabled._readonly._readonly {
|
|
33
|
+
opacity: 1;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&::before {
|
|
37
|
+
.fullsize(absolute, inset);
|
|
38
|
+
|
|
39
|
+
content: '';
|
|
40
|
+
margin: auto;
|
|
41
|
+
border-radius: 100%;
|
|
42
|
+
background: currentColor;
|
|
43
|
+
transform: scale(0);
|
|
44
|
+
transition-property: transform;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&:checked::before {
|
|
48
|
+
transform: scale(0.5);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&[data-size='s'] {
|
|
52
|
+
--t-size: 1rem;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&:invalid:not([data-mode]),
|
|
56
|
+
&[data-mode~='invalid'] {
|
|
57
|
+
color: #fff;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @name Status
|
|
3
|
+
* @selector [tuiStatus]
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* An indicator of a status with a color dot
|
|
7
|
+
*
|
|
8
|
+
* @vars
|
|
9
|
+
* --t-status — color of the dot
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* <span tuiStatus style="--t-status: green">Success</span>
|
|
13
|
+
*
|
|
14
|
+
* @see-also
|
|
15
|
+
* Badge, Chip
|
|
16
|
+
*/
|
|
17
|
+
[tuiStatus]:where(*&) {
|
|
18
|
+
display: inline-flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
gap: 0.5rem;
|
|
21
|
+
|
|
22
|
+
&::before {
|
|
23
|
+
content: '';
|
|
24
|
+
display: var(--t-status, none);
|
|
25
|
+
inline-size: 0.5rem;
|
|
26
|
+
block-size: 0.5rem;
|
|
27
|
+
border-radius: 100%;
|
|
28
|
+
background: var(--t-status);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&[data-size='s'],
|
|
32
|
+
&[data-size='m'],
|
|
33
|
+
&[data-size='l'] {
|
|
34
|
+
gap: 0.25rem;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&[data-size='xl'] {
|
|
38
|
+
gap: 0.375rem;
|
|
39
|
+
}
|
|
40
|
+
}
|