maverick-wave 5.39.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.
- package/README.md +63 -47
- package/maverick-wave.min.css +94 -68
- package/maverick-wave.min.js +1 -1
- package/package.json +7 -7
- package/src/js/main.js +346 -57
- package/src/scss/abstracts/_mixins.scss +35 -24
- package/src/scss/abstracts/_variables.scss +15 -0
- package/src/scss/base/_base.scss +107 -64
- package/src/scss/base/_index.scss +1 -0
- package/src/scss/base/_page-transitions.scss +29 -0
- package/src/scss/base/_reset.scss +0 -8
- package/src/scss/components/_accordions.scss +23 -18
- package/src/scss/components/_action-bar.scss +143 -0
- package/src/scss/components/_alerts.scss +13 -1
- package/src/scss/components/_avatars.scss +17 -0
- package/src/scss/components/_badge.scss +12 -0
- package/src/scss/components/_breadcrumbs.scss +10 -2
- package/src/scss/components/_chat.scss +250 -0
- package/src/scss/components/_code.scss +3 -1
- package/src/scss/components/_compare.scss +135 -0
- package/src/scss/components/_deck.scss +8 -14
- package/src/scss/components/_devices.scss +49 -20
- package/src/scss/components/_dropdown.scss +43 -2
- package/src/scss/components/_empty-state.scss +43 -0
- package/src/scss/components/_flag.scss +16 -0
- package/src/scss/components/_index.scss +5 -0
- package/src/scss/components/_lightbox.scss +1 -1
- package/src/scss/components/_marquee.scss +132 -0
- package/src/scss/components/_modals.scss +112 -83
- package/src/scss/components/_occasions.scss +62 -11
- package/src/scss/components/_pagination.scss +91 -0
- package/src/scss/components/_portrait-gallery.scss +1 -1
- package/src/scss/components/_progress.scss +122 -2
- package/src/scss/components/_segmented.scss +65 -2
- package/src/scss/components/_skeleton.scss +8 -0
- package/src/scss/components/_spinners.scss +38 -0
- package/src/scss/components/_stat.scss +232 -0
- package/src/scss/components/_stepper.scss +42 -2
- package/src/scss/components/_stories.scss +36 -22
- package/src/scss/components/_tables.scss +160 -17
- package/src/scss/components/_tabs.scss +42 -4
- package/src/scss/components/_tags.scss +39 -4
- package/src/scss/components/_tiles.scss +1 -1
- package/src/scss/components/_timelines.scss +138 -1
- package/src/scss/components/_toasts.scss +5 -1
- package/src/scss/components/_tooltip.scss +13 -0
- package/src/scss/form-elements/_checkbox.scss +40 -7
- package/src/scss/form-elements/_form.scss +2 -4
- package/src/scss/form-elements/_input.scss +9 -6
- package/src/scss/form-elements/_radio.scss +32 -3
- package/src/scss/form-elements/_select.scss +44 -1
- package/src/scss/form-elements/_slider.scss +18 -0
- package/src/scss/form-elements/_textarea.scss +9 -6
- package/src/scss/form-elements/_toggle.scss +37 -4
- package/src/scss/layout/_app-shell.scss +661 -0
- package/src/scss/layout/_bento.scss +43 -0
- package/src/scss/layout/_footer.scss +114 -2
- package/src/scss/layout/_grid.scss +7 -2
- package/src/scss/layout/_header-reveal.scss +30 -17
- package/src/scss/layout/_header.scss +21 -4
- package/src/scss/layout/_index.scss +2 -0
- package/src/scss/layout/_parallax.scss +13 -11
- package/src/scss/utilities/_accessibility.scss +4 -19
- package/src/scss/utilities/_index.scss +1 -0
- package/src/scss/utilities/_print.scss +7 -3
- package/src/scss/utilities/_reveal.scss +25 -17
- package/src/scss/utilities/_shape.scss +24 -0
- package/src/scss/utilities/_touch-targets.scss +23 -0
- 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
|
|
29
|
-
-
|
|
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@
|
|
50
|
+
href="https://cdn.jsdelivr.net/npm/maverick-wave@6.0.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@
|
|
55
|
+
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@6.0.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 ...)`)
|
|
127
|
-
>
|
|
128
|
-
>
|
|
129
|
-
> when building
|
|
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
|
-
|
|
363
|
+
Eighteen classes on `<html>` retune the whole look without touching markup or
|
|
360
364
|
rebuilding. They stack.
|
|
361
365
|
|
|
362
|
-
| Class
|
|
363
|
-
|
|
|
364
|
-
| `mw-corners-even`
|
|
365
|
-
| `mw-accent-single`
|
|
366
|
-
| `mw-
|
|
367
|
-
| `mw-
|
|
368
|
-
| `mw-
|
|
369
|
-
| `mw-
|
|
370
|
-
| `mw-
|
|
371
|
-
| `mw-
|
|
372
|
-
| `mw-
|
|
373
|
-
| `mw-
|
|
374
|
-
| `mw-
|
|
375
|
-
| `mw-
|
|
376
|
-
| `mw-btn-
|
|
377
|
-
| `mw-
|
|
378
|
-
| `mw-
|
|
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
|
|
392
|
-
|
|
393
|
-
|
|
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
|
|
491
|
-
|
|
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 `<
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
534
|
-
|
|
535
|
-
|
|
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
|
|
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
|
-
├──
|
|
627
|
+
├── *.html # Showcase pages, one per section
|
|
612
628
|
└── package.json
|
|
613
629
|
```
|
|
614
630
|
|