maverick-wave 3.3.0 → 3.3.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/.claude/skills/maverick-wave/SKILL.md +208 -0
- package/.claude/skills/maverick-wave/examples/angular-form.md +275 -0
- package/.claude/skills/maverick-wave/examples/angular-list-page.md +304 -0
- package/.claude/skills/maverick-wave/examples/angular-services.md +348 -0
- package/.claude/skills/maverick-wave/examples/static-landing-page.md +362 -0
- package/.claude/skills/maverick-wave/references/components.md +812 -0
- package/.claude/skills/maverick-wave/references/forms.md +289 -0
- package/.claude/skills/maverick-wave/references/javascript.md +70 -0
- package/.claude/skills/maverick-wave/references/layout.md +300 -0
- package/.claude/skills/maverick-wave/references/theming.md +192 -0
- package/.github/workflows/ci.yml +41 -0
- package/CHANGELOG.md +13 -0
- package/README.md +115 -21
- package/index.html +15 -9
- package/maverick-wave.min.css +1 -1
- package/maverick-wave.min.js +1 -1
- package/package.json +3 -1
- package/scripts/verify.js +137 -0
- package/src/js/main.js +39 -11
- package/src/partials/accordions-container.html +22 -27
- package/src/partials/alerts-container.html +26 -0
- package/src/partials/avatars-container.html +22 -0
- package/src/partials/buttons-container.html +11 -15
- package/src/partials/cards-container.html +8 -8
- package/src/partials/colors-container.html +33 -20
- package/src/partials/documentation-container.html +3 -0
- package/src/partials/form-field-container.html +16 -12
- package/src/partials/get-started-container.html +93 -35
- package/src/partials/header-utilities-container.html +64 -6
- package/src/partials/input-group-container.html +5 -3
- package/src/partials/page-header-container.html +78 -0
- package/src/partials/tables-container.html +130 -0
- package/src/partials/tabs-container.html +20 -16
- package/src/partials/tags-container.html +55 -1
- package/src/scss/abstracts/_index.scss +4 -1
- package/src/scss/abstracts/_variables.scss +128 -106
- package/src/scss/base/_base.scss +32 -136
- package/src/scss/base/_reset.scss +1 -1
- package/src/scss/base/_typography.scss +0 -92
- package/src/scss/components/_accordions.scss +3 -3
- package/src/scss/components/_avatars.scss +28 -1
- package/src/scss/components/_blog-post.scss +1 -1
- package/src/scss/components/_button-bar.scss +6 -6
- package/src/scss/components/_buttons.scss +33 -10
- package/src/scss/components/_cards.scss +7 -7
- package/src/scss/components/_coming-soon.scss +4 -4
- package/src/scss/components/_gallery.scss +2 -2
- package/src/scss/components/_index.scss +1 -0
- package/src/scss/components/_info.scss +20 -3
- package/src/scss/components/_lists.scss +11 -10
- package/src/scss/components/_modals.scss +14 -7
- package/src/scss/components/_pagination.scss +3 -3
- package/src/scss/components/_panels.scss +4 -4
- package/src/scss/components/_progress.scss +1 -1
- package/src/scss/components/_ratings.scss +1 -1
- package/src/scss/components/_spinners.scss +2 -2
- package/src/scss/components/_stepper.scss +3 -2
- package/src/scss/components/_tables.scss +42 -1
- package/src/scss/components/_tabs.scss +5 -5
- package/src/scss/components/_tags.scss +43 -27
- package/src/scss/components/_tiles.scss +3 -3
- package/src/scss/components/_timelines.scss +2 -2
- package/src/scss/components/_toasts.scss +92 -0
- package/src/scss/form-elements/_form.scss +11 -3
- package/src/scss/form-elements/_input.scss +24 -0
- package/src/scss/form-elements/_toggle.scss +1 -1
- package/src/scss/layout/_footer.scss +4 -4
- package/src/scss/layout/_header.scss +219 -59
- package/src/scss/layout/_index.scss +1 -0
- package/src/scss/layout/_main.scss +1 -1
- package/src/scss/layout/_page-header.scss +48 -0
- package/src/scss/layout/_section.scss +15 -14
- package/src/scss/main.scss +4 -0
- package/src/scss/utilities/_flex.scss +4 -0
- package/src/scss/utilities/_index.scss +1 -0
- package/src/scss/utilities/_text.scss +105 -0
- package/.claude/commands/mw.md +0 -595
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# Theming, tokens & partial imports
|
|
2
|
+
|
|
3
|
+
## The model
|
|
4
|
+
|
|
5
|
+
Twelve colours are configured, everything else is derived from them **at
|
|
6
|
+
runtime** with `color-mix()`. Overriding a root token therefore retunes its
|
|
7
|
+
whole family - hover tone, translucent backgrounds, borders. That is the
|
|
8
|
+
difference to pre-3.4.0, where derived values were baked in at compile time and
|
|
9
|
+
a palette switch meant setting 41 variables.
|
|
10
|
+
|
|
11
|
+
```css
|
|
12
|
+
/* loaded after maverick-wave.min.css */
|
|
13
|
+
:root {
|
|
14
|
+
--mw-primary-color: #0f766e; /* also retunes hover, backgrounds, border accent */
|
|
15
|
+
--mw-secondary-color: #f39c12;
|
|
16
|
+
|
|
17
|
+
--mw-success-color: #218838;
|
|
18
|
+
--mw-warning-color: #d4a310;
|
|
19
|
+
--mw-danger-color: #c82333;
|
|
20
|
+
--mw-info-color: #17a2b8;
|
|
21
|
+
|
|
22
|
+
--mw-gray-color: #565656;
|
|
23
|
+
|
|
24
|
+
--mw-dark-page-background: #0b111a;
|
|
25
|
+
--mw-dark-text-color: #d6dbdf;
|
|
26
|
+
--mw-light-page-background: #d2d1e1;
|
|
27
|
+
--mw-light-text-color: #1a1a1d;
|
|
28
|
+
|
|
29
|
+
--mw-form-elements-background: #efefef;
|
|
30
|
+
|
|
31
|
+
/* text on every solid coloured surface */
|
|
32
|
+
--mw-accent-text-color: #ffffff;
|
|
33
|
+
|
|
34
|
+
--mw-font-family-base: 'Inter', sans-serif;
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Which token for what
|
|
39
|
+
|
|
40
|
+
| Token | Role |
|
|
41
|
+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
42
|
+
| `--mw-primary-color` | Brand colour: primary buttons, table headers, focus rings, active states |
|
|
43
|
+
| `--mw-primary-color-hover` | Solid hover surface (derived: base + 18% black) |
|
|
44
|
+
| `--mw-primary-background` | 20% tint - focus halo, scrollbar tracks |
|
|
45
|
+
| `--mw-primary-background-hover` | 50% tint - row and list hover |
|
|
46
|
+
| `--mw-primary-info-background` | 70% tint - alert and info surfaces |
|
|
47
|
+
| `--mw-border-accent` | Translucent accent **line**: panel rules, dividers, tab underlines |
|
|
48
|
+
| `--mw-secondary-*` | Same set for the second brand colour |
|
|
49
|
+
| `--mw-success/warning/danger/info-color` | Status colours, each with `-color-hover`, `-info-background`, `-info-background-hover` |
|
|
50
|
+
| `--mw-accent-text-color` | Text on any solid coloured surface (buttons, table/panel headers, badges, stepper dots) |
|
|
51
|
+
| `--mw-gray-color` | Neutral foreground: muted icons, tooltips |
|
|
52
|
+
| `--mw-gray-background` | Subtle neutral surface (20% alpha): zebra rows, disabled fields, tracks, skeletons |
|
|
53
|
+
| `--mw-overlay-background` | Heavy scrim (60%) behind modals and blocking spinners |
|
|
54
|
+
| `--mw-page-background`, `--mw-card-background`, `--mw-footer-background`, `--mw-border`, `--mw-shadow`, `--mw-text-color`, `--mw-text-muted-color`, `--mw-hero-overlay-background` | The **active theme** - aliases pointing at the `--mw-dark-*` or `--mw-light-*` set |
|
|
55
|
+
| `--mw-header-*` | Header chrome: `background`, `text-color`, `navbar-list-color`, `navbar-list-active-color`, `burgerbutton-color`, `border` - dark in both themes |
|
|
56
|
+
| `--mw-form-elements-background`, `--mw-form-elements-color` | Form controls stay light in both themes and therefore have their own pair |
|
|
57
|
+
| `--mw-font-family-base`, `-heading`, `-mono` | Font stacks (default: system stacks - no font is bundled) |
|
|
58
|
+
| `--mw-hero-background` | Hero image (`url(...)`) |
|
|
59
|
+
| `--mw-transition` | Global transition (`all 0.3s ease`) |
|
|
60
|
+
| `--mw-table-scroll-height` | Per-table height cap for `mw-table-responsive-scroll` |
|
|
61
|
+
| `--mw-internal-theme-mode` | Read-only: what `$mw-theme-mode` was compiled to |
|
|
62
|
+
|
|
63
|
+
Two rules that prevent most colour bugs:
|
|
64
|
+
|
|
65
|
+
1. **Surfaces are opaque, lines are translucent.** For a coloured surface use
|
|
66
|
+
`--mw-*-color` / `--mw-*-color-hover`; for a rule or outline use
|
|
67
|
+
`--mw-border-accent` or `--mw-border`.
|
|
68
|
+
2. **`--mw-text-muted-color` is only for text on theme surfaces** (cards, page
|
|
69
|
+
background) - it follows the theme. On a colour surface that stays the same
|
|
70
|
+
in both themes it is always wrong: use `--mw-accent-text-color`, or `opacity`
|
|
71
|
+
for a disabled look.
|
|
72
|
+
|
|
73
|
+
## Light & dark
|
|
74
|
+
|
|
75
|
+
- Dark is the base. Light is applied by putting `mw-theme-light` on `<body>` -
|
|
76
|
+
that class only re-points the theme aliases at the `--mw-light-*` set.
|
|
77
|
+
- Header, footer chrome and form controls deliberately stay dark/light
|
|
78
|
+
respectively in both themes.
|
|
79
|
+
- Persisting the choice, the toggle UI and the initial class are the
|
|
80
|
+
application's job in a SPA (`examples/angular-services.md`). The shipped JS
|
|
81
|
+
does it for static pages using `localStorage` under the key `mw-theme`.
|
|
82
|
+
|
|
83
|
+
```ts
|
|
84
|
+
document.body.classList.toggle('mw-theme-light', isLight);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## SCSS configuration
|
|
88
|
+
|
|
89
|
+
Only `@use ... with (...)` works - a plain assignment before the `@use` has no
|
|
90
|
+
effect, because the root colours are declared with `!default`.
|
|
91
|
+
|
|
92
|
+
```scss
|
|
93
|
+
@use 'maverick-wave/src/scss/main' with (
|
|
94
|
+
$mw-theme-mode: 'switchable',
|
|
95
|
+
// 'switchable' | 'dark' | 'light'
|
|
96
|
+
$primary-color: #0f766e,
|
|
97
|
+
$secondary-color: #f39c12,
|
|
98
|
+
$success-color: #218838,
|
|
99
|
+
$warning-color: #d4a310,
|
|
100
|
+
$danger-color: #c82333,
|
|
101
|
+
$info-color: #17a2b8,
|
|
102
|
+
$gray-color: #565656,
|
|
103
|
+
$dark-background: #0b111a,
|
|
104
|
+
$dark-text-color: #d6dbdf,
|
|
105
|
+
$light-background: #d2d1e1,
|
|
106
|
+
$light-text-color: #1a1a1d,
|
|
107
|
+
$form-elements-background: #efefef,
|
|
108
|
+
$mw-hero-image: url('/assets/hero.jpg')
|
|
109
|
+
);
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
`$mw-theme-mode: 'dark'` or `'light'` compiles a single theme - the other set of
|
|
113
|
+
variables is omitted and `mw-theme-light` has no effect. The theme toggle
|
|
114
|
+
component reads `--mw-internal-theme-mode` and disables itself.
|
|
115
|
+
|
|
116
|
+
Overriding a value that is not on the list above is done in CSS afterwards -
|
|
117
|
+
they are all `var()` references anyway:
|
|
118
|
+
|
|
119
|
+
```scss
|
|
120
|
+
@use 'maverick-wave/src/scss/main' with (
|
|
121
|
+
$primary-color: #0f766e
|
|
122
|
+
);
|
|
123
|
+
|
|
124
|
+
:root {
|
|
125
|
+
/* break out of the derived scale for one token */
|
|
126
|
+
--mw-primary-background-hover: color-mix(
|
|
127
|
+
in srgb,
|
|
128
|
+
var(--mw-primary-color) 35%,
|
|
129
|
+
transparent
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## Importing only what you need
|
|
135
|
+
|
|
136
|
+
The full stylesheet is ~147 kB raw / ~22.5 kB gzipped. Marketing components
|
|
137
|
+
(`blog-post`, `gallery`, `content-slider`, `techstack-bucket`, `tiles`,
|
|
138
|
+
`coming-soon`, `ratings`, `home`, `hero`) are dead weight in an application, and
|
|
139
|
+
Angular bundle budgets notice.
|
|
140
|
+
|
|
141
|
+
Every layer forwards one module per file, and no `@extend` crosses a file
|
|
142
|
+
boundary, so partial imports are safe. **The one thing you must not drop is
|
|
143
|
+
`base`** - it carries the `:root` tokens; without it every component renders
|
|
144
|
+
colourless.
|
|
145
|
+
|
|
146
|
+
```scss
|
|
147
|
+
// styles.scss - configure first, then pick
|
|
148
|
+
@use 'maverick-wave/src/scss/abstracts/variables' with (
|
|
149
|
+
$primary-color: #0f766e
|
|
150
|
+
);
|
|
151
|
+
|
|
152
|
+
@use 'maverick-wave/src/scss/base'; // :root tokens + reset + typography
|
|
153
|
+
|
|
154
|
+
@use 'maverick-wave/src/scss/layout/grid';
|
|
155
|
+
@use 'maverick-wave/src/scss/layout/main';
|
|
156
|
+
@use 'maverick-wave/src/scss/layout/page-header';
|
|
157
|
+
@use 'maverick-wave/src/scss/layout/section';
|
|
158
|
+
|
|
159
|
+
@use 'maverick-wave/src/scss/components/alerts';
|
|
160
|
+
@use 'maverick-wave/src/scss/components/buttons';
|
|
161
|
+
@use 'maverick-wave/src/scss/components/cards';
|
|
162
|
+
@use 'maverick-wave/src/scss/components/empty-state';
|
|
163
|
+
@use 'maverick-wave/src/scss/components/modals';
|
|
164
|
+
@use 'maverick-wave/src/scss/components/panels';
|
|
165
|
+
@use 'maverick-wave/src/scss/components/skeleton';
|
|
166
|
+
@use 'maverick-wave/src/scss/components/spinners';
|
|
167
|
+
@use 'maverick-wave/src/scss/components/tables';
|
|
168
|
+
@use 'maverick-wave/src/scss/components/tags';
|
|
169
|
+
@use 'maverick-wave/src/scss/components/toasts';
|
|
170
|
+
|
|
171
|
+
@use 'maverick-wave/src/scss/form-elements'; // or single files
|
|
172
|
+
@use 'maverick-wave/src/scss/utilities';
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
That set compiles to ~98 kB raw / ~15 kB gzipped - a third off the full build.
|
|
176
|
+
|
|
177
|
+
Details worth knowing:
|
|
178
|
+
|
|
179
|
+
- **Configuration has to come first.** `abstracts/variables` must be configured
|
|
180
|
+
before any other module loads it, so the `with (...)` line goes at the top of
|
|
181
|
+
the file. Configuring `main` instead pulls in everything again.
|
|
182
|
+
- `base` forwards `reset`, `base` and `typography`. If you already have your own
|
|
183
|
+
reset, `@use '.../base/base'` gives you the `:root` block alone (~9 kB with a
|
|
184
|
+
component or two).
|
|
185
|
+
- Module names are the file names without the leading underscore:
|
|
186
|
+
`components/_buttons.scss` becomes `components/buttons`.
|
|
187
|
+
- Layer index files (`components`, `form-elements`, `layout`, `utilities`,
|
|
188
|
+
`base`) pull in their whole layer - convenient for the small ones
|
|
189
|
+
(`utilities`, `form-elements`), wasteful for `components`.
|
|
190
|
+
- Some components expect a sibling: `lists` styles checkbox rows and looks best
|
|
191
|
+
with `form-elements/checkbox`; `tags` uses `mw-btn-mini` from `buttons` for
|
|
192
|
+
its remove button.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
build:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
|
|
16
|
+
- uses: actions/setup-node@v4
|
|
17
|
+
with:
|
|
18
|
+
node-version: 22
|
|
19
|
+
cache: npm
|
|
20
|
+
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: npm ci
|
|
23
|
+
|
|
24
|
+
- name: Check formatting
|
|
25
|
+
run: npm run format:check
|
|
26
|
+
|
|
27
|
+
# Fails on any Sass error, so a broken @use or an unknown function
|
|
28
|
+
# never reaches a release
|
|
29
|
+
- name: Build
|
|
30
|
+
run: npm run build
|
|
31
|
+
|
|
32
|
+
# Token and class consistency between the built CSS and the markup
|
|
33
|
+
- name: Verify
|
|
34
|
+
run: npm run verify
|
|
35
|
+
|
|
36
|
+
- name: Upload build output
|
|
37
|
+
uses: actions/upload-artifact@v4
|
|
38
|
+
with:
|
|
39
|
+
name: dist
|
|
40
|
+
path: dist/
|
|
41
|
+
retention-days: 7
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,19 @@ 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
|
+
## [3.4.0] - 2026-08-04
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- Claude Code skill
|
|
14
|
+
- some new elements
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
|
|
18
|
+
- Big update!
|
|
19
|
+
- A few claude code ideas from a few other private projects
|
|
20
|
+
- Small fixes
|
|
21
|
+
|
|
9
22
|
## [3.3.0] - 2026-04-12
|
|
10
23
|
|
|
11
24
|
### Fixed
|
package/README.md
CHANGED
|
@@ -63,48 +63,128 @@ Download `maverick-wave.min.css` and `maverick-wave.min.js` from the [latest rel
|
|
|
63
63
|
|
|
64
64
|
### CSS Custom Properties
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
There are thirteen root color tokens. Everything else — hover tones, translucent
|
|
67
|
+
backgrounds, borders, muted text — is derived from them at runtime with
|
|
68
|
+
`color-mix()`, so overriding a root token is enough. Load your stylesheet
|
|
69
|
+
**after** `maverick-wave.min.css`:
|
|
67
70
|
|
|
68
71
|
```css
|
|
69
72
|
:root {
|
|
70
|
-
|
|
71
|
-
--mw-
|
|
73
|
+
/* brand */
|
|
74
|
+
--mw-primary-color: #e94560;
|
|
75
|
+
--mw-secondary-color: #f39c12;
|
|
76
|
+
|
|
77
|
+
/* status */
|
|
78
|
+
--mw-success-color: #218838;
|
|
79
|
+
--mw-warning-color: #d4a310;
|
|
80
|
+
--mw-danger-color: #c82333;
|
|
81
|
+
--mw-info-color: #17a2b8;
|
|
82
|
+
|
|
83
|
+
/* neutrals and themes */
|
|
84
|
+
--mw-gray-color: #565656;
|
|
72
85
|
--mw-dark-page-background: #1a1a2e;
|
|
73
|
-
--mw-dark-
|
|
86
|
+
--mw-dark-text-color: #d6dbdf;
|
|
87
|
+
--mw-light-page-background: #f8f9fa;
|
|
88
|
+
--mw-light-text-color: #1a1a1d;
|
|
89
|
+
--mw-form-elements-background: #ffffff;
|
|
90
|
+
|
|
91
|
+
/* text on solid colored surfaces: buttons, table and panel headers */
|
|
92
|
+
--mw-accent-text-color: #ffffff;
|
|
93
|
+
|
|
74
94
|
--mw-font-family-base: 'Your Font Name', sans-serif;
|
|
75
95
|
}
|
|
76
96
|
```
|
|
77
97
|
|
|
98
|
+
Setting `--mw-primary-color` alone also retunes `--mw-primary-color-hover`,
|
|
99
|
+
`--mw-primary-background`, `--mw-primary-background-hover`,
|
|
100
|
+
`--mw-primary-info-background` and `--mw-border-accent`. The same holds for
|
|
101
|
+
`--mw-dark-page-background`, which drives the dark card, footer and border
|
|
102
|
+
tones. Each derived token can still be overridden individually if you want to
|
|
103
|
+
break out of the scale.
|
|
104
|
+
|
|
78
105
|
### SCSS Source
|
|
79
106
|
|
|
80
|
-
For full control, clone the repository and integrate `src/scss/main.scss` into your Sass build (Dart Sass required). MaverickWave uses modern `@use`/`@forward` syntax.
|
|
107
|
+
For full control, clone the repository and integrate `src/scss/main.scss` into your Sass build (Dart Sass required). MaverickWave uses modern `@use`/`@forward` syntax. Pass your overrides through `with`:
|
|
81
108
|
|
|
82
109
|
```scss
|
|
83
110
|
// your styles.scss
|
|
84
111
|
|
|
85
|
-
|
|
86
|
-
|
|
112
|
+
@use 'path/to/maverick-wave/src/scss/main' with (
|
|
113
|
+
// Optional: choose theme mode ('switchable' | 'dark' | 'light')
|
|
114
|
+
$mw-theme-mode: 'switchable',
|
|
115
|
+
|
|
116
|
+
// Override root colors
|
|
117
|
+
$primary-color: #e94560,
|
|
118
|
+
$secondary-color: #f39c12,
|
|
119
|
+
$dark-background: #1f1f2e,
|
|
120
|
+
$light-background: #f8f9fa
|
|
121
|
+
);
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
> Plain variable assignments before `@use` have no effect — the framework
|
|
125
|
+
> declares its root colors with `!default`, which only `@use ... with` feeds.
|
|
126
|
+
|
|
127
|
+
### Importing Only What You Need
|
|
87
128
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
129
|
+
Every layer forwards one module per file and no `@extend` crosses a file
|
|
130
|
+
boundary, so components can be imported individually. Applications typically
|
|
131
|
+
have no use for the marketing components (`blog-post`, `gallery`,
|
|
132
|
+
`content-slider`, `techstack-bucket`, `tiles`, `coming-soon`, `ratings`,
|
|
133
|
+
`home`), and Angular bundle budgets notice the difference.
|
|
93
134
|
|
|
94
|
-
|
|
95
|
-
|
|
135
|
+
```scss
|
|
136
|
+
// styles.scss — configuration first, then pick
|
|
137
|
+
@use 'maverick-wave/src/scss/abstracts/variables' with (
|
|
138
|
+
$primary-color: #0f766e
|
|
139
|
+
);
|
|
140
|
+
|
|
141
|
+
@use 'maverick-wave/src/scss/base'; // required: :root tokens, reset, typography
|
|
142
|
+
|
|
143
|
+
@use 'maverick-wave/src/scss/layout/grid';
|
|
144
|
+
@use 'maverick-wave/src/scss/layout/page-header';
|
|
145
|
+
@use 'maverick-wave/src/scss/components/buttons';
|
|
146
|
+
@use 'maverick-wave/src/scss/components/cards';
|
|
147
|
+
@use 'maverick-wave/src/scss/components/modals';
|
|
148
|
+
@use 'maverick-wave/src/scss/components/tables';
|
|
149
|
+
@use 'maverick-wave/src/scss/components/tags';
|
|
150
|
+
@use 'maverick-wave/src/scss/form-elements';
|
|
151
|
+
@use 'maverick-wave/src/scss/utilities';
|
|
96
152
|
```
|
|
97
153
|
|
|
154
|
+
A typical application subset like the one above compiles to roughly 98 kB raw /
|
|
155
|
+
15 kB gzipped, against 147 kB / 22.5 kB for the full build.
|
|
156
|
+
|
|
157
|
+
> **`base` is not optional.** It carries the `:root` custom properties — without
|
|
158
|
+
> it every component renders without colors. If you bring your own reset, use
|
|
159
|
+
> `@use 'maverick-wave/src/scss/base/base'` for the token block alone.
|
|
160
|
+
> The `with (...)` configuration has to be the first statement in the file,
|
|
161
|
+
> because every module loads `abstracts/variables` itself.
|
|
162
|
+
|
|
98
163
|
### Angular Integration
|
|
99
164
|
|
|
100
|
-
|
|
165
|
+
Reference the stylesheet in `angular.json` (or import the SCSS source as shown
|
|
166
|
+
above):
|
|
101
167
|
|
|
102
168
|
```json
|
|
103
|
-
"styles": ["src/assets/maverick-wave.min.css", "src/styles.scss"]
|
|
104
|
-
"scripts": ["src/assets/maverick-wave.min.js"]
|
|
169
|
+
"styles": ["src/assets/maverick-wave.min.css", "src/styles.scss"]
|
|
105
170
|
```
|
|
106
171
|
|
|
107
|
-
|
|
172
|
+
> **Do not add `maverick-wave.min.js` to a SPA.** It wires everything up once on
|
|
173
|
+
> `DOMContentLoaded` and writes straight into the DOM: components rendered later
|
|
174
|
+
> are never initialized, and the theme toggle mutates the DOM behind Angular's
|
|
175
|
+
> change detection. The behaviors it covers (accordion, tabs, modal close, mobile
|
|
176
|
+
> nav, scroll spy, theme toggle, progress bars, sliders, alerts, galleries) are a
|
|
177
|
+
> few lines each in a component — the framework's state classes are the whole
|
|
178
|
+
> contract. Theme switching, for example, is a single class on `<body>`:
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
// theme.service.ts
|
|
182
|
+
document.body.classList.toggle('mw-theme-light', isLight);
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
The `mw-field` wrapper groups label, control, hint and error. Bind the error
|
|
186
|
+
state yourself — the framework does not style Angular's `ng-invalid` /
|
|
187
|
+
`ng-touched` classes:
|
|
108
188
|
|
|
109
189
|
```html
|
|
110
190
|
<div
|
|
@@ -113,13 +193,19 @@ MaverickWave automatically styles Angular Reactive Forms state classes (`.ng-inv
|
|
|
113
193
|
>
|
|
114
194
|
<label class="mw-field-label mw-required" for="email">Email</label>
|
|
115
195
|
<input id="email" type="email" class="mw-input" formControlName="email" />
|
|
116
|
-
|
|
196
|
+
@if (email.invalid && email.touched) {
|
|
197
|
+
<span class="mw-field-error">
|
|
117
198
|
<i class="fas fa-exclamation-circle"></i> Please enter a valid email
|
|
118
199
|
address.
|
|
119
200
|
</span>
|
|
201
|
+
}
|
|
120
202
|
</div>
|
|
121
203
|
```
|
|
122
204
|
|
|
205
|
+
A complete usage guide for AI coding assistants — every component, token,
|
|
206
|
+
integration pattern and example — ships with the package as a Claude Code skill
|
|
207
|
+
in `.claude/skills/maverick-wave/`.
|
|
208
|
+
|
|
123
209
|
## Development
|
|
124
210
|
|
|
125
211
|
### Prerequisites
|
|
@@ -143,9 +229,14 @@ npm run start # Start Gulp watcher (recompiles on changes)
|
|
|
143
229
|
npm run showcase # Serve the built dist/ on http://localhost:8888
|
|
144
230
|
npm run build # Full clean build → dist/
|
|
145
231
|
npm run format # Format all source files with Prettier
|
|
232
|
+
npm run verify # Check dist/ for unused/undefined tokens and unknown classes
|
|
146
233
|
npm run release # Build non-minified release files to project root
|
|
147
234
|
```
|
|
148
235
|
|
|
236
|
+
`npm run verify` runs against `dist/`, so build first. It fails when a token is
|
|
237
|
+
referenced but never defined, when a token is defined but never used, or when
|
|
238
|
+
the showcase or the docs use a `mw-*` class the CSS does not generate.
|
|
239
|
+
|
|
149
240
|
## Project Structure
|
|
150
241
|
|
|
151
242
|
```
|
|
@@ -164,7 +255,10 @@ maverick-wave/
|
|
|
164
255
|
│ ├── utilities/ # Spacing, flex, display helpers
|
|
165
256
|
│ └── main.scss # SCSS entry point
|
|
166
257
|
├── .claude/
|
|
167
|
-
│
|
|
258
|
+
│ ├── commands/mw.md # Claude Code slash command (Angular quick reference)
|
|
259
|
+
│ └── skills/
|
|
260
|
+
│ └── maverick-wave/ # Claude Code skill: full usage guide + examples
|
|
261
|
+
├── scripts/verify.js # Class and token consistency check (npm run verify)
|
|
168
262
|
├── .prettierrc.json # Prettier configuration
|
|
169
263
|
├── gulpfile.js # Gulp tasks configuration
|
|
170
264
|
├── index.html # Showcase entry point
|
|
@@ -177,7 +271,7 @@ Contributions are welcome!
|
|
|
177
271
|
|
|
178
272
|
1. Fork the repository.
|
|
179
273
|
2. Create a new branch for your feature or fix.
|
|
180
|
-
3. Make your changes and run `npm run format`.
|
|
274
|
+
3. Make your changes and run `npm run format`, then `npm run build && npm run verify`.
|
|
181
275
|
4. Commit using Conventional Commits (e.g., `feat: add new component`).
|
|
182
276
|
5. Push and open a Pull Request.
|
|
183
277
|
|
package/index.html
CHANGED
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
top: -24px;
|
|
68
68
|
right: 13%;
|
|
69
69
|
background: var(--mw-primary-color);
|
|
70
|
-
color: var(--mw-
|
|
70
|
+
color: var(--mw-accent-text-color);
|
|
71
71
|
font-size: 1.1rem;
|
|
72
72
|
padding: 0.3rem 0.7rem;
|
|
73
73
|
border-radius: 0.4rem;
|
|
@@ -128,14 +128,14 @@
|
|
|
128
128
|
|
|
129
129
|
<main class="mw-main">
|
|
130
130
|
<!-- Home section -->
|
|
131
|
-
<section id="home">
|
|
131
|
+
<section id="home" class="mw-section">
|
|
132
132
|
<div class="mw-container">
|
|
133
133
|
@@include('./src/partials/home-container.html')
|
|
134
134
|
</div>
|
|
135
135
|
</section>
|
|
136
136
|
|
|
137
137
|
<!-- Get started section -->
|
|
138
|
-
<section id="get-started">
|
|
138
|
+
<section id="get-started" class="mw-section">
|
|
139
139
|
<div class="mw-container">
|
|
140
140
|
<h2 class="mw-section-title">Get started</h2>
|
|
141
141
|
@@include('./src/partials/get-started-container.html')
|
|
@@ -143,7 +143,7 @@
|
|
|
143
143
|
</section>
|
|
144
144
|
|
|
145
145
|
<!-- Documentation section -->
|
|
146
|
-
<section id="documentation" class="mw-section-alternate">
|
|
146
|
+
<section id="documentation" class="mw-section mw-section-alternate">
|
|
147
147
|
<div class="mw-container">
|
|
148
148
|
<h2 class="mw-section-title">Documentation</h2>
|
|
149
149
|
@@include('./src/partials/documentation-container.html')
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
</section>
|
|
152
152
|
|
|
153
153
|
<!-- Foundations section -->
|
|
154
|
-
<section id="foundations">
|
|
154
|
+
<section id="foundations" class="mw-section">
|
|
155
155
|
<div class="mw-container">
|
|
156
156
|
<h2 class="mw-section-title">Foundations</h2>
|
|
157
157
|
<nav class="mw-section-nav">
|
|
@@ -198,7 +198,7 @@
|
|
|
198
198
|
</section>
|
|
199
199
|
|
|
200
200
|
<!-- Layout section -->
|
|
201
|
-
<section id="layout" class="mw-section-alternate">
|
|
201
|
+
<section id="layout" class="mw-section mw-section-alternate">
|
|
202
202
|
<div class="mw-container">
|
|
203
203
|
<h2 class="mw-section-title">Layout</h2>
|
|
204
204
|
<nav class="mw-section-nav">
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
</section>
|
|
266
266
|
|
|
267
267
|
<!-- Components section -->
|
|
268
|
-
<section id="components">
|
|
268
|
+
<section id="components" class="mw-section">
|
|
269
269
|
<div class="mw-container">
|
|
270
270
|
<h2 class="mw-section-title">Components</h2>
|
|
271
271
|
<nav class="mw-section-nav">
|
|
@@ -340,7 +340,7 @@
|
|
|
340
340
|
</section>
|
|
341
341
|
|
|
342
342
|
<!-- Forms section -->
|
|
343
|
-
<section id="forms" class="mw-section-alternate">
|
|
343
|
+
<section id="forms" class="mw-section mw-section-alternate">
|
|
344
344
|
<div class="mw-container">
|
|
345
345
|
<h2 class="mw-section-title">Forms</h2>
|
|
346
346
|
<nav class="mw-section-nav">
|
|
@@ -375,10 +375,11 @@
|
|
|
375
375
|
</section>
|
|
376
376
|
|
|
377
377
|
<!-- Data & display section -->
|
|
378
|
-
<section id="data-display">
|
|
378
|
+
<section id="data-display" class="mw-section">
|
|
379
379
|
<div class="mw-container">
|
|
380
380
|
<h2 class="mw-section-title">Data & Display</h2>
|
|
381
381
|
<nav class="mw-section-nav">
|
|
382
|
+
<a href="#page-header" class="mw-section-btn">Page Header</a>
|
|
382
383
|
<a href="#meta-info" class="mw-section-btn">Meta Info</a>
|
|
383
384
|
<a href="#tables" class="mw-section-btn">Tables</a>
|
|
384
385
|
<a href="#pagination" class="mw-section-btn">Pagination</a>
|
|
@@ -391,6 +392,11 @@
|
|
|
391
392
|
<a href="#blog-posts" class="mw-section-btn">Blog Posts</a>
|
|
392
393
|
</nav>
|
|
393
394
|
|
|
395
|
+
<!-- Page Header container -->
|
|
396
|
+
<div id="page-header">
|
|
397
|
+
@@include('./src/partials/page-header-container.html')
|
|
398
|
+
</div>
|
|
399
|
+
|
|
394
400
|
<!-- Meta Info container -->
|
|
395
401
|
<div id="meta-info">
|
|
396
402
|
@@include('./src/partials/meta-info-container.html')
|