@carbon/web-components 2.63.0-rc.0 → 2.63.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/custom-elements.json +645 -0
- package/es/components/big-number/big-number.js +1 -1
- package/es/components/card/card-action.d.ts +27 -0
- package/es/components/card/card-action.d.ts.map +1 -0
- package/es/components/card/card-action.js +52 -0
- package/es/components/card/card-action.js.map +1 -0
- package/es/components/card/card-actions.d.ts +36 -0
- package/es/components/card/card-actions.d.ts.map +1 -0
- package/es/components/card/card-actions.js +171 -0
- package/es/components/card/card-actions.js.map +1 -0
- package/es/components/card/card-body.d.ts +23 -0
- package/es/components/card/card-body.d.ts.map +1 -0
- package/es/components/card/card-body.js +54 -0
- package/es/components/card/card-body.js.map +1 -0
- package/es/components/card/card-context.d.ts +20 -0
- package/es/components/card/card-context.d.ts.map +1 -0
- package/es/components/card/card-context.js +29 -0
- package/es/components/card/card-context.js.map +1 -0
- package/es/components/card/card-footer.d.ts +34 -0
- package/es/components/card/card-footer.d.ts.map +1 -0
- package/es/components/card/card-footer.js +75 -0
- package/es/components/card/card-footer.js.map +1 -0
- package/es/components/card/card-header-media.d.ts +19 -0
- package/es/components/card/card-header-media.d.ts.map +1 -0
- package/es/components/card/card-header-media.js +39 -0
- package/es/components/card/card-header-media.js.map +1 -0
- package/es/components/card/card-header.d.ts +23 -0
- package/es/components/card/card-header.d.ts.map +1 -0
- package/es/components/card/card-header.js +70 -0
- package/es/components/card/card-header.js.map +1 -0
- package/es/components/card/card-media.d.ts +37 -0
- package/es/components/card/card-media.d.ts.map +1 -0
- package/es/components/card/card-media.js +79 -0
- package/es/components/card/card-media.js.map +1 -0
- package/es/components/card/card-title-media.d.ts +19 -0
- package/es/components/card/card-title-media.d.ts.map +1 -0
- package/es/components/card/card-title-media.js +39 -0
- package/es/components/card/card-title-media.js.map +1 -0
- package/es/components/card/card-title.d.ts +52 -0
- package/es/components/card/card-title.d.ts.map +1 -0
- package/es/components/card/card-title.js +144 -0
- package/es/components/card/card-title.js.map +1 -0
- package/es/components/card/card.d.ts +69 -0
- package/es/components/card/card.d.ts.map +1 -0
- package/es/components/card/card.js +185 -0
- package/es/components/card/card.js.map +1 -0
- package/es/components/card/card.scss.js +14 -0
- package/es/components/card/card.scss.js.map +1 -0
- package/es/components/card/defs.d.ts +33 -0
- package/es/components/card/defs.d.ts.map +1 -0
- package/es/components/card/defs.js +46 -0
- package/es/components/card/defs.js.map +1 -0
- package/es/components/card/index.d.ts +17 -0
- package/es/components/card/index.d.ts.map +1 -0
- package/es/components/card/index.js +17 -0
- package/es/components/tile/clickable-tile.js +1 -1
- package/es/components/user-avatar/index.d.ts +8 -0
- package/es/components/user-avatar/index.d.ts.map +1 -0
- package/es/components/user-avatar/index.js +8 -0
- package/es/components/user-avatar/user-avatar.d.ts +84 -0
- package/es/components/user-avatar/user-avatar.d.ts.map +1 -0
- package/es/components/user-avatar/user-avatar.js +151 -0
- package/es/components/user-avatar/user-avatar.js.map +1 -0
- package/es/components/user-avatar/user-avatar.scss.js +14 -0
- package/es/components/user-avatar/user-avatar.scss.js.map +1 -0
- package/es/globals/settings.d.ts +1 -1
- package/es/globals/settings.d.ts.map +1 -1
- package/es/globals/settings.js +1 -0
- package/es/globals/settings.js.map +1 -1
- package/es/index.d.ts +10 -0
- package/es/index.d.ts.map +1 -1
- package/es/index.js +13 -3
- package/es-custom/components/big-number/big-number.js +1 -1
- package/es-custom/components/card/card-action.d.ts +27 -0
- package/es-custom/components/card/card-action.d.ts.map +1 -0
- package/es-custom/components/card/card-action.js +52 -0
- package/es-custom/components/card/card-action.js.map +1 -0
- package/es-custom/components/card/card-actions.d.ts +36 -0
- package/es-custom/components/card/card-actions.d.ts.map +1 -0
- package/es-custom/components/card/card-actions.js +171 -0
- package/es-custom/components/card/card-actions.js.map +1 -0
- package/es-custom/components/card/card-body.d.ts +23 -0
- package/es-custom/components/card/card-body.d.ts.map +1 -0
- package/es-custom/components/card/card-body.js +54 -0
- package/es-custom/components/card/card-body.js.map +1 -0
- package/es-custom/components/card/card-context.d.ts +20 -0
- package/es-custom/components/card/card-context.d.ts.map +1 -0
- package/es-custom/components/card/card-context.js +29 -0
- package/es-custom/components/card/card-context.js.map +1 -0
- package/es-custom/components/card/card-footer.d.ts +34 -0
- package/es-custom/components/card/card-footer.d.ts.map +1 -0
- package/es-custom/components/card/card-footer.js +75 -0
- package/es-custom/components/card/card-footer.js.map +1 -0
- package/es-custom/components/card/card-header-media.d.ts +19 -0
- package/es-custom/components/card/card-header-media.d.ts.map +1 -0
- package/es-custom/components/card/card-header-media.js +39 -0
- package/es-custom/components/card/card-header-media.js.map +1 -0
- package/es-custom/components/card/card-header.d.ts +23 -0
- package/es-custom/components/card/card-header.d.ts.map +1 -0
- package/es-custom/components/card/card-header.js +70 -0
- package/es-custom/components/card/card-header.js.map +1 -0
- package/es-custom/components/card/card-media.d.ts +37 -0
- package/es-custom/components/card/card-media.d.ts.map +1 -0
- package/es-custom/components/card/card-media.js +79 -0
- package/es-custom/components/card/card-media.js.map +1 -0
- package/es-custom/components/card/card-title-media.d.ts +19 -0
- package/es-custom/components/card/card-title-media.d.ts.map +1 -0
- package/es-custom/components/card/card-title-media.js +39 -0
- package/es-custom/components/card/card-title-media.js.map +1 -0
- package/es-custom/components/card/card-title.d.ts +52 -0
- package/es-custom/components/card/card-title.d.ts.map +1 -0
- package/es-custom/components/card/card-title.js +144 -0
- package/es-custom/components/card/card-title.js.map +1 -0
- package/es-custom/components/card/card.d.ts +69 -0
- package/es-custom/components/card/card.d.ts.map +1 -0
- package/es-custom/components/card/card.js +185 -0
- package/es-custom/components/card/card.js.map +1 -0
- package/es-custom/components/card/card.scss.js +14 -0
- package/es-custom/components/card/card.scss.js.map +1 -0
- package/es-custom/components/card/defs.d.ts +33 -0
- package/es-custom/components/card/defs.d.ts.map +1 -0
- package/es-custom/components/card/defs.js +46 -0
- package/es-custom/components/card/defs.js.map +1 -0
- package/es-custom/components/card/index.d.ts +17 -0
- package/es-custom/components/card/index.d.ts.map +1 -0
- package/es-custom/components/card/index.js +17 -0
- package/es-custom/components/tile/clickable-tile.js +1 -1
- package/es-custom/components/user-avatar/index.d.ts +8 -0
- package/es-custom/components/user-avatar/index.d.ts.map +1 -0
- package/es-custom/components/user-avatar/index.js +8 -0
- package/es-custom/components/user-avatar/user-avatar.d.ts +84 -0
- package/es-custom/components/user-avatar/user-avatar.d.ts.map +1 -0
- package/es-custom/components/user-avatar/user-avatar.js +151 -0
- package/es-custom/components/user-avatar/user-avatar.js.map +1 -0
- package/es-custom/components/user-avatar/user-avatar.scss.js +14 -0
- package/es-custom/components/user-avatar/user-avatar.scss.js.map +1 -0
- package/es-custom/globals/settings.d.ts +1 -1
- package/es-custom/globals/settings.d.ts.map +1 -1
- package/es-custom/globals/settings.js +1 -0
- package/es-custom/globals/settings.js.map +1 -1
- package/es-custom/index.d.ts +10 -0
- package/es-custom/index.d.ts.map +1 -1
- package/es-custom/index.js +13 -3
- package/lib/components/card/card-action.d.ts +27 -0
- package/lib/components/card/card-action.d.ts.map +1 -0
- package/lib/components/card/card-actions.d.ts +36 -0
- package/lib/components/card/card-actions.d.ts.map +1 -0
- package/lib/components/card/card-body.d.ts +23 -0
- package/lib/components/card/card-body.d.ts.map +1 -0
- package/lib/components/card/card-context.d.ts +20 -0
- package/lib/components/card/card-context.d.ts.map +1 -0
- package/lib/components/card/card-footer.d.ts +34 -0
- package/lib/components/card/card-footer.d.ts.map +1 -0
- package/lib/components/card/card-header-media.d.ts +19 -0
- package/lib/components/card/card-header-media.d.ts.map +1 -0
- package/lib/components/card/card-header.d.ts +23 -0
- package/lib/components/card/card-header.d.ts.map +1 -0
- package/lib/components/card/card-media.d.ts +37 -0
- package/lib/components/card/card-media.d.ts.map +1 -0
- package/lib/components/card/card-title-media.d.ts +19 -0
- package/lib/components/card/card-title-media.d.ts.map +1 -0
- package/lib/components/card/card-title.d.ts +52 -0
- package/lib/components/card/card-title.d.ts.map +1 -0
- package/lib/components/card/card.d.ts +69 -0
- package/lib/components/card/card.d.ts.map +1 -0
- package/lib/components/card/defs.d.ts +33 -0
- package/lib/components/card/defs.d.ts.map +1 -0
- package/lib/components/card/defs.js +48 -0
- package/lib/components/card/defs.js.map +1 -0
- package/lib/components/card/index.d.ts +17 -0
- package/lib/components/card/index.d.ts.map +1 -0
- package/lib/components/user-avatar/index.d.ts +8 -0
- package/lib/components/user-avatar/index.d.ts.map +1 -0
- package/lib/components/user-avatar/user-avatar.d.ts +84 -0
- package/lib/components/user-avatar/user-avatar.d.ts.map +1 -0
- package/lib/globals/settings.d.ts +1 -1
- package/lib/globals/settings.d.ts.map +1 -1
- package/lib/globals/settings.js +1 -0
- package/lib/globals/settings.js.map +1 -1
- package/lib/index.d.ts +10 -0
- package/lib/index.d.ts.map +1 -1
- package/package.json +6 -6
- package/scss/components/card/card-story.scss +29 -0
- package/scss/components/card/card.scss +212 -0
- package/scss/components/user-avatar/story-styles.scss +53 -0
- package/scss/components/user-avatar/user-avatar.scss +113 -0
- package/telemetry.yml +5 -0
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright IBM Corp. 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
|
+
$css--plex: true !default;
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/config' as *;
|
|
11
|
+
@use '@carbon/styles/scss/spacing' as *;
|
|
12
|
+
@use '@carbon/styles/scss/theme' as *;
|
|
13
|
+
@use '@carbon/styles/scss/type' as *;
|
|
14
|
+
// `@use` runs the module's `_index.scss` once, which already includes the
|
|
15
|
+
// `card.card` mixin — do not `@include` it again here or every rule from
|
|
16
|
+
// the shared @carbon/styles card mixin gets emitted twice.
|
|
17
|
+
@use '@carbon/styles/scss/components/card' as card;
|
|
18
|
+
|
|
19
|
+
:host-context(#{$prefix}-card-header) .#{$prefix}--card__title {
|
|
20
|
+
margin-block: $spacing-05;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:host(#{$prefix}-card-title) .#{$prefix}--card__title-text-row {
|
|
24
|
+
// Base / fallback — productive is the default density.
|
|
25
|
+
@include type-style('heading-compact-02');
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host-context(#{$prefix}-card[density='productive'])
|
|
29
|
+
.#{$prefix}--card__title-text-row {
|
|
30
|
+
@include type-style('heading-compact-02');
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:host-context(#{$prefix}-card[density='expressive'])
|
|
34
|
+
.#{$prefix}--card__title-text-row {
|
|
35
|
+
@include type-style('heading-03');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
:host-context(#{$prefix}-card[disabled]) .#{$prefix}--card__label {
|
|
39
|
+
color: $text-disabled;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host-context(#{$prefix}-card[disabled]) .#{$prefix}--card__description {
|
|
43
|
+
color: $text-disabled;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
:host-context(#{$prefix}-card[horizontal]) .#{$prefix}--card__body {
|
|
47
|
+
flex: 1 0 auto;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
:host-context(#{$prefix}-card[horizontal]) .#{$prefix}--card__footer {
|
|
51
|
+
margin-block-start: auto;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
:host-context(#{$prefix}-card[has-ai-label]) .#{$prefix}--card__title {
|
|
55
|
+
padding-inline-end: calc($spacing-07 + $spacing-05);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:host-context(#{$prefix}-card[has-ai-label]) .#{$prefix}--card__label {
|
|
59
|
+
padding-inline-end: calc($spacing-07 + $spacing-05);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:host-context(#{$prefix}-card[has-ai-label]) .#{$prefix}--card__description {
|
|
63
|
+
padding-inline-end: calc($spacing-07 + $spacing-05);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:host-context(#{$prefix}-card[has-ai-label][has-actions])
|
|
67
|
+
.#{$prefix}--card__title {
|
|
68
|
+
padding-inline-end: $spacing-13;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:host-context(#{$prefix}-card[has-ai-label][has-actions])
|
|
72
|
+
.#{$prefix}--card__label {
|
|
73
|
+
padding-inline-end: $spacing-13;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
:host-context(#{$prefix}-card[has-ai-label][has-actions])
|
|
77
|
+
.#{$prefix}--card__description {
|
|
78
|
+
padding-inline-end: $spacing-13;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
:host-context(#{$prefix}-card-header[has-title-media])
|
|
82
|
+
.#{$prefix}--card__title {
|
|
83
|
+
grid-column: 2;
|
|
84
|
+
margin-inline-start: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:host(#{$prefix}-card-footer[has-actions]) .#{$prefix}--card__footer {
|
|
88
|
+
overflow: hidden;
|
|
89
|
+
justify-content: flex-end;
|
|
90
|
+
padding: 0;
|
|
91
|
+
border-block-start: 1px solid $border-subtle;
|
|
92
|
+
gap: 1px;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
:host(#{$prefix}-card-action:not([icon-only])) {
|
|
96
|
+
flex: 1 0 0;
|
|
97
|
+
min-inline-size: 0;
|
|
98
|
+
|
|
99
|
+
.#{$prefix}--card__action {
|
|
100
|
+
display: flex;
|
|
101
|
+
inline-size: 100%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.#{$prefix}--card__action > ::slotted(*) {
|
|
105
|
+
inline-size: 100%;
|
|
106
|
+
max-inline-size: none;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
// Icon-only actions: fixed width. The footer container's justify-content:flex-end
|
|
111
|
+
// pushes the whole group to the trailing edge, so no per-item margin trick needed.
|
|
112
|
+
// Original: .cds--card__footer > .cds--card__action:has(.cds--btn--icon-only)
|
|
113
|
+
|
|
114
|
+
:host(#{$prefix}-card-action[icon-only]) {
|
|
115
|
+
flex: 0 0 auto;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// ─── Host-level display ───────────────────────────────────────────────────────
|
|
119
|
+
|
|
120
|
+
:host(#{$prefix}-card) {
|
|
121
|
+
display: block;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
:host(#{$prefix}-card) a[part='link'] {
|
|
125
|
+
color: inherit;
|
|
126
|
+
text-decoration: none;
|
|
127
|
+
|
|
128
|
+
&:hover,
|
|
129
|
+
&:focus,
|
|
130
|
+
&:active {
|
|
131
|
+
color: inherit;
|
|
132
|
+
text-decoration: none;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
:host(#{$prefix}-card-header) {
|
|
137
|
+
display: block;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
:host(#{$prefix}-card-body) {
|
|
141
|
+
display: block;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
:host(#{$prefix}-card-footer) {
|
|
145
|
+
display: block;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
:host(#{$prefix}-card-media) {
|
|
149
|
+
display: block;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
:host(#{$prefix}-card-header-media) {
|
|
153
|
+
display: flex;
|
|
154
|
+
align-items: flex-start;
|
|
155
|
+
justify-content: flex-start;
|
|
156
|
+
grid-column: 1 / -1;
|
|
157
|
+
margin-block: $spacing-05;
|
|
158
|
+
margin-inline: $spacing-05;
|
|
159
|
+
max-block-size: $spacing-10;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
:host(#{$prefix}-card-header-media) .#{$prefix}--card__header-media {
|
|
163
|
+
display: contents;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
:host(#{$prefix}-card-title) {
|
|
167
|
+
display: block;
|
|
168
|
+
min-inline-size: 0;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
:host(#{$prefix}-card-title-media) {
|
|
172
|
+
display: block;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
:host(#{$prefix}-card-header)
|
|
176
|
+
.#{$prefix}--card__header
|
|
177
|
+
::slotted(#{$prefix}-card-actions) {
|
|
178
|
+
position: absolute;
|
|
179
|
+
display: inline-flex;
|
|
180
|
+
align-items: center;
|
|
181
|
+
justify-content: flex-end;
|
|
182
|
+
block-size: $spacing-07;
|
|
183
|
+
gap: $spacing-02;
|
|
184
|
+
inline-size: 50%;
|
|
185
|
+
inset-block-start: $spacing-03;
|
|
186
|
+
inset-inline-end: $spacing-03;
|
|
187
|
+
max-inline-size: 50%;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
:host(#{$prefix}-card-actions) {
|
|
191
|
+
// Provide a positioning context for the shadow-DOM overflow menu.
|
|
192
|
+
position: relative;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// The overflow menu renders in shadow DOM but visually aligns with the
|
|
196
|
+
// sentinel (which is hidden when not overflowing). `position:absolute` takes
|
|
197
|
+
// it out of flow; the host's `position:relative` is the containing block.
|
|
198
|
+
:host(#{$prefix}-card-actions) .#{$prefix}--card__actions-overflow-menu {
|
|
199
|
+
position: absolute;
|
|
200
|
+
inset-block-start: 0;
|
|
201
|
+
inset-inline-end: 0;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
:host(#{$prefix}-card-action) {
|
|
205
|
+
display: block;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
// The overflow handler sets data-hidden on items that don't fit.
|
|
209
|
+
// This hides them from view while keeping them in the DOM for measurement.
|
|
210
|
+
:host(#{$prefix}-card-action[data-hidden]) {
|
|
211
|
+
display: none;
|
|
212
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright IBM Corp. 2025, 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 '@carbon/styles/scss/theme';
|
|
9
|
+
@use '@carbon/styles/scss/themes';
|
|
10
|
+
@use '@carbon/styles/scss/spacing' as *;
|
|
11
|
+
|
|
12
|
+
#main-content {
|
|
13
|
+
align-content: center;
|
|
14
|
+
padding: $spacing-05;
|
|
15
|
+
min-block-size: 100vh;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.user-avatar-story__theme-section {
|
|
19
|
+
padding: $spacing-05;
|
|
20
|
+
inline-size: 100%;
|
|
21
|
+
|
|
22
|
+
&--white {
|
|
23
|
+
@include theme.theme(themes.$white, true);
|
|
24
|
+
|
|
25
|
+
background: theme.$background;
|
|
26
|
+
color: theme.$text-primary;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&--g10 {
|
|
30
|
+
@include theme.theme(themes.$g10, true);
|
|
31
|
+
|
|
32
|
+
background: theme.$background;
|
|
33
|
+
color: theme.$text-primary;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&--g90 {
|
|
37
|
+
@include theme.theme(themes.$g90, true);
|
|
38
|
+
|
|
39
|
+
background: theme.$background;
|
|
40
|
+
color: theme.$text-primary;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&--g100 {
|
|
44
|
+
@include theme.theme(themes.$g100, true);
|
|
45
|
+
|
|
46
|
+
background: theme.$background;
|
|
47
|
+
color: theme.$text-primary;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.user-avatar-story__theme-text {
|
|
52
|
+
margin-block-end: $spacing-03;
|
|
53
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright IBM Corp. 2025, 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
|
+
$css--plex: true !default;
|
|
9
|
+
|
|
10
|
+
@use '@carbon/styles/scss/reset';
|
|
11
|
+
@use '@carbon/styles/scss/config' as *;
|
|
12
|
+
@use '@carbon/styles/scss/spacing' as *;
|
|
13
|
+
@use '@carbon/styles/scss/theme' as *;
|
|
14
|
+
@use '@carbon/styles/scss/type';
|
|
15
|
+
@use '@carbon/styles/scss/colors' as *;
|
|
16
|
+
|
|
17
|
+
@use '@carbon/styles/scss/components/user-avatar' as *;
|
|
18
|
+
$block-class: #{$prefix}--user-avatar;
|
|
19
|
+
|
|
20
|
+
:host(#{$prefix}-user-avatar) {
|
|
21
|
+
display: inline-block;
|
|
22
|
+
|
|
23
|
+
.#{$block-class} {
|
|
24
|
+
box-sizing: border-box;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host(#{$prefix}-user-avatar) .#{$block-class}--xl {
|
|
29
|
+
::slotted([slot='rendericon']) {
|
|
30
|
+
block-size: $spacing-07;
|
|
31
|
+
inline-size: $spacing-07;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
:host(#{$prefix}-user-avatar) .#{$block-class}--lg {
|
|
36
|
+
::slotted([slot='rendericon']) {
|
|
37
|
+
block-size: $spacing-06;
|
|
38
|
+
inline-size: $spacing-06;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
:host(#{$prefix}-user-avatar) .#{$block-class}--md {
|
|
43
|
+
::slotted([slot='rendericon']) {
|
|
44
|
+
block-size: $spacing-04 + $spacing-03;
|
|
45
|
+
inline-size: $spacing-04 + $spacing-03;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
:host(#{$prefix}-user-avatar) .#{$block-class}--sm {
|
|
50
|
+
::slotted([slot='rendericon']) {
|
|
51
|
+
block-size: $spacing-05;
|
|
52
|
+
inline-size: $spacing-05;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
:host(#{$prefix}-user-avatar) .#{$block-class}__tooltip-trigger {
|
|
57
|
+
padding: 0;
|
|
58
|
+
border: 0;
|
|
59
|
+
background: none;
|
|
60
|
+
outline: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
:host(#{$prefix}-user-avatar) .#{$block-class}__tooltip-content {
|
|
64
|
+
--cds-tooltip-padding-block: #{$spacing-01};
|
|
65
|
+
|
|
66
|
+
&:focus-within {
|
|
67
|
+
outline: $spacing-01 solid $focus;
|
|
68
|
+
outline-offset: 1px;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
@mixin setBgColor($color) {
|
|
73
|
+
background-color: $color;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
// this mixin allows you to set background color based on the lighter themes such as g10 and white
|
|
77
|
+
@mixin setLightBg($order, $color) {
|
|
78
|
+
:host(#{$prefix}-user-avatar) .#{$block-class}--#{$order},
|
|
79
|
+
:host(#{$prefix}-user-avatar[theme='light']) .#{$block-class}--#{$order} {
|
|
80
|
+
@include setBgColor($color);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@mixin setDarkBg($order, $color) {
|
|
85
|
+
:host(#{$prefix}-user-avatar[theme='dark']) .#{$block-class}--#{$order} {
|
|
86
|
+
@include setBgColor($color);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
@include setLightBg(order-1-cyan, $cyan-60);
|
|
91
|
+
@include setLightBg(order-2-gray, $gray-60);
|
|
92
|
+
@include setLightBg(order-3-green, $green-60);
|
|
93
|
+
@include setLightBg(order-4-magenta, $magenta-60);
|
|
94
|
+
@include setLightBg(order-5-purple, $purple-60);
|
|
95
|
+
@include setLightBg(order-6-teal, $teal-60);
|
|
96
|
+
@include setLightBg(order-7-cyan, $cyan-80);
|
|
97
|
+
@include setLightBg(order-8-gray, $gray-80);
|
|
98
|
+
@include setLightBg(order-9-green, $green-80);
|
|
99
|
+
@include setLightBg(order-10-magenta, $magenta-80);
|
|
100
|
+
@include setLightBg(order-11-purple, $purple-80);
|
|
101
|
+
@include setLightBg(order-12-teal, $teal-80);
|
|
102
|
+
@include setDarkBg(order-1-cyan, $cyan-50);
|
|
103
|
+
@include setDarkBg(order-2-gray, $gray-50);
|
|
104
|
+
@include setDarkBg(order-3-green, $green-50);
|
|
105
|
+
@include setDarkBg(order-4-magenta, $magenta-50);
|
|
106
|
+
@include setDarkBg(order-5-purple, $purple-50);
|
|
107
|
+
@include setDarkBg(order-6-teal, $teal-50);
|
|
108
|
+
@include setDarkBg(order-7-cyan, $cyan-30);
|
|
109
|
+
@include setDarkBg(order-8-gray, $gray-30);
|
|
110
|
+
@include setDarkBg(order-9-green, $green-30);
|
|
111
|
+
@include setDarkBg(order-10-magenta, $magenta-30);
|
|
112
|
+
@include setDarkBg(order-11-purple, $purple-30);
|
|
113
|
+
@include setDarkBg(order-12-teal, $teal-30);
|
package/telemetry.yml
CHANGED
|
@@ -658,6 +658,11 @@ collect:
|
|
|
658
658
|
- is-expanded
|
|
659
659
|
- oneventSelected
|
|
660
660
|
- oneventToggled
|
|
661
|
+
# cds-user-avatar
|
|
662
|
+
- background-color
|
|
663
|
+
- image
|
|
664
|
+
- image-description
|
|
665
|
+
- theme
|
|
661
666
|
# feature-flags
|
|
662
667
|
- enable-experimental-focus-wrap-without-sentinels
|
|
663
668
|
- enable-focus-wrap-without-sentinels
|