maverick-wave 4.2.1 → 4.4.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/.claude/skills/maverick-wave/SKILL.md +2 -1
- package/.claude/skills/maverick-wave/examples/angular-form.md +4 -0
- package/.claude/skills/maverick-wave/references/forms.md +27 -0
- package/CHANGELOG.md +10 -0
- package/CLAUDE.md +10 -10
- package/README.md +9 -9
- package/maverick-wave.min.css +1 -1
- package/package.json +2 -2
- package/scripts/verify.js +5 -5
- package/src/js/main.js +3 -3
- package/src/partials/accordions-container.html +3 -3
- package/src/partials/blog-posts-container.html +1 -1
- package/src/partials/buttons-container.html +1 -1
- package/src/partials/colors-container.html +4 -4
- package/src/partials/footer-container.html +3 -3
- package/src/partials/form-elements-container.html +98 -0
- package/src/partials/form-field-container.html +20 -4
- package/src/partials/get-started-container.html +19 -19
- package/src/partials/header-utilities-container.html +1 -1
- package/src/partials/modals-container.html +1 -1
- package/src/partials/ratings-container.html +1 -1
- package/src/partials/segmented-container.html +2 -2
- package/src/partials/tables-container.html +4 -4
- package/src/partials/tags-container.html +1 -1
- package/src/partials/timelines-container.html +5 -5
- package/src/partials/utilities-container.html +1 -1
- package/src/scss/abstracts/_variables.scss +7 -2
- package/src/scss/base/_base.scss +1 -1
- package/src/scss/components/_avatars.scss +1 -1
- package/src/scss/components/_kanban.scss +9 -9
- package/src/scss/form-elements/_checkbox.scss +1 -1
- package/src/scss/form-elements/_form.scss +2 -2
- package/src/scss/form-elements/_index.scss +1 -0
- package/src/scss/form-elements/_input-group.scss +1 -1
- package/src/scss/form-elements/_input.scss +3 -3
- package/src/scss/form-elements/_prefilled.scss +65 -0
- package/src/scss/form-elements/_select.scss +2 -2
- package/src/scss/form-elements/_slider.scss +1 -1
- package/src/scss/form-elements/_textarea.scss +2 -2
- package/src/scss/layout/_header.scss +1 -1
- package/src/scss/utilities/_flex.scss +1 -1
|
@@ -186,7 +186,8 @@ Everything below is documented in `references/components.md` unless marked other
|
|
|
186
186
|
|
|
187
187
|
**Forms** (`references/forms.md`) `mw-field` · `mw-input` · `mw-select` ·
|
|
188
188
|
`mw-textarea` · `mw-checkbox` · `mw-radio` · `mw-toggle` · `mw-slider` ·
|
|
189
|
-
`mw-input-group` · `mw-
|
|
189
|
+
`mw-input-group` · `mw-prefilled` · `mw-form` / `mw-form-group` /
|
|
190
|
+
`mw-form-actions` · `mw-login`
|
|
190
191
|
|
|
191
192
|
**Layout** (`references/layout.md`) `mw-main` · `mw-container` · `mw-content` ·
|
|
192
193
|
`mw-section` · `mw-page-header` · `mw-grid-*` · `mw-row-split` · `mw-hero` ·
|
|
@@ -238,6 +238,10 @@ export class ProjectFormComponent {
|
|
|
238
238
|
container - use `mw-form-element-error` instead.
|
|
239
239
|
- **`disabled`/`readonly` are attributes**, not classes. With reactive forms use
|
|
240
240
|
`control.disable()`; the muted look comes from the `:disabled` selector.
|
|
241
|
+
- **Prefilled values** take `mw-prefilled` on the control, not on the wrapper.
|
|
242
|
+
In an edit form that starts from `patchValue()`, bind it to your own flag:
|
|
243
|
+
`[class.mw-prefilled]="loaded() && !form.controls.name.dirty"`. Repeat the
|
|
244
|
+
information in the `mw-field-hint`, the marker itself is decoration.
|
|
241
245
|
- **The slider needs two bindings**: `data-value` for the badge text,
|
|
242
246
|
`--value` for the filled part of the track.
|
|
243
247
|
- **A spinner inside a button** needs its shape class (`mw-spinner-border`) plus
|
|
@@ -170,6 +170,33 @@ Sizes: `mw-textarea-sm`, `mw-textarea-lg`. Resizing is off by default; enable it
|
|
|
170
170
|
with `mw-textarea-resizable`, `mw-textarea-resizable-vertical` or
|
|
171
171
|
`mw-textarea-resizable-horizontal`.
|
|
172
172
|
|
|
173
|
+
## Prefilled values
|
|
174
|
+
|
|
175
|
+
`mw-prefilled` marks a control whose value did not come from the user in this
|
|
176
|
+
session - loaded from an existing record, restored from a draft, filled with a
|
|
177
|
+
default. It draws a small triangle into the top left corner of the control.
|
|
178
|
+
|
|
179
|
+
```html
|
|
180
|
+
<input type="text" class="mw-input mw-prefilled" value="Max Mustermann" />
|
|
181
|
+
<select class="mw-select mw-select-sm mw-prefilled">
|
|
182
|
+
...
|
|
183
|
+
</select>
|
|
184
|
+
<textarea class="mw-textarea mw-prefilled" rows="3"></textarea>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
- Works on `mw-input`, `mw-select` and `mw-textarea`, and goes on the control
|
|
188
|
+
itself, not on the `mw-field` wrapper - so it also works in an input group or
|
|
189
|
+
on a standalone control.
|
|
190
|
+
- The triangle follows the size modifier (`mw-input-sm`, `mw-select-lg`, ...)
|
|
191
|
+
and stays visible on `readonly` and `disabled` controls.
|
|
192
|
+
- Colour is `--mw-info-color`, deliberately not primary or danger: it is an
|
|
193
|
+
information about the value, not a state or an error.
|
|
194
|
+
- Decoration only. Screen readers do not see it, so put the same information in
|
|
195
|
+
an `mw-field-hint` and reference it with `aria-describedby`.
|
|
196
|
+
- It is drawn as a background layer, not a pseudo element (`input` and `select`
|
|
197
|
+
never render `::before`/`::after`). A rule that sets the `background`
|
|
198
|
+
shorthand on the same control wipes it - use `background-color` there.
|
|
199
|
+
|
|
173
200
|
## Checkbox
|
|
174
201
|
|
|
175
202
|
The native input is hidden; `mw-checkbox-box` is the visible control, so the
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,16 @@ 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.4.0] - 2026-08-20
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- prefilled marker for form controls (`mw-prefilled`)
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
|
|
17
|
+
- disabled select lost its arrow
|
|
18
|
+
|
|
9
19
|
## [4.3.0] - 2026-08-19
|
|
10
20
|
|
|
11
21
|
### Fixed
|
package/CLAUDE.md
CHANGED
|
@@ -21,21 +21,21 @@ There are no test or lint scripts.
|
|
|
21
21
|
|
|
22
22
|
## Architecture
|
|
23
23
|
|
|
24
|
-
**Build pipeline**
|
|
24
|
+
**Build pipeline** - `gulpfile.js` orchestrates everything: SCSS compilation (autoprefixed, minified), JS minification via Terser, HTML templating via `gulp-file-include`, asset copying, and build-info injection (`{{VERSION}}`, `{{LAST_BUILD_DATE}}`, `{{LAST_BUILD_YEAR}}` placeholders replaced in HTML at build time).
|
|
25
25
|
|
|
26
26
|
**SCSS layers** (`src/scss/`) follow an ITCSS-inspired structure:
|
|
27
27
|
|
|
28
|
-
- `abstracts/`
|
|
29
|
-
- `base/`
|
|
30
|
-
- `components/`
|
|
31
|
-
- `form-elements/`
|
|
32
|
-
- `layout/`
|
|
33
|
-
- `utilities/`
|
|
34
|
-
- `main.scss`
|
|
28
|
+
- `abstracts/` - CSS custom properties, mixins, SCSS functions (color variant generation)
|
|
29
|
+
- `base/` - Reset, element defaults, typography
|
|
30
|
+
- `components/` - Self-contained component styles (25+ files, one per component)
|
|
31
|
+
- `form-elements/` - Form input/select/checkbox-specific styles
|
|
32
|
+
- `layout/` - Grid, container, header/footer, section
|
|
33
|
+
- `utilities/` - Spacing, flex, display utility classes
|
|
34
|
+
- `main.scss` - Entry point using `@use`/`@forward` (not `@import`)
|
|
35
35
|
|
|
36
|
-
**JavaScript** (`src/js/main.js`)
|
|
36
|
+
**JavaScript** (`src/js/main.js`) - Single file. All components auto-initialize on `DOMContentLoaded`. Includes: gallery slider, theme toggle (persisted to localStorage), accordion, mobile nav, progress bar (IntersectionObserver), scroll spy, tabs, alerts/toasts, modals, range inputs.
|
|
37
37
|
|
|
38
|
-
**HTML showcase** (`index.html` + `src/partials/`)
|
|
38
|
+
**HTML showcase** (`index.html` + `src/partials/`) - The top-level `index.html` uses `@@include()` syntax to pull in 40+ partials from `src/partials/`. These compile into `dist/index.html`.
|
|
39
39
|
|
|
40
40
|
## Naming Conventions
|
|
41
41
|
|
package/README.md
CHANGED
|
@@ -63,8 +63,8 @@ Download `maverick-wave.min.css` and `maverick-wave.min.js` from the [latest rel
|
|
|
63
63
|
|
|
64
64
|
### CSS Custom Properties
|
|
65
65
|
|
|
66
|
-
There are thirteen root color tokens. Everything else
|
|
67
|
-
backgrounds, borders, muted text
|
|
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
68
|
`color-mix()`, so overriding a root token is enough. Load your stylesheet
|
|
69
69
|
**after** `maverick-wave.min.css`:
|
|
70
70
|
|
|
@@ -121,7 +121,7 @@ For full control, clone the repository and integrate `src/scss/main.scss` into y
|
|
|
121
121
|
);
|
|
122
122
|
```
|
|
123
123
|
|
|
124
|
-
> Plain variable assignments before `@use` have no effect
|
|
124
|
+
> Plain variable assignments before `@use` have no effect - the framework
|
|
125
125
|
> declares its root colors with `!default`, which only `@use ... with` feeds.
|
|
126
126
|
|
|
127
127
|
### Importing Only What You Need
|
|
@@ -133,7 +133,7 @@ have no use for the marketing components (`blog-post`, `gallery`,
|
|
|
133
133
|
`home`), and Angular bundle budgets notice the difference.
|
|
134
134
|
|
|
135
135
|
```scss
|
|
136
|
-
// styles.scss
|
|
136
|
+
// styles.scss - configuration first, then pick
|
|
137
137
|
@use 'maverick-wave/src/scss/abstracts/variables' with (
|
|
138
138
|
$primary-color: #0f766e
|
|
139
139
|
);
|
|
@@ -154,7 +154,7 @@ have no use for the marketing components (`blog-post`, `gallery`,
|
|
|
154
154
|
A typical application subset like the one above compiles to roughly 98 kB raw /
|
|
155
155
|
15 kB gzipped, against 147 kB / 22.5 kB for the full build.
|
|
156
156
|
|
|
157
|
-
> **`base` is not optional.** It carries the `:root` custom properties
|
|
157
|
+
> **`base` is not optional.** It carries the `:root` custom properties - without
|
|
158
158
|
> it every component renders without colors. If you bring your own reset, use
|
|
159
159
|
> `@use 'maverick-wave/src/scss/base/base'` for the token block alone.
|
|
160
160
|
> The `with (...)` configuration has to be the first statement in the file,
|
|
@@ -174,7 +174,7 @@ above):
|
|
|
174
174
|
> are never initialized, and the theme toggle mutates the DOM behind Angular's
|
|
175
175
|
> change detection. The behaviors it covers (accordion, tabs, modal close, mobile
|
|
176
176
|
> nav, scroll spy, theme toggle, progress bars, sliders, alerts, galleries) are a
|
|
177
|
-
> few lines each in a component
|
|
177
|
+
> few lines each in a component - the framework's state classes are the whole
|
|
178
178
|
> contract. Theme switching, for example, is a single class on `<body>`:
|
|
179
179
|
|
|
180
180
|
```typescript
|
|
@@ -183,7 +183,7 @@ document.body.classList.toggle('mw-theme-light', isLight);
|
|
|
183
183
|
```
|
|
184
184
|
|
|
185
185
|
The `mw-field` wrapper groups label, control, hint and error. Bind the error
|
|
186
|
-
state yourself
|
|
186
|
+
state yourself - the framework does not style Angular's `ng-invalid` /
|
|
187
187
|
`ng-touched` classes:
|
|
188
188
|
|
|
189
189
|
```html
|
|
@@ -202,8 +202,8 @@ state yourself — the framework does not style Angular's `ng-invalid` /
|
|
|
202
202
|
</div>
|
|
203
203
|
```
|
|
204
204
|
|
|
205
|
-
A complete usage guide for AI coding assistants
|
|
206
|
-
integration pattern and example
|
|
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
207
|
in `.claude/skills/maverick-wave/`.
|
|
208
208
|
|
|
209
209
|
## Development
|