maverick-wave 5.38.0 → 6.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 (69) hide show
  1. package/README.md +63 -47
  2. package/maverick-wave.min.css +94 -68
  3. package/maverick-wave.min.js +1 -1
  4. package/package.json +7 -7
  5. package/src/js/main.js +382 -57
  6. package/src/scss/abstracts/_mixins.scss +35 -24
  7. package/src/scss/abstracts/_variables.scss +15 -0
  8. package/src/scss/base/_base.scss +107 -64
  9. package/src/scss/base/_index.scss +1 -0
  10. package/src/scss/base/_page-transitions.scss +29 -0
  11. package/src/scss/base/_reset.scss +0 -8
  12. package/src/scss/components/_accordions.scss +23 -18
  13. package/src/scss/components/_action-bar.scss +143 -0
  14. package/src/scss/components/_alerts.scss +13 -1
  15. package/src/scss/components/_avatars.scss +17 -0
  16. package/src/scss/components/_badge.scss +12 -0
  17. package/src/scss/components/_breadcrumbs.scss +10 -2
  18. package/src/scss/components/_chat.scss +250 -0
  19. package/src/scss/components/_code.scss +3 -1
  20. package/src/scss/components/_compare.scss +135 -0
  21. package/src/scss/components/_deck.scss +8 -14
  22. package/src/scss/components/_devices.scss +323 -0
  23. package/src/scss/components/_dropdown.scss +43 -2
  24. package/src/scss/components/_empty-state.scss +43 -0
  25. package/src/scss/components/_flag.scss +16 -0
  26. package/src/scss/components/_index.scss +6 -0
  27. package/src/scss/components/_lightbox.scss +1 -1
  28. package/src/scss/components/_marquee.scss +132 -0
  29. package/src/scss/components/_modals.scss +112 -83
  30. package/src/scss/components/_occasions.scss +62 -11
  31. package/src/scss/components/_pagination.scss +91 -0
  32. package/src/scss/components/_portrait-gallery.scss +1 -1
  33. package/src/scss/components/_progress.scss +122 -2
  34. package/src/scss/components/_segmented.scss +65 -2
  35. package/src/scss/components/_skeleton.scss +8 -0
  36. package/src/scss/components/_spinners.scss +38 -0
  37. package/src/scss/components/_stat.scss +232 -0
  38. package/src/scss/components/_stepper.scss +42 -2
  39. package/src/scss/components/_stories.scss +36 -22
  40. package/src/scss/components/_tables.scss +160 -17
  41. package/src/scss/components/_tabs.scss +42 -4
  42. package/src/scss/components/_tags.scss +39 -4
  43. package/src/scss/components/_tiles.scss +1 -1
  44. package/src/scss/components/_timelines.scss +138 -1
  45. package/src/scss/components/_toasts.scss +5 -1
  46. package/src/scss/components/_tooltip.scss +13 -0
  47. package/src/scss/form-elements/_checkbox.scss +40 -7
  48. package/src/scss/form-elements/_form.scss +2 -4
  49. package/src/scss/form-elements/_input.scss +9 -6
  50. package/src/scss/form-elements/_radio.scss +32 -3
  51. package/src/scss/form-elements/_select.scss +44 -1
  52. package/src/scss/form-elements/_slider.scss +18 -0
  53. package/src/scss/form-elements/_textarea.scss +9 -6
  54. package/src/scss/form-elements/_toggle.scss +37 -4
  55. package/src/scss/layout/_app-shell.scss +661 -0
  56. package/src/scss/layout/_bento.scss +43 -0
  57. package/src/scss/layout/_footer.scss +114 -2
  58. package/src/scss/layout/_grid.scss +7 -2
  59. package/src/scss/layout/_header-reveal.scss +30 -17
  60. package/src/scss/layout/_header.scss +21 -4
  61. package/src/scss/layout/_index.scss +2 -0
  62. package/src/scss/layout/_parallax.scss +13 -11
  63. package/src/scss/utilities/_accessibility.scss +4 -19
  64. package/src/scss/utilities/_index.scss +1 -0
  65. package/src/scss/utilities/_print.scss +7 -3
  66. package/src/scss/utilities/_reveal.scss +25 -17
  67. package/src/scss/utilities/_shape.scss +24 -0
  68. package/src/scss/utilities/_touch-targets.scss +23 -0
  69. package/src/scss/utilities/_variants.scss +25 -6
@@ -72,9 +72,9 @@
72
72
  }
73
73
  }
74
74
 
75
- // Current page styling
75
+ // Marked, never guessed from position: a last item may well be a link
76
76
  &.mw-breadcrumbs-current a,
77
- &:last-child a {
77
+ a[aria-current='page'] {
78
78
  color: var(--mw-text-color);
79
79
  border-color: var(--mw-primary-text-color);
80
80
  cursor: default;
@@ -115,4 +115,12 @@
115
115
  }
116
116
  }
117
117
  }
118
+
119
+ // Forced colours paint every border alike, so the current step is underlined
120
+ @media (forced-colors: active) {
121
+ .mw-breadcrumbs-item.mw-breadcrumbs-current a,
122
+ .mw-breadcrumbs-item a[aria-current='page'] {
123
+ text-decoration: underline 2px;
124
+ }
125
+ }
118
126
  }
@@ -0,0 +1,250 @@
1
+ @use '../abstracts' as *;
2
+
3
+ @layer mw.components {
4
+ .mw-chat {
5
+ --mw-chat-bubble: var(--mw-card-background);
6
+
7
+ display: flex;
8
+ flex-direction: column;
9
+ gap: spacing('5');
10
+ }
11
+
12
+ // On a surface the card tone is the surface itself, only the border would show
13
+ :is(.mw-card, .mw-panel, .mw-modal, .mw-tile) .mw-chat {
14
+ --mw-chat-bubble: var(--mw-surface-muted);
15
+ }
16
+
17
+ .mw-chat-message {
18
+ display: flex;
19
+ align-items: flex-start;
20
+ gap: spacing('3');
21
+ max-width: min(100%, 44rem);
22
+
23
+ > .mw-avatar {
24
+ margin: 0;
25
+ }
26
+ }
27
+
28
+ .mw-chat-body {
29
+ display: flex;
30
+ flex-direction: column;
31
+ align-items: flex-start;
32
+ gap: spacing('1');
33
+ min-width: 0;
34
+ }
35
+
36
+ .mw-chat-meta {
37
+ display: flex;
38
+ flex-wrap: wrap;
39
+ align-items: baseline;
40
+ gap: spacing('1') spacing('2');
41
+ padding-inline: spacing('1');
42
+ font-size: font-size('xs');
43
+ color: var(--mw-text-muted-color);
44
+
45
+ strong {
46
+ color: var(--mw-text-color);
47
+ font-weight: font-weight('medium');
48
+ }
49
+ }
50
+
51
+ // The brand silhouette, sharp on the corner the message comes from
52
+ .mw-chat-bubble {
53
+ max-width: 100%;
54
+ padding: spacing('3') spacing('4');
55
+ background: var(--mw-chat-bubble);
56
+ border: 1px solid var(--mw-border);
57
+ border-radius: radius-sharp() radius('xl') radius-sharp() radius('xl');
58
+ color: var(--mw-text-color);
59
+ overflow-wrap: anywhere;
60
+
61
+ > :first-child {
62
+ margin-top: 0;
63
+ }
64
+
65
+ > :last-child {
66
+ margin-bottom: 0;
67
+ }
68
+
69
+ pre {
70
+ max-width: 100%;
71
+ overflow-x: auto;
72
+ }
73
+ }
74
+
75
+ .mw-chat-message-user {
76
+ flex-direction: row-reverse;
77
+ align-self: flex-end;
78
+ max-width: min(88%, 36rem);
79
+
80
+ .mw-chat-body {
81
+ align-items: flex-end;
82
+ }
83
+
84
+ .mw-chat-meta {
85
+ justify-content: flex-end;
86
+ }
87
+
88
+ .mw-chat-bubble {
89
+ background: var(--mw-primary-background);
90
+ border-color: var(--mw-border-accent);
91
+ border-radius: radius('xl') radius-sharp() radius('xl') radius-sharp();
92
+ }
93
+ }
94
+
95
+ .mw-chat-actions {
96
+ display: flex;
97
+ flex-wrap: wrap;
98
+ gap: spacing('1');
99
+ color: var(--mw-text-muted-color);
100
+
101
+ .mw-btn-ghost {
102
+ color: inherit;
103
+ }
104
+ }
105
+
106
+ // Tool activity and system lines - quieter than a message, in the message column
107
+ .mw-chat-note {
108
+ display: flex;
109
+ align-items: center;
110
+ gap: spacing('2');
111
+ padding-inline: spacing('1');
112
+ font-size: font-size('xs');
113
+ color: var(--mw-text-muted-color);
114
+ }
115
+
116
+ .mw-chat-typing {
117
+ display: inline-flex;
118
+ align-items: center;
119
+ gap: spacing('1');
120
+ height: 1lh;
121
+
122
+ > span {
123
+ width: 0.45rem;
124
+ height: 0.45rem;
125
+ border-radius: radius('full');
126
+ background: currentcolor;
127
+ opacity: 0.6;
128
+ animation-name: mw-chat-typing;
129
+ animation-duration: motion(1.2s);
130
+ animation-timing-function: var(--mw-ease-in-out);
131
+ animation-iteration-count: infinite;
132
+
133
+ &:nth-child(2) {
134
+ animation-delay: motion(0.15s);
135
+ }
136
+
137
+ &:nth-child(3) {
138
+ animation-delay: motion(0.3s);
139
+ }
140
+ }
141
+ }
142
+
143
+ @keyframes mw-chat-typing {
144
+ 0%,
145
+ 60%,
146
+ 100% {
147
+ opacity: 0.35;
148
+ transform: translateY(0);
149
+ }
150
+
151
+ 30% {
152
+ opacity: 1;
153
+ transform: translateY(-3px);
154
+ }
155
+ }
156
+
157
+ .mw-chat-thinking {
158
+ color: var(--mw-text-muted-color);
159
+ }
160
+
161
+ // Clipped text is invisible under forced colours, hence the extra media guard
162
+ @supports (background-clip: text) {
163
+ .mw-chat-thinking {
164
+ @include motion-safe {
165
+ @media (forced-colors: none) {
166
+ background-image: linear-gradient(
167
+ 90deg,
168
+ var(--mw-text-muted-color) 40%,
169
+ var(--mw-text-color) 50%,
170
+ var(--mw-text-muted-color) 60%
171
+ );
172
+ background-size: 250% 100%;
173
+ background-clip: text;
174
+ color: transparent;
175
+ animation-name: mw-chat-shimmer;
176
+ animation-duration: motion(2.2s);
177
+ animation-timing-function: linear;
178
+ animation-iteration-count: infinite;
179
+ }
180
+ }
181
+ }
182
+ }
183
+
184
+ @keyframes mw-chat-shimmer {
185
+ from {
186
+ background-position: 100% 0;
187
+ }
188
+
189
+ to {
190
+ background-position: 0 0;
191
+ }
192
+ }
193
+
194
+ .mw-chat-suggestions {
195
+ display: flex;
196
+ flex-wrap: wrap;
197
+ gap: spacing('2');
198
+
199
+ .mw-btn {
200
+ border-radius: radius('xl');
201
+ }
202
+ }
203
+
204
+ // Drawn like a field, light in both themes - see $form-elements-background
205
+ .mw-chat-composer {
206
+ display: flex;
207
+ flex-direction: column;
208
+ width: 100%;
209
+ background: var(--mw-form-elements-background);
210
+ color: var(--mw-form-elements-color);
211
+ border: 2px solid var(--mw-border);
212
+ border-radius: radius('md');
213
+ color-scheme: light;
214
+ transition: var(--mw-transition);
215
+
216
+ &:focus-within {
217
+ border-color: var(--mw-primary-color);
218
+ @include focus-halo;
219
+ }
220
+
221
+ .mw-textarea {
222
+ min-height: 3lh;
223
+ max-height: 12lh;
224
+ padding: spacing('3') spacing('4') spacing('1');
225
+ background: transparent;
226
+ border: 0;
227
+ box-shadow: none;
228
+
229
+ @supports (field-sizing: content) {
230
+ min-height: 0;
231
+ }
232
+ }
233
+
234
+ .mw-btn-ghost {
235
+ color: inherit;
236
+ }
237
+ }
238
+
239
+ .mw-chat-composer-bar {
240
+ display: flex;
241
+ flex-wrap: wrap;
242
+ align-items: center;
243
+ gap: spacing('2');
244
+ padding: spacing('2');
245
+
246
+ > :last-child {
247
+ margin-inline-start: auto;
248
+ }
249
+ }
250
+ }
@@ -36,10 +36,12 @@
36
36
  overflow-x: auto;
37
37
  border: none;
38
38
 
39
+ // The pre decides whether a long line wraps or scrolls
39
40
  code {
40
41
  color: inherit;
41
42
  padding: spacing('0');
42
- white-space: pre-wrap;
43
+ white-space: inherit;
44
+ word-break: inherit;
43
45
  display: block;
44
46
  line-height: 1.5;
45
47
  font-size: font-size('3xs');
@@ -0,0 +1,135 @@
1
+ @use '../abstracts' as *;
2
+
3
+ $_handle-arrows: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l-6 6 6 6M15 6l6 6-6 6'/%3E%3C/svg%3E");
4
+
5
+ @layer mw.components {
6
+ // An invisible native range over the frame: pointer, touch and keys for free
7
+ .mw-compare {
8
+ --mw-compare-position: 50%;
9
+
10
+ position: relative;
11
+ display: block;
12
+ overflow: hidden;
13
+ isolation: isolate;
14
+ border-radius: radius-sharp() radius('xl') radius-sharp() radius('xl');
15
+ background-color: $fixed-stage;
16
+ user-select: none;
17
+
18
+ :root.mw-corners-even & {
19
+ border-radius: radius('md');
20
+ }
21
+
22
+ &-before,
23
+ &-after {
24
+ display: block;
25
+ width: 100%;
26
+ height: 100%;
27
+ object-fit: cover;
28
+
29
+ img {
30
+ display: block;
31
+ width: 100%;
32
+ height: 100%;
33
+ object-fit: cover;
34
+ }
35
+ }
36
+
37
+ &-after {
38
+ position: absolute;
39
+ inset: 0;
40
+ clip-path: inset(0 0 0 var(--mw-compare-position));
41
+ }
42
+
43
+ // Drawn by the frame, because the range on top is invisible
44
+ &::before,
45
+ &::after {
46
+ content: '';
47
+ position: absolute;
48
+ left: var(--mw-compare-position);
49
+ z-index: z-index('lift');
50
+ pointer-events: none;
51
+ }
52
+
53
+ &::before {
54
+ inset-block: 0;
55
+ width: 2px;
56
+ translate: -50% 0;
57
+ background-color: $fixed-surface-text;
58
+ box-shadow: 0 0 0 1px rgb(0 0 0 / 25%);
59
+ }
60
+
61
+ &::after {
62
+ top: 50%;
63
+ width: 2.75rem;
64
+ aspect-ratio: 1;
65
+ translate: -50% -50%;
66
+ border: 2px solid $fixed-surface-text;
67
+ border-radius: radius('full');
68
+ background:
69
+ $_handle-arrows center / 55% no-repeat,
70
+ color-mix(in srgb, #{$fixed-stage} 55%, transparent);
71
+ box-shadow: var(--mw-elevation-2);
72
+ transition: var(--mw-transition-fast);
73
+ }
74
+
75
+ &:has(> .mw-compare-range:active)::after {
76
+ @include motion-safe {
77
+ transform: scale(1.1);
78
+ }
79
+ }
80
+
81
+ &:has(> .mw-compare-range:focus-visible)::after {
82
+ outline: var(--mw-focus-ring-width) solid var(--mw-focus-ring-color);
83
+ outline-offset: var(--mw-focus-ring-offset);
84
+ }
85
+
86
+ &-range {
87
+ position: absolute;
88
+ inset: 0;
89
+ z-index: z-index('lift');
90
+ width: 100%;
91
+ height: 100%;
92
+ margin: 0;
93
+ opacity: 0;
94
+ appearance: none;
95
+ background: transparent;
96
+ cursor: ew-resize;
97
+ // Vertical swipes still scroll the page on a phone
98
+ touch-action: pan-y;
99
+
100
+ // A hairline thumb, so a click lands on the split and not half a thumb off
101
+ &::-webkit-slider-thumb {
102
+ -webkit-appearance: none;
103
+ width: 2px;
104
+ height: 100%;
105
+ }
106
+
107
+ &::-moz-range-thumb {
108
+ width: 2px;
109
+ height: 100%;
110
+ border: 0;
111
+ }
112
+ }
113
+
114
+ &-label {
115
+ position: absolute;
116
+ top: spacing('4');
117
+ left: spacing('4');
118
+ z-index: z-index('lift');
119
+ padding: spacing('1') spacing('3');
120
+ border-radius: radius('sm');
121
+ background-color: color-mix(in srgb, #{$fixed-stage} 65%, transparent);
122
+ color: $fixed-surface-text;
123
+ font-size: font-size('xs');
124
+ font-weight: font-weight('medium');
125
+ letter-spacing: 0.06em;
126
+ text-transform: uppercase;
127
+ pointer-events: none;
128
+
129
+ &-after {
130
+ left: auto;
131
+ right: spacing('4');
132
+ }
133
+ }
134
+ }
135
+ }
@@ -87,21 +87,15 @@
87
87
  // .mw-accent-single on <html>, which makes the second colour the first.
88
88
  --mw-deck-second: var(--mw-secondary-color);
89
89
  --mw-deck-second-label: var(--mw-secondary-accent-text-color);
90
- --mw-deck-second-ink: var(--mw-secondary-text-color);
91
90
  --mw-deck-second-ink-dark: #{$_secondary-ink-dark};
92
- --mw-deck-first-ink: var(--mw-primary-text-color);
93
-
94
- // A browser without light-dark() keeps the theme's own inks
95
- @supports (color: light-dark(#000, #fff)) {
96
- --mw-deck-first-ink: light-dark(
97
- var(--mw-light-primary-text-color),
98
- #{$_primary-ink-dark}
99
- );
100
- --mw-deck-second-ink: light-dark(
101
- var(--mw-light-secondary-text-color),
102
- #{$_secondary-ink-dark}
103
- );
104
- }
91
+ --mw-deck-first-ink: light-dark(
92
+ var(--mw-light-primary-text-color),
93
+ #{$_primary-ink-dark}
94
+ );
95
+ --mw-deck-second-ink: light-dark(
96
+ var(--mw-light-secondary-text-color),
97
+ #{$_secondary-ink-dark}
98
+ );
105
99
 
106
100
  @include tone('page');
107
101