maverick-wave 5.5.0 → 5.7.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.
Files changed (39) hide show
  1. package/.claude/skills/mw-maverick-wave/SKILL.md +16 -13
  2. package/.claude/skills/mw-maverick-wave/examples/static-landing-page.md +2 -2
  3. package/.claude/skills/mw-maverick-wave/references/components.md +5 -2
  4. package/.claude/skills/mw-maverick-wave/references/forms.md +5 -5
  5. package/.claude/skills/mw-maverick-wave/references/theming.md +41 -0
  6. package/CHANGELOG.md +17 -0
  7. package/README.md +30 -5
  8. package/index.html +359 -4
  9. package/maverick-wave.min.css +5 -5
  10. package/package.json +2 -2
  11. package/src/partials/history-container.html +1 -1
  12. package/src/partials/palette-container.html +210 -0
  13. package/src/partials/typography-container.html +8 -9
  14. package/src/partials/utilities-container.html +48 -0
  15. package/src/scss/abstracts/_functions.scss +11 -2
  16. package/src/scss/abstracts/_mixins.scss +35 -3
  17. package/src/scss/abstracts/_variables.scss +8 -8
  18. package/src/scss/base/_base.scss +3 -0
  19. package/src/scss/components/_avatars.scss +33 -1
  20. package/src/scss/components/_blog-post.scss +2 -2
  21. package/src/scss/components/_button-bar.scss +1 -1
  22. package/src/scss/components/_buttons.scss +1 -1
  23. package/src/scss/components/_cards.scss +13 -22
  24. package/src/scss/components/_coming-soon.scss +1 -1
  25. package/src/scss/components/_info.scss +2 -2
  26. package/src/scss/components/_lists.scss +1 -1
  27. package/src/scss/components/_panels.scss +1 -1
  28. package/src/scss/components/_pricing.scss +1 -1
  29. package/src/scss/components/_techstack-bucket.scss +1 -1
  30. package/src/scss/components/_tiles.scss +1 -1
  31. package/src/scss/form-elements/_input.scss +1 -1
  32. package/src/scss/form-elements/_select.scss +1 -1
  33. package/src/scss/layout/_footer.scss +1 -1
  34. package/src/scss/layout/_header.scss +9 -1
  35. package/src/scss/layout/_main.scss +31 -2
  36. package/src/scss/utilities/_index.scss +1 -0
  37. package/src/scss/utilities/_reveal.scss +9 -2
  38. package/src/scss/utilities/_touch-targets.scss +1 -1
  39. package/src/scss/utilities/_variants.scss +120 -0
@@ -3,7 +3,7 @@
3
3
  @layer mw.forms {
4
4
  .mw-input {
5
5
  width: 100%;
6
- padding: spacing('2') spacing('3');
6
+ padding: spacing('1') spacing('3');
7
7
  font-size: var(--mw-control-font);
8
8
  line-height: var(--mw-control-line-height);
9
9
  min-height: var(--mw-control-height);
@@ -3,7 +3,7 @@
3
3
  @layer mw.forms {
4
4
  .mw-select {
5
5
  width: 100%;
6
- padding: spacing('2') spacing('6') spacing('2') spacing('3');
6
+ padding: spacing('1') spacing('6') spacing('1') spacing('3');
7
7
  font-size: var(--mw-control-font);
8
8
  min-height: var(--mw-control-height);
9
9
  background: var(--mw-form-elements-background);
@@ -115,7 +115,7 @@
115
115
  border-color: var(--mw-primary-color);
116
116
  }
117
117
 
118
- @include hover {
118
+ @include hover-move {
119
119
  transform: translateY(-2px);
120
120
  }
121
121
 
@@ -82,7 +82,12 @@
82
82
 
83
83
  &:hover:not(:disabled) {
84
84
  background: var(--mw-primary-color-hover);
85
- transform: translateY(-1px);
85
+ }
86
+
87
+ @include hover-move {
88
+ &:not(:disabled) {
89
+ transform: translateY(-1px);
90
+ }
86
91
  }
87
92
 
88
93
  @include focus-ring;
@@ -117,6 +122,9 @@
117
122
 
118
123
  &:hover {
119
124
  background: var(--mw-primary-color-hover);
125
+ }
126
+
127
+ @include hover-move {
120
128
  transform: translateY(-1px);
121
129
  }
122
130
 
@@ -157,8 +157,23 @@
157
157
  padding: spacing('2') spacing('5');
158
158
  border: 1px solid #{fade('hero-text-color', 22%)};
159
159
  border-radius: 999px;
160
- background: fade('hero-text-color', 8%);
161
- backdrop-filter: blur(4px);
160
+ // A vertical ramp and not a flat tint: glass is lit from above, and the
161
+ // gradient is what gives the pill a thickness instead of a fogged panel
162
+ background: linear-gradient(
163
+ to bottom,
164
+ #{fade('hero-text-color', 16%)},
165
+ #{fade('hero-text-color', 5%)}
166
+ );
167
+ // saturate() is what separates glass from frosted plastic: the blur alone
168
+ // greys out what shows through, and pushing the chroma back up is how a
169
+ // real lens reads. The two inset lines are the specular highlight - light
170
+ // catching the top edge, a fainter bounce off the bottom - and the outer
171
+ // shadow is what lifts the pill off the photo instead of pasting it on.
172
+ backdrop-filter: blur(14px) saturate(180%);
173
+ box-shadow:
174
+ inset 0 1px 0 #{fade('hero-text-color', 40%)},
175
+ inset 0 -1px 0 #{fade('hero-text-color', 12%)},
176
+ 0 2px 12px rgb(0 0 0 / 18%);
162
177
  color: fade('hero-text-color', 88%);
163
178
  font-size: font-size('sm');
164
179
  font-weight: font-weight('medium');
@@ -311,6 +326,20 @@
311
326
  }
312
327
  }
313
328
 
329
+ // A press usually scales the trigger, and a transform makes it a containing
330
+ // block for the fixed-position bubble above - which would drop the label
331
+ // into the element being pressed. So it steps aside for the click instead;
332
+ // by then it has been read anyway. After the hover rule, same weight.
333
+ &:active::before,
334
+ &:active::after {
335
+ opacity: 0;
336
+ display: none;
337
+ // Not transitioned: `allow-discrete` holds `display: block` until the fade
338
+ // ends, and the bubble would spend those 180ms visibly sitting in the
339
+ // element. Going back out on release keeps the fade - that one is wanted.
340
+ transition: none;
341
+ }
342
+
314
343
  // The clipping caveat above, lifted where the browser can do it: `fixed` takes
315
344
  // the bubble out of the trigger's containing block, anchor positioning keeps
316
345
  // it attached. No `anchor-name` needed - a pseudo element is implicitly
@@ -8,3 +8,4 @@
8
8
  @forward 'spacing';
9
9
  @forward 'text';
10
10
  @forward 'touch-targets';
11
+ @forward 'variants';
@@ -11,8 +11,7 @@
11
11
  // `animation:` that cannot carry a timeline.
12
12
  @supports (animation-timeline: view()) {
13
13
  @media (prefers-reduced-motion: no-preference) {
14
- .mw-reveal,
15
- .mw-reveal-stagger > * {
14
+ :root:not(.mw-scroll-static) :is(.mw-reveal, .mw-reveal-stagger > *) {
16
15
  animation-name: mw-reveal;
17
16
  animation-timing-function: var(--mw-ease-out);
18
17
  animation-fill-mode: backwards;
@@ -47,6 +46,14 @@
47
46
  transform: translateY(40px);
48
47
  }
49
48
 
49
+ // The script has already hidden whatever was below the fold when the class
50
+ // arrives, and it only ever un-hides on intersection - without this the
51
+ // switch would leave those elements invisible instead of static.
52
+ :root.mw-scroll-static .mw-reveal-hidden {
53
+ opacity: 1;
54
+ transform: none;
55
+ }
56
+
50
57
  .mw-reveal-run {
51
58
  // `backwards` for the reason above - a forwards fill would pin the
52
59
  // transform and cost the card its hover lift. The delay comes inline,
@@ -22,7 +22,7 @@
22
22
  min-height: 2.5rem;
23
23
  }
24
24
 
25
- // The base fields sit at 2.35rem from the control scale, which is right under
25
+ // The base fields sit at 2.125rem from the control scale, which is right under
26
26
  // a pointer and short of a thumb. Same floor as the button beside them.
27
27
  .mw-input,
28
28
  .mw-select {
@@ -0,0 +1,120 @@
1
+ @use '../abstracts' as *;
2
+
3
+ @layer mw.utilities {
4
+ // Site-wide looks, switched with one class on <html>. Two more live elsewhere,
5
+ // because they have to reach every caller of a mixin: .mw-corners-even in
6
+ // surface(), .mw-hover-static in hover-move().
7
+
8
+ // One brand colour instead of two. Every secondary tone is derived from
9
+ // --mw-secondary-color with color-mix() and oklch(from ...), so the two lines
10
+ // below carry through to hovers, tints, borders and both themes' ink.
11
+ :root.mw-accent-single {
12
+ --mw-secondary-color: var(--mw-primary-color);
13
+ --mw-secondary-accent-text-color: var(--mw-primary-accent-text-color);
14
+
15
+ // Or the two solid buttons would be the same button. Outline keeps the
16
+ // emphasis order the markup asked for: primary fills, secondary draws a line.
17
+ .mw-btn-secondary {
18
+ background: transparent;
19
+ border-color: var(--mw-primary-text-color);
20
+ color: var(--mw-primary-text-color);
21
+
22
+ &:hover:not(:disabled) {
23
+ background: var(--mw-primary-color);
24
+ border-color: var(--mw-primary-color);
25
+ color: var(--mw-primary-accent-text-color);
26
+ }
27
+ }
28
+ }
29
+
30
+ // 1 to 3 are surfaces lying on the page and go; 4 and 5 are the dropdown and
31
+ // the modal, which genuinely float above content and keep their shadow - in a
32
+ // flat page they are the only two things that should cast one.
33
+ //
34
+ // The second selector is not optional: elevation is a theme alias, and the
35
+ // light theme re-declares it on <body>. A value written on :root alone is
36
+ // shadowed for the whole body subtree, so the switch would do nothing at all
37
+ // in light mode. Any variant that retunes a theme-bound token needs both.
38
+ :root.mw-shadows-flat,
39
+ :root.mw-shadows-flat .mw-theme-light {
40
+ --mw-elevation-1: none;
41
+ --mw-elevation-2: none;
42
+ --mw-elevation-3: none;
43
+ }
44
+
45
+ // The diagonal hatch behind an alternating section, dropped. Written on the
46
+ // section and not as a token on :root: --mw-page-background is a theme alias
47
+ // that only becomes the light one further down the tree, so a copy taken up
48
+ // here hands the section the *other* theme's colour - the hatch turns dark
49
+ // instead of vanishing.
50
+ :root.mw-sections-plain .mw-section-alternate {
51
+ background: var(--mw-page-background);
52
+ }
53
+
54
+ // Buttons only. Input groups build their radius corner by corner, so a pill
55
+ // there is its own piece of geometry rather than one more override.
56
+ :root.mw-btn-pill .mw-btn {
57
+ border-radius: 999px;
58
+ }
59
+
60
+ // Tinted glass: a translucent wash with a vertical ramp and a specular line
61
+ // along the top edge, which is what gives the button its thickness.
62
+ //
63
+ // Deliberately without `backdrop-filter`, and that omission has to stay. The
64
+ // filter makes the button a containing block for its own fixed-position
65
+ // descendants, which drops a [data-tooltip] bubble inside the button instead
66
+ // of above it; and nested inside the header's own blur it flickers while the
67
+ // page scrolls. At the tint below there was next to nothing to see through.
68
+ //
69
+ // The tint stays heavy on purpose, and that is the other trade-off: a 20%
70
+ // wash reads as real glass, but the label then rides on whatever is behind
71
+ // it, and over a light card that contrast is gone. At 88/70 the label keeps
72
+ // roughly the fill's contrast.
73
+ //
74
+ // Hover and active are restated rather than inherited: this sits in
75
+ // mw.utilities, which outranks every rule in mw.components whatever its
76
+ // specificity, so the states would otherwise be flattened along with the fill.
77
+ :root.mw-btn-glass {
78
+ @each $name in ('primary', 'secondary', 'danger', 'success') {
79
+ .mw-btn-#{$name} {
80
+ background: linear-gradient(
81
+ to bottom,
82
+ color-mix(in srgb, var(--mw-#{$name}-color) 88%, transparent),
83
+ color-mix(in srgb, var(--mw-#{$name}-color) 70%, transparent)
84
+ );
85
+ border-color: color-mix(
86
+ in srgb,
87
+ var(--mw-#{$name}-color) 70%,
88
+ transparent
89
+ );
90
+ box-shadow:
91
+ inset 0 1px 0 rgb(255 255 255 / 28%),
92
+ 0 1px 3px rgb(0 0 0 / 14%);
93
+
94
+ &:hover:not(:disabled),
95
+ &.mw-active:not(:disabled),
96
+ &.active:not(:disabled) {
97
+ background: linear-gradient(
98
+ to bottom,
99
+ color-mix(in srgb, var(--mw-#{$name}-color) 97%, transparent),
100
+ color-mix(in srgb, var(--mw-#{$name}-color) 82%, transparent)
101
+ );
102
+ border-color: color-mix(
103
+ in srgb,
104
+ var(--mw-#{$name}-color) 85%,
105
+ transparent
106
+ );
107
+ }
108
+ }
109
+ }
110
+ }
111
+
112
+ :root.mw-headings-caps {
113
+ h1,
114
+ h2,
115
+ h3 {
116
+ text-transform: uppercase;
117
+ letter-spacing: 0.045em;
118
+ }
119
+ }
120
+ }