maverick-wave 4.28.0 → 5.0.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/.claude/settings.local.json +29 -1
- package/.claude/skills/mw-maverick-wave/SKILL.md +39 -24
- package/.claude/skills/mw-maverick-wave/examples/angular-services.md +16 -4
- package/.claude/skills/mw-maverick-wave/examples/static-landing-page.md +13 -4
- package/.claude/skills/mw-maverick-wave/references/components.md +42 -5
- package/.claude/skills/mw-maverick-wave/references/forms.md +14 -2
- package/.claude/skills/mw-maverick-wave/references/javascript.md +17 -4
- package/.claude/skills/mw-maverick-wave/references/layout.md +53 -19
- package/.claude/skills/mw-maverick-wave/references/theming.md +38 -1
- package/.impeccable/config.local.json +5 -0
- package/.impeccable/hook.cache.json +1 -0
- package/CHANGELOG.md +11 -0
- package/CLAUDE.md +5 -5
- package/README.md +48 -4
- package/index.html +19 -38
- package/maverick-wave.min.css +14 -12
- package/maverick-wave.min.js +1 -1
- package/package.json +2 -2
- package/scripts/verify.js +27 -2
- package/src/js/main.js +223 -83
- package/src/partials/accordions-container.html +6 -10
- package/src/partials/alerts-container.html +6 -6
- package/src/partials/announcement-container.html +5 -5
- package/src/partials/avatars-container.html +85 -17
- package/src/partials/badges-container.html +6 -6
- package/src/partials/blog-posts-container.html +11 -12
- package/src/partials/buttons-container.html +3 -3
- package/src/partials/cards-container.html +26 -9
- package/src/partials/code-container.html +5 -5
- package/src/partials/content-slider-container.html +5 -4
- package/src/partials/divider-container.html +7 -7
- package/src/partials/dropdown-container.html +2 -2
- package/src/partials/empty-state-container.html +5 -5
- package/src/partials/footer-container.html +21 -18
- package/src/partials/form-elements-container.html +14 -14
- package/src/partials/gallery-container.html +16 -8
- package/src/partials/get-started-container.html +4 -8
- package/src/partials/header-container.html +18 -7
- package/src/partials/home-container.html +10 -20
- package/src/partials/input-group-container.html +11 -2
- package/src/partials/kbd-container.html +1 -1
- package/src/partials/login-container.html +5 -1
- package/src/partials/media-container.html +2 -2
- package/src/partials/modals-container.html +22 -32
- package/src/partials/pricing-container.html +9 -9
- package/src/partials/skeleton-container.html +6 -6
- package/src/partials/stepper-container.html +2 -2
- package/src/partials/tables-container.html +12 -12
- package/src/partials/tabs-container.html +17 -27
- package/src/partials/tags-container.html +23 -17
- package/src/partials/techstack-bucket-container.html +13 -0
- package/src/partials/tiles-container.html +26 -9
- package/src/partials/typography-container.html +7 -6
- package/src/partials/utilities-container.html +35 -15
- package/src/scss/_layers.scss +10 -0
- package/src/scss/abstracts/_index.scss +6 -0
- package/src/scss/abstracts/_mixins.scss +61 -153
- package/src/scss/abstracts/_variables.scss +123 -319
- package/src/scss/base/_base.scss +170 -190
- package/src/scss/base/_reset.scss +106 -104
- package/src/scss/base/_typography.scss +153 -151
- package/src/scss/components/_accordions.scss +97 -97
- package/src/scss/components/_alerts.scss +71 -70
- package/src/scss/components/_announcement.scss +71 -70
- package/src/scss/components/_avatars.scss +130 -142
- package/src/scss/components/_badge.scss +131 -132
- package/src/scss/components/_blog-post.scss +223 -220
- package/src/scss/components/_breadcrumbs.scss +93 -92
- package/src/scss/components/_button-bar.scss +102 -110
- package/src/scss/components/_buttons.scss +319 -324
- package/src/scss/components/_calendar.scss +251 -252
- package/src/scss/components/_cards.scss +359 -386
- package/src/scss/components/_code.scss +190 -194
- package/src/scss/components/_coming-soon.scss +77 -75
- package/src/scss/components/_content-slider.scss +90 -89
- package/src/scss/components/_divider.scss +55 -53
- package/src/scss/components/_dropdown.scss +179 -185
- package/src/scss/components/_empty-state.scss +57 -57
- package/src/scss/components/_flag.scss +294 -278
- package/src/scss/components/_gallery.scss +131 -133
- package/src/scss/components/_info.scss +151 -167
- package/src/scss/components/_kanban.scss +332 -341
- package/src/scss/components/_kbd.scss +40 -38
- package/src/scss/components/_lang-switch.scss +89 -97
- package/src/scss/components/_links.scss +21 -28
- package/src/scss/components/_lists.scss +510 -514
- package/src/scss/components/_localhost-indicator.scss +26 -24
- package/src/scss/components/_media.scss +22 -20
- package/src/scss/components/_meta-info.scss +35 -33
- package/src/scss/components/_modals.scss +277 -186
- package/src/scss/components/_pagination.scss +81 -87
- package/src/scss/components/_panels.scss +99 -97
- package/src/scss/components/_pricing.scss +183 -241
- package/src/scss/components/_progress.scss +112 -89
- package/src/scss/components/_prose.scss +35 -33
- package/src/scss/components/_ratings.scss +40 -38
- package/src/scss/components/_segmented.scss +82 -84
- package/src/scss/components/_skeleton.scss +66 -72
- package/src/scss/components/_spinners.scss +155 -159
- package/src/scss/components/_stepper.scss +116 -116
- package/src/scss/components/_tables.scss +155 -148
- package/src/scss/components/_tabs.scss +232 -141
- package/src/scss/components/_tags.scss +109 -107
- package/src/scss/components/_techstack-bucket.scss +123 -122
- package/src/scss/components/_testimonial.scss +72 -70
- package/src/scss/components/_theme-toggle.scss +53 -51
- package/src/scss/components/_tiles.scss +174 -174
- package/src/scss/components/_timelines.scss +282 -280
- package/src/scss/components/_toasts.scss +66 -72
- package/src/scss/form-elements/_checkbox.scss +117 -132
- package/src/scss/form-elements/_form.scss +149 -115
- package/src/scss/form-elements/_input-group.scss +99 -103
- package/src/scss/form-elements/_input.scss +74 -74
- package/src/scss/form-elements/_login.scss +48 -48
- package/src/scss/form-elements/_prefilled.scss +53 -51
- package/src/scss/form-elements/_radio.scss +95 -107
- package/src/scss/form-elements/_select.scss +42 -42
- package/src/scss/form-elements/_slider.scss +117 -132
- package/src/scss/form-elements/_textarea.scss +68 -54
- package/src/scss/form-elements/_toggle.scss +127 -140
- package/src/scss/layout/_footer.scss +172 -171
- package/src/scss/layout/_grid.scss +268 -302
- package/src/scss/layout/_header.scss +426 -427
- package/src/scss/layout/_home.scss +28 -27
- package/src/scss/layout/_main.scss +275 -238
- package/src/scss/layout/_page-header.scss +38 -36
- package/src/scss/layout/_section.scss +150 -124
- package/src/scss/main.scss +1 -1
- package/src/scss/utilities/_accessibility.scss +46 -45
- package/src/scss/utilities/_aspect.scss +22 -20
- package/src/scss/utilities/_corner.scss +23 -5
- package/src/scss/utilities/_display.scss +76 -70
- package/src/scss/utilities/_elevation.scss +13 -11
- package/src/scss/utilities/_flex.scss +83 -85
- package/src/scss/utilities/_reveal.scss +40 -63
- package/src/scss/utilities/_spacing.scss +63 -64
- package/src/scss/utilities/_text.scss +139 -141
- package/src/scss/utilities/_touch-targets.scss +130 -147
|
@@ -1,89 +1,90 @@
|
|
|
1
1
|
@use '../abstracts' as *;
|
|
2
2
|
|
|
3
|
-
.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
@layer mw.components {
|
|
4
|
+
.mw-alert {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: flex-start;
|
|
8
|
+
padding: spacing('4');
|
|
9
|
+
margin-bottom: spacing('4');
|
|
10
|
+
border-radius: radius('md');
|
|
10
11
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
background: var(--mw-card-background);
|
|
13
|
+
border: 1px solid var(--mw-border);
|
|
14
|
+
box-shadow: var(--mw-elevation-2);
|
|
14
15
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
&-icon {
|
|
17
|
+
flex-shrink: 0;
|
|
18
|
+
margin-right: spacing('3');
|
|
19
|
+
font-size: font-size('xl');
|
|
20
|
+
line-height: 1.2;
|
|
21
|
+
margin-top: spacing('1');
|
|
22
|
+
}
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
24
|
+
&-content {
|
|
25
|
+
flex: 1;
|
|
26
|
+
color: var(--mw-text-color);
|
|
27
|
+
}
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
&-title {
|
|
30
|
+
display: block;
|
|
31
|
+
font-weight: font-weight('bold');
|
|
32
|
+
margin-bottom: spacing('1');
|
|
33
|
+
line-height: 1.3;
|
|
34
|
+
}
|
|
34
35
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
// Text in body
|
|
37
|
+
p {
|
|
38
|
+
margin: 0;
|
|
39
|
+
line-height: 1.5;
|
|
40
|
+
font-size: font-size('sm');
|
|
41
|
+
opacity: 0.9;
|
|
41
42
|
|
|
42
|
-
|
|
43
|
-
|
|
43
|
+
& + p {
|
|
44
|
+
margin-top: spacing('2');
|
|
45
|
+
}
|
|
44
46
|
}
|
|
45
|
-
}
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
// initAlerts() sets this, waits, then adds -closed. Without a rule here that
|
|
49
|
+
// wait is 300ms in which nothing happens and the alert then blinks out.
|
|
50
|
+
&-closing {
|
|
51
|
+
opacity: 0;
|
|
52
|
+
transform: translateY(-6px);
|
|
53
|
+
transition:
|
|
54
|
+
opacity var(--mw-duration-base) var(--mw-ease-out),
|
|
55
|
+
transform var(--mw-duration-base) var(--mw-ease-out);
|
|
56
|
+
}
|
|
50
57
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
&-icon {
|
|
54
|
-
margin-right: spacing('3');
|
|
58
|
+
&-closed {
|
|
59
|
+
display: none;
|
|
55
60
|
}
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
61
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
62
|
+
@include media-up('sm') {
|
|
63
|
+
padding: spacing('4') spacing('5');
|
|
64
|
+
&-icon {
|
|
65
|
+
margin-right: spacing('4');
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
64
69
|
|
|
65
|
-
//
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
success: var(--mw-success-color),
|
|
71
|
-
warning: var(--mw-warning-color),
|
|
72
|
-
danger: var(--mw-danger-color),
|
|
73
|
-
);
|
|
70
|
+
// Close button
|
|
71
|
+
.mw-alert-close {
|
|
72
|
+
flex-shrink: 0;
|
|
73
|
+
margin-left: spacing('3');
|
|
74
|
+
}
|
|
74
75
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
border-left: 4px solid var(--mw-#{$name}-text-color);
|
|
76
|
+
@each $name, $col in $semantic-colors {
|
|
77
|
+
.mw-alert-#{$name} {
|
|
78
|
+
background-image: linear-gradient(
|
|
79
|
+
var(--mw-#{$name}-info-background),
|
|
80
|
+
var(--mw-#{$name}-info-background)
|
|
81
|
+
);
|
|
82
|
+
border: 1px solid color-mix(in srgb, #{$col} 20%, transparent);
|
|
83
|
+
border-left: 4px solid var(--mw-#{$name}-text-color);
|
|
84
84
|
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
.mw-alert-icon {
|
|
86
|
+
color: var(--mw-#{$name}-text-color);
|
|
87
|
+
}
|
|
87
88
|
}
|
|
88
89
|
}
|
|
89
90
|
}
|
|
@@ -1,84 +1,85 @@
|
|
|
1
1
|
@use '../abstracts' as *;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
3
|
+
@layer mw.components {
|
|
4
|
+
// The ribbon under the fixed header - a discount, a launch note, a maintenance
|
|
5
|
+
// window. One per page, and always a single line of content with an optional
|
|
6
|
+
// highlight pill in front of it.
|
|
7
|
+
.mw-announcement {
|
|
8
|
+
position: fixed;
|
|
9
|
+
top: var(--mw-header-height);
|
|
10
|
+
right: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
z-index: z-index('header') - 10;
|
|
13
|
+
background: color-mix(in srgb, var(--mw-primary-color) 75%, transparent);
|
|
14
|
+
backdrop-filter: blur(7px);
|
|
15
|
+
color: var(--mw-primary-accent-text-color);
|
|
16
|
+
box-shadow: var(--mw-elevation-2);
|
|
17
|
+
}
|
|
17
18
|
|
|
18
|
-
// The one row inside - usually a link to the thing announced.
|
|
19
|
-
.mw-announcement-content {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
19
|
+
// The one row inside - usually a link to the thing announced.
|
|
20
|
+
.mw-announcement-content {
|
|
21
|
+
display: flex;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
gap: spacing('4');
|
|
25
|
+
min-height: var(--mw-announcement-height);
|
|
26
|
+
padding: spacing('1') spacing('4');
|
|
27
|
+
font-size: font-size('sm');
|
|
28
|
+
text-align: center;
|
|
29
|
+
color: inherit;
|
|
30
|
+
text-decoration: none;
|
|
30
31
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
&:hover,
|
|
33
|
+
&:focus-visible {
|
|
34
|
+
background: color-mix(in srgb, #000 10%, transparent);
|
|
35
|
+
}
|
|
35
36
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
37
|
+
@include focus-ring-inset;
|
|
38
|
+
@include tappable;
|
|
39
|
+
}
|
|
39
40
|
|
|
40
|
-
// The highlight pill - the "-20 %", the "NEW". Darkened glass rather than a
|
|
41
|
-
// color of its own, so it works on every variant without a token per pair.
|
|
42
|
-
.mw-announcement-highlight {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
41
|
+
// The highlight pill - the "-20 %", the "NEW". Darkened glass rather than a
|
|
42
|
+
// color of its own, so it works on every variant without a token per pair.
|
|
43
|
+
.mw-announcement-highlight {
|
|
44
|
+
flex-shrink: 0;
|
|
45
|
+
padding: spacing('1') spacing('3');
|
|
46
|
+
border-radius: 999px;
|
|
47
|
+
background: color-mix(in srgb, #000 18%, transparent);
|
|
48
|
+
font-weight: font-weight('bold');
|
|
49
|
+
}
|
|
49
50
|
|
|
50
|
-
// The ribbon in the document flow instead of glued under the header - for a
|
|
51
|
-
// notice inside a page, or a demo of the component itself. Static, it scrolls
|
|
52
|
-
// with the content and shifts no anchor offset below.
|
|
53
|
-
.mw-announcement-static {
|
|
54
|
-
|
|
55
|
-
}
|
|
51
|
+
// The ribbon in the document flow instead of glued under the header - for a
|
|
52
|
+
// notice inside a page, or a demo of the component itself. Static, it scrolls
|
|
53
|
+
// with the content and shifts no anchor offset below.
|
|
54
|
+
.mw-announcement-static {
|
|
55
|
+
position: static;
|
|
56
|
+
}
|
|
56
57
|
|
|
57
|
-
// Anchors scrolled to under the fixed chrome would land under the ribbon too -
|
|
58
|
-
// the same reason the reset reserves the header height. Scoped with :has, so a
|
|
59
|
-
// page without a ribbon keeps the plain offset - and a static ribbon does not
|
|
60
|
-
// count, it scrolls with the content.
|
|
61
|
-
html:has(.mw-announcement:not(.mw-announcement-static)) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
58
|
+
// Anchors scrolled to under the fixed chrome would land under the ribbon too -
|
|
59
|
+
// the same reason the reset reserves the header height. Scoped with :has, so a
|
|
60
|
+
// page without a ribbon keeps the plain offset - and a static ribbon does not
|
|
61
|
+
// count, it scrolls with the content.
|
|
62
|
+
html:has(.mw-announcement:not(.mw-announcement-static)) {
|
|
63
|
+
scroll-padding-top: calc(
|
|
64
|
+
var(--mw-header-height) + var(--mw-announcement-height)
|
|
65
|
+
);
|
|
66
|
+
}
|
|
66
67
|
|
|
67
|
-
// On a phone the line wraps and the ribbon grows - the height token follows,
|
|
68
|
-
// so the scroll offset above stays honest. Here and not in base, so cherry-
|
|
69
|
-
// picking the component brings the whole behaviour along.
|
|
70
|
-
@include media-down('sm') {
|
|
71
|
-
|
|
72
|
-
|
|
68
|
+
// On a phone the line wraps and the ribbon grows - the height token follows,
|
|
69
|
+
// so the scroll offset above stays honest. Here and not in base, so cherry-
|
|
70
|
+
// picking the component brings the whole behaviour along.
|
|
71
|
+
@include media-down('sm') {
|
|
72
|
+
:root {
|
|
73
|
+
--mw-announcement-height: 3.4rem;
|
|
74
|
+
}
|
|
73
75
|
}
|
|
74
|
-
}
|
|
75
76
|
|
|
76
|
-
|
|
77
|
-
$_mw-announcement-colors: (secondary, success, warning, danger, info);
|
|
77
|
+
$_mw-announcement-colors: (secondary, success, warning, danger, info);
|
|
78
78
|
|
|
79
|
-
@each $name in $_mw-announcement-colors {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
79
|
+
@each $name in $_mw-announcement-colors {
|
|
80
|
+
.mw-announcement-#{$name} {
|
|
81
|
+
background: color-mix(in srgb, var(--mw-#{$name}-color) 75%, transparent);
|
|
82
|
+
color: var(--mw-#{$name}-accent-text-color);
|
|
83
|
+
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
@@ -1,171 +1,159 @@
|
|
|
1
1
|
@use '../abstracts' as *;
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
);
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
flex-grow: 0; // Prevents the avatar from growing
|
|
26
|
-
// Scales with the avatar size; only takes effect on the initials variant
|
|
27
|
-
font-size: font-size('3xl');
|
|
28
|
-
|
|
29
|
-
img {
|
|
30
|
-
width: 100%;
|
|
31
|
-
height: 100%;
|
|
32
|
-
object-fit: cover;
|
|
33
|
-
display: block;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Sizes
|
|
37
|
-
&-xs {
|
|
38
|
-
width: 32px;
|
|
39
|
-
height: 32px;
|
|
40
|
-
border-width: 2px;
|
|
41
|
-
// Small enough that wide pairs like "MW" still clear the circle
|
|
42
|
-
font-size: font-size('2xs');
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&-sm {
|
|
46
|
-
width: 64px;
|
|
47
|
-
height: 64px;
|
|
48
|
-
border-width: 2px;
|
|
49
|
-
font-size: font-size('xl');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&-lg {
|
|
53
|
-
width: 144px;
|
|
54
|
-
height: 144px;
|
|
55
|
-
border-width: 5px;
|
|
56
|
-
font-size: font-size('5xl');
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&-xl {
|
|
60
|
-
width: 210px;
|
|
61
|
-
height: 210px;
|
|
62
|
-
border-width: 6px;
|
|
63
|
-
font-size: font-size('6xl');
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
// Square
|
|
67
|
-
&-square {
|
|
68
|
-
border-radius: radius('sm');
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
// Initials - for users without a picture. Centers its text content and puts
|
|
72
|
-
// the color on the background, so it stays combinable with the color
|
|
73
|
-
// variants below, which keep working on the border.
|
|
74
|
-
&-initials {
|
|
75
|
-
align-items: center;
|
|
76
|
-
justify-content: center;
|
|
77
|
-
background: var(--mw-primary-color);
|
|
78
|
-
color: var(--mw-primary-accent-text-color);
|
|
79
|
-
font-weight: font-weight('bold');
|
|
80
|
-
line-height: 1;
|
|
81
|
-
text-transform: uppercase;
|
|
82
|
-
letter-spacing: 0.02em;
|
|
83
|
-
user-select: none;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Groups
|
|
87
|
-
&-group {
|
|
88
|
-
display: flex;
|
|
89
|
-
flex-wrap: wrap; // Allow items to wrap to next line
|
|
90
|
-
justify-content: flex-start;
|
|
91
|
-
margin: spacing('2');
|
|
92
|
-
row-gap: spacing('3');
|
|
93
|
-
|
|
94
|
-
.mw-avatar {
|
|
95
|
-
margin: spacing('0') -15px spacing('0') spacing('0');
|
|
96
|
-
border: 2px solid var(--mw-secondary-text-color);
|
|
97
|
-
transition: transform var(--mw-duration-base) var(--mw-ease-out);
|
|
98
|
-
|
|
99
|
-
@include hover {
|
|
100
|
-
transform: translateY(-3px);
|
|
101
|
-
z-index: z-index('lift');
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
&:last-child {
|
|
105
|
-
margin-right: spacing('0');
|
|
106
|
-
}
|
|
3
|
+
@layer mw.components {
|
|
4
|
+
.mw-avatar {
|
|
5
|
+
display: inline-flex;
|
|
6
|
+
position: relative;
|
|
7
|
+
border-radius: radius('full');
|
|
8
|
+
overflow: hidden;
|
|
9
|
+
border: 3px solid var(--mw-border);
|
|
10
|
+
box-shadow: var(--mw-elevation-3);
|
|
11
|
+
margin: spacing('1');
|
|
12
|
+
|
|
13
|
+
width: 96px;
|
|
14
|
+
height: 96px;
|
|
15
|
+
flex-shrink: 0;
|
|
16
|
+
flex-grow: 0;
|
|
17
|
+
// Scales with the avatar size; only takes effect on the initials variant
|
|
18
|
+
font-size: font-size('3xl');
|
|
19
|
+
|
|
20
|
+
img {
|
|
21
|
+
width: 100%;
|
|
22
|
+
height: 100%;
|
|
23
|
+
object-fit: cover;
|
|
24
|
+
display: block;
|
|
107
25
|
}
|
|
108
26
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
27
|
+
&-xs {
|
|
28
|
+
width: 32px;
|
|
29
|
+
height: 32px;
|
|
30
|
+
border-width: 2px;
|
|
31
|
+
// Small enough that wide pairs like "MW" still clear the circle
|
|
32
|
+
font-size: font-size('2xs');
|
|
112
33
|
}
|
|
113
34
|
|
|
114
|
-
&-
|
|
115
|
-
|
|
35
|
+
&-sm {
|
|
36
|
+
width: 64px;
|
|
37
|
+
height: 64px;
|
|
38
|
+
border-width: 2px;
|
|
39
|
+
font-size: font-size('xl');
|
|
116
40
|
}
|
|
117
41
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
42
|
+
&-lg {
|
|
43
|
+
width: 120px;
|
|
44
|
+
height: 120px;
|
|
45
|
+
border-width: 4px;
|
|
46
|
+
font-size: font-size('5xl');
|
|
123
47
|
}
|
|
124
|
-
|
|
125
|
-
|
|
48
|
+
|
|
49
|
+
&-xl {
|
|
50
|
+
width: 150px;
|
|
51
|
+
height: 150px;
|
|
52
|
+
border-width: 5px;
|
|
53
|
+
font-size: font-size('6xl');
|
|
126
54
|
}
|
|
127
|
-
|
|
128
|
-
|
|
55
|
+
|
|
56
|
+
&-square {
|
|
57
|
+
border-radius: radius('sm');
|
|
129
58
|
}
|
|
130
59
|
|
|
131
|
-
|
|
132
|
-
|
|
60
|
+
// Initials - for users without a picture. Centers its text content and puts
|
|
61
|
+
// the color on the background, so it stays combinable with the color
|
|
62
|
+
// variants below, which keep working on the border.
|
|
63
|
+
&-initials {
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
background: var(--mw-primary-color);
|
|
67
|
+
color: var(--mw-primary-accent-text-color);
|
|
68
|
+
font-weight: font-weight('bold');
|
|
69
|
+
line-height: 1;
|
|
70
|
+
text-transform: uppercase;
|
|
71
|
+
letter-spacing: 0.02em;
|
|
72
|
+
user-select: none;
|
|
133
73
|
}
|
|
134
74
|
|
|
135
|
-
|
|
136
|
-
|
|
75
|
+
&-group {
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-wrap: wrap;
|
|
78
|
+
justify-content: flex-start;
|
|
79
|
+
margin: spacing('2');
|
|
80
|
+
row-gap: spacing('3');
|
|
81
|
+
|
|
137
82
|
.mw-avatar {
|
|
138
|
-
margin
|
|
83
|
+
margin: spacing('0') -15px spacing('0') spacing('0');
|
|
84
|
+
border: 2px solid var(--mw-secondary-text-color);
|
|
85
|
+
transition: transform var(--mw-duration-base) var(--mw-ease-out);
|
|
86
|
+
|
|
87
|
+
@include hover {
|
|
88
|
+
transform: translateY(-3px);
|
|
89
|
+
z-index: z-index('lift');
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:last-child {
|
|
93
|
+
margin-right: spacing('0');
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
&-sm .mw-avatar {
|
|
98
|
+
margin-right: -10px;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
&-lg .mw-avatar {
|
|
102
|
+
margin-right: -20px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.mw-avatar-xs {
|
|
106
|
+
margin-right: -5px;
|
|
107
|
+
}
|
|
108
|
+
.mw-avatar-sm {
|
|
109
|
+
margin-right: -10px;
|
|
110
|
+
}
|
|
111
|
+
.mw-avatar-lg {
|
|
112
|
+
margin-right: -23px;
|
|
113
|
+
}
|
|
114
|
+
.mw-avatar-xl {
|
|
115
|
+
margin-right: -32px;
|
|
139
116
|
}
|
|
140
117
|
|
|
141
118
|
.mw-avatar:last-child {
|
|
142
119
|
margin-right: spacing('0');
|
|
143
120
|
}
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
121
|
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
122
|
+
@include media-down('sm') {
|
|
123
|
+
// For small screens, create a more compact layout
|
|
124
|
+
.mw-avatar {
|
|
125
|
+
margin-right: -10px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.mw-avatar:last-child {
|
|
129
|
+
margin-right: spacing('0');
|
|
130
|
+
}
|
|
131
|
+
}
|
|
152
132
|
}
|
|
153
133
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
134
|
+
@include media-up('sm') {
|
|
135
|
+
&-lg {
|
|
136
|
+
width: 144px;
|
|
137
|
+
height: 144px;
|
|
138
|
+
border-width: 5px;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&-xl {
|
|
142
|
+
width: 210px;
|
|
143
|
+
height: 210px;
|
|
144
|
+
border-width: 6px;
|
|
145
|
+
}
|
|
158
146
|
}
|
|
159
147
|
}
|
|
160
|
-
}
|
|
161
148
|
|
|
162
|
-
@each $name, $col in $
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
149
|
+
@each $name, $col in $semantic-colors {
|
|
150
|
+
.mw-avatar-#{$name} {
|
|
151
|
+
border-color: #{$col};
|
|
152
|
+
}
|
|
166
153
|
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
154
|
+
// On an initials avatar the same variant also tints the surface
|
|
155
|
+
.mw-avatar-initials.mw-avatar-#{$name} {
|
|
156
|
+
background: #{$col};
|
|
157
|
+
}
|
|
170
158
|
}
|
|
171
159
|
}
|