maverick-wave 3.6.0 → 3.6.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maverick-wave",
3
- "version": "3.6.0",
3
+ "version": "3.6.2",
4
4
  "config": {
5
5
  "version_short": "3.6"
6
6
  },
@@ -2,7 +2,7 @@
2
2
 
3
3
  <h3 class="mw-mb-4">Standard Cards</h3>
4
4
  <div class="mw-grid-3">
5
- <div class="mw-card mw-card-content">
5
+ <div class="mw-card">
6
6
  <div class="mw-card-img">
7
7
  <img
8
8
  src="https://images.unsplash.com/photo-1550745165-9bc0b252726f?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"
@@ -26,7 +26,7 @@
26
26
  </div>
27
27
  </div>
28
28
 
29
- <div class="mw-card mw-card-content">
29
+ <div class="mw-card">
30
30
  <div class="mw-card-body">
31
31
  <h3 class="mw-card-title">Project Update</h3>
32
32
  <hr class="mw-card-title-divider" />
@@ -44,7 +44,7 @@
44
44
  </div>
45
45
  </div>
46
46
 
47
- <div class="mw-card mw-card-content">
47
+ <div class="mw-card">
48
48
  <div class="mw-card-body">
49
49
  <h3 class="mw-card-title">Development Stack</h3>
50
50
  <hr class="mw-card-title-divider" />
@@ -166,8 +166,13 @@
166
166
  while maintaining centering and proportions. (See the first large and the
167
167
  second extra large card)
168
168
  </p>
169
+ <p class="mw-text-muted">
170
+ Besides <code>mw-card-lg</code> and <code>mw-card-xl</code> you can set any
171
+ image height yourself with the <code>--mw-card-img-height</code> custom
172
+ property on the card.
173
+ </p>
169
174
  <div class="mw-grid-2">
170
- <div class="mw-card mw-card-content mw-card-lg">
175
+ <div class="mw-card mw-card-lg">
171
176
  <div class="mw-card-img">
172
177
  <img
173
178
  src="https://images.unsplash.com/photo-1493246507139-91e8fad9978e?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"
@@ -178,7 +183,7 @@
178
183
  <h3 class="mw-card-title">Large Card</h3>
179
184
  <hr class="mw-card-title-divider" />
180
185
  <p class="mw-card-text">
181
- Large cards feature taller images (330px height) that work well for
186
+ Large cards feature taller images (340px height) that work well for
182
187
  portrait-oriented photos or when you want to showcase more of your
183
188
  visual content.
184
189
  </p>
@@ -191,7 +196,7 @@
191
196
  </div>
192
197
  </div>
193
198
 
194
- <div class="mw-card mw-card-content mw-card-lg">
199
+ <div class="mw-card mw-card-lg">
195
200
  <div class="mw-card-img">
196
201
  <img
197
202
  src="https://images.unsplash.com/photo-1517841905240-472988babdf9?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"
@@ -221,7 +226,7 @@
221
226
  <code>mw-card-img-contain</code> class on the second image.
222
227
  </p>
223
228
  <div class="mw-grid-2">
224
- <div class="mw-card mw-card-content mw-card-xl">
229
+ <div class="mw-card mw-card-xl">
225
230
  <div class="mw-card-img">
226
231
  <img
227
232
  src="https://images.unsplash.com/photo-1544005313-94ddf0286df2?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"
@@ -247,7 +252,7 @@
247
252
  </div>
248
253
  </div>
249
254
 
250
- <div class="mw-card mw-card-content mw-card-xl">
255
+ <div class="mw-card mw-card-xl">
251
256
  <div class="mw-card-img-contain">
252
257
  <img
253
258
  src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?ixlib=rb-4.0.3&auto=format&fit=crop&w=800&q=80"
@@ -273,7 +278,7 @@
273
278
 
274
279
  <h3 class="mw-mb-4 mw-mt-6">Card Variations</h3>
275
280
  <div class="mw-grid-3">
276
- <div class="mw-card mw-card-content">
281
+ <div class="mw-card">
277
282
  <div class="mw-card-body">
278
283
  <h3 class="mw-card-title">Card with Tags</h3>
279
284
  <hr class="mw-card-title-divider" />
@@ -291,7 +296,7 @@
291
296
  </div>
292
297
  </div>
293
298
 
294
- <div class="mw-card mw-card-content">
299
+ <div class="mw-card">
295
300
  <div class="mw-card-body">
296
301
  <h3 class="mw-card-title">Card with Avatar</h3>
297
302
  <hr class="mw-card-title-divider" />
@@ -315,7 +320,7 @@
315
320
  </div>
316
321
  </div>
317
322
 
318
- <div class="mw-card mw-card-content">
323
+ <div class="mw-card">
319
324
  <div class="mw-card-body">
320
325
  <h3 class="mw-card-title">Card with Progress</h3>
321
326
  <hr class="mw-card-title-divider" />
@@ -351,7 +356,7 @@
351
356
  <h3 class="mw-card-title">Badges</h3>
352
357
  <div class="mw-grid-2-lg">
353
358
  <!-- Badge 1 -->
354
- <div class="mw-card mw-card-content">
359
+ <div class="mw-card">
355
360
  <div class="mw-card-badge mw-card-addon-primary">New</div>
356
361
  <div class="mw-card-body">
357
362
  <h3 class="mw-card-title">Latest Gadget</h3>
@@ -365,7 +370,7 @@
365
370
  </div>
366
371
  </div>
367
372
  <!-- Badge 2 -->
368
- <div class="mw-card mw-card-content">
373
+ <div class="mw-card">
369
374
  <div class="mw-card-badge mw-card-addon-secondary">Hot</div>
370
375
  <div class="mw-card-img">
371
376
  <img
@@ -385,7 +390,7 @@
385
390
  </div>
386
391
  </div>
387
392
  <!-- Badge 3 -->
388
- <div class="mw-card mw-card-content">
393
+ <div class="mw-card">
389
394
  <div class="mw-card-badge mw-card-addon-success">Sale</div>
390
395
  <div class="mw-card-img">
391
396
  <img
@@ -407,7 +412,7 @@
407
412
  </div>
408
413
  </div>
409
414
  <!-- Badge 4 -->
410
- <div class="mw-card mw-card-content">
415
+ <div class="mw-card">
411
416
  <div class="mw-card-badge mw-card-addon-danger">Limited</div>
412
417
  <div class="mw-card-body">
413
418
  <h3 class="mw-card-title">Limited Offer</h3>
@@ -430,7 +435,7 @@
430
435
  <h3 class="mw-card-title">Ribbons</h3>
431
436
  <div class="mw-grid-2-lg">
432
437
  <!-- Ribbon 1 -->
433
- <div class="mw-card mw-card-content">
438
+ <div class="mw-card">
434
439
  <div class="mw-card-ribbon mw-card-addon-primary">Featured</div>
435
440
  <div class="mw-card-img">
436
441
  <img
@@ -450,7 +455,7 @@
450
455
  </div>
451
456
  </div>
452
457
  <!-- Ribbon 2 -->
453
- <div class="mw-card mw-card-content">
458
+ <div class="mw-card">
454
459
  <div class="mw-card-ribbon mw-card-addon-info">
455
460
  <span>Info</span>
456
461
  </div>
@@ -468,7 +473,7 @@
468
473
  </div>
469
474
  </div>
470
475
  <!-- Ribbon 3 -->
471
- <div class="mw-card mw-card-content">
476
+ <div class="mw-card">
472
477
  <div class="mw-card-ribbon mw-card-addon-warning">Beta</div>
473
478
  <div class="mw-card-img">
474
479
  <img
@@ -488,7 +493,7 @@
488
493
  </div>
489
494
  </div>
490
495
  <!-- Ribbon 4 -->
491
- <div class="mw-card mw-card-content">
496
+ <div class="mw-card">
492
497
  <div class="mw-card-ribbon mw-card-addon-danger">Highlight Project</div>
493
498
  <div class="mw-card-body">
494
499
  <h3 class="mw-card-title">VIP Access</h3>
@@ -10,7 +10,7 @@
10
10
  <div class="mw-timeline-big-date-main">01/2023 – Present</div>
11
11
  </div>
12
12
  <div class="mw-timeline-big-content">
13
- <div class="mw-card mw-card-content">
13
+ <div class="mw-card">
14
14
  <div class="mw-card-body">
15
15
  <h3 class="mw-card-title">Lead Developer</h3>
16
16
  <p class="mw-card-subtitle">Innovatech Inc • San Francisco</p>
@@ -41,7 +41,7 @@
41
41
  <div class="mw-timeline-big-date-sub">(1 year 4 months)</div>
42
42
  </div>
43
43
  <div class="mw-timeline-big-content">
44
- <div class="mw-card mw-card-content">
44
+ <div class="mw-card">
45
45
  <div class="mw-card-body">
46
46
  <h3 class="mw-card-title">Senior Developer</h3>
47
47
  <p class="mw-card-subtitle">Innovatech Inc • San Francisco</p>
@@ -78,7 +78,7 @@
78
78
  <div class="mw-timeline-big-date-sub">(1 year 1 month)</div>
79
79
  </div>
80
80
  <div class="mw-timeline-big-content">
81
- <div class="mw-card mw-card-content">
81
+ <div class="mw-card">
82
82
  <div class="mw-card-body">
83
83
  <h3 class="mw-card-title">Mid-Level Developer</h3>
84
84
  <p class="mw-card-subtitle">DevSolutions LLC • Remote</p>
@@ -109,7 +109,7 @@
109
109
  <div class="mw-timeline-big-date-sub">(2 year 3 months)</div>
110
110
  </div>
111
111
  <div class="mw-timeline-big-content">
112
- <div class="mw-card mw-card-content">
112
+ <div class="mw-card">
113
113
  <div class="mw-card-body">
114
114
  <h3 class="mw-card-title">Junior Developer</h3>
115
115
  <p class="mw-card-subtitle">StartupXYZ • Berlin</p>
@@ -115,3 +115,38 @@
115
115
  </div>
116
116
  </div>
117
117
  </div>
118
+
119
+ <h3 class="mw-mb-4 mw-mt-6">Tooltips</h3>
120
+ <p class="mw-text-muted">
121
+ Put <code>data-tooltip="..."</code> on any element - pure CSS, no script
122
+ needed. The bubble sits above the element on hover or keyboard focus and long
123
+ text wraps instead of running off in one endless line. It reaches outside a
124
+ card, because cards only clip their content when they carry a ribbon. What
125
+ does still cut it off: a scroll container, and the edge of the screen.
126
+ </p>
127
+ <div class="mw-card mw-card-simple">
128
+ <p class="mw-mb-4">
129
+ Works on inline elements too:
130
+ <a href="#utilities" data-tooltip="A link">a link</a>,
131
+ <code data-tooltip="Some code">a code span</code> or
132
+ <i class="fas fa-circle-info" data-tooltip="An icon"></i> an icon.
133
+ </p>
134
+ <div class="mw-d-flex mw-gap-4 mw-flex-wrap">
135
+ <button
136
+ type="button"
137
+ class="mw-btn mw-btn-outline"
138
+ data-tooltip="Hover or focus me"
139
+ >
140
+ A button
141
+ </button>
142
+ <span class="mw-tag mw-tag-primary" data-tooltip="Tags work as well">
143
+ Tag
144
+ </span>
145
+ <span
146
+ class="mw-tag mw-tag-success"
147
+ data-tooltip="Long text wraps at 280px instead of running off the screen in one endless line"
148
+ >
149
+ Long text
150
+ </span>
151
+ </div>
152
+ </div>
@@ -126,7 +126,7 @@
126
126
  height: 18px;
127
127
  border-radius: radius('full');
128
128
  background: var(--mw-gray-color);
129
- color: var(--mw-accent-text-color);
129
+ color: #efefef;
130
130
  border: none;
131
131
  padding: 0;
132
132
  line-height: 1;
@@ -9,20 +9,37 @@ $_mw-card-addon-colors: (
9
9
  danger: var(--mw-danger-color),
10
10
  );
11
11
 
12
+ // Fading rule used by the title divider and the stack header underline
13
+ @mixin _card-divider-gradient {
14
+ background-image: linear-gradient(
15
+ to right,
16
+ var(--mw-secondary-color),
17
+ var(--mw-secondary-color),
18
+ var(--mw-gray-background),
19
+ transparent
20
+ );
21
+ opacity: 0.75;
22
+ }
23
+
12
24
  .mw-card {
25
+ // flex column so the footer can be pushed to the bottom - no height: 100%,
26
+ // grid and flex items already stretch and it would blow up block parents
27
+ display: flex;
28
+ flex-direction: column;
13
29
  background: var(--mw-card-background);
14
30
  border-radius: radius('sm') radius('xl') radius('sm') radius('xl');
15
- padding: spacing('5') spacing('0') spacing('3') spacing('0');
16
31
  box-shadow: 0 5px 10px var(--mw-shadow);
17
- transition: var(--mw-transition);
18
32
  border: 1px solid var(--mw-border);
33
+ transition: var(--mw-transition);
19
34
  position: relative;
20
- overflow: hidden;
21
- margin: spacing('0');
22
- z-index: z-index('card');
35
+ // deliberately not `overflow: hidden` - that would also cut off anything a
36
+ // child wants to show outside the card, a tooltip above a button being the
37
+ // common case. Images round their own corners below, and only the ribbon
38
+ // really needs the card to clip.
39
+ overflow: visible;
23
40
 
24
- &-simple {
25
- padding: spacing('5');
41
+ &:has(.mw-card-ribbon) {
42
+ overflow: hidden;
26
43
  }
27
44
 
28
45
  &:hover {
@@ -31,6 +48,13 @@ $_mw-card-addon-colors: (
31
48
  border-color: var(--mw-border-accent);
32
49
  }
33
50
 
51
+ // Padded surface for arbitrary content - stays a block container so inline
52
+ // children keep flowing instead of turning into flex items
53
+ &-simple {
54
+ display: block;
55
+ padding: spacing('5');
56
+ }
57
+
34
58
  &-badge {
35
59
  position: absolute;
36
60
  top: spacing('2');
@@ -38,10 +62,10 @@ $_mw-card-addon-colors: (
38
62
  padding: spacing('1') spacing('4');
39
63
  font-size: font-size('xs');
40
64
  color: var(--mw-accent-text-color);
41
- background: var(--mw-primary-color);
65
+ background: var(--mw-card-addon-color, var(--mw-primary-color));
42
66
  border-radius: radius('md');
43
67
  white-space: nowrap;
44
- z-index: z-index('card') + 5;
68
+ z-index: 1;
45
69
  pointer-events: none;
46
70
  text-align: center;
47
71
  opacity: 0.9;
@@ -55,10 +79,10 @@ $_mw-card-addon-colors: (
55
79
  padding: spacing('1') spacing('4');
56
80
  font-size: font-size('xs');
57
81
  color: var(--mw-accent-text-color);
58
- background: var(--mw-primary-color);
82
+ background: var(--mw-card-addon-color, var(--mw-primary-color));
59
83
  white-space: nowrap;
60
84
  width: 220px;
61
- z-index: z-index('card') + 5;
85
+ z-index: 1;
62
86
  pointer-events: none;
63
87
  transform: rotate(25deg);
64
88
  text-align: center;
@@ -69,27 +93,18 @@ $_mw-card-addon-colors: (
69
93
  }
70
94
  }
71
95
 
72
- // Content card variant - uses flex layout for footer positioning
73
- &-content {
74
- display: flex;
75
- flex-direction: column;
76
- height: 100%;
77
- }
78
-
79
- &-img {
80
- height: 210px;
96
+ &-img,
97
+ &-img-contain {
98
+ height: var(--mw-card-img-height, 210px);
81
99
  overflow: hidden;
82
- top: 0;
83
- left: 0;
84
- margin-top: -1 * spacing('5');
85
100
  flex-shrink: 0;
101
+ border-radius: (radius('sm') - 1px) (radius('xl') - 1px) 0 0;
86
102
 
87
103
  img {
88
104
  width: 100%;
89
105
  height: 100%;
90
106
  object-fit: cover;
91
107
  transition: var(--mw-transition);
92
- z-index: z-index('card') + 2;
93
108
  }
94
109
 
95
110
  &:hover img {
@@ -97,11 +112,20 @@ $_mw-card-addon-colors: (
97
112
  }
98
113
  }
99
114
 
100
- &-img-contain {
101
- @extend .mw-card-img;
102
- img {
103
- object-fit: contain;
104
- object-position: center;
115
+ &-img-contain img {
116
+ object-fit: contain;
117
+ object-position: center;
118
+ }
119
+
120
+ &-lg {
121
+ --mw-card-img-height: 340px;
122
+ }
123
+
124
+ &-xl {
125
+ --mw-card-img-height: 480px;
126
+
127
+ @include media-down('sm') {
128
+ --mw-card-img-height: 440px;
105
129
  }
106
130
  }
107
131
 
@@ -109,7 +133,20 @@ $_mw-card-addon-colors: (
109
133
  display: flex;
110
134
  flex-direction: column;
111
135
  flex-grow: 1;
112
- padding: spacing('5');
136
+ padding: spacing('7') spacing('5') spacing('6');
137
+
138
+ @include media-down('sm') {
139
+ padding: spacing('6') spacing('4') spacing('5');
140
+ }
141
+
142
+ > *:last-child:not(.mw-card-footer) {
143
+ margin-bottom: spacing('0');
144
+ }
145
+
146
+ .mw-card-footer {
147
+ margin-top: auto;
148
+ padding-top: spacing('5');
149
+ }
113
150
  }
114
151
 
115
152
  &-title {
@@ -124,15 +161,8 @@ $_mw-card-addon-colors: (
124
161
  height: 4px;
125
162
  margin: spacing('1') spacing('0') spacing('4') spacing('0');
126
163
  border: 0;
127
- background-image: linear-gradient(
128
- to right,
129
- var(--mw-secondary-color),
130
- var(--mw-secondary-color),
131
- var(--mw-gray-background),
132
- transparent
133
- );
134
- opacity: 0.75;
135
164
  width: 70%;
165
+ @include _card-divider-gradient;
136
166
  }
137
167
 
138
168
  &-subtitle {
@@ -154,15 +184,6 @@ $_mw-card-addon-colors: (
154
184
  }
155
185
  }
156
186
 
157
- &-body > *:last-child:not(.mw-card-footer) {
158
- margin-bottom: spacing('0');
159
- }
160
-
161
- &-body .mw-card-footer {
162
- margin-top: auto;
163
- padding-top: spacing('5');
164
- }
165
-
166
187
  &-footer {
167
188
  display: flex;
168
189
  justify-content: flex-start;
@@ -171,7 +192,7 @@ $_mw-card-addon-colors: (
171
192
  flex-shrink: 0;
172
193
  text-wrap: balance;
173
194
 
174
- /* push the last element all the way right */
195
+ /* push the last element all the way right - a single one included */
175
196
  > *:last-child {
176
197
  margin-left: auto;
177
198
  text-align: right;
@@ -199,41 +220,9 @@ $_mw-card-addon-colors: (
199
220
  }
200
221
  }
201
222
 
202
- // Card sizes
203
- &-lg {
204
- .mw-card-img {
205
- height: 340px;
206
- }
207
- }
208
-
209
- &-xl {
210
- .mw-card-img {
211
- height: 480px;
212
- @include media-down('sm') {
213
- height: 440px;
214
- }
215
- }
216
- }
217
-
218
- @include media-down('sm') {
219
- &-body {
220
- padding: spacing('4');
221
- }
222
-
223
- // Adjust the image margin to match the new padding
224
- .mw-card-img {
225
- margin-bottom: spacing('2');
226
- img {
227
- width: 100%;
228
- }
229
- }
230
- }
231
-
232
223
  &-stack {
233
224
  padding: spacing('4') spacing('5');
234
- transition: all 0.4s ease;
235
225
 
236
- // Icon transition setup
237
226
  &-icon {
238
227
  width: 38px;
239
228
  height: 38px;
@@ -247,15 +236,13 @@ $_mw-card-addon-colors: (
247
236
  font-size: font-size('md');
248
237
  flex-shrink: 0;
249
238
  box-shadow: 0 4px 8px var(--mw-shadow);
250
- transition: transform 0.6s ease;
239
+ transition: var(--mw-transition);
251
240
  }
252
241
 
253
- // Add rotation on hover
254
242
  &:hover &-icon {
255
243
  transform: rotate(25deg);
256
244
  }
257
245
 
258
- // Rest of your styles...
259
246
  &-header {
260
247
  display: flex;
261
248
  align-items: center;
@@ -265,18 +252,11 @@ $_mw-card-addon-colors: (
265
252
  content: '';
266
253
  position: absolute;
267
254
  bottom: spacing('-3');
268
- left: 48%;
255
+ left: 50%;
269
256
  transform: translateX(-50%);
270
257
  width: 90%;
271
258
  height: 2px;
272
- background-image: linear-gradient(
273
- to right,
274
- var(--mw-secondary-color),
275
- var(--mw-secondary-color),
276
- var(--mw-gray-background),
277
- transparent
278
- );
279
- opacity: 0.75;
259
+ @include _card-divider-gradient;
280
260
  }
281
261
  }
282
262
 
@@ -307,6 +287,22 @@ $_mw-card-addon-colors: (
307
287
 
308
288
  @each $name, $col in $_mw-card-addon-colors {
309
289
  .mw-card-addon-#{$name} {
310
- background: #{$col};
290
+ --mw-card-addon-color: #{$col};
291
+ }
292
+ }
293
+
294
+ @media (prefers-reduced-motion: reduce) {
295
+ .mw-card,
296
+ .mw-card-img img,
297
+ .mw-card-img-contain img,
298
+ .mw-card-stack-icon {
299
+ transition: none;
300
+ }
301
+
302
+ .mw-card:hover,
303
+ .mw-card-img:hover img,
304
+ .mw-card-img-contain:hover img,
305
+ .mw-card-stack:hover .mw-card-stack-icon {
306
+ transform: none;
311
307
  }
312
308
  }
@@ -46,7 +46,7 @@
46
46
  border: none;
47
47
  border-radius: radius('md');
48
48
  background: rgb(0 0 0 / 40%);
49
- color: var(--mw-accent-text-color);
49
+ color: #efefef;
50
50
  font-size: font-size('xl');
51
51
  line-height: 1;
52
52
  cursor: pointer;
@@ -92,7 +92,7 @@ button.mw-info {
92
92
  height: 20px;
93
93
  border-radius: radius('full');
94
94
  background: var(--mw-gray-color);
95
- color: var(--mw-accent-text-color);
95
+ color: #efefef;
96
96
  border: none;
97
97
  padding: 0;
98
98
  line-height: 1;
@@ -11,14 +11,20 @@
11
11
  border-bottom: 1px solid var(--mw-header-border);
12
12
  padding: spacing('3') spacing('0');
13
13
  transition: var(--mw-transition);
14
-
15
- // Flex, so the container stays vertically centered once the height token
16
- // exceeds the intrinsic content height. min-height, so a too-small token
17
- // never clips a taller logo or a wrapping action row.
18
14
  display: flex;
19
15
  align-items: center;
20
16
  min-height: var(--mw-header-height);
21
17
 
18
+ // A component host (Angular, React) sitting between the header and its
19
+ // container would become the flex item and shrink to content width, leaving
20
+ // mw-container to center inside a far too narrow box. The container brings
21
+ // its own width and centering, so the wrapper only has to fill the line.
22
+ // Absolutely positioned children are out of flow and stay unaffected.
23
+ > *:not(.mw-container) {
24
+ flex: 1;
25
+ min-width: 0;
26
+ }
27
+
22
28
  .mw-container {
23
29
  display: flex;
24
30
  justify-content: space-between;