@itwin/itwinui-css 0.55.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/all.css +416 -273
- package/css/inputs.css +18 -168
- package/css/radio-tile.css +221 -0
- package/css/tabs.css +4 -0
- package/css/text.css +9 -3
- package/css/toast-notification.css +1 -1
- package/css/toggle-switch.css +65 -0
- package/package.json +1 -1
- package/scss/classes.scss +3 -2
- package/scss/index.scss +3 -2
- package/scss/inputs/checkbox.scss +11 -6
- package/scss/inputs/classes.scss +0 -4
- package/scss/inputs/index.scss +0 -1
- package/scss/inputs/labeled-inputs.scss +1 -1
- package/scss/radio-tile/classes.scss +31 -0
- package/scss/radio-tile/index.scss +3 -0
- package/scss/radio-tile/radio-tile.scss +214 -0
- package/scss/tabs/tabs.scss +6 -0
- package/scss/text/skeleton.scss +13 -7
- package/scss/toast-notification/classes.scss +1 -1
- package/scss/toggle-switch/toggle-switch.scss +50 -2
- package/scss/inputs/radio-tile.scss +0 -200
|
@@ -66,6 +66,13 @@
|
|
|
66
66
|
|
|
67
67
|
@include iui-focus($thickness: 2px);
|
|
68
68
|
|
|
69
|
+
&:disabled {
|
|
70
|
+
--_iui-checkbox-svg-color: var(--iui-icons-color-actionable-disabled);
|
|
71
|
+
--_iui-checkbox-border-color: var(--iui-color-background-border);
|
|
72
|
+
--_iui-checkbox-background-color: var(--iui-color-background-disabled);
|
|
73
|
+
cursor: not-allowed;
|
|
74
|
+
}
|
|
75
|
+
|
|
69
76
|
&.iui-checkbox-visibility {
|
|
70
77
|
--_iui-checkbox-checkmark-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m8 2.99051a8.81883 8.81883 0 0 0 -8 4.95062 8.74664 8.74664 0 0 0 8 5.06836 8.63266 8.63266 0 0 0 8-5.06836 8.83631 8.83631 0 0 0 -8-4.95062zm-1.31445 1.86981a1.47663 1.47663 0 1 1 -1.47663 1.47668 1.47665 1.47665 0 0 1 1.47663-1.47668zm1.31445 6.64917a7.17486 7.17486 0 0 1 -6.30475-3.55237 7.4952 7.4952 0 0 1 2.81475-2.6336 3.83956 3.83956 0 1 0 6.98126.00244 7.522 7.522 0 0 1 2.81774 2.63916 7.09785 7.09785 0 0 1 -6.309 3.54437z" /></svg>');
|
|
71
78
|
--_iui-checkbox-indeterminate-svg: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="m8 3v7.9a4.01179 4.01179 0 0 0 4-4 6.7509 6.7509 0 0 0 -.2-1.4l.1.1a6.89429 6.89429 0 0 1 2.4 2.4 8.39088 8.39088 0 0 1 -2.3 2.3 6.89412 6.89412 0 0 1 -3.9 1.2c-.03345 0-.06653-.00677-.1-.0072v1.5072a8.90686 8.90686 0 0 0 8-5 8.90686 8.90686 0 0 0 -8-5z" opacity=".33" /><path d="m8 0a1 1 0 0 0 -1 1v2.07135a8.91637 8.91637 0 0 0 -7 4.92865 8.91637 8.91637 0 0 0 7 4.92865v2.07135a1 1 0 0 0 2 0v-14a1 1 0 0 0 -1-1zm-1.5 4.9a1.55426 1.55426 0 0 1 .5.087v2.81451a1.40746 1.40746 0 0 1 -.5.09849 1.538 1.538 0 0 1 -1.5-1.5 1.53794 1.53794 0 0 1 1.5-1.5zm-2.3 5.4a6.97279 6.97279 0 0 1 -2.5-2.3 6.89429 6.89429 0 0 1 2.4-2.4c.1 0 .1-.1.2-.1a3.194 3.194 0 0 0 -.3 1.4 4.0047 4.0047 0 0 0 3 3.857v.65289a6.37491 6.37491 0 0 1 -2.8-1.10989z" /></svg>');
|
|
@@ -82,13 +89,11 @@
|
|
|
82
89
|
--_iui-checkbox-border-color: transparent;
|
|
83
90
|
--_iui-checkbox-background-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-6));
|
|
84
91
|
}
|
|
85
|
-
}
|
|
86
92
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
cursor: not-allowed;
|
|
93
|
+
&:where(:disabled) {
|
|
94
|
+
--_iui-checkbox-svg-color: var(--iui-icons-color-actionable-disabled);
|
|
95
|
+
--_iui-checkbox-background-color: var(--iui-color-background-disabled);
|
|
96
|
+
}
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
&.iui-loading {
|
package/scss/inputs/classes.scss
CHANGED
package/scss/inputs/index.scss
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
// Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
2
|
+
// See LICENSE.md in the project root for license terms and full copyright notice.
|
|
3
|
+
@import './index';
|
|
4
|
+
|
|
5
|
+
.iui-radio-tile {
|
|
6
|
+
@include iui-radio-tile;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.iui-radio-tile-content {
|
|
10
|
+
@include iui-radio-tile-content;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.iui-radio-tile-container {
|
|
14
|
+
@include iui-radio-tile-container;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.iui-radio-tile-input {
|
|
18
|
+
@include iui-radio-tile-input;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.iui-radio-tile-icon {
|
|
22
|
+
@include iui-radio-tile-icon;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.iui-radio-tile-label {
|
|
26
|
+
@include iui-radio-tile-label;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.iui-radio-tile-sublabel {
|
|
30
|
+
@include iui-radio-tile-sublabel;
|
|
31
|
+
}
|
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
2
|
+
// See LICENSE.md in the project root for license terms and full copyright notice.
|
|
3
|
+
@import '../style/index';
|
|
4
|
+
@import '../icon/index';
|
|
5
|
+
|
|
6
|
+
@mixin iui-radio-tile {
|
|
7
|
+
cursor: pointer;
|
|
8
|
+
@include themed {
|
|
9
|
+
-webkit-tap-highlight-color: rgba(t(iui-color-foreground-primary-rgb), t(iui-opacity-6));
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:first-of-type > .iui-radio-tile-content {
|
|
13
|
+
border-radius: $iui-border-radius 0 0 $iui-border-radius;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:last-of-type > .iui-radio-tile-content {
|
|
17
|
+
border-radius: 0 $iui-border-radius $iui-border-radius 0;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:not(:first-of-type) > .iui-radio-tile-content {
|
|
21
|
+
margin-left: -1px;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
@mixin iui-radio-tile-content {
|
|
25
|
+
width: $iui-xl * 5;
|
|
26
|
+
height: 100%;
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
padding: $iui-s;
|
|
29
|
+
position: relative;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
32
|
+
transition: border-color $iui-speed-fast ease-out;
|
|
33
|
+
}
|
|
34
|
+
@include themed {
|
|
35
|
+
border: 1px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
|
|
36
|
+
background-color: t(iui-color-background-1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&:hover {
|
|
40
|
+
z-index: 2;
|
|
41
|
+
@include themed {
|
|
42
|
+
border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
svg {
|
|
46
|
+
@media (forced-colors: active) {
|
|
47
|
+
fill: CanvasText;
|
|
48
|
+
}
|
|
49
|
+
@include themed {
|
|
50
|
+
fill: t(iui-icons-color-actionable);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin iui-radio-tile-container {
|
|
57
|
+
display: inline-flex;
|
|
58
|
+
flex-wrap: wrap;
|
|
59
|
+
user-select: none;
|
|
60
|
+
// Create stacking context
|
|
61
|
+
position: relative;
|
|
62
|
+
z-index: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@mixin iui-radio-tile-input {
|
|
66
|
+
width: 0;
|
|
67
|
+
height: 0;
|
|
68
|
+
appearance: none;
|
|
69
|
+
opacity: 0;
|
|
70
|
+
position: absolute;
|
|
71
|
+
@include focus-visible {
|
|
72
|
+
+ * {
|
|
73
|
+
outline-offset: -4px;
|
|
74
|
+
@media (forced-colors: active) {
|
|
75
|
+
outline-color: Highlight;
|
|
76
|
+
}
|
|
77
|
+
@include themed {
|
|
78
|
+
outline: 2px solid t(iui-color-foreground-primary);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&:checked + * {
|
|
84
|
+
padding: $iui-s - 1;
|
|
85
|
+
z-index: 3;
|
|
86
|
+
@media (forced-colors: active) {
|
|
87
|
+
border-color: Highlight;
|
|
88
|
+
}
|
|
89
|
+
@include themed {
|
|
90
|
+
border: 2px solid t(iui-color-foreground-primary);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
svg {
|
|
94
|
+
@media (forced-colors: active) {
|
|
95
|
+
fill: Highlight;
|
|
96
|
+
}
|
|
97
|
+
@include themed {
|
|
98
|
+
fill: t(iui-icons-color-primary);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
&::after {
|
|
103
|
+
content: '';
|
|
104
|
+
width: $iui-icons-default;
|
|
105
|
+
height: $iui-icons-default;
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: $iui-s;
|
|
108
|
+
right: $iui-s;
|
|
109
|
+
mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M6,14L0,8l2-2l4,4l8-8l2,2L6,14z" /></svg>');
|
|
110
|
+
@media (forced-colors: active) {
|
|
111
|
+
background-color: Highlight;
|
|
112
|
+
}
|
|
113
|
+
@include themed {
|
|
114
|
+
background-color: t(iui-color-foreground-primary);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&:disabled + * {
|
|
120
|
+
cursor: not-allowed;
|
|
121
|
+
z-index: 0;
|
|
122
|
+
@include themed {
|
|
123
|
+
border-color: t(iui-color-background-disabled);
|
|
124
|
+
background-color: t(iui-color-background-disabled);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&::after {
|
|
128
|
+
@media (forced-colors: active) {
|
|
129
|
+
background-color: GrayText;
|
|
130
|
+
}
|
|
131
|
+
@include themed {
|
|
132
|
+
background-color: t(iui-icons-color-actionable-disabled);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
svg {
|
|
137
|
+
@media (forced-colors: active) {
|
|
138
|
+
fill: GrayText;
|
|
139
|
+
}
|
|
140
|
+
@include themed {
|
|
141
|
+
fill: t(iui-icons-color-actionable-disabled);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.iui-radio-tile-icon {
|
|
146
|
+
filter: $iui-icons-color-multicolor-disabled;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.iui-radio-tile-label,
|
|
150
|
+
.iui-radio-tile-sublabel {
|
|
151
|
+
@media (forced-colors: active) {
|
|
152
|
+
color: GrayText;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.iui-radio-tile-label {
|
|
157
|
+
@include themed {
|
|
158
|
+
color: t(iui-text-color-muted);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&:disabled:checked + * {
|
|
164
|
+
z-index: 3;
|
|
165
|
+
@media (forced-colors: active) {
|
|
166
|
+
border-color: GrayText;
|
|
167
|
+
}
|
|
168
|
+
@include themed {
|
|
169
|
+
border: 2px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
@mixin iui-radio-tile-icon {
|
|
175
|
+
width: $iui-icons-xl;
|
|
176
|
+
height: $iui-icons-xl;
|
|
177
|
+
display: block;
|
|
178
|
+
margin: 0 auto;
|
|
179
|
+
padding-top: round($iui-baseline * 0.5);
|
|
180
|
+
padding-bottom: $iui-baseline;
|
|
181
|
+
|
|
182
|
+
svg {
|
|
183
|
+
@media (prefers-reduced-motion: no-preference) {
|
|
184
|
+
transition: fill $iui-speed-fast ease-out;
|
|
185
|
+
}
|
|
186
|
+
@media (forced-colors: active) {
|
|
187
|
+
fill: CanvasText;
|
|
188
|
+
}
|
|
189
|
+
@include themed {
|
|
190
|
+
fill: t(iui-icons-color);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
@mixin iui-radio-tile-label {
|
|
196
|
+
font-size: $iui-font-size;
|
|
197
|
+
font-weight: $iui-font-weight-semibold;
|
|
198
|
+
line-height: $iui-line-height;
|
|
199
|
+
text-align: center;
|
|
200
|
+
word-break: break-word;
|
|
201
|
+
@include themed {
|
|
202
|
+
color: t(iui-text-color);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
@mixin iui-radio-tile-sublabel {
|
|
207
|
+
font-size: $iui-font-size-small;
|
|
208
|
+
line-height: round($iui-baseline * 1.375);
|
|
209
|
+
text-align: center;
|
|
210
|
+
word-break: break-word;
|
|
211
|
+
@include themed {
|
|
212
|
+
color: t(iui-text-color-muted);
|
|
213
|
+
}
|
|
214
|
+
}
|
package/scss/tabs/tabs.scss
CHANGED
package/scss/text/skeleton.scss
CHANGED
|
@@ -7,17 +7,23 @@
|
|
|
7
7
|
user-select: none;
|
|
8
8
|
color: transparent;
|
|
9
9
|
border-radius: $iui-border-radius;
|
|
10
|
+
cursor: progress;
|
|
10
11
|
|
|
11
12
|
@include themed {
|
|
12
13
|
background: linear-gradient(
|
|
13
|
-
|
|
14
|
-
t(iui-color-
|
|
15
|
-
t(iui-color-
|
|
16
|
-
t(iui-color-
|
|
17
|
-
t(iui-color-
|
|
18
|
-
t(iui-color-
|
|
14
|
+
292deg,
|
|
15
|
+
t(iui-text-color-muted),
|
|
16
|
+
t(iui-text-color-muted),
|
|
17
|
+
t(iui-text-color-placeholder),
|
|
18
|
+
t(iui-text-color-muted),
|
|
19
|
+
t(iui-text-color-muted)
|
|
19
20
|
);
|
|
20
|
-
|
|
21
|
+
}
|
|
22
|
+
background-size: 200% 100%;
|
|
23
|
+
|
|
24
|
+
@media (forced-colors: active) {
|
|
25
|
+
forced-color-adjust: none;
|
|
26
|
+
background: linear-gradient(292deg, CanvasText, CanvasText, Canvas, CanvasText, CanvasText);
|
|
21
27
|
}
|
|
22
28
|
|
|
23
29
|
@media (prefers-reduced-motion: no-preference) {
|
|
@@ -30,6 +30,9 @@
|
|
|
30
30
|
@include themed {
|
|
31
31
|
color: t(iui-text-color-muted);
|
|
32
32
|
}
|
|
33
|
+
@media (forced-colors: active) {
|
|
34
|
+
color: GrayText;
|
|
35
|
+
}
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
// For labels on the left
|
|
@@ -92,14 +95,24 @@
|
|
|
92
95
|
// #region Unchecked toggle switch
|
|
93
96
|
background-color: var(--iui-color-background-1);
|
|
94
97
|
border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-4));
|
|
98
|
+
@media (forced-colors: active) {
|
|
99
|
+
border-color: CanvasText;
|
|
100
|
+
}
|
|
95
101
|
|
|
96
102
|
&::after {
|
|
97
103
|
background-color: var(--iui-color-foreground-body);
|
|
98
104
|
opacity: var(--iui-opacity-2);
|
|
105
|
+
@media (forced-colors: active) {
|
|
106
|
+
background-color: CanvasText;
|
|
107
|
+
opacity: 1;
|
|
108
|
+
}
|
|
99
109
|
}
|
|
100
110
|
|
|
101
111
|
&:hover {
|
|
102
112
|
border-color: rgba(var(--iui-color-foreground-body-rgb), var(--iui-opacity-2));
|
|
113
|
+
@media (forced-colors: active) {
|
|
114
|
+
border-color: CanvasText;
|
|
115
|
+
}
|
|
103
116
|
}
|
|
104
117
|
|
|
105
118
|
@include focus-visible {
|
|
@@ -111,11 +124,19 @@
|
|
|
111
124
|
&:checked {
|
|
112
125
|
background-color: var(--iui-color-background-primary);
|
|
113
126
|
border-color: var(--iui-color-background-primary);
|
|
127
|
+
@media (forced-colors: active) {
|
|
128
|
+
background-color: Highlight;
|
|
129
|
+
border-color: Highlight;
|
|
130
|
+
}
|
|
114
131
|
|
|
115
132
|
&::after {
|
|
116
133
|
transform: translateX($iui-toggle-switch-handle-size + $iui-toggle-switch-handle-offset);
|
|
117
134
|
background-color: var(--iui-color-foreground-accessory);
|
|
118
135
|
opacity: var(--iui-opacity-2);
|
|
136
|
+
@media (forced-colors: active) {
|
|
137
|
+
background-color: HighlightText;
|
|
138
|
+
opacity: 1;
|
|
139
|
+
}
|
|
119
140
|
}
|
|
120
141
|
|
|
121
142
|
~ .iui-toggle-switch-icon {
|
|
@@ -141,10 +162,18 @@
|
|
|
141
162
|
cursor: not-allowed;
|
|
142
163
|
background-color: var(--iui-color-background-disabled);
|
|
143
164
|
border-color: var(--iui-color-background-disabled);
|
|
165
|
+
@media (forced-colors: active) {
|
|
166
|
+
border-color: GrayText;
|
|
167
|
+
}
|
|
144
168
|
|
|
145
169
|
&::after {
|
|
146
170
|
background-color: var(--iui-color-foreground-body);
|
|
147
171
|
opacity: var(--iui-opacity-5);
|
|
172
|
+
|
|
173
|
+
@media (forced-colors: active) {
|
|
174
|
+
background-color: GrayText;
|
|
175
|
+
opacity: 0.75;
|
|
176
|
+
}
|
|
148
177
|
}
|
|
149
178
|
|
|
150
179
|
~ .iui-toggle-switch-icon {
|
|
@@ -152,8 +181,24 @@
|
|
|
152
181
|
fill: var(--iui-icons-color-actionable);
|
|
153
182
|
}
|
|
154
183
|
|
|
155
|
-
&:checked
|
|
156
|
-
|
|
184
|
+
&:checked {
|
|
185
|
+
@media (forced-colors: active) {
|
|
186
|
+
background-color: GrayText;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
&::after {
|
|
190
|
+
@media (forced-colors: active) {
|
|
191
|
+
background-color: Canvas;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
~ .iui-toggle-switch-icon {
|
|
196
|
+
opacity: var(--iui-opacity-5);
|
|
197
|
+
@media (forced-colors: active) {
|
|
198
|
+
fill: Canvas;
|
|
199
|
+
opacity: 0.75;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
157
202
|
}
|
|
158
203
|
}
|
|
159
204
|
// #endregion Disabled toggle switch
|
|
@@ -170,5 +215,8 @@
|
|
|
170
215
|
transition: opacity $iui-speed-fast ease-out;
|
|
171
216
|
pointer-events: none;
|
|
172
217
|
fill: var(--iui-color-foreground-accessory);
|
|
218
|
+
@media (forced-colors: active) {
|
|
219
|
+
fill: HighlightText;
|
|
220
|
+
}
|
|
173
221
|
}
|
|
174
222
|
}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
// Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
2
|
-
// See LICENSE.md in the project root for license terms and full copyright notice.
|
|
3
|
-
@import '../style/index';
|
|
4
|
-
@import '../icon/index';
|
|
5
|
-
|
|
6
|
-
@mixin iui-radio-tile {
|
|
7
|
-
display: inline-flex;
|
|
8
|
-
flex-wrap: wrap;
|
|
9
|
-
width: fit-content;
|
|
10
|
-
user-select: none;
|
|
11
|
-
// Create stacking context
|
|
12
|
-
position: relative;
|
|
13
|
-
z-index: 0;
|
|
14
|
-
|
|
15
|
-
> label {
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
|
|
18
|
-
> input {
|
|
19
|
-
width: 0;
|
|
20
|
-
height: 0;
|
|
21
|
-
appearance: none;
|
|
22
|
-
opacity: 0;
|
|
23
|
-
position: absolute;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Radio tile styling
|
|
27
|
-
> .iui-radio-tile {
|
|
28
|
-
width: $iui-xl * 5;
|
|
29
|
-
height: 100%;
|
|
30
|
-
box-sizing: border-box;
|
|
31
|
-
padding: $iui-s;
|
|
32
|
-
position: relative;
|
|
33
|
-
z-index: 1;
|
|
34
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
35
|
-
transition: border-color $iui-speed-fast ease-out;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
@include themed {
|
|
39
|
-
border: 1px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
|
|
40
|
-
background-color: t(iui-color-background-1);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
> .iui-icon {
|
|
44
|
-
width: $iui-icons-xl;
|
|
45
|
-
height: $iui-icons-xl;
|
|
46
|
-
display: block;
|
|
47
|
-
margin: 0 auto;
|
|
48
|
-
margin-top: round($iui-baseline * 0.5);
|
|
49
|
-
margin-bottom: $iui-baseline;
|
|
50
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
51
|
-
transition: fill $iui-speed-fast ease-out;
|
|
52
|
-
}
|
|
53
|
-
@include themed {
|
|
54
|
-
fill: t(iui-icons-color);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
> .iui-checkmark {
|
|
59
|
-
display: none;
|
|
60
|
-
width: $iui-icons-default;
|
|
61
|
-
height: $iui-icons-default;
|
|
62
|
-
position: absolute;
|
|
63
|
-
right: $iui-s;
|
|
64
|
-
|
|
65
|
-
@include themed {
|
|
66
|
-
fill: t(iui-icons-color-primary);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
> .iui-label {
|
|
71
|
-
font-size: $iui-font-size;
|
|
72
|
-
font-weight: $iui-font-weight-semibold;
|
|
73
|
-
line-height: $iui-line-height;
|
|
74
|
-
text-align: center;
|
|
75
|
-
|
|
76
|
-
@include themed {
|
|
77
|
-
color: t(iui-text-color);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
> .iui-description {
|
|
82
|
-
font-size: $iui-font-size-small;
|
|
83
|
-
line-height: round($iui-baseline * 1.375);
|
|
84
|
-
text-align: center;
|
|
85
|
-
|
|
86
|
-
@include themed {
|
|
87
|
-
color: t(iui-text-color-muted);
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Rounded corners on first tile
|
|
93
|
-
&:first-child > .iui-radio-tile {
|
|
94
|
-
border-radius: $iui-border-radius 0 0 $iui-border-radius;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
// Rounded corners on last tile
|
|
98
|
-
&:last-child > .iui-radio-tile {
|
|
99
|
-
border-radius: 0 $iui-border-radius $iui-border-radius 0;
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
// All tiles shift 1px left so we don't have 2px thick dividers
|
|
103
|
-
&:not(:first-child) > .iui-radio-tile {
|
|
104
|
-
margin-left: -1px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
// Adds focus to enabled radio tiles
|
|
108
|
-
input:enabled {
|
|
109
|
-
&:focus ~ .iui-radio-tile {
|
|
110
|
-
@include themed {
|
|
111
|
-
outline: 2px solid t(iui-color-foreground-primary);
|
|
112
|
-
outline-offset: -4px;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
&:focus:not(:focus-visible) ~ .iui-radio-tile {
|
|
117
|
-
outline: none;
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
// Adds hover to everything that is not checked or disabled
|
|
122
|
-
&:hover > input:enabled:not(:checked) ~ .iui-radio-tile {
|
|
123
|
-
z-index: 2;
|
|
124
|
-
@include themed {
|
|
125
|
-
border-color: rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-2));
|
|
126
|
-
}
|
|
127
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
128
|
-
transition: border-color $iui-speed-fast ease-out;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
> .iui-icon {
|
|
132
|
-
@include themed {
|
|
133
|
-
fill: t(iui-icons-color-actionable);
|
|
134
|
-
}
|
|
135
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
136
|
-
transition: fill $iui-speed-fast ease-out;
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Styles checked radio tile
|
|
142
|
-
input:checked ~ .iui-radio-tile {
|
|
143
|
-
padding: $iui-s - 1;
|
|
144
|
-
z-index: 3;
|
|
145
|
-
|
|
146
|
-
@include themed {
|
|
147
|
-
border: 2px solid t(iui-color-foreground-primary);
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
> .iui-icon {
|
|
151
|
-
@include themed {
|
|
152
|
-
fill: t(iui-icons-color-primary);
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
> .iui-checkmark {
|
|
157
|
-
display: inline-block;
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
// Styles disabled radio tile
|
|
162
|
-
input:disabled ~ .iui-radio-tile {
|
|
163
|
-
cursor: not-allowed;
|
|
164
|
-
z-index: 0;
|
|
165
|
-
|
|
166
|
-
@include themed {
|
|
167
|
-
border-color: t(iui-color-background-disabled);
|
|
168
|
-
background-color: t(iui-color-background-disabled);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
> .iui-checkmark {
|
|
172
|
-
@include themed {
|
|
173
|
-
fill: t(iui-icons-color-actionable-disabled);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
> .iui-icon {
|
|
178
|
-
@include themed {
|
|
179
|
-
fill: t(iui-icons-color-actionable-disabled);
|
|
180
|
-
}
|
|
181
|
-
filter: $iui-icons-color-multicolor-disabled;
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
> .iui-label {
|
|
185
|
-
@include themed {
|
|
186
|
-
color: t(iui-text-color-muted);
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
// Styles disabled checked radio tile
|
|
192
|
-
input:disabled:checked ~ .iui-radio-tile {
|
|
193
|
-
z-index: 3;
|
|
194
|
-
|
|
195
|
-
@include themed {
|
|
196
|
-
border: 2px solid rgba(t(iui-color-foreground-body-rgb), t(iui-opacity-4));
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
}
|
|
200
|
-
}
|