maverick-wave 4.11.0 → 4.13.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.
@@ -162,7 +162,8 @@ Two shadows per level - a tight contact layer plus a wide ambient one:
162
162
  `0` is explicitly flat. Never write a `box-shadow` by hand - the twelve one-off
163
163
  values that used to exist are exactly what this replaced.
164
164
 
165
- **Motion** `--mw-duration-instant|fast|base|slow|slower` = 90/150/240/400/700ms,
165
+ **Motion** `--mw-duration-instant|fast|base|slow|slower` = 110/180/300/520/900ms
166
+ plus `--mw-duration-zoom` (650ms, for a large surface actually travelling),
166
167
  `--mw-ease-out` (things arriving - the default), `--mw-ease-in-out` (A to B and
167
168
  back), `--mw-ease-spring` (a pop). Two ready-made transitions:
168
169
  `var(--mw-transition)` for hover and focus states, `var(--mw-transition-fast)`
@@ -186,7 +187,8 @@ Everything below is documented in `references/components.md` unless marked other
186
187
 
187
188
  **Actions** `mw-btn` (+ `primary`, `secondary`, `danger`, `success`, `outline`,
188
189
  `ghost`, `ghost-danger`, `link`, `link-muted`, `plain`, `icon`, `block`, `sm`,
189
- `lg`) · `mw-btn-mini` · `mw-button-bar`
190
+ `lg`) · `mw-btn-mini` · `mw-link` / `mw-link-muted` (the link in running text) ·
191
+ `mw-button-bar`
190
192
  (+ `left`, `right`, `center`, `between`) · `mw-segmented` · `mw-actions-note`
191
193
 
192
194
  **Containers** `mw-card` (+ `simple`, `lg`, `xl`, `stack`, badge, ribbon,
@@ -352,10 +354,21 @@ spacing, flex, display, text
352
354
  comment. If your component really does need to animate a size, name that
353
355
  property - do not reach for `all`.
354
356
  27. **A control is a `<button>`, never a styled `<div>`.** `mw-tabs-nav-item`,
355
- `mw-theme-toggle` and `mw-gallery-dot` are all written for one, and all
356
- three shipped as divs and spans before 4.11 that no keyboard could reach.
357
+ `mw-theme-toggle`, `mw-gallery-dot` and `mw-accordion-header` are all
358
+ written for one, and all four shipped as divs and spans - the first three
359
+ until 4.11, the accordion header until 4.12 - that no keyboard could reach.
357
360
  Each class clears what a `<button>` brings with it, so
358
361
  `<button type="button" class="mw-tabs-nav-item" data-tab="...">` is the
359
362
  whole markup. If you build your own clickable thing: the element decides
360
363
  whether anyone without a mouse can use it, the class only decides how it
361
364
  looks.
365
+ 28. **A link in running text is `mw-link`, not `mw-btn mw-btn-link`.** Since
366
+ 4.13.0 there is a class for exactly that. `mw-btn` is `inline-flex` with
367
+ `min-height: var(--mw-control-height)`, so a link written that way pulls its
368
+ own line up to 2.25rem while every line around it keeps the paragraph's
369
+ height - in a footer disclaimer at `font-size: sm` that is nearly double,
370
+ and it reads as a layout bug. `mw-p-0` is not the fix it looks like: the
371
+ height does it, not the padding. `mw-link` is the same look without the
372
+ control height and works on an `<a>` and a `<button>` alike.
373
+ `mw-btn mw-btn-link` stays right where the link really is one of several
374
+ buttons and has to line up with them - a card's actions, a button bar.
@@ -194,7 +194,7 @@ export class ConfirmDialogComponent {
194
194
 
195
195
  ## Accordion
196
196
 
197
- `active` on the header **and** the content - no prefix.
197
+ `mw-active` on the header **and** the content.
198
198
 
199
199
  ```ts
200
200
  @Component({
@@ -203,16 +203,20 @@ export class ConfirmDialogComponent {
203
203
  <div class="mw-accordion">
204
204
  @for (item of items(); track item.id; let i = $index) {
205
205
  <div class="mw-accordion-item">
206
- <div
206
+ <button
207
+ type="button"
207
208
  class="mw-accordion-header"
208
209
  [class.mw-active]="openIndex() === i"
210
+ [attr.aria-expanded]="openIndex() === i"
211
+ [attr.aria-controls]="item.id"
209
212
  (click)="toggle(i)"
210
213
  >
211
- <h3>{{ item.question }}</h3>
214
+ <span>{{ item.question }}</span>
212
215
  <i class="fas fa-chevron-down mw-accordion-icon"></i>
213
- </div>
216
+ </button>
214
217
  <div
215
218
  class="mw-accordion-content"
219
+ [id]="item.id"
216
220
  [class.mw-active]="openIndex() === i"
217
221
  >
218
222
  <div class="mw-accordion-content-inner">{{ item.answer }}</div>
@@ -234,11 +234,16 @@ wired up by hand.
234
234
 
235
235
  <div class="mw-accordion">
236
236
  <div class="mw-accordion-item">
237
- <div class="mw-accordion-header mw-active">
238
- <h3>Where is the data stored?</h3>
237
+ <button
238
+ type="button"
239
+ class="mw-accordion-header mw-active"
240
+ aria-expanded="true"
241
+ aria-controls="faq-storage"
242
+ >
243
+ <span>Where is the data stored?</span>
239
244
  <i class="fas fa-chevron-down mw-accordion-icon"></i>
240
- </div>
241
- <div class="mw-accordion-content mw-active">
245
+ </button>
246
+ <div class="mw-accordion-content mw-active" id="faq-storage">
242
247
  <div class="mw-accordion-content-inner">
243
248
  <p>In Frankfurt, in our own data centre.</p>
244
249
  </div>
@@ -246,11 +251,16 @@ wired up by hand.
246
251
  </div>
247
252
 
248
253
  <div class="mw-accordion-item">
249
- <div class="mw-accordion-header">
250
- <h3>Can I cancel monthly?</h3>
254
+ <button
255
+ type="button"
256
+ class="mw-accordion-header"
257
+ aria-expanded="false"
258
+ aria-controls="faq-cancel"
259
+ >
260
+ <span>Can I cancel monthly?</span>
251
261
  <i class="fas fa-chevron-down mw-accordion-icon"></i>
252
- </div>
253
- <div class="mw-accordion-content">
262
+ </button>
263
+ <div class="mw-accordion-content" id="faq-cancel">
254
264
  <div class="mw-accordion-content-inner">
255
265
  <p>Yes, at the end of every billing period.</p>
256
266
  </div>
@@ -26,11 +26,38 @@ exhaustive: what is not named does not exist.
26
26
  - Every variant dips 1px on `:active`, and the solid ones invert their top
27
27
  highlight into an inner shadow. On touch that press is the only feedback there
28
28
  is, so do not override it away
29
- - `mw-btn-link` still has the button padding - `mw-p-0` makes it read as inline
30
- text
29
+ - **A link inside a sentence is `mw-link`, not `mw-btn mw-btn-link`.** The base
30
+ class carries a control height, so in running text it lifts that one line to
31
+ 2.25rem while the lines around it stay where they are. `mw-p-0` does not help
32
+ - the height does it, not the padding. Keep `mw-btn` only where the link
33
+ really is a button in a row of buttons and has to line up with them
31
34
  - On a coarse pointer or below 768px `mw-btn` grows to a 2.75rem minimum height
32
35
  and `mw-btn-sm` to 2.5rem, on their own
33
36
 
37
+ ```html
38
+ <!-- a button that happens to look like a link -->
39
+ <button type="button" class="mw-btn mw-btn-link">Read Article</button>
40
+
41
+ <!-- a link inside a sentence -->
42
+ <p>Built with <a href="https://astro.build" class="mw-link">Astro</a>.</p>
43
+ ```
44
+
45
+ ### Text links
46
+
47
+ `mw-link` and `mw-link-muted` are the inline links, added in 4.13.0. Same look
48
+ as the two button variants - no box, underline on hover - but without
49
+ `inline-flex` and without the control height, which is what makes them sit on
50
+ the line instead of above it. `font` and the focus ring are set explicitly, so
51
+ a `<button>` in the middle of a paragraph works as well as an `<a>`.
52
+
53
+ ```html
54
+ <p>
55
+ Built with <a href="https://astro.build" class="mw-link">Astro</a> and written
56
+ up in the
57
+ <a href="#get-started" class="mw-link-muted">Get Started</a> section.
58
+ </p>
59
+ ```
60
+
34
61
  ### Three emphasis levels
35
62
 
36
63
  `mw-btn-primary` (or any solid colour) **fills**, `mw-btn-outline` **draws a
@@ -79,7 +106,8 @@ and colour, and keeps exactly two things: the pointer and the focus ring. Used
79
106
  on its own - `mw-btn` is neither needed nor wanted next to it.
80
107
 
81
108
  Not the same as `mw-btn-link`, which is a button dressed as a link and brings
82
- its own colour and minimum width.
109
+ its own colour and control height, nor as `mw-link`, which is the link inside a
110
+ sentence.
83
111
 
84
112
  **Destructive actions use `mw-btn-danger`.** `mw-btn-secondary` is a brand
85
113
  colour, not a semantic one.
@@ -317,21 +345,32 @@ Tile sizes: `mw-tile-sm`, `mw-tile-lg`.
317
345
  ```html
318
346
  <div class="mw-accordion">
319
347
  <div class="mw-accordion-item">
320
- <div class="mw-accordion-header mw-active">
321
- <h3>Question</h3>
348
+ <button
349
+ type="button"
350
+ class="mw-accordion-header mw-active"
351
+ aria-expanded="true"
352
+ aria-controls="faq-1"
353
+ >
354
+ <span>Question</span>
322
355
  <i class="fas fa-chevron-down mw-accordion-icon"></i>
323
- </div>
324
- <div class="mw-accordion-content mw-active">
356
+ </button>
357
+ <div class="mw-accordion-content mw-active" id="faq-1">
325
358
  <div class="mw-accordion-content-inner">Answer</div>
326
359
  </div>
327
360
  </div>
328
361
  </div>
329
362
  ```
330
363
 
364
+ The header is a `<button>` - it is the control that opens the panel, and a
365
+ `<div>` is not focusable. A heading is not allowed inside a button, so the
366
+ question is a `<span>` and the header carries the type itself; a nested `h3`
367
+ still renders the same, for markup written before 4.12.
368
+
331
369
  Open state = `mw-active` on header **and** content (bare `active` still works
332
370
  but is deprecated). The icon rotates via the **header** state - putting the
333
371
  class on the icon instead does nothing. Content taller than 500px scrolls.
334
- Toggling is JS - see `references/javascript.md`.
372
+ Toggling is JS - see `references/javascript.md`; the shipped script keeps
373
+ `aria-expanded` in step when the header is a button.
335
374
 
336
375
  ## Tabs
337
376
 
@@ -27,7 +27,7 @@ classes are the entire contract.
27
27
 
28
28
  | Behaviour | What the shipped JS does | What to do instead |
29
29
  | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
30
- | Accordion | Toggles `mw-active` on `mw-accordion-header` and the following `mw-accordion-content` | `[class.mw-active]="isOpen()"` on both elements |
30
+ | Accordion | Toggles `mw-active` on `mw-accordion-header` and the following `mw-accordion-content`, and writes `aria-expanded` when the header is a `<button>` | `[class.mw-active]="isOpen()"` and `[attr.aria-expanded]="isOpen()"` on the header, `mw-active` on the panel |
31
31
  | Tabs | `data-tab` → panel `id`; sets `mw-active` on nav item and panel | Track the selected index/key, bind `mw-active` on both; drop `data-tab` |
32
32
  | Modal | Click on `mw-modal-close` removes `mw-modal-open` from the overlay | `[class.mw-modal-open]="isOpen()"`; backdrop click closes. Opening is not in the script at all (the showcase has its own `openModal`) |
33
33
  | Mobile nav | Toggles `open` on `mw-menu-btn` and `mw-navbar`, closes on anchor click | One signal, bound to both; reset it on navigation end |
package/CHANGELOG.md CHANGED
@@ -6,6 +6,18 @@ Patch releases are only for test purposes - here I only document major and minor
6
6
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
7
7
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
8
8
 
9
+ ## [4.13.0] - 2026-08-27
10
+
11
+ ### Added
12
+
13
+ - `mw-link` / `mw-link-muted` - the link inside a sentence, same look as `mw-btn-link` without the control height
14
+
15
+ ## [4.12.0] - 2026-08-27
16
+
17
+ ### Fixed
18
+
19
+ - some fixes because of the big update previously
20
+
9
21
  ## [4.11.0] - 2026-08-27
10
22
 
11
23
  ### Changed