maverick-wave 5.39.0 → 6.1.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 +346 -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 +49 -20
  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 +5 -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 +44 -2
  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
package/README.md CHANGED
@@ -16,8 +16,10 @@ The result is a framework that balances utility with simplicity, offering develo
16
16
 
17
17
  ## Features
18
18
 
19
- - Responsive Grid System
19
+ - Responsive Grid System, plus a bento grid for tiles of mixed size
20
20
  - 30+ UI Components: Buttons, Cards, Panels, Tabs, Accordions, Modals, Tiles, Alerts, Spinners, Progress Bars, Avatars, Tags, Badges, Dropdown, Ratings, Stepper, Skeleton Loader, Empty State, Price, Offer Cards, Divider, and more
21
+ - Application building blocks: an app shell with a sidebar that folds to an icon rail, drawers, chat, stat tiles and meters
22
+ - Homepage specials: before/after compare, a mobile action bar for call, route and booking, a logo marquee, image shapes
21
23
  - Form Elements: Input, Select, Textarea, Checkbox, Radio, Toggle, Input Group, with `mw-field` wrapper pattern for Angular Reactive Forms
22
24
  - Utility Classes for spacing, flex, display, typography, text overflow, elevation and aspect ratio
23
25
  - A five-step elevation ramp and a motion scale, so every shadow and every transition in the framework comes from one place
@@ -25,8 +27,8 @@ The result is a framework that balances utility with simplicity, offering develo
25
27
  - Easy Customization via CSS Custom Properties
26
28
  - Built-in Light & Dark Mode - follows the OS by default, switchable per reader
27
29
  - SCSS Source Files for advanced customization (Dart Sass, `@use`/`@forward`)
28
- - Modals as `<div>` or as `<dialog>` - the latter brings the focus trap, Escape and the inert background from the platform
29
- - Native form validation is styled through `:user-invalid`, alongside the class-driven error states for reactive forms
30
+ - Modals and drawers on `<dialog>` - the focus trap, Escape and the inert background come from the platform
31
+ - Validation state read from the control itself - `:user-invalid`, `aria-invalid` and Angular's `ng-invalid ng-touched`
30
32
  - Minimal JavaScript footprint (single vanilla JS file, no dependencies)
31
33
 
32
34
  ## Installation & Usage
@@ -45,12 +47,12 @@ The result is a framework that balances utility with simplicity, offering develo
45
47
  <title>My MaverickWave Project</title>
46
48
  <link
47
49
  rel="stylesheet"
48
- href="https://cdn.jsdelivr.net/npm/maverick-wave@5.39.0/maverick-wave.min.css"
50
+ href="https://cdn.jsdelivr.net/npm/maverick-wave@6.1.0/maverick-wave.min.css"
49
51
  />
50
52
  </head>
51
53
  <body>
52
54
  <!-- Your content here -->
53
- <script src="https://cdn.jsdelivr.net/npm/maverick-wave@5.39.0/maverick-wave.min.js"></script>
55
+ <script src="https://cdn.jsdelivr.net/npm/maverick-wave@6.1.0/maverick-wave.min.js"></script>
54
56
  </body>
55
57
  </html>
56
58
  ```
@@ -123,10 +125,11 @@ which drives the dark card, footer and border tones. Each derived token can
123
125
  still be overridden individually if you want to break out of the scale.
124
126
 
125
127
  > The derivation needs `color-mix()` **and** relative colour syntax
126
- > (`oklch(from ...)`): Chrome 119+, Safari 16.4+, Firefox 128+. Older browsers
127
- > get no colours at all, not merely worse ones. The same floor is set as
128
- > `browserslist` in `package.json`, which is what Autoprefixer and cssnano read
129
- > when building `dist/`.
128
+ > (`oklch(from ...)`), and the two themes need `light-dark()`: Chrome and Edge
129
+ > 123+, Safari and iOS 17.5+, Firefox 140+ (ESR). Older browsers get no colours
130
+ > at all, not merely worse ones. The same floor is set as `browserslist` in
131
+ > `package.json`, which is what Autoprefixer and cssnano read when building
132
+ > `dist/`.
130
133
 
131
134
  ### Elevation and motion
132
135
 
@@ -196,7 +199,8 @@ one font scale instead of the select sitting a step below the input next to it.
196
199
  Under `prefers-reduced-motion: reduce` the duration tokens all drop to 1ms and a
197
200
  blanket rule catches anything that names its own timing - including whatever you
198
201
  wrote yourself. 1ms rather than 0, so a script waiting on `transitionend` still
199
- gets one.
202
+ gets one. `mw-motion-off` on `<html>` gives every reader the same page, script
203
+ included - for a motion switch on the site itself.
200
204
 
201
205
  To retune from SCSS instead, the same values are `$duration-*`, `$ease-*`,
202
206
  `$control-height*` / `$control-font*`, `$focus-ring-*` and `$shadow-near-*` /
@@ -356,26 +360,29 @@ layer of its own:
356
360
 
357
361
  ### Site-wide variants
358
362
 
359
- Fifteen classes on `<html>` retune the whole look without touching markup or
363
+ Eighteen classes on `<html>` retune the whole look without touching markup or
360
364
  rebuilding. They stack.
361
365
 
362
- | Class | Effect |
363
- | -------------------- | ----------------------------------------------------------------------- |
364
- | `mw-corners-even` | Drops the surface signature - every panel becomes an evenly rounded box |
365
- | `mw-accent-single` | One brand colour instead of two; `mw-btn-secondary` turns outline |
366
- | `mw-shadows-flat` | Elevation 1-3 to `none`; dropdown and modal keep theirs |
367
- | `mw-surfaces-flush` | Cards, panels and footer on the page colour, held by their border |
368
- | `mw-hover-static` | No hover travels - lifts and image zooms go, colour still responds |
369
- | `mw-scroll-static` | No scroll entrance - `mw-reveal` blocks sit where they land |
370
- | `mw-sections-plain` | The hatch behind `mw-section-alternate` collapses into the page colour |
371
- | `mw-headings-caps` | `h1`-`h3` in capitals |
372
- | `mw-links-underline` | Links underlined at rest; the stroke thickens on hover |
373
- | `mw-btn-pill` | Fully rounded buttons; form fields keep their radius |
374
- | `mw-btn-square` | Buttons cut to a hard corner while the page keeps its radius |
375
- | `mw-btn-glass` | Filled buttons become a translucent wash with a lit top edge |
376
- | `mw-btn-tactile` | Filled buttons stand on a darker edge and sink onto it when pressed |
377
- | `mw-density-compact` | Less padding in cards, panels and controls; type stays put |
378
- | `mw-density-roomy` | More of the same |
366
+ | Class | Effect |
367
+ | --------------------- | ----------------------------------------------------------------------- |
368
+ | `mw-corners-even` | Drops the surface signature - every panel becomes an evenly rounded box |
369
+ | `mw-accent-single` | One brand colour instead of two; `mw-btn-secondary` turns outline |
370
+ | `mw-accent-text-auto` | The label on every fill turns black or white by `contrast-color()` |
371
+ | `mw-shadows-flat` | Elevation 1-3 to `none`; dropdown and modal keep theirs |
372
+ | `mw-shadows-hard` | Every elevation becomes a hard offset without blur |
373
+ | `mw-surfaces-flush` | Cards, panels and footer on the page colour, held by their border |
374
+ | `mw-hover-static` | No hover travels - lifts and image zooms go, colour still responds |
375
+ | `mw-motion-off` | The reduced-motion page for every reader, script included |
376
+ | `mw-scroll-static` | No scroll entrance - `mw-reveal` blocks sit where they land |
377
+ | `mw-sections-plain` | The hatch behind `mw-section-alternate` collapses into the page colour |
378
+ | `mw-headings-caps` | `h1`-`h3` in capitals |
379
+ | `mw-links-underline` | Links underlined at rest; the stroke thickens on hover |
380
+ | `mw-btn-pill` | Fully rounded buttons; form fields keep their radius |
381
+ | `mw-btn-square` | Buttons cut to a hard corner while the page keeps its radius |
382
+ | `mw-btn-glass` | Filled buttons become a translucent wash with a lit top edge |
383
+ | `mw-btn-tactile` | Filled buttons stand on a darker edge and sink onto it when pressed |
384
+ | `mw-density-compact` | Less padding in cards, panels and controls; type stays put |
385
+ | `mw-density-roomy` | More of the same |
379
386
 
380
387
  Six properties do the rest: `--mw-radius-scale` multiplies every radius (`0`
381
388
  squares the framework off), `--mw-root-font-size` moves the whole rem scale,
@@ -388,10 +395,9 @@ and the URL carries whatever is set - send that link and the next person opens
388
395
  the page exactly as you left it. The panel prints the same setup as markup and
389
396
  CSS to copy into a project.
390
397
 
391
- A variant of your own that retunes a theme-bound token has to target
392
- `:root.your-class` **and** `:root.your-class .mw-theme-light` - the light theme
393
- re-declares those on `<body>` and would shadow a root-only value. The elevation
394
- tokens are the exception and need only `:root`.
398
+ A variant of your own needs only `:root.your-class`: the theme tokens are
399
+ `light-dark()` pairs resolved where they are used, and the theme classes switch
400
+ `color-scheme` plus the one non-colour token, `--mw-hero-image-filter`.
395
401
 
396
402
  ### SCSS Source
397
403
 
@@ -404,6 +410,9 @@ For full control, clone the repository and integrate `src/scss/main.scss` into y
404
410
  // Optional: choose theme mode ('switchable' | 'dark' | 'light')
405
411
  $mw-theme-mode: 'switchable',
406
412
 
413
+ // Optional: crossfade between pages (cross-document view transitions)
414
+ $mw-page-transitions: true,
415
+
407
416
  // Override root colors
408
417
  $primary-color: #0f766e,
409
418
  $secondary-color: #b45309,
@@ -447,6 +456,10 @@ They exist on the SCSS path only - the compiled CSS carries none of them.
447
456
  - `hit-area($grow: 6px)` - grows the hit area through `::after` without touching
448
457
  the silhouette, for a control whose size is the design. Neighbours need a gap
449
458
  of at least twice `$grow`, or two hit areas overlap.
459
+ - `motion-safe` / `motion-reduced` - inside a rule, the content applies only when
460
+ motion is allowed, or only when it is not. Both read `prefers-reduced-motion`
461
+ and `mw-motion-off`, so your own animation follows the site's switch too.
462
+ - `visually-hidden` - out of sight, still read by a screen reader.
450
463
 
451
464
  ```scss
452
465
  @use 'maverick-wave/src/scss/abstracts' as *;
@@ -487,8 +500,8 @@ have no use for the marketing components (`blog-post`, `gallery`,
487
500
  @use 'maverick-wave/src/scss/utilities';
488
501
  ```
489
502
 
490
- A typical application subset like the one above compiles to roughly 113 kB raw /
491
- 17 kB gzipped, against 281 kB / 40 kB for the full build.
503
+ A typical application subset like the one above compiles to roughly 129 kB raw /
504
+ 20 kB gzipped, against 518 kB / 72 kB for the full build.
492
505
 
493
506
  > **`base` is not optional.** It carries the `:root` custom properties - without
494
507
  > it every component renders without colors. If you bring your own reset, use
@@ -511,7 +524,7 @@ above):
511
524
  > change detection. The behaviors it covers (accordion, tabs, modal close, mobile
512
525
  > nav, scroll spy, theme toggle, progress bars, sliders, alerts, galleries) are a
513
526
  > few lines each in a component - the framework's state classes are the whole
514
- > contract. Theme switching, for example, is a pair of classes on `<body>`:
527
+ > contract. Theme switching, for example, is a pair of classes on `<html>`:
515
528
 
516
529
  ```typescript
517
530
  // theme.service.ts - mw-theme-switching suppresses the transitions the flip
@@ -519,10 +532,10 @@ above):
519
532
  const root = document.documentElement;
520
533
 
521
534
  root.classList.add('mw-theme-switching');
522
- document.body.classList.toggle('mw-theme-light', isLight);
535
+ root.classList.toggle('mw-theme-light', isLight);
523
536
  // the explicit counterpart - without it a dark choice on a light machine
524
537
  // falls back to the OS preference
525
- document.body.classList.toggle('mw-theme-dark', !isLight);
538
+ root.classList.toggle('mw-theme-dark', !isLight);
526
539
  void root.offsetHeight;
527
540
  root.classList.remove('mw-theme-switching');
528
541
  ```
@@ -530,19 +543,22 @@ root.classList.remove('mw-theme-switching');
530
543
  With neither class the page follows `prefers-color-scheme`, so an app that has
531
544
  nothing stored yet can simply leave both off.
532
545
 
533
- The `mw-field` wrapper groups label, control, hint and error. Bind the error
534
- state yourself - the framework does not style Angular's `ng-invalid` /
535
- `ng-touched` classes:
546
+ The `mw-field` wrapper groups label, control, hint and error. The control turns
547
+ red on its own from Angular's `ng-invalid ng-touched`; the message is yours to
548
+ render:
536
549
 
537
550
  ```html
538
- <div
539
- class="mw-field"
540
- [class.mw-field-has-error]="email.invalid && email.touched"
541
- >
551
+ <div class="mw-field">
542
552
  <label class="mw-field-label mw-required" for="email">Email</label>
543
- <input id="email" type="email" class="mw-input" formControlName="email" />
553
+ <input
554
+ id="email"
555
+ type="email"
556
+ class="mw-input"
557
+ formControlName="email"
558
+ aria-describedby="email-error"
559
+ />
544
560
  @if (email.invalid && email.touched) {
545
- <span class="mw-field-error">
561
+ <span class="mw-field-error" id="email-error">
546
562
  <i class="fas fa-exclamation-circle"></i> Please enter a valid email
547
563
  address.
548
564
  </span>
@@ -608,7 +624,7 @@ maverick-wave/
608
624
  ├── scripts/verify.js # Class and token consistency check (npm run verify)
609
625
  ├── .prettierrc.json # Prettier configuration
610
626
  ├── gulpfile.js # Gulp tasks configuration
611
- ├── index.html # Showcase entry point
627
+ ├── *.html # Showcase pages, one per section
612
628
  └── package.json
613
629
  ```
614
630