maverick-wave 4.10.0 → 4.12.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 +114 -12
- package/.claude/skills/maverick-wave/examples/angular-services.md +8 -4
- package/.claude/skills/maverick-wave/examples/static-landing-page.md +18 -8
- package/.claude/skills/maverick-wave/references/components.md +168 -9
- package/.claude/skills/maverick-wave/references/forms.md +26 -0
- package/.claude/skills/maverick-wave/references/javascript.md +34 -27
- package/.claude/skills/maverick-wave/references/layout.md +38 -3
- package/.claude/skills/maverick-wave/references/theming.md +33 -7
- package/CHANGELOG.md +12 -0
- package/README.md +79 -4
- package/index.html +16 -0
- package/maverick-wave.min.css +3 -3
- package/maverick-wave.min.js +1 -1
- package/package.json +2 -2
- package/src/js/main.js +79 -1
- package/src/partials/accordions-container.html +41 -16
- package/src/partials/alerts-container.html +5 -0
- package/src/partials/avatars-container.html +5 -0
- package/src/partials/badges-container.html +114 -0
- package/src/partials/blog-posts-container.html +5 -0
- package/src/partials/breadcrumbs-container.html +1 -1
- package/src/partials/button-bar-container.html +5 -0
- package/src/partials/buttons-container.html +84 -0
- package/src/partials/calendar-container.html +1 -1
- package/src/partials/cards-container.html +5 -0
- package/src/partials/code-container.html +6 -0
- package/src/partials/colors-container.html +1 -1
- package/src/partials/coming-soon-container.html +4 -0
- package/src/partials/divider-container.html +4 -0
- package/src/partials/dropdown-container.html +119 -0
- package/src/partials/empty-state-container.html +5 -0
- package/src/partials/form-container.html +5 -0
- package/src/partials/form-elements-container.html +5 -0
- package/src/partials/form-field-container.html +5 -0
- package/src/partials/gallery-container.html +5 -0
- package/src/partials/get-started-container.html +16 -4
- package/src/partials/header-container.html +6 -2
- package/src/partials/header-utilities-container.html +8 -2
- package/src/partials/html-lists-container.html +5 -0
- package/src/partials/info-container.html +4 -0
- package/src/partials/input-group-container.html +5 -0
- package/src/partials/item-lists-container.html +5 -0
- package/src/partials/kanban-container.html +1 -1
- package/src/partials/kbd-container.html +63 -0
- package/src/partials/meta-info-container.html +5 -0
- package/src/partials/pagination-container.html +1 -1
- package/src/partials/panels-container.html +4 -0
- package/src/partials/progress-container.html +4 -0
- package/src/partials/ratings-container.html +1 -1
- package/src/partials/skeleton-container.html +5 -0
- package/src/partials/spinners-container.html +5 -1
- package/src/partials/stepper-container.html +4 -0
- package/src/partials/tables-container.html +7 -0
- package/src/partials/tabs-container.html +35 -13
- package/src/partials/tags-container.html +5 -0
- package/src/partials/tiles-container.html +1 -1
- package/src/partials/typography-container.html +5 -0
- package/src/partials/utilities-container.html +153 -0
- package/src/scss/abstracts/_functions.scss +18 -0
- package/src/scss/abstracts/_mixins.scss +176 -0
- package/src/scss/abstracts/_variables.scss +192 -4
- package/src/scss/base/_base.scss +103 -2
- package/src/scss/base/_reset.scss +38 -3
- package/src/scss/base/_typography.scss +47 -0
- package/src/scss/components/_accordions.scss +37 -7
- package/src/scss/components/_alerts.scss +3 -3
- package/src/scss/components/_avatars.scss +27 -6
- package/src/scss/components/_badge.scss +157 -0
- package/src/scss/components/_blog-post.scss +10 -7
- package/src/scss/components/_breadcrumbs.scss +11 -2
- package/src/scss/components/_button-bar.scss +9 -2
- package/src/scss/components/_buttons.scss +133 -17
- package/src/scss/components/_calendar.scss +13 -2
- package/src/scss/components/_cards.scss +12 -5
- package/src/scss/components/_code.scss +15 -0
- package/src/scss/components/_coming-soon.scss +5 -2
- package/src/scss/components/_content-slider.scss +1 -1
- package/src/scss/components/_dropdown.scss +219 -0
- package/src/scss/components/_gallery.scss +17 -8
- package/src/scss/components/_index.scss +3 -0
- package/src/scss/components/_info.scss +14 -8
- package/src/scss/components/_kanban.scss +40 -6
- package/src/scss/components/_kbd.scss +43 -0
- package/src/scss/components/_lists.scss +26 -23
- package/src/scss/components/_modals.scss +71 -6
- package/src/scss/components/_pagination.scss +4 -3
- package/src/scss/components/_panels.scss +13 -14
- package/src/scss/components/_progress.scss +1 -1
- package/src/scss/components/_segmented.scss +8 -4
- package/src/scss/components/_stepper.scss +3 -3
- package/src/scss/components/_tables.scss +5 -8
- package/src/scss/components/_tabs.scss +22 -3
- package/src/scss/components/_tags.scss +1 -2
- package/src/scss/components/_techstack-bucket.scss +8 -5
- package/src/scss/components/_theme-toggle.scss +16 -8
- package/src/scss/components/_tiles.scss +14 -4
- package/src/scss/components/_timelines.scss +9 -6
- package/src/scss/components/_toasts.scss +1 -1
- package/src/scss/form-elements/_checkbox.scss +2 -1
- package/src/scss/form-elements/_form.scss +2 -2
- package/src/scss/form-elements/_input-group.scss +30 -1
- package/src/scss/form-elements/_input.scss +10 -10
- package/src/scss/form-elements/_login.scss +1 -1
- package/src/scss/form-elements/_radio.scss +4 -3
- package/src/scss/form-elements/_select.scss +9 -10
- package/src/scss/form-elements/_slider.scss +11 -11
- package/src/scss/form-elements/_textarea.scss +5 -8
- package/src/scss/form-elements/_toggle.scss +6 -5
- package/src/scss/layout/_footer.scss +14 -7
- package/src/scss/layout/_header.scss +18 -17
- package/src/scss/layout/_home.scss +1 -1
- package/src/scss/layout/_main.scss +6 -6
- package/src/scss/layout/_section.scss +7 -4
- package/src/scss/utilities/_accessibility.scss +38 -0
- package/src/scss/utilities/_aspect.scss +27 -0
- package/src/scss/utilities/_display.scss +52 -0
- package/src/scss/utilities/_elevation.scss +16 -0
- package/src/scss/utilities/_index.scss +2 -0
- package/src/scss/utilities/_text.scss +63 -0
- package/src/scss/utilities/_touch-targets.scss +63 -0
|
@@ -117,7 +117,7 @@ same height as the login and burger buttons.
|
|
|
117
117
|
palette. All of them derive from `--mw-primary-color`, not from a theme
|
|
118
118
|
colour: the bar is dark in both themes and a light-only project must not have
|
|
119
119
|
to configure dark-theme values to change it. The bar itself is the primary
|
|
120
|
-
darkened toward black, `$header-surface` (
|
|
120
|
+
darkened toward black, `$header-surface` (14%) - see `theming.md`.
|
|
121
121
|
|
|
122
122
|
**Localhost indicator.** Put `mw-localhost-indicator-activated` on the header
|
|
123
123
|
and the shipped JS prepends a pulsing bar when the host is localhost/127.0.0.1/
|
|
@@ -238,8 +238,8 @@ mode with the background image from `--mw-hero-background`.
|
|
|
238
238
|
`mw-home-content-fade` fades the content in.
|
|
239
239
|
|
|
240
240
|
The image is treated per theme through `--mw-hero-image-filter` - a filter, not
|
|
241
|
-
a tinted overlay: `$hero-filter-dark` (`brightness(0.
|
|
242
|
-
`$hero-filter-light` (`brightness(1.
|
|
241
|
+
a tinted overlay: `$hero-filter-dark` (`brightness(0.7)`) against
|
|
242
|
+
`$hero-filter-light` (`brightness(1.1)`). A translucent layer can
|
|
243
243
|
only darken toward its own colour, so on an already dark photo both themes look
|
|
244
244
|
the same until the alpha is high enough that the tint colour is what you see.
|
|
245
245
|
Moving the image's brightness reads as a difference even on a dark photo, and
|
|
@@ -314,6 +314,41 @@ automatically.
|
|
|
314
314
|
**Display** - `mw-d-flex`, `mw-d-inline-flex`, `mw-d-block`, `mw-d-inline`,
|
|
315
315
|
`mw-d-inline-block`, `mw-d-grid`, `mw-d-none`, `mw-d-contents`.
|
|
316
316
|
|
|
317
|
+
**Responsive display** - `mw-d-{sm|md|lg|xl}-{none|block|flex|inline-flex|grid|inline-block}`.
|
|
318
|
+
Mobile-first and min-width, like everything else here: `mw-d-md-flex` means
|
|
319
|
+
"flex from the md breakpoint up", and the unprefixed class beside it is what
|
|
320
|
+
applies below that. The pair `mw-d-none mw-d-md-flex` is hidden on a phone and a
|
|
321
|
+
row from a tablet on. `mw-hide-mobile` (gone below md) and `mw-hide-desktop`
|
|
322
|
+
(gone from md up) spell out the two everyone actually reaches for.
|
|
323
|
+
|
|
324
|
+
**Text overflow** - `mw-text-truncate` is one line ending in an ellipsis and
|
|
325
|
+
carries `min-width: 0` with it, which is the reason truncation "does not work"
|
|
326
|
+
nine times out of ten inside a flex row. `mw-text-clamp-2` through `-5` is that
|
|
327
|
+
many lines ending in one. `mw-text-break` is for a string with nothing to break
|
|
328
|
+
at - a URL, a hash, an API key - and is what keeps a phone page from scrolling
|
|
329
|
+
sideways. `mw-text-nowrap` is the opposite.
|
|
330
|
+
|
|
331
|
+
**Wrapping and measure** - `mw-text-balance` evens out the lines of a short
|
|
332
|
+
block so a headline never leaves one word alone (headings get it already);
|
|
333
|
+
`mw-text-pretty` only prevents the orphan and is the one for body copy
|
|
334
|
+
(paragraphs get it already). `mw-text-measure` caps a column at 68 characters -
|
|
335
|
+
past roughly 75 the eye loses the start of the next line on the way back.
|
|
336
|
+
`mw-text-eyebrow` is the small spaced upper-case kicker above a heading.
|
|
337
|
+
`mw-text-uppercase` carries the letter-spacing capitals need to stay legible
|
|
338
|
+
with it; `mw-text-capitalize` is the plain transform.
|
|
339
|
+
|
|
340
|
+
**Elevation** - `mw-elevation-0` through `-5`, the same ramp every component
|
|
341
|
+
uses. See the scale table in `SKILL.md`. Never hand-roll a `box-shadow`.
|
|
342
|
+
|
|
343
|
+
**Aspect ratio** - `mw-aspect-square|video|wide|portrait|photo`. Reserves the
|
|
344
|
+
box before the image inside it has loaded, so the page does not reflow when the
|
|
345
|
+
picture arrives. The child fills the box and crops rather than stretching.
|
|
346
|
+
|
|
347
|
+
**Overflow and scrolling** - `mw-overflow-auto`, `mw-overflow-x-auto` (which
|
|
348
|
+
also contains the overscroll, so a sideways swipe on a wide table does not walk
|
|
349
|
+
the whole page), `mw-overflow-hidden`, and `mw-snap-x` to make a horizontal
|
|
350
|
+
strip come to rest on an item instead of halfway between two.
|
|
351
|
+
|
|
317
352
|
**Numbers** - `mw-text-numeric` is fixed-width digits and nothing else, for a
|
|
318
353
|
clock, a counter or an ID that must not jitter while it changes.
|
|
319
354
|
`mw-text-currency` adds right alignment and `nowrap` on top, which is what a
|
|
@@ -68,7 +68,7 @@ Safari 16.4+, Firefox 128+. The same range is declared as `browserslist` in
|
|
|
68
68
|
| `--mw-form-elements-background`, `--mw-form-elements-color` | Form controls stay light in both themes and therefore have their own pair |
|
|
69
69
|
| `--mw-font-family-base`, `-heading`, `-mono` | Font stacks - system stacks by default (`-mono` leads with Fira Code); no font is bundled. Configurable in SCSS, see below |
|
|
70
70
|
| `--mw-hero-background`, `--mw-hero-text-color` | Hero image (`url(...)`) and the ink on it. Fixed across themes - the photo does not change with the theme, so its text must not either. Defaults to the light end of the palette |
|
|
71
|
-
| `--mw-transition` |
|
|
71
|
+
| `--mw-transition` | Hover and focus states - an explicit paint-only property list at `--mw-duration-base`, never `all` |
|
|
72
72
|
| `--mw-card-img-height` | Per-card image height (default `210px`; `mw-card-lg`/`-xl` set it to 340px/480px, 260px/340px below `sm`) |
|
|
73
73
|
| `--mw-card-addon-color` | Background of `mw-card-badge` / `mw-card-ribbon`; the `mw-card-addon-*` classes set it, override it for a custom colour |
|
|
74
74
|
| `--mw-card-addon-text-color` | Label on that badge/ribbon; the `mw-card-addon-*` classes point it at the matching `--mw-*-accent-text-color` |
|
|
@@ -79,6 +79,15 @@ Safari 16.4+, Firefox 128+. The same range is declared as `browserslist` in
|
|
|
79
79
|
| `--mw-section-padding-block` | Top/bottom rhythm of `mw-section` (1.75rem) |
|
|
80
80
|
| `--mw-calendar-dot` | Colour of a single calendar dot - set it per dot or per cell; the `mw-calendar-dot-*` classes are presets for it |
|
|
81
81
|
| `--mw-scroll-hint-cover` | Colour the scroll hint on a tab bar fades into. Preset to the page, re-pointed to the card background inside `mw-card`, `mw-panel`, `mw-modal`, `mw-tile`, `mw-calendar` |
|
|
82
|
+
| `--mw-elevation-1` … `-5` | Every shadow in the framework. Two layers per level - contact plus ambient. Never write a `box-shadow` by hand: a hand-rolled one is the wrong colour in one of the two themes |
|
|
83
|
+
| `--mw-shadow-near`, `--mw-shadow-far` | The two tones the ramp above is mixed from, per theme |
|
|
84
|
+
| `--mw-transition-fast` | The same property list at `--mw-duration-fast` - for a state change that should feel instant under the pointer |
|
|
85
|
+
| `--mw-duration-instant\|fast\|base\|slow\|slower` | 110 / 180 / 300 / 520 / 900ms. Anything built on these is covered by `prefers-reduced-motion` for free |
|
|
86
|
+
| `--mw-duration-zoom` | 650ms, for a large surface actually travelling - an image scaling inside a card, a slider track |
|
|
87
|
+
| `--mw-ease-out`, `--mw-ease-in-out`, `--mw-ease-spring` | Things arriving (the default) / A to B and back / a pop |
|
|
88
|
+
| `--mw-control-height-sm\|·\|lg`, `--mw-control-font-sm\|·\|lg`, `--mw-control-line-height` | One size scale for input, select, textarea and button, so a field and the button beside it line up by construction |
|
|
89
|
+
| `--mw-focus-ring-width\|offset\|color` | The keyboard focus ring |
|
|
90
|
+
| `--mw-focus-halo-size\|opacity` | The soft ring a form field gets instead of a hard outline |
|
|
82
91
|
| `--mw-internal-theme-mode` | Read-only: what `$mw-theme-mode` was compiled to |
|
|
83
92
|
|
|
84
93
|
`--mw-container-gutter`, `--mw-container-width` and `--mw-section-padding-block`
|
|
@@ -97,11 +106,26 @@ Two rules that prevent most colour bugs:
|
|
|
97
106
|
or `--mw-border`.
|
|
98
107
|
2. **`--mw-text-muted-color` is only for text on theme surfaces** (cards, page
|
|
99
108
|
background) - it follows the theme. It is a true gray with `$muted-tint`
|
|
100
|
-
(
|
|
109
|
+
(23%) of the primary mixed in, not a stepped-back text colour, so it stays
|
|
101
110
|
gray no matter how tinted the palette is. On a colour surface that stays the same
|
|
102
111
|
in both themes it is always wrong: use `--mw-*-accent-text-color`, or
|
|
103
112
|
`opacity` for a disabled look.
|
|
104
113
|
|
|
114
|
+
3. **Elevation, motion and focus are tokens too.** `var(--mw-elevation-1..5)`
|
|
115
|
+
for any shadow, `var(--mw-transition)` / `var(--mw-transition-fast)` for a
|
|
116
|
+
hover or focus state, `var(--mw-duration-*)` with `var(--mw-ease-*)` for
|
|
117
|
+
anything else, and `--mw-focus-ring-*` / `--mw-focus-halo-*` for the ring.
|
|
118
|
+
A hand-rolled shadow is the wrong colour in one of the two themes: the dark
|
|
119
|
+
theme's shadow is a light rim over a dark contact layer, not a black blur.
|
|
120
|
+
A hand-rolled duration also opts out of `prefers-reduced-motion`, which works
|
|
121
|
+
by turning the duration tokens down.
|
|
122
|
+
|
|
123
|
+
4. **The header has two knobs of its own.** `$header-surface` sets how dark the
|
|
124
|
+
bar sits under the primary colour (lower is darker); `$header-active-tint`
|
|
125
|
+
sets how far the active navbar link is lifted off it (lower is a stronger,
|
|
126
|
+
more saturated blue, higher is paler with more contrast against the bar).
|
|
127
|
+
Both are `!default` in `abstracts/_variables.scss`.
|
|
128
|
+
|
|
105
129
|
## Light & dark
|
|
106
130
|
|
|
107
131
|
- Dark is the base. Light is applied by putting `mw-theme-light` on `<body>` -
|
|
@@ -124,7 +148,7 @@ Two rules that prevent most colour bugs:
|
|
|
124
148
|
both themes, and so does the header - see the next point for where its colour
|
|
125
149
|
comes from.
|
|
126
150
|
- The header bar is **not** part of that surface stack. It is
|
|
127
|
-
`--mw-primary-color` darkened straight toward black - `$header-surface` (
|
|
151
|
+
`--mw-primary-color` darkened straight toward black - `$header-surface` (14%)
|
|
128
152
|
is how much of the colour survives, the same shade ramp a colour tool prints.
|
|
129
153
|
It sits well past the bottom of that ramp so the hue reads as a tint on
|
|
130
154
|
near-black, not as a colour of its own. That matters for a light-only project:
|
|
@@ -185,6 +209,9 @@ effect, because the root colours are declared with `!default`.
|
|
|
185
209
|
$footer-surface-light: 0.95,
|
|
186
210
|
// the header bar - how much of the primary survives darkening toward black
|
|
187
211
|
$header-surface: 16%,
|
|
212
|
+
// how far the active navbar link sits off the primary colour - lower is a
|
|
213
|
+
// stronger, more saturated blue, higher is paler with more contrast
|
|
214
|
+
$header-active-tint: 25%,
|
|
188
215
|
$mw-hero-image: url('/assets/hero.jpg'),
|
|
189
216
|
// ink on that image - fixed, because the image is
|
|
190
217
|
$mw-hero-text-color: var(--mw-dark-text-color),
|
|
@@ -236,7 +263,7 @@ they are all `var()` references anyway:
|
|
|
236
263
|
|
|
237
264
|
## Importing only what you need
|
|
238
265
|
|
|
239
|
-
The full stylesheet is ~
|
|
266
|
+
The full stylesheet is ~200 kB raw / ~31 kB gzipped. Marketing components
|
|
240
267
|
(`blog-post`, `gallery`, `content-slider`, `techstack-bucket`, `tiles`,
|
|
241
268
|
`coming-soon`, `ratings`, `home`, `hero`) are dead weight in an application, and
|
|
242
269
|
Angular bundle budgets notice.
|
|
@@ -275,8 +302,7 @@ colourless.
|
|
|
275
302
|
@use 'maverick-wave/src/scss/utilities';
|
|
276
303
|
```
|
|
277
304
|
|
|
278
|
-
That set compiles to ~
|
|
279
|
-
build.
|
|
305
|
+
That set compiles to ~100 kB raw / ~17 kB gzipped - half the full build.
|
|
280
306
|
|
|
281
307
|
Details worth knowing:
|
|
282
308
|
|
|
@@ -284,7 +310,7 @@ Details worth knowing:
|
|
|
284
310
|
before any other module loads it, so the `with (...)` line goes at the top of
|
|
285
311
|
the file. Configuring `main` instead pulls in everything again.
|
|
286
312
|
- `base` forwards `reset`, `base` and `typography`. If you already have your own
|
|
287
|
-
reset, `@use '.../base/base'` gives you the `:root` block alone (~
|
|
313
|
+
reset, `@use '.../base/base'` gives you the `:root` block alone (~11 kB with a
|
|
288
314
|
component or two).
|
|
289
315
|
- Module names are the file names without the leading underscore:
|
|
290
316
|
`components/_buttons.scss` becomes `components/buttons`.
|
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,18 @@ 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.12.0] - 2026-08-27
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- some fixes because of the big update previously
|
|
14
|
+
|
|
15
|
+
## [4.11.0] - 2026-08-27
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- claude ui/ux pro skill - glow up
|
|
20
|
+
|
|
9
21
|
## [4.10.0] - 2026-08-24
|
|
10
22
|
|
|
11
23
|
### Added
|
package/README.md
CHANGED
|
@@ -17,9 +17,11 @@ The result is a framework that balances utility with simplicity, offering develo
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
19
|
- Responsive Grid System
|
|
20
|
-
- 30+ UI Components: Buttons, Cards, Panels, Tabs, Accordions, Modals, Tiles, Alerts, Spinners, Progress Bars, Avatars, Tags, Ratings, Stepper, Skeleton Loader, Empty State, Divider, and more
|
|
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, Divider, and more
|
|
21
21
|
- Form Elements: Input, Select, Textarea, Checkbox, Radio, Toggle, Input Group, with `mw-field` wrapper pattern for Angular Reactive Forms
|
|
22
|
-
- Utility Classes for spacing, flex, display, and
|
|
22
|
+
- Utility Classes for spacing, flex, display, typography, text overflow, elevation and aspect ratio
|
|
23
|
+
- A five-step elevation ramp and a motion scale, so every shadow and every transition in the framework comes from one place
|
|
24
|
+
- Mobile as a first-class target: 44px touch targets on a coarse pointer, modals that become bottom sheets, press states on everything, and hover effects that do not latch after a tap
|
|
23
25
|
- Easy Customization via CSS Custom Properties
|
|
24
26
|
- Built-in Light & Dark Mode with optional theme switching
|
|
25
27
|
- SCSS Source Files for advanced customization (Dart Sass, `@use`/`@forward`)
|
|
@@ -116,6 +118,79 @@ still be overridden individually if you want to break out of the scale.
|
|
|
116
118
|
> `browserslist` in `package.json`, which is what Autoprefixer and cssnano read
|
|
117
119
|
> when building `dist/`.
|
|
118
120
|
|
|
121
|
+
### Elevation and motion
|
|
122
|
+
|
|
123
|
+
Two scales that are not colours, and both are tokens for the same reason: a
|
|
124
|
+
framework where every component picks its own shadow and its own timing looks
|
|
125
|
+
assembled rather than designed.
|
|
126
|
+
|
|
127
|
+
```css
|
|
128
|
+
:root {
|
|
129
|
+
/* Elevation. Each level is two shadows - a tight contact layer that gives
|
|
130
|
+
the box weight, and a wide ambient one that says how high it floats.
|
|
131
|
+
Declared per theme, because the tones they are mixed from differ. */
|
|
132
|
+
--mw-elevation-1: /* resting: inputs, tags, small controls */;
|
|
133
|
+
--mw-elevation-2: /* raised: cards and panels at rest */;
|
|
134
|
+
--mw-elevation-3: /* floating: a card under the pointer */;
|
|
135
|
+
--mw-elevation-4: /* overlay: dropdowns, popovers, drawer */;
|
|
136
|
+
--mw-elevation-5: /* modal */;
|
|
137
|
+
|
|
138
|
+
/* Motion */
|
|
139
|
+
--mw-duration-instant: 90ms; /* a press */
|
|
140
|
+
--mw-duration-fast: 150ms; /* a colour swap under the pointer */
|
|
141
|
+
--mw-duration-base: 240ms; /* the default */
|
|
142
|
+
--mw-duration-slow: 400ms; /* something crossing the screen */
|
|
143
|
+
--mw-duration-slower: 700ms; /* a slider, a progress bar */
|
|
144
|
+
--mw-ease-out: cubic-bezier(0.22, 1, 0.36, 1); /* things arriving */
|
|
145
|
+
--mw-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* A to B and back */
|
|
146
|
+
--mw-ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1); /* a pop */
|
|
147
|
+
|
|
148
|
+
/* The two ready-made transitions every component uses */
|
|
149
|
+
--mw-transition: /* the explicit paint-only property list, base duration */;
|
|
150
|
+
--mw-transition-fast: /* the same list, fast duration */;
|
|
151
|
+
|
|
152
|
+
/* Control sizes - one height per step, shared by input, select, textarea
|
|
153
|
+
and button, so a field and the button beside it line up */
|
|
154
|
+
--mw-control-height-sm: 2rem;
|
|
155
|
+
--mw-control-height: 2.25rem;
|
|
156
|
+
--mw-control-height-lg: 2.5rem;
|
|
157
|
+
--mw-control-font-sm: 0.8rem;
|
|
158
|
+
--mw-control-font: 0.9rem;
|
|
159
|
+
--mw-control-font-lg: 1rem;
|
|
160
|
+
--mw-control-line-height: 1.35;
|
|
161
|
+
|
|
162
|
+
/* Focus */
|
|
163
|
+
--mw-focus-ring-width: 2px;
|
|
164
|
+
--mw-focus-ring-offset: 2px;
|
|
165
|
+
--mw-focus-ring-color: var(--mw-primary-text-color);
|
|
166
|
+
--mw-focus-halo-size: 3px; /* the soft ring a form field gets instead */
|
|
167
|
+
--mw-focus-halo-opacity: 28%;
|
|
168
|
+
}
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
`--mw-transition` deliberately lists its properties rather than saying `all`: a
|
|
172
|
+
width that changes at a breakpoint should snap, not crawl. Anything that really
|
|
173
|
+
does want to animate a size says so itself. `--mw-duration-zoom` (650ms) is the
|
|
174
|
+
one for a large surface actually travelling - an image scaling inside a card, a
|
|
175
|
+
slider track crossing its frame - because the eye reads speed as distance over
|
|
176
|
+
time, and the 300ms that feels right on a 40px button feels snatched on a 300px
|
|
177
|
+
photo.
|
|
178
|
+
|
|
179
|
+
The control scale is what makes a form row line up. Each field used to work its
|
|
180
|
+
own height out from its own font size, its own line-height and its own padding,
|
|
181
|
+
and no two of them agreed: an input, a select and a button side by side measured
|
|
182
|
+
32.2, 34.4 and 37.2 pixels. They all measure the same now, and the fields share
|
|
183
|
+
one font scale instead of the select sitting a step below the input next to it.
|
|
184
|
+
|
|
185
|
+
Under `prefers-reduced-motion: reduce` the duration tokens all drop to 1ms and a
|
|
186
|
+
blanket rule catches anything that names its own timing - including whatever you
|
|
187
|
+
wrote yourself. 1ms rather than 0, so a script waiting on `transitionend` still
|
|
188
|
+
gets one.
|
|
189
|
+
|
|
190
|
+
To retune from SCSS instead, the same values are `$duration-*`, `$ease-*`,
|
|
191
|
+
`$control-height*` / `$control-font*`, `$focus-ring-*` and `$shadow-near-*` /
|
|
192
|
+
`$shadow-far-*` in `abstracts/_variables.scss`, all `!default`.
|
|
193
|
+
|
|
119
194
|
### Fill or ink
|
|
120
195
|
|
|
121
196
|
Every brand and status colour comes in two tokens, and picking the right one is
|
|
@@ -292,8 +367,8 @@ have no use for the marketing components (`blog-post`, `gallery`,
|
|
|
292
367
|
@use 'maverick-wave/src/scss/utilities';
|
|
293
368
|
```
|
|
294
369
|
|
|
295
|
-
A typical application subset like the one above compiles to roughly
|
|
296
|
-
|
|
370
|
+
A typical application subset like the one above compiles to roughly 85 kB raw /
|
|
371
|
+
14 kB gzipped, against 196 kB / 30 kB for the full build.
|
|
297
372
|
|
|
298
373
|
> **`base` is not optional.** It carries the `:root` custom properties - without
|
|
299
374
|
> it every component renders without colors. If you bring your own reset, use
|
package/index.html
CHANGED
|
@@ -271,6 +271,9 @@
|
|
|
271
271
|
<a href="#spinners" class="mw-section-btn">Loading Spinners</a>
|
|
272
272
|
<a href="#avatars" class="mw-section-btn">Avatars</a>
|
|
273
273
|
<a href="#tags" class="mw-section-btn">Tags</a>
|
|
274
|
+
<a href="#badges" class="mw-section-btn">Badges</a>
|
|
275
|
+
<a href="#dropdown" class="mw-section-btn">Dropdown</a>
|
|
276
|
+
<a href="#kbd" class="mw-section-btn">Keyboard Keys</a>
|
|
274
277
|
<a href="#ratings" class="mw-section-btn">Ratings</a>
|
|
275
278
|
<a href="#info" class="mw-section-btn">Info</a>
|
|
276
279
|
<a href="#alerts" class="mw-section-btn">Alerts</a>
|
|
@@ -307,6 +310,19 @@
|
|
|
307
310
|
<!-- Tags container -->
|
|
308
311
|
<div id="tags">@@include('./src/partials/tags-container.html')</div>
|
|
309
312
|
|
|
313
|
+
<!-- Badges container -->
|
|
314
|
+
<div id="badges">
|
|
315
|
+
@@include('./src/partials/badges-container.html')
|
|
316
|
+
</div>
|
|
317
|
+
|
|
318
|
+
<!-- Dropdown container -->
|
|
319
|
+
<div id="dropdown">
|
|
320
|
+
@@include('./src/partials/dropdown-container.html')
|
|
321
|
+
</div>
|
|
322
|
+
|
|
323
|
+
<!-- Keyboard keys container -->
|
|
324
|
+
<div id="kbd">@@include('./src/partials/kbd-container.html')</div>
|
|
325
|
+
|
|
310
326
|
<!-- Ratings container -->
|
|
311
327
|
<div id="ratings">
|
|
312
328
|
@@include('./src/partials/ratings-container.html')
|