maverick-wave 3.11.0 → 4.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.
- package/.claude/skills/maverick-wave/SKILL.md +59 -30
- package/.claude/skills/maverick-wave/examples/angular-form.md +1 -1
- package/.claude/skills/maverick-wave/examples/angular-services.md +15 -8
- package/.claude/skills/maverick-wave/examples/static-landing-page.md +4 -4
- package/.claude/skills/maverick-wave/references/components.md +269 -25
- package/.claude/skills/maverick-wave/references/forms.md +8 -4
- package/.claude/skills/maverick-wave/references/javascript.md +20 -8
- package/.claude/skills/maverick-wave/references/layout.md +48 -3
- package/.claude/skills/maverick-wave/references/theming.md +34 -25
- package/CHANGELOG.md +17 -26
- package/index.html +25 -0
- package/maverick-wave.min.css +2 -2
- package/maverick-wave.min.js +1 -1
- package/package.json +2 -2
- package/src/js/main.js +314 -20
- package/src/partials/accordions-container.html +2 -2
- package/src/partials/button-bar-container.html +4 -2
- package/src/partials/buttons-container.html +35 -0
- package/src/partials/calendar-container.html +205 -0
- package/src/partials/cards-container.html +43 -0
- package/src/partials/documentation-container.html +3 -0
- package/src/partials/form-container.html +1 -1
- package/src/partials/get-started-container.html +2 -2
- package/src/partials/kanban-container.html +680 -715
- package/src/partials/modals-container.html +5 -5
- package/src/partials/pagination-container.html +50 -13
- package/src/partials/segmented-container.html +66 -0
- package/src/partials/tables-container.html +96 -24
- package/src/partials/tabs-container.html +16 -6
- package/src/partials/tags-container.html +15 -0
- package/src/partials/timelines-container.html +2 -2
- package/src/partials/utilities-container.html +81 -0
- package/src/scss/abstracts/_mixins.scss +34 -0
- package/src/scss/abstracts/_variables.scss +4 -0
- package/src/scss/base/_base.scss +21 -0
- package/src/scss/components/_accordions.scss +2 -0
- package/src/scss/components/_button-bar.scss +6 -0
- package/src/scss/components/_buttons.scss +67 -0
- package/src/scss/components/_calendar.scss +290 -0
- package/src/scss/components/_content-slider.scss +1 -0
- package/src/scss/components/_index.scss +2 -0
- package/src/scss/components/_modals.scss +15 -4
- package/src/scss/components/_pagination.scss +68 -64
- package/src/scss/components/_segmented.scss +85 -0
- package/src/scss/components/_tables.scss +16 -0
- package/src/scss/components/_tabs.scss +15 -0
- package/src/scss/components/_tags.scss +16 -0
- package/src/scss/components/_theme-toggle.scss +2 -0
- package/src/scss/components/_timelines.scss +3 -0
- package/src/scss/form-elements/_form.scss +13 -7
- package/src/scss/layout/_header.scss +3 -0
- package/src/scss/layout/_main.scss +5 -1
- package/src/scss/layout/_section.scss +1 -1
- package/src/scss/utilities/_accessibility.scss +14 -0
- package/src/scss/utilities/_flex.scss +17 -0
- package/src/scss/utilities/_index.scss +2 -0
- package/src/scss/utilities/_text.scss +17 -5
- package/src/scss/utilities/_touch-targets.scss +54 -0
|
@@ -44,14 +44,14 @@ Load the one you need - do not read them all up front.
|
|
|
44
44
|
```html
|
|
45
45
|
<link
|
|
46
46
|
rel="stylesheet"
|
|
47
|
-
href="https://cdn.jsdelivr.net/npm/maverick-wave@
|
|
47
|
+
href="https://cdn.jsdelivr.net/npm/maverick-wave@4.0.0/maverick-wave.min.css"
|
|
48
48
|
/>
|
|
49
49
|
<link
|
|
50
50
|
rel="stylesheet"
|
|
51
51
|
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css"
|
|
52
52
|
/>
|
|
53
53
|
...
|
|
54
|
-
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@
|
|
54
|
+
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@4.0.0/maverick-wave.min.js"></script>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
57
|
Pin the version. The JS file is optional and only for server-rendered/static pages -
|
|
@@ -99,30 +99,39 @@ bundled. Load it yourself or override the token.
|
|
|
99
99
|
- Size variants: `-sm`, `-lg`, sometimes `-xs` / `-xl`. The unsuffixed class is
|
|
100
100
|
the medium size.
|
|
101
101
|
|
|
102
|
-
### State classes
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
|
118
|
-
|
|
|
119
|
-
|
|
|
120
|
-
|
|
|
121
|
-
|
|
|
122
|
-
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
102
|
+
### State classes
|
|
103
|
+
|
|
104
|
+
Since 4.0.0 there is one spelling for "this one is on": **`mw-active`**. It
|
|
105
|
+
works on every component that previously wanted a bare `active` - accordion,
|
|
106
|
+
tabs, navbar link, timeline step, image slider, button, theme toggle, segmented
|
|
107
|
+
control - alongside gallery dot, stepper and kanban composer, which used it all
|
|
108
|
+
along. Write `mw-active` and stop looking things up.
|
|
109
|
+
|
|
110
|
+
The unprefixed `active` is still styled everywhere it used to be, so existing
|
|
111
|
+
markup keeps working, but it is deprecated. The shipped `main.js` clears both
|
|
112
|
+
when it switches a state off, precisely so a stale `active` in the HTML cannot
|
|
113
|
+
leave a second tab lit.
|
|
114
|
+
|
|
115
|
+
The classes that mean something _other_ than "on" keep their own names:
|
|
116
|
+
|
|
117
|
+
| Component | State class |
|
|
118
|
+
| -------------------------------------------- | ----------------------------------- |
|
|
119
|
+
| Anything switchable, "on" | `mw-active` (`active` deprecated) |
|
|
120
|
+
| Burger button + navbar drawer | `open` (no prefix) |
|
|
121
|
+
| Stepper indicator / label / connector / step | `mw-active`, `mw-done` |
|
|
122
|
+
| Checkbox list item (`li`) | `mw-selected` |
|
|
123
|
+
| Calendar day, picked | `mw-selected` |
|
|
124
|
+
| Kanban ticket being edited | `mw-kanban-editing` |
|
|
125
|
+
| Modal overlay | `mw-modal-open` |
|
|
126
|
+
| Alert, after dismissal | `mw-alert-closed` (`display: none`) |
|
|
127
|
+
| Field wrapper in error | `mw-field-has-error` |
|
|
128
|
+
| Single form control in error | `mw-form-element-error` |
|
|
129
|
+
|
|
130
|
+
`mw-active` and `mw-selected` are not the same thing and not interchangeable:
|
|
131
|
+
active is the one of several that is currently showing, selected is a choice the
|
|
132
|
+
user made and can undo.
|
|
133
|
+
|
|
134
|
+
Angular: `[class.mw-active]="i === current"`.
|
|
126
135
|
|
|
127
136
|
## Scales
|
|
128
137
|
|
|
@@ -149,14 +158,16 @@ keys at all (negative gap is invalid CSS and is not generated).
|
|
|
149
158
|
Everything below is documented in `references/components.md` unless marked otherwise.
|
|
150
159
|
|
|
151
160
|
**Actions** `mw-btn` (+ `primary`, `secondary`, `danger`, `success`, `outline`,
|
|
152
|
-
`link`, `link-muted`, `sm`, `lg`) · `mw-btn-mini` · `mw-button-bar`
|
|
161
|
+
`link`, `link-muted`, `plain`, `sm`, `lg`) · `mw-btn-mini` · `mw-button-bar`
|
|
162
|
+
(+ `left`, `right`, `center`, `between`) · `mw-segmented` · `mw-actions-note`
|
|
153
163
|
|
|
154
164
|
**Containers** `mw-card` (+ `simple`, `lg`, `xl`, `stack`, badge, ribbon) ·
|
|
155
165
|
`mw-panel` · `mw-tile` · `mw-accordion` · `mw-tabs` · `mw-modal` ·
|
|
156
166
|
`mw-item-list` family
|
|
157
167
|
|
|
158
168
|
**Data & status** `mw-table` (+ `subtle`, `sticky-head`, `cards`, `compact`,
|
|
159
|
-
`hover`, responsive wrappers) · `mw-kanban` (+ `plain`, `compact`) ·
|
|
169
|
+
`hover`, responsive wrappers) · `mw-kanban` (+ `plain`, `compact`) ·
|
|
170
|
+
`mw-calendar` (+ `compact`, `plain`) · `mw-tag` /
|
|
160
171
|
`mw-tags` · `mw-info` / `mw-info-mini` / `mw-info-counter` · `mw-progress-bar` ·
|
|
161
172
|
`mw-rating` · `mw-meta-header` · `mw-stepper` · `mw-timeline-big` /
|
|
162
173
|
`mw-timeline-simple`
|
|
@@ -176,7 +187,12 @@ Everything below is documented in `references/components.md` unless marked other
|
|
|
176
187
|
`mw-input-group` · `mw-form` / `mw-form-group` / `mw-form-actions` · `mw-login`
|
|
177
188
|
|
|
178
189
|
**Layout** (`references/layout.md`) `mw-main` · `mw-container` · `mw-content` ·
|
|
179
|
-
`mw-section` · `mw-page-header` · `mw-grid-*` · `mw-
|
|
190
|
+
`mw-section` · `mw-page-header` · `mw-grid-*` · `mw-row-split` · `mw-hero` ·
|
|
191
|
+
`mw-footer`
|
|
192
|
+
|
|
193
|
+
**Utilities** (`references/layout.md`) `mw-sr-only` · `mw-row-split`
|
|
194
|
+
(+ `center`) · `mw-text-numeric` / `mw-text-currency` · spacing, flex, display,
|
|
195
|
+
text
|
|
180
196
|
|
|
181
197
|
## Pitfalls
|
|
182
198
|
|
|
@@ -213,7 +229,20 @@ Everything below is documented in `references/components.md` unless marked other
|
|
|
213
229
|
set.
|
|
214
230
|
10. **Browser floor: `color-mix()`** - Chrome 111+, Safari 16.2+, Firefox 113+.
|
|
215
231
|
Older browsers get no colours at all, not merely worse ones.
|
|
216
|
-
11. **
|
|
232
|
+
11. **Touch targets grow on their own.** On `pointer: coarse` or below 768px,
|
|
233
|
+
`mw-btn-sm`, `mw-input-sm`, `mw-select-sm` and `mw-textarea-sm` get a 2.5rem
|
|
234
|
+
minimum height, a tab 2.75rem, a calendar day 44px. `mw-btn-mini` keeps its
|
|
235
|
+
18px circle - it sits in tag rows and table cells where a bigger one would
|
|
236
|
+
shift the layout - and grows its _hit area_ to 28px via a pseudo-element.
|
|
237
|
+
Nothing to switch on, and no reason to write the media query again in an app.
|
|
238
|
+
12. **`mw-empty-state` has a `-desc`, not a `-text`.** The parts are
|
|
239
|
+
`mw-empty-state-icon`, `-title`, `-desc`, plus the size variant
|
|
240
|
+
`mw-empty-state-sm`. Invented names fail silently, as always.
|
|
241
|
+
13. **`mw-text-numeric` gives digits, `mw-text-currency` gives a money column.**
|
|
242
|
+
The first is only `tabular-nums` - for a clock, a counter, an ID. The second
|
|
243
|
+
adds right alignment and `nowrap`. Before 4.0.0 the first did both, which
|
|
244
|
+
is why people wrote the declaration out by hand.
|
|
245
|
+
14. **A component host between a container and its children breaks the layout,
|
|
217
246
|
silently.** Every `mw-*` flex or grid container styles its _children_ -
|
|
218
247
|
`mw-grid-*`, `mw-tags`, `mw-button-bar`, `mw-form-actions`, `mw-modal-footer`,
|
|
219
248
|
`mw-toast-stack`. In plain HTML the children are right there; in a SPA a
|
|
@@ -216,7 +216,7 @@ export class ProjectFormComponent {
|
|
|
216
216
|
</div>
|
|
217
217
|
|
|
218
218
|
<div class="mw-form-actions">
|
|
219
|
-
<p class="mw-
|
|
219
|
+
<p class="mw-actions-note">Fields marked with * are required.</p>
|
|
220
220
|
<button type="button" class="mw-btn mw-btn-outline" (click)="form.reset()">
|
|
221
221
|
Reset
|
|
222
222
|
</button>
|
|
@@ -37,7 +37,7 @@ The framework's own toggle markup, driven by the service:
|
|
|
37
37
|
```html
|
|
38
38
|
<div
|
|
39
39
|
class="mw-theme-toggle"
|
|
40
|
-
[class.active]="theme.light()"
|
|
40
|
+
[class.mw-active]="theme.light()"
|
|
41
41
|
(click)="theme.toggle()"
|
|
42
42
|
>
|
|
43
43
|
<div class="mw-theme-toggle-slider">
|
|
@@ -205,13 +205,16 @@ export class ConfirmDialogComponent {
|
|
|
205
205
|
<div class="mw-accordion-item">
|
|
206
206
|
<div
|
|
207
207
|
class="mw-accordion-header"
|
|
208
|
-
[class.active]="openIndex() === i"
|
|
208
|
+
[class.mw-active]="openIndex() === i"
|
|
209
209
|
(click)="toggle(i)"
|
|
210
210
|
>
|
|
211
211
|
<h3>{{ item.question }}</h3>
|
|
212
212
|
<i class="fas fa-chevron-down mw-accordion-icon"></i>
|
|
213
213
|
</div>
|
|
214
|
-
<div
|
|
214
|
+
<div
|
|
215
|
+
class="mw-accordion-content"
|
|
216
|
+
[class.mw-active]="openIndex() === i"
|
|
217
|
+
>
|
|
215
218
|
<div class="mw-accordion-content-inner">{{ item.answer }}</div>
|
|
216
219
|
</div>
|
|
217
220
|
</div>
|
|
@@ -241,7 +244,7 @@ export class FaqComponent {
|
|
|
241
244
|
@for (tab of tabs; track tab.key) {
|
|
242
245
|
<div
|
|
243
246
|
class="mw-tabs-nav-item"
|
|
244
|
-
[class.active]="active() === tab.key"
|
|
247
|
+
[class.mw-active]="active() === tab.key"
|
|
245
248
|
(click)="active.set(tab.key)"
|
|
246
249
|
>
|
|
247
250
|
{{ tab.label }}
|
|
@@ -249,8 +252,12 @@ export class FaqComponent {
|
|
|
249
252
|
}
|
|
250
253
|
</div>
|
|
251
254
|
<div class="mw-tabs-content">
|
|
252
|
-
<div class="mw-tabs-panel" [class.active]="active() === 'details'"
|
|
253
|
-
|
|
255
|
+
<div class="mw-tabs-panel" [class.mw-active]="active() === 'details'">
|
|
256
|
+
…
|
|
257
|
+
</div>
|
|
258
|
+
<div class="mw-tabs-panel" [class.mw-active]="active() === 'history'">
|
|
259
|
+
…
|
|
260
|
+
</div>
|
|
254
261
|
</div>
|
|
255
262
|
</div>
|
|
256
263
|
```
|
|
@@ -281,7 +288,7 @@ on every navigation.
|
|
|
281
288
|
<a
|
|
282
289
|
class="mw-navbar-link"
|
|
283
290
|
[routerLink]="item.path"
|
|
284
|
-
routerLinkActive="active"
|
|
291
|
+
routerLinkActive="mw-active"
|
|
285
292
|
>
|
|
286
293
|
{{ item.label }}
|
|
287
294
|
</a>
|
|
@@ -324,7 +331,7 @@ export class HeaderComponent {
|
|
|
324
331
|
}
|
|
325
332
|
```
|
|
326
333
|
|
|
327
|
-
`routerLinkActive="active"` replaces the scroll spy - the framework only cares
|
|
334
|
+
`routerLinkActive="mw-active"` replaces the scroll spy - the framework only cares
|
|
328
335
|
about the class name.
|
|
329
336
|
|
|
330
337
|
## Progress bar
|
|
@@ -15,7 +15,7 @@ wired up by hand.
|
|
|
15
15
|
|
|
16
16
|
<link
|
|
17
17
|
rel="stylesheet"
|
|
18
|
-
href="https://cdn.jsdelivr.net/npm/maverick-wave@
|
|
18
|
+
href="https://cdn.jsdelivr.net/npm/maverick-wave@4.0.0/maverick-wave.min.css"
|
|
19
19
|
/>
|
|
20
20
|
<link
|
|
21
21
|
rel="stylesheet"
|
|
@@ -234,11 +234,11 @@ 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 active">
|
|
237
|
+
<div class="mw-accordion-header mw-active">
|
|
238
238
|
<h3>Where is the data stored?</h3>
|
|
239
239
|
<i class="fas fa-chevron-down mw-accordion-icon"></i>
|
|
240
240
|
</div>
|
|
241
|
-
<div class="mw-accordion-content active">
|
|
241
|
+
<div class="mw-accordion-content mw-active">
|
|
242
242
|
<div class="mw-accordion-content-inner">
|
|
243
243
|
<p>In Frankfurt, in our own data centre.</p>
|
|
244
244
|
</div>
|
|
@@ -332,7 +332,7 @@ wired up by hand.
|
|
|
332
332
|
<div class="mw-modal-backdrop" onclick="closeModal('demo')"></div>
|
|
333
333
|
</div>
|
|
334
334
|
|
|
335
|
-
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@
|
|
335
|
+
<script src="https://cdn.jsdelivr.net/npm/maverick-wave@4.0.0/maverick-wave.min.js"></script>
|
|
336
336
|
<script>
|
|
337
337
|
// The only thing the shipped script does not cover: opening a modal.
|
|
338
338
|
// Closing works through .mw-modal-close, the backdrop is wired above.
|