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.
Files changed (138) hide show
  1. package/.claude/settings.local.json +29 -1
  2. package/.claude/skills/mw-maverick-wave/SKILL.md +39 -24
  3. package/.claude/skills/mw-maverick-wave/examples/angular-services.md +16 -4
  4. package/.claude/skills/mw-maverick-wave/examples/static-landing-page.md +13 -4
  5. package/.claude/skills/mw-maverick-wave/references/components.md +42 -5
  6. package/.claude/skills/mw-maverick-wave/references/forms.md +14 -2
  7. package/.claude/skills/mw-maverick-wave/references/javascript.md +17 -4
  8. package/.claude/skills/mw-maverick-wave/references/layout.md +53 -19
  9. package/.claude/skills/mw-maverick-wave/references/theming.md +38 -1
  10. package/.impeccable/config.local.json +5 -0
  11. package/.impeccable/hook.cache.json +1 -0
  12. package/CHANGELOG.md +11 -0
  13. package/CLAUDE.md +5 -5
  14. package/README.md +48 -4
  15. package/index.html +19 -38
  16. package/maverick-wave.min.css +14 -12
  17. package/maverick-wave.min.js +1 -1
  18. package/package.json +2 -2
  19. package/scripts/verify.js +27 -2
  20. package/src/js/main.js +223 -83
  21. package/src/partials/accordions-container.html +6 -10
  22. package/src/partials/alerts-container.html +6 -6
  23. package/src/partials/announcement-container.html +5 -5
  24. package/src/partials/avatars-container.html +85 -17
  25. package/src/partials/badges-container.html +6 -6
  26. package/src/partials/blog-posts-container.html +11 -12
  27. package/src/partials/buttons-container.html +3 -3
  28. package/src/partials/cards-container.html +26 -9
  29. package/src/partials/code-container.html +5 -5
  30. package/src/partials/content-slider-container.html +5 -4
  31. package/src/partials/divider-container.html +7 -7
  32. package/src/partials/dropdown-container.html +2 -2
  33. package/src/partials/empty-state-container.html +5 -5
  34. package/src/partials/footer-container.html +21 -18
  35. package/src/partials/form-elements-container.html +14 -14
  36. package/src/partials/gallery-container.html +16 -8
  37. package/src/partials/get-started-container.html +4 -8
  38. package/src/partials/header-container.html +18 -7
  39. package/src/partials/home-container.html +10 -20
  40. package/src/partials/input-group-container.html +11 -2
  41. package/src/partials/kbd-container.html +1 -1
  42. package/src/partials/login-container.html +5 -1
  43. package/src/partials/media-container.html +2 -2
  44. package/src/partials/modals-container.html +22 -32
  45. package/src/partials/pricing-container.html +9 -9
  46. package/src/partials/skeleton-container.html +6 -6
  47. package/src/partials/stepper-container.html +2 -2
  48. package/src/partials/tables-container.html +12 -12
  49. package/src/partials/tabs-container.html +17 -27
  50. package/src/partials/tags-container.html +23 -17
  51. package/src/partials/techstack-bucket-container.html +13 -0
  52. package/src/partials/tiles-container.html +26 -9
  53. package/src/partials/typography-container.html +7 -6
  54. package/src/partials/utilities-container.html +35 -15
  55. package/src/scss/_layers.scss +10 -0
  56. package/src/scss/abstracts/_index.scss +6 -0
  57. package/src/scss/abstracts/_mixins.scss +61 -153
  58. package/src/scss/abstracts/_variables.scss +123 -319
  59. package/src/scss/base/_base.scss +170 -190
  60. package/src/scss/base/_reset.scss +106 -104
  61. package/src/scss/base/_typography.scss +153 -151
  62. package/src/scss/components/_accordions.scss +97 -97
  63. package/src/scss/components/_alerts.scss +71 -70
  64. package/src/scss/components/_announcement.scss +71 -70
  65. package/src/scss/components/_avatars.scss +130 -142
  66. package/src/scss/components/_badge.scss +131 -132
  67. package/src/scss/components/_blog-post.scss +223 -220
  68. package/src/scss/components/_breadcrumbs.scss +93 -92
  69. package/src/scss/components/_button-bar.scss +102 -110
  70. package/src/scss/components/_buttons.scss +319 -324
  71. package/src/scss/components/_calendar.scss +251 -252
  72. package/src/scss/components/_cards.scss +359 -386
  73. package/src/scss/components/_code.scss +190 -194
  74. package/src/scss/components/_coming-soon.scss +77 -75
  75. package/src/scss/components/_content-slider.scss +90 -89
  76. package/src/scss/components/_divider.scss +55 -53
  77. package/src/scss/components/_dropdown.scss +179 -185
  78. package/src/scss/components/_empty-state.scss +57 -57
  79. package/src/scss/components/_flag.scss +294 -278
  80. package/src/scss/components/_gallery.scss +131 -133
  81. package/src/scss/components/_info.scss +151 -167
  82. package/src/scss/components/_kanban.scss +332 -341
  83. package/src/scss/components/_kbd.scss +40 -38
  84. package/src/scss/components/_lang-switch.scss +89 -97
  85. package/src/scss/components/_links.scss +21 -28
  86. package/src/scss/components/_lists.scss +510 -514
  87. package/src/scss/components/_localhost-indicator.scss +26 -24
  88. package/src/scss/components/_media.scss +22 -20
  89. package/src/scss/components/_meta-info.scss +35 -33
  90. package/src/scss/components/_modals.scss +277 -186
  91. package/src/scss/components/_pagination.scss +81 -87
  92. package/src/scss/components/_panels.scss +99 -97
  93. package/src/scss/components/_pricing.scss +183 -241
  94. package/src/scss/components/_progress.scss +112 -89
  95. package/src/scss/components/_prose.scss +35 -33
  96. package/src/scss/components/_ratings.scss +40 -38
  97. package/src/scss/components/_segmented.scss +82 -84
  98. package/src/scss/components/_skeleton.scss +66 -72
  99. package/src/scss/components/_spinners.scss +155 -159
  100. package/src/scss/components/_stepper.scss +116 -116
  101. package/src/scss/components/_tables.scss +155 -148
  102. package/src/scss/components/_tabs.scss +232 -141
  103. package/src/scss/components/_tags.scss +109 -107
  104. package/src/scss/components/_techstack-bucket.scss +123 -122
  105. package/src/scss/components/_testimonial.scss +72 -70
  106. package/src/scss/components/_theme-toggle.scss +53 -51
  107. package/src/scss/components/_tiles.scss +174 -174
  108. package/src/scss/components/_timelines.scss +282 -280
  109. package/src/scss/components/_toasts.scss +66 -72
  110. package/src/scss/form-elements/_checkbox.scss +117 -132
  111. package/src/scss/form-elements/_form.scss +149 -115
  112. package/src/scss/form-elements/_input-group.scss +99 -103
  113. package/src/scss/form-elements/_input.scss +74 -74
  114. package/src/scss/form-elements/_login.scss +48 -48
  115. package/src/scss/form-elements/_prefilled.scss +53 -51
  116. package/src/scss/form-elements/_radio.scss +95 -107
  117. package/src/scss/form-elements/_select.scss +42 -42
  118. package/src/scss/form-elements/_slider.scss +117 -132
  119. package/src/scss/form-elements/_textarea.scss +68 -54
  120. package/src/scss/form-elements/_toggle.scss +127 -140
  121. package/src/scss/layout/_footer.scss +172 -171
  122. package/src/scss/layout/_grid.scss +268 -302
  123. package/src/scss/layout/_header.scss +426 -427
  124. package/src/scss/layout/_home.scss +28 -27
  125. package/src/scss/layout/_main.scss +275 -238
  126. package/src/scss/layout/_page-header.scss +38 -36
  127. package/src/scss/layout/_section.scss +150 -124
  128. package/src/scss/main.scss +1 -1
  129. package/src/scss/utilities/_accessibility.scss +46 -45
  130. package/src/scss/utilities/_aspect.scss +22 -20
  131. package/src/scss/utilities/_corner.scss +23 -5
  132. package/src/scss/utilities/_display.scss +76 -70
  133. package/src/scss/utilities/_elevation.scss +13 -11
  134. package/src/scss/utilities/_flex.scss +83 -85
  135. package/src/scss/utilities/_reveal.scss +40 -63
  136. package/src/scss/utilities/_spacing.scss +63 -64
  137. package/src/scss/utilities/_text.scss +139 -141
  138. package/src/scss/utilities/_touch-targets.scss +130 -147
@@ -1,89 +1,90 @@
1
1
  @use '../abstracts' as *;
2
2
 
3
- .mw-alert {
4
- position: relative;
5
- display: flex;
6
- align-items: flex-start;
7
- padding: spacing('4') spacing('5');
8
- margin-bottom: spacing('4');
9
- border-radius: radius('md');
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
- background: var(--mw-card-background);
12
- border: 1px solid var(--mw-border);
13
- box-shadow: var(--mw-elevation-2);
12
+ background: var(--mw-card-background);
13
+ border: 1px solid var(--mw-border);
14
+ box-shadow: var(--mw-elevation-2);
14
15
 
15
- &-icon {
16
- flex-shrink: 0;
17
- margin-right: spacing('4');
18
- font-size: font-size('xl');
19
- line-height: 1.2;
20
- margin-top: spacing('1');
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
- &-content {
24
- flex: 1;
25
- color: var(--mw-text-color);
26
- }
24
+ &-content {
25
+ flex: 1;
26
+ color: var(--mw-text-color);
27
+ }
27
28
 
28
- &-title {
29
- display: block;
30
- font-weight: font-weight('bold');
31
- margin-bottom: spacing('1');
32
- line-height: 1.3;
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
- // Text in body
36
- p {
37
- margin: 0;
38
- line-height: 1.5;
39
- font-size: font-size('sm');
40
- opacity: 0.9;
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
- & + p {
43
- margin-top: spacing('2');
43
+ & + p {
44
+ margin-top: spacing('2');
45
+ }
44
46
  }
45
- }
46
47
 
47
- &-closed {
48
- display: none !important;
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
- @include media-down('sm') {
52
- padding: spacing('4');
53
- &-icon {
54
- margin-right: spacing('3');
58
+ &-closed {
59
+ display: none;
55
60
  }
56
- }
57
- }
58
61
 
59
- // Close button
60
- .mw-alert-close {
61
- flex-shrink: 0;
62
- margin-left: spacing('3');
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
- // Color mapping
66
- $_mw-alert-colors: (
67
- primary: var(--mw-primary-color),
68
- secondary: var(--mw-secondary-color),
69
- info: var(--mw-info-color),
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
- // Color variants
76
- @each $name, $col in $_mw-alert-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);
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
- .mw-alert-icon {
86
- color: var(--mw-#{$name}-text-color);
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
- // The ribbon under the fixed header - a discount, a launch note, a maintenance
4
- // window. One per page, and always a single line of content with an optional
5
- // highlight pill in front of it.
6
- .mw-announcement {
7
- position: fixed;
8
- top: var(--mw-header-height);
9
- right: 0;
10
- left: 0;
11
- z-index: z-index('header') - 10;
12
- background: color-mix(in srgb, var(--mw-primary-color) 75%, transparent);
13
- backdrop-filter: blur(7px);
14
- color: var(--mw-primary-accent-text-color);
15
- box-shadow: var(--mw-elevation-2);
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
- display: flex;
21
- align-items: center;
22
- justify-content: center;
23
- gap: spacing('4');
24
- min-height: var(--mw-announcement-height);
25
- padding: spacing('1') spacing('4');
26
- font-size: font-size('sm');
27
- text-align: center;
28
- color: inherit;
29
- text-decoration: none;
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
- &:hover,
32
- &:focus-visible {
33
- background: color-mix(in srgb, #000 10%, transparent);
34
- }
32
+ &:hover,
33
+ &:focus-visible {
34
+ background: color-mix(in srgb, #000 10%, transparent);
35
+ }
35
36
 
36
- @include focus-ring-inset;
37
- @include tappable;
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
- flex-shrink: 0;
44
- padding: spacing('1') spacing('3');
45
- border-radius: 999px;
46
- background: color-mix(in srgb, #000 18%, transparent);
47
- font-weight: font-weight('bold');
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
- position: static;
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
- scroll-padding-top: calc(
63
- var(--mw-header-height) + var(--mw-announcement-height)
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
- :root {
72
- --mw-announcement-height: 3.4rem;
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
- // Color variants
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
- .mw-announcement-#{$name} {
81
- background: color-mix(in srgb, var(--mw-#{$name}-color) 75%, transparent);
82
- color: var(--mw-#{$name}-accent-text-color);
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
- $_mw-avatar-colors: (
4
- primary: var(--mw-primary-color),
5
- secondary: var(--mw-secondary-color),
6
- info: var(--mw-info-color),
7
- success: var(--mw-success-color),
8
- warning: var(--mw-warning-color),
9
- danger: var(--mw-danger-color),
10
- );
11
-
12
- .mw-avatar {
13
- display: inline-flex;
14
- position: relative;
15
- border-radius: radius('full');
16
- overflow: hidden;
17
- border: 3px solid var(--mw-border);
18
- box-shadow: var(--mw-elevation-3);
19
- margin: spacing('1');
20
-
21
- // Standard (md)
22
- width: 96px;
23
- height: 96px;
24
- flex-shrink: 0; // Prevents the avatar from shrinking
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
- // Group sizes
110
- &-sm .mw-avatar {
111
- margin-right: -10px;
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
- &-lg .mw-avatar {
115
- margin-right: -20px;
35
+ &-sm {
36
+ width: 64px;
37
+ height: 64px;
38
+ border-width: 2px;
39
+ font-size: font-size('xl');
116
40
  }
117
41
 
118
- .mw-avatar-xs {
119
- margin-right: -5px;
120
- }
121
- .mw-avatar-sm {
122
- margin-right: -10px;
42
+ &-lg {
43
+ width: 120px;
44
+ height: 120px;
45
+ border-width: 4px;
46
+ font-size: font-size('5xl');
123
47
  }
124
- .mw-avatar-lg {
125
- margin-right: -23px;
48
+
49
+ &-xl {
50
+ width: 150px;
51
+ height: 150px;
52
+ border-width: 5px;
53
+ font-size: font-size('6xl');
126
54
  }
127
- .mw-avatar-xl {
128
- margin-right: -32px;
55
+
56
+ &-square {
57
+ border-radius: radius('sm');
129
58
  }
130
59
 
131
- .mw-avatar:last-child {
132
- margin-right: spacing('0');
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
- @include media-down('sm') {
136
- // For small screens, create a more compact layout
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-right: -10px; // Reduce overlap on small screens
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
- @include media-down('sm') {
148
- &-lg {
149
- width: 120px;
150
- height: 120px;
151
- border-width: 4px;
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
- &-xl {
155
- width: 150px;
156
- height: 150px;
157
- border-width: 5px;
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 $_mw-avatar-colors {
163
- .mw-avatar-#{$name} {
164
- border-color: #{$col};
165
- }
149
+ @each $name, $col in $semantic-colors {
150
+ .mw-avatar-#{$name} {
151
+ border-color: #{$col};
152
+ }
166
153
 
167
- // On an initials avatar the same variant also tints the surface
168
- .mw-avatar-initials.mw-avatar-#{$name} {
169
- background: #{$col};
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
  }