@carbon/styles 1.113.0 → 1.114.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/styles.css +2167 -536
- package/css/styles.min.css +1 -1
- package/index.scss +2 -1
- package/package.json +9 -9
- package/scss/__tests__/__snapshots__/border-radius-test.js.snap +24 -0
- package/scss/__tests__/__snapshots__/colors-test.js.snap +1 -1
- package/scss/__tests__/__snapshots__/config-test.js.snap +1 -1
- package/scss/__tests__/__snapshots__/spacing-test.js.snap +1 -1
- package/scss/__tests__/__snapshots__/type-test.js.snap +1 -1
- package/scss/__tests__/border-radius-test.js +31 -0
- package/scss/_border-radius.scss +10 -0
- package/scss/components/EditInPlace/_edit-in-place.scss +188 -0
- package/scss/components/EditInPlace/_index.scss +11 -0
- package/scss/components/FullPageError/_full-page-error.scss +91 -0
- package/scss/components/FullPageError/_index.scss +11 -0
- package/scss/components/InterstitialScreen/_index.scss +11 -0
- package/scss/components/InterstitialScreen/_interstitial-screen.scss +181 -0
- package/scss/components/OptionsTile/_index.scss +11 -0
- package/scss/components/OptionsTile/_options-tile.scss +240 -0
- package/scss/components/__tests__/button-test.js +27 -0
- package/scss/components/__tests__/data-table-test.js +43 -1
- package/scss/components/__tests__/file-uploader.js +30 -0
- package/scss/components/__tests__/overflow-menu-test.js +40 -1
- package/scss/components/__tests__/structured-list-test.js +38 -1
- package/scss/components/__tests__/tag-test.js +1 -2
- package/scss/components/__tests__/text-input-test.js +1 -1
- package/scss/components/__tests__/treeview-test.js +60 -1
- package/scss/components/_index.scss +9 -1
- package/scss/components/big-number/_big-number.scss +164 -0
- package/scss/components/big-number/_index.scss +11 -0
- package/scss/components/button/_button.scss +0 -1
- package/scss/components/card/_card.scss +37 -12
- package/scss/components/coachmark/_coachmark-beacon.scss +159 -0
- package/scss/components/coachmark/_coachmark-tagline.scss +142 -0
- package/scss/components/coachmark/_coachmark.scss +56 -0
- package/scss/components/coachmark/_index.scss +17 -0
- package/scss/components/data-table/_data-table.scss +140 -110
- package/scss/components/data-table/expandable/_data-table-expandable.scss +86 -59
- package/scss/components/data-table/skeleton/_data-table-skeleton.scss +10 -8
- package/scss/components/date-picker/_date-picker-next.scss +20 -20
- package/scss/components/date-picker/_date-picker.scss +5 -3
- package/scss/components/date-picker/_flatpickr.scss +46 -28
- package/scss/components/file-uploader/_file-uploader.scss +23 -10
- package/scss/components/loading/_loading.scss +2 -1
- package/scss/components/overflow-menu/_overflow-menu.scss +12 -6
- package/scss/components/pagination/_pagination.scss +12 -0
- package/scss/components/pagination-nav/_pagination-nav.scss +5 -3
- package/scss/components/scroll-gradient/_index.scss +11 -0
- package/scss/components/scroll-gradient/_scroll-gradient.scss +107 -0
- package/scss/components/slider/_slider.scss +38 -15
- package/scss/components/structured-list/_structured-list.scss +27 -20
- package/scss/components/tabs/_tabs.scss +11 -0
- package/scss/components/tag/_mixins.scss +9 -5
- package/scss/components/tag/_tag.scss +44 -26
- package/scss/components/text-input/_text-input.scss +11 -7
- package/scss/components/treeview/_treeview.scss +52 -33
- package/scss/components/ui-shell/side-nav/_side-nav.scss +58 -42
- package/scss/components/ui-shell/switcher/_switcher.scss +7 -5
- package/scss/components/user-avatar/_index.scss +11 -0
- package/scss/components/user-avatar/_user-avatar.scss +160 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright IBM Corp. 2016,
|
|
2
|
+
// Copyright IBM Corp. 2016, 2026
|
|
3
3
|
//
|
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
@@ -99,8 +99,10 @@
|
|
|
99
99
|
padding-block: 0;
|
|
100
100
|
padding-inline-end: 0;
|
|
101
101
|
|
|
102
|
-
|
|
103
|
-
|
|
102
|
+
@media (any-hover: hover) {
|
|
103
|
+
&:hover {
|
|
104
|
+
outline: none;
|
|
105
|
+
}
|
|
104
106
|
}
|
|
105
107
|
}
|
|
106
108
|
|
|
@@ -110,9 +112,11 @@
|
|
|
110
112
|
color: $text-primary;
|
|
111
113
|
cursor: pointer;
|
|
112
114
|
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
115
|
+
@media (any-hover: hover) {
|
|
116
|
+
&:hover {
|
|
117
|
+
background-color: $layer-hover;
|
|
118
|
+
outline: none;
|
|
119
|
+
}
|
|
116
120
|
}
|
|
117
121
|
|
|
118
122
|
&:focus {
|
|
@@ -125,8 +129,10 @@
|
|
|
125
129
|
background-color: $layer-selected-inverse;
|
|
126
130
|
color: $text-inverse;
|
|
127
131
|
|
|
128
|
-
|
|
129
|
-
|
|
132
|
+
@media (any-hover: hover) {
|
|
133
|
+
&:hover {
|
|
134
|
+
background-color: $layer-selected-inverse;
|
|
135
|
+
}
|
|
130
136
|
}
|
|
131
137
|
}
|
|
132
138
|
|
|
@@ -136,9 +142,11 @@
|
|
|
136
142
|
color: $tag-color-gray;
|
|
137
143
|
cursor: pointer;
|
|
138
144
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
145
|
+
@media (any-hover: hover) {
|
|
146
|
+
&:hover {
|
|
147
|
+
background-color: $tag-hover-gray;
|
|
148
|
+
outline: none;
|
|
149
|
+
}
|
|
142
150
|
}
|
|
143
151
|
|
|
144
152
|
&:focus {
|
|
@@ -248,8 +256,10 @@
|
|
|
248
256
|
.#{$prefix}--multi-select--readonly
|
|
249
257
|
.#{$prefix}--tag--high-contrast:not(.#{$prefix}--tag--operational)
|
|
250
258
|
.#{$prefix}--tag__close-icon {
|
|
251
|
-
|
|
252
|
-
|
|
259
|
+
@media (any-hover: hover) {
|
|
260
|
+
&:hover {
|
|
261
|
+
background-color: transparent;
|
|
262
|
+
}
|
|
253
263
|
}
|
|
254
264
|
}
|
|
255
265
|
|
|
@@ -270,8 +280,10 @@
|
|
|
270
280
|
box-shadow: none;
|
|
271
281
|
outline: none;
|
|
272
282
|
|
|
273
|
-
|
|
274
|
-
|
|
283
|
+
@media (any-hover: hover) {
|
|
284
|
+
&:hover {
|
|
285
|
+
cursor: not-allowed;
|
|
286
|
+
}
|
|
275
287
|
}
|
|
276
288
|
|
|
277
289
|
.#{$prefix}--tag__label {
|
|
@@ -286,9 +298,11 @@
|
|
|
286
298
|
background-color: $layer;
|
|
287
299
|
color: $text-disabled;
|
|
288
300
|
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
301
|
+
@media (any-hover: hover) {
|
|
302
|
+
&:hover {
|
|
303
|
+
background-color: $layer;
|
|
304
|
+
cursor: not-allowed;
|
|
305
|
+
}
|
|
292
306
|
}
|
|
293
307
|
}
|
|
294
308
|
|
|
@@ -350,9 +364,11 @@
|
|
|
350
364
|
box-shadow: inset 0 0 0 1px $focus-inverse;
|
|
351
365
|
}
|
|
352
366
|
|
|
353
|
-
|
|
354
|
-
.#{$prefix}--
|
|
355
|
-
|
|
367
|
+
@media (any-hover: hover) {
|
|
368
|
+
.#{$prefix}--tag--filter.#{$prefix}--tag--disabled
|
|
369
|
+
.#{$prefix}--tag__close-icon:hover {
|
|
370
|
+
background-color: transparent;
|
|
371
|
+
}
|
|
356
372
|
}
|
|
357
373
|
|
|
358
374
|
.#{$prefix}--tag--filter.#{$prefix}--tag--disabled svg {
|
|
@@ -404,11 +420,13 @@
|
|
|
404
420
|
background-color: currentColor;
|
|
405
421
|
}
|
|
406
422
|
|
|
407
|
-
|
|
408
|
-
.#{$prefix}--
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
423
|
+
@media (any-hover: hover) {
|
|
424
|
+
.#{$prefix}--tag
|
|
425
|
+
.#{$prefix}--ai-label
|
|
426
|
+
.#{$prefix}--ai-label__button--inline:hover,
|
|
427
|
+
.#{$prefix}--tag .#{$prefix}--slug .#{$prefix}--slug__button--inline:hover {
|
|
428
|
+
border-color: currentColor;
|
|
429
|
+
}
|
|
412
430
|
}
|
|
413
431
|
|
|
414
432
|
.#{$prefix}--tag--filter .#{$prefix}--tag__decorator > *,
|
|
@@ -170,8 +170,10 @@
|
|
|
170
170
|
svg {
|
|
171
171
|
fill: $icon-disabled;
|
|
172
172
|
|
|
173
|
-
|
|
174
|
-
|
|
173
|
+
@media (any-hover: hover) {
|
|
174
|
+
&:hover {
|
|
175
|
+
fill: $icon-disabled;
|
|
176
|
+
}
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
|
|
@@ -183,12 +185,14 @@
|
|
|
183
185
|
cursor: default;
|
|
184
186
|
}
|
|
185
187
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
188
|
+
@media (any-hover: hover) {
|
|
189
|
+
.#{$prefix}--text-input--password__visibility__toggle:disabled.#{$prefix}--tooltip__trigger:hover {
|
|
190
|
+
svg {
|
|
191
|
+
fill: $icon-disabled;
|
|
192
|
+
}
|
|
190
193
|
|
|
191
|
-
|
|
194
|
+
cursor: default;
|
|
195
|
+
}
|
|
192
196
|
}
|
|
193
197
|
|
|
194
198
|
.#{$prefix}--text-input__counter-alert {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright IBM Corp. 2016,
|
|
2
|
+
// Copyright IBM Corp. 2016, 2026
|
|
3
3
|
//
|
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
@@ -35,8 +35,10 @@
|
|
|
35
35
|
outline: none;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
@media (any-hover: hover) {
|
|
39
|
+
&:hover {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
}
|
|
40
42
|
}
|
|
41
43
|
}
|
|
42
44
|
|
|
@@ -65,30 +67,39 @@
|
|
|
65
67
|
outline: none;
|
|
66
68
|
}
|
|
67
69
|
|
|
68
|
-
.#{$prefix}--tree-node--disabled
|
|
69
|
-
.#{$prefix}--tree-node--disabled .#{$prefix}--tree-node__label:hover,
|
|
70
|
-
.#{$prefix}--tree-node--disabled
|
|
71
|
-
.#{$prefix}--tree-node__label:hover
|
|
72
|
-
.#{$prefix}--tree-node__label__details {
|
|
70
|
+
.#{$prefix}--tree-node--disabled {
|
|
73
71
|
background-color: $field-01;
|
|
74
72
|
color: $text-disabled;
|
|
73
|
+
cursor: not-allowed;
|
|
75
74
|
}
|
|
76
75
|
|
|
77
76
|
.#{$prefix}--tree-node--disabled .#{$prefix}--tree-parent-node__toggle-icon,
|
|
78
|
-
.#{$prefix}--tree-node--disabled .#{$prefix}--tree-node__icon
|
|
79
|
-
.#{$prefix}--tree-node--disabled
|
|
80
|
-
.#{$prefix}--tree-node__label:hover
|
|
81
|
-
.#{$prefix}--tree-parent-node__toggle-icon,
|
|
82
|
-
.#{$prefix}--tree-node--disabled
|
|
83
|
-
.#{$prefix}--tree-node__label:hover
|
|
84
|
-
.#{$prefix}--tree-node__icon {
|
|
77
|
+
.#{$prefix}--tree-node--disabled .#{$prefix}--tree-node__icon {
|
|
85
78
|
fill: $icon-disabled;
|
|
86
79
|
}
|
|
87
80
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.#{$prefix}--tree-
|
|
91
|
-
|
|
81
|
+
@media (any-hover: hover) {
|
|
82
|
+
.#{$prefix}--tree-node--disabled .#{$prefix}--tree-node__label:hover,
|
|
83
|
+
.#{$prefix}--tree-node--disabled
|
|
84
|
+
.#{$prefix}--tree-node__label:hover
|
|
85
|
+
.#{$prefix}--tree-node__label__details {
|
|
86
|
+
background-color: $field-01;
|
|
87
|
+
color: $text-disabled;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.#{$prefix}--tree-node--disabled
|
|
91
|
+
.#{$prefix}--tree-node__label:hover
|
|
92
|
+
.#{$prefix}--tree-parent-node__toggle-icon,
|
|
93
|
+
.#{$prefix}--tree-node--disabled
|
|
94
|
+
.#{$prefix}--tree-node__label:hover
|
|
95
|
+
.#{$prefix}--tree-node__icon {
|
|
96
|
+
fill: $icon-disabled;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.#{$prefix}--tree-node--disabled
|
|
100
|
+
.#{$prefix}--tree-parent-node__toggle-icon:hover {
|
|
101
|
+
cursor: not-allowed;
|
|
102
|
+
}
|
|
92
103
|
}
|
|
93
104
|
|
|
94
105
|
// Overrides link styling
|
|
@@ -122,9 +133,11 @@
|
|
|
122
133
|
min-block-size: convert.to-rem(32px);
|
|
123
134
|
padding-inline-end: 1rem;
|
|
124
135
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
136
|
+
@media (any-hover: hover) {
|
|
137
|
+
&:hover {
|
|
138
|
+
background-color: $layer-hover-01;
|
|
139
|
+
color: $text-primary;
|
|
140
|
+
}
|
|
128
141
|
}
|
|
129
142
|
}
|
|
130
143
|
|
|
@@ -134,14 +147,16 @@
|
|
|
134
147
|
// (min-height 32px - single line text height 18px) / 2 = 7px
|
|
135
148
|
}
|
|
136
149
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
150
|
+
@media (any-hover: hover) {
|
|
151
|
+
.#{$prefix}--tree-node__label:hover .#{$prefix}--tree-node__label__details {
|
|
152
|
+
color: $text-primary;
|
|
153
|
+
}
|
|
140
154
|
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
155
|
+
.#{$prefix}--tree-node__label:hover
|
|
156
|
+
.#{$prefix}--tree-parent-node__toggle-icon,
|
|
157
|
+
.#{$prefix}--tree-node__label:hover .#{$prefix}--tree-node__icon {
|
|
158
|
+
fill: $icon-primary;
|
|
159
|
+
}
|
|
145
160
|
}
|
|
146
161
|
|
|
147
162
|
.#{$prefix}--tree-leaf-node {
|
|
@@ -177,8 +192,10 @@
|
|
|
177
192
|
margin-inline: -$spacing-02 $spacing-02;
|
|
178
193
|
padding-inline-start: $spacing-02;
|
|
179
194
|
|
|
180
|
-
|
|
181
|
-
|
|
195
|
+
@media (any-hover: hover) {
|
|
196
|
+
&:hover {
|
|
197
|
+
cursor: pointer;
|
|
198
|
+
}
|
|
182
199
|
}
|
|
183
200
|
|
|
184
201
|
&:focus {
|
|
@@ -213,8 +230,10 @@
|
|
|
213
230
|
background-color: $layer-selected-01;
|
|
214
231
|
color: $text-primary;
|
|
215
232
|
|
|
216
|
-
|
|
217
|
-
|
|
233
|
+
@media (any-hover: hover) {
|
|
234
|
+
&:hover {
|
|
235
|
+
background-color: $layer-selected-hover-01;
|
|
236
|
+
}
|
|
218
237
|
}
|
|
219
238
|
}
|
|
220
239
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright IBM Corp. 2016,
|
|
2
|
+
// Copyright IBM Corp. 2016, 2026
|
|
3
3
|
//
|
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
@@ -154,31 +154,32 @@
|
|
|
154
154
|
inline-size: auto;
|
|
155
155
|
}
|
|
156
156
|
|
|
157
|
-
|
|
157
|
+
@media (any-hover: hover) {
|
|
158
|
+
.#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active):hover,
|
|
158
159
|
.#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active)
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
160
|
+
> .#{$prefix}--side-nav__submenu:hover,
|
|
161
|
+
.#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active)
|
|
162
|
+
> .#{$prefix}--side-nav__link:hover,
|
|
163
|
+
.#{$prefix}--side-nav__menu
|
|
164
|
+
a.#{$prefix}--side-nav__link:not(
|
|
165
|
+
.#{$prefix}--side-nav__link--current
|
|
166
|
+
):not([aria-current='page']):hover,
|
|
167
|
+
.#{$prefix}--side-nav a.#{$prefix}--header__menu-item:hover,
|
|
168
|
+
.#{$prefix}--side-nav
|
|
169
|
+
.#{$prefix}--header__menu-title[aria-expanded='true']:hover {
|
|
170
|
+
// TODO: sync color
|
|
171
|
+
background-color: $background-hover;
|
|
172
|
+
color: $text-primary;
|
|
173
|
+
}
|
|
174
|
+
.#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active)
|
|
175
|
+
> .#{$prefix}--side-nav__link:hover
|
|
176
|
+
> span,
|
|
177
|
+
.#{$prefix}--side-nav__item:not(.#{$prefix}--side-nav__item--active)
|
|
178
|
+
.#{$prefix}--side-nav__menu-item
|
|
179
|
+
> .#{$prefix}--side-nav__link:hover
|
|
180
|
+
> span {
|
|
181
|
+
color: $text-primary;
|
|
182
|
+
}
|
|
182
183
|
}
|
|
183
184
|
|
|
184
185
|
.#{$prefix}--side-nav__item--large {
|
|
@@ -220,9 +221,11 @@
|
|
|
220
221
|
user-select: none;
|
|
221
222
|
}
|
|
222
223
|
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
224
|
+
@media (any-hover: hover) {
|
|
225
|
+
.#{$prefix}--side-nav__submenu:hover {
|
|
226
|
+
background-color: $background-hover;
|
|
227
|
+
color: $text-primary;
|
|
228
|
+
}
|
|
226
229
|
}
|
|
227
230
|
|
|
228
231
|
.#{$prefix}--side-nav__submenu:focus {
|
|
@@ -257,10 +260,16 @@
|
|
|
257
260
|
block-size: mini-units(6);
|
|
258
261
|
}
|
|
259
262
|
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
263
|
+
@media (any-hover: hover) {
|
|
264
|
+
.#{$prefix}--side-nav__submenu:hover {
|
|
265
|
+
background-color: $background-hover;
|
|
266
|
+
color: $text-primary;
|
|
267
|
+
}
|
|
268
|
+
.#{$prefix}--side-nav__item--active .#{$prefix}--side-nav__submenu:hover {
|
|
269
|
+
//the active className is used for selected styles, hence using the selected tokens
|
|
270
|
+
background-color: $background-selected;
|
|
271
|
+
color: $text-primary;
|
|
272
|
+
}
|
|
264
273
|
}
|
|
265
274
|
|
|
266
275
|
.#{$prefix}--side-nav__item--active
|
|
@@ -505,14 +514,16 @@
|
|
|
505
514
|
padding-inline-start: 4.25rem;
|
|
506
515
|
}
|
|
507
516
|
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
517
|
+
@media (any-hover: hover) {
|
|
518
|
+
a.#{$prefix}--header__menu-item:hover {
|
|
519
|
+
background-color: $background-hover;
|
|
520
|
+
color: $text-primary;
|
|
521
|
+
}
|
|
512
522
|
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
523
|
+
// non-hover, selected state inherited from `_header.scss`
|
|
524
|
+
a.#{$prefix}--header__menu-item--current:hover {
|
|
525
|
+
background-color: $layer-selected-hover;
|
|
526
|
+
}
|
|
516
527
|
}
|
|
517
528
|
}
|
|
518
529
|
|
|
@@ -532,13 +543,18 @@
|
|
|
532
543
|
block-size: inherit;
|
|
533
544
|
}
|
|
534
545
|
|
|
535
|
-
.#{$prefix}--side-nav
|
|
536
|
-
a.#{$prefix}--header__menu-item:hover
|
|
537
|
-
.#{$prefix}--header__menu-arrow,
|
|
538
546
|
.#{$prefix}--side-nav
|
|
539
547
|
a.#{$prefix}--header__menu-item:focus
|
|
540
548
|
.#{$prefix}--header__menu-arrow,
|
|
541
549
|
.#{$prefix}--side-nav .#{$prefix}--header__menu-arrow {
|
|
542
550
|
fill: $icon-secondary;
|
|
543
551
|
}
|
|
552
|
+
|
|
553
|
+
@media (any-hover: hover) {
|
|
554
|
+
.#{$prefix}--side-nav
|
|
555
|
+
a.#{$prefix}--header__menu-item:hover
|
|
556
|
+
.#{$prefix}--header__menu-arrow {
|
|
557
|
+
fill: $icon-secondary;
|
|
558
|
+
}
|
|
559
|
+
}
|
|
544
560
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//
|
|
2
|
-
// Copyright IBM Corp. 2016,
|
|
2
|
+
// Copyright IBM Corp. 2016, 2026
|
|
3
3
|
//
|
|
4
4
|
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
@@ -56,10 +56,12 @@
|
|
|
56
56
|
color: $text-secondary;
|
|
57
57
|
text-decoration: none;
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
@media (any-hover: hover) {
|
|
60
|
+
&:hover:not(.#{$prefix}--switcher__item-link--selected) {
|
|
61
|
+
background: $layer-hover;
|
|
62
|
+
color: $text-primary;
|
|
63
|
+
cursor: pointer;
|
|
64
|
+
}
|
|
63
65
|
}
|
|
64
66
|
|
|
65
67
|
&:focus {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2024, 2026
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
@forward 'user-avatar';
|
|
9
|
+
@use 'user-avatar';
|
|
10
|
+
|
|
11
|
+
@include user-avatar.user-avatar;
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 2024, 2026
|
|
3
|
+
//
|
|
4
|
+
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
+
// LICENSE file in the root directory of this source tree.
|
|
6
|
+
//
|
|
7
|
+
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
@use '../../config' as *;
|
|
10
|
+
@use '../../theme' as *;
|
|
11
|
+
@use '../../type' as *;
|
|
12
|
+
@use '../../spacing' as *;
|
|
13
|
+
@use '@carbon/colors' as *;
|
|
14
|
+
|
|
15
|
+
$_sizes: (
|
|
16
|
+
xl: $spacing-10,
|
|
17
|
+
lg: $spacing-09,
|
|
18
|
+
md: $spacing-07,
|
|
19
|
+
sm: $spacing-06,
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
@mixin -size($block-class, $size) {
|
|
23
|
+
$_size: map.get($_sizes, $size);
|
|
24
|
+
|
|
25
|
+
.#{$block-class}--#{$size} {
|
|
26
|
+
block-size: $_size;
|
|
27
|
+
inline-size: $_size;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin -photo-size($block-class, $size) {
|
|
32
|
+
$_size: map.get($_sizes, $size);
|
|
33
|
+
|
|
34
|
+
.#{$block-class}__photo--#{$size} {
|
|
35
|
+
border-radius: 100%;
|
|
36
|
+
block-size: $_size;
|
|
37
|
+
inline-size: $_size;
|
|
38
|
+
object-fit: fill;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
@mixin -set-light-bg($block-class, $order, $color) {
|
|
43
|
+
:root .#{$block-class}--#{$order},
|
|
44
|
+
.#{$prefix}--g10 .#{$block-class}--#{$order},
|
|
45
|
+
.#{$prefix}--white .#{$block-class}--#{$order} {
|
|
46
|
+
background-color: $color;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
@mixin -set-dark-bg($block-class, $order, $color) {
|
|
51
|
+
.#{$prefix}--g90 .#{$block-class}--#{$order},
|
|
52
|
+
.#{$prefix}--g100 .#{$block-class}--#{$order} {
|
|
53
|
+
background-color: $color;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/// UserAvatar styles
|
|
58
|
+
/// @access public
|
|
59
|
+
/// @group user-avatar
|
|
60
|
+
@mixin user-avatar {
|
|
61
|
+
$block-class: #{$prefix}--user-avatar;
|
|
62
|
+
|
|
63
|
+
.#{$block-class} {
|
|
64
|
+
position: relative;
|
|
65
|
+
display: flex;
|
|
66
|
+
align-items: center;
|
|
67
|
+
justify-content: center;
|
|
68
|
+
border: 0.5px solid transparent;
|
|
69
|
+
border-radius: 100%;
|
|
70
|
+
block-size: 4rem;
|
|
71
|
+
color: $text-inverse;
|
|
72
|
+
inline-size: 4rem;
|
|
73
|
+
outline: none;
|
|
74
|
+
outline-offset: 3px;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.#{$block-class} svg {
|
|
78
|
+
color: $icon-inverse;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.#{$block-class}__tooltip-trigger {
|
|
82
|
+
display: flex;
|
|
83
|
+
box-sizing: border-box;
|
|
84
|
+
align-items: center;
|
|
85
|
+
justify-content: center;
|
|
86
|
+
padding: 0;
|
|
87
|
+
border: 0;
|
|
88
|
+
margin: 0;
|
|
89
|
+
appearance: none;
|
|
90
|
+
background: none;
|
|
91
|
+
block-size: 100%;
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
inline-size: 100%;
|
|
94
|
+
outline: none;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.#{$block-class}__tooltip {
|
|
98
|
+
&:focus-within .#{$block-class} {
|
|
99
|
+
outline: 2px solid $focus;
|
|
100
|
+
outline-offset: 1px;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.#{$block-class}__photo {
|
|
105
|
+
border-radius: 100%;
|
|
106
|
+
object-fit: contain;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
@include -size($block-class, 'xl');
|
|
110
|
+
@include -size($block-class, 'lg');
|
|
111
|
+
@include -size($block-class, 'md');
|
|
112
|
+
@include -size($block-class, 'sm');
|
|
113
|
+
|
|
114
|
+
.#{$block-class}--xl {
|
|
115
|
+
@include type-style('heading-04');
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.#{$block-class}--lg {
|
|
119
|
+
@include type-style('heading-03');
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.#{$block-class}--md {
|
|
123
|
+
@include type-style('body-compact-01');
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.#{$block-class}--sm {
|
|
127
|
+
@include type-style('label-01');
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
@include -photo-size($block-class, 'xl');
|
|
131
|
+
@include -photo-size($block-class, 'lg');
|
|
132
|
+
@include -photo-size($block-class, 'md');
|
|
133
|
+
@include -photo-size($block-class, 'sm');
|
|
134
|
+
|
|
135
|
+
@include -set-light-bg($block-class, order-1-cyan, $cyan-60);
|
|
136
|
+
@include -set-light-bg($block-class, order-2-gray, $gray-60);
|
|
137
|
+
@include -set-light-bg($block-class, order-3-green, $green-60);
|
|
138
|
+
@include -set-light-bg($block-class, order-4-magenta, $magenta-60);
|
|
139
|
+
@include -set-light-bg($block-class, order-5-purple, $purple-60);
|
|
140
|
+
@include -set-light-bg($block-class, order-6-teal, $teal-60);
|
|
141
|
+
@include -set-light-bg($block-class, order-7-cyan, $cyan-80);
|
|
142
|
+
@include -set-light-bg($block-class, order-8-gray, $gray-80);
|
|
143
|
+
@include -set-light-bg($block-class, order-9-green, $green-80);
|
|
144
|
+
@include -set-light-bg($block-class, order-10-magenta, $magenta-80);
|
|
145
|
+
@include -set-light-bg($block-class, order-11-purple, $purple-80);
|
|
146
|
+
@include -set-light-bg($block-class, order-12-teal, $teal-80);
|
|
147
|
+
|
|
148
|
+
@include -set-dark-bg($block-class, order-1-cyan, $cyan-50);
|
|
149
|
+
@include -set-dark-bg($block-class, order-2-gray, $gray-50);
|
|
150
|
+
@include -set-dark-bg($block-class, order-3-green, $green-50);
|
|
151
|
+
@include -set-dark-bg($block-class, order-4-magenta, $magenta-50);
|
|
152
|
+
@include -set-dark-bg($block-class, order-5-purple, $purple-50);
|
|
153
|
+
@include -set-dark-bg($block-class, order-6-teal, $teal-50);
|
|
154
|
+
@include -set-dark-bg($block-class, order-7-cyan, $cyan-30);
|
|
155
|
+
@include -set-dark-bg($block-class, order-8-gray, $gray-30);
|
|
156
|
+
@include -set-dark-bg($block-class, order-9-green, $green-30);
|
|
157
|
+
@include -set-dark-bg($block-class, order-10-magenta, $magenta-30);
|
|
158
|
+
@include -set-dark-bg($block-class, order-11-purple, $purple-30);
|
|
159
|
+
@include -set-dark-bg($block-class, order-12-teal, $teal-30);
|
|
160
|
+
}
|