srcdev-nuxt-components 9.6.16 → 9.6.18
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.
|
@@ -211,6 +211,8 @@ All tokens are read via `var(--token, default)` — see the full list in the com
|
|
|
211
211
|
| `--responsive-header-link-font-size` | `inherit` | Nav-link font-size. **Set this to a fixed value** — see the measurement-pipeline note above for why leaving it `inherit` from a fluid ancestor is a footgun. |
|
|
212
212
|
| `--responsive-header-link-padding-block` / `--responsive-header-link-padding-inline` | `0.8rem` / `0.2rem` | Padding around each top-bar link and summary. The active underline and hover highlight span this box, so larger inline padding makes them reach past the label. Set fixed values, as with the font size: the overflow-collapse measurement only re-runs when the header resizes. |
|
|
213
213
|
| `--responsive-header-nav-item-gap` | `30px` | Gap between items within each top-bar list. Reduce it when you raise the inline padding to keep the label-to-label spacing. |
|
|
214
|
+
| `--responsive-header-link-icon-size` / `--responsive-header-link-icon-gap` | `1.35em` / `6px` | Link icon and summary chevron size, and its gap to the label. Keep the size fixed so a late icon can't widen an item after measurement. |
|
|
215
|
+
| `--responsive-header-nav-group-gap` | `60px` | Gap between the main and secondary nav groups. |
|
|
214
216
|
| `--responsive-header-link-color` | `inherit` | Link/summary text colour. |
|
|
215
217
|
| `--responsive-header-link-color-hover` / `-active` | the resting colour | Per-state link colour in the top bar (added 2026-10-07). Hover falls back to the item's current state. `--overflow-nav-link-color-hover` / `-active` do the same in the overflow panel. |
|
|
216
218
|
| `--responsive-header-bg` / `--responsive-header-padding-*` / `--responsive-header-border*` | transparent / `0` / `none` | Root element theming. |
|
|
@@ -219,6 +221,8 @@ All tokens are read via `var(--token, default)` — see the full list in the com
|
|
|
219
221
|
|
|
220
222
|
Defaults are for a **light** header (changed 2026-10-07): panels use `--page-bg`, borders and hover tints are `color-mix()`es of `--theme-text`, the overflow button is transparent with a `--theme-border-focus` hover outline. They used to assume a dark bar (`Canvas`, translucent white borders and tints). A dark header sets the tokens.
|
|
221
223
|
| `--responsive-nav-decorator-indicator-color` / `--responsive-nav-decorator-hovered-*` | `currentColor` / inherits | The sliding active/hover indicator bar under the main nav. |
|
|
224
|
+
| `--responsive-nav-decorator-indicator-offset` | `2px` | Distance of the active indicator below the active item's bottom edge; negative raises it. |
|
|
225
|
+
| `--responsive-nav-decorator-indicator-height` / `--responsive-nav-decorator-hovered-border-radius` / `--responsive-nav-decorator-transition-duration` | `2px` / `4px` / `200ms` | Active indicator thickness, hover highlight radius, and how long both take to slide (they jump under `prefers-reduced-motion`; the chevron and overflow button don't animate their movement either). |
|
|
222
226
|
|
|
223
227
|
---
|
|
224
228
|
|
|
@@ -12,6 +12,9 @@ are documented alongside it since that's where they're consumed.
|
|
|
12
12
|
| `--responsive-header-link-font-size` | `inherit` | Nav-link font-size. **Always set this to a fixed value.** Leaving it `inherit` means a fluid ancestor font-size (`clamp()`/`vw`) can drift nav-item text width without ever re-triggering the overflow-collapse measurement — see the component skill doc's "measurement pipeline" section for the full mechanism. |
|
|
13
13
|
| `--responsive-header-link-padding-block` / `--responsive-header-link-padding-inline` | `0.8rem` / `0.2rem` | Padding around each top-bar link and summary. The active underline and hover highlight span this box, so larger inline padding makes them reach past the label. Set fixed values, as with the font size: the overflow-collapse measurement only re-runs when the header resizes. |
|
|
14
14
|
| `--responsive-header-nav-item-gap` | `30px` | Gap between items within each top-bar list. Reduce it when you raise the inline padding to keep the label-to-label spacing. |
|
|
15
|
+
| `--responsive-header-link-icon-size` | `1.35em` | Size of a top-bar link's icon and a sub-nav summary's chevron. Keep it a fixed size (not `auto`): the slot is reserved so a late-loading icon can't widen an item after the overflow measurement. |
|
|
16
|
+
| `--responsive-header-link-icon-gap` | `6px` | Gap between a top-bar link's icon and label, and a summary's label and chevron. |
|
|
17
|
+
| `--responsive-header-nav-group-gap` | `60px` | Gap between the main and secondary nav groups. |
|
|
15
18
|
| `--responsive-header-link-color` | `inherit` | Link/summary text colour. |
|
|
16
19
|
| `--responsive-header-main-nav-justify-content` | `space-between` | How the main nav's groups are spread along the bar. Use `flex-start`, `safe center` or `safe end`; plain `center`/`end` let items that don't fit spill off the start edge, where they're clipped. (Safari 16 ignores `safe` values and falls back to start alignment.) |
|
|
17
20
|
| `--responsive-header-color` | `inherit` | Root element text colour. |
|
|
@@ -31,8 +34,12 @@ are documented alongside it since that's where they're consumed.
|
|
|
31
34
|
| `--responsive-header-overflow-nav-bg` / `-border` / `-border-radius` / `-padding-block` | `var(--page-bg, var(--theme-surface-subtle))` / `1px solid color-mix(in oklch, var(--theme-text) 20%, transparent)` / `8px` / `12px` | Overflow panel container. |
|
|
32
35
|
| `--responsive-header-overflow-nav-max-block-size` | `70vh` | Tallest the overflow panel gets before it scrolls. |
|
|
33
36
|
| `--responsive-nav-decorator-indicator-color` | `currentColor` | Active-item indicator bar/underline. |
|
|
37
|
+
| `--responsive-nav-decorator-indicator-offset` | `2px` | How far the active indicator sits below the active item's bottom edge. Negative values raise it inside the item (`-4px` sits it 4px up). |
|
|
34
38
|
| `--responsive-nav-decorator-hovered-indicator-color` | inherits the above | Indicator colour while hovering. |
|
|
35
39
|
| `--responsive-nav-decorator-hovered-bg` | `color-mix(in oklch, var(--theme-text) 8%, transparent)` | Hover highlight background behind the hovered item. |
|
|
40
|
+
| `--responsive-nav-decorator-indicator-height` | `2px` | Thickness of the active indicator. |
|
|
41
|
+
| `--responsive-nav-decorator-hovered-border-radius` | `4px` | Corner radius of the hover highlight. |
|
|
42
|
+
| `--responsive-nav-decorator-transition-duration` | `200ms` | How long the active indicator and hover highlight take to slide between items. Under `prefers-reduced-motion` they jump instead (the hover highlight still fades). |
|
|
36
43
|
|
|
37
44
|
### Overflow panel content (`NavigationItems`)
|
|
38
45
|
|
|
@@ -56,13 +63,17 @@ Link and dropdown text is never line-clamped: it names where the link goes. Long
|
|
|
56
63
|
wrap inside the dropdown and overflow panels; in the top bar, an item too wide to fit moves to the
|
|
57
64
|
overflow menu.
|
|
58
65
|
|
|
66
|
+
> **Changed 2026-10-20**: under `prefers-reduced-motion` the active indicator and hover highlight
|
|
67
|
+
> jump to the new item instead of sliding, the dropdown chevron flips without rotating, and the
|
|
68
|
+
> overflow button appears without animating its width. Opacity fades stay.
|
|
69
|
+
>
|
|
59
70
|
> **Changed 2026-10-07**: the defaults assumed a dark bar: `Canvas` panel and button backgrounds,
|
|
60
71
|
> translucent white borders (`#ffffff90`, `#efefef75`), a white button outline/hover outline and
|
|
61
72
|
> white-tint hover highlights, all near-invisible on a light header. They now come from the
|
|
62
73
|
> `--theme-*` slots and `--page-bg` (see the tables). A dark header sets these tokens. Also added
|
|
63
74
|
> the `-link-color-hover` / `-link-color-active` tokens (top bar and overflow panel), which
|
|
64
75
|
> TabNavigation had and ResponsiveHeader lacked.
|
|
65
|
-
|
|
76
|
+
>
|
|
66
77
|
> **Changed 2026-10-05**: the dropdown and overflow panels had no maximum size, so a long child
|
|
67
78
|
> name or a long child list ran off-screen. They are now capped by the max-size tokens above.
|
|
68
79
|
> `--_overflow-drop-down-width`, a private token nothing ever set, is gone (`min-width: fit-content`
|
|
@@ -775,13 +775,20 @@ watch(
|
|
|
775
775
|
--responsive-header-overflow-nav-max-block-size (default: 70vh)
|
|
776
776
|
|
|
777
777
|
--responsive-nav-decorator-indicator-color (default: currentColor)
|
|
778
|
+
--responsive-nav-decorator-indicator-offset (default: 2px, below the item; negative raises it)
|
|
778
779
|
--responsive-nav-decorator-hovered-indicator-color (default: inherits --responsive-nav-decorator-indicator-color)
|
|
779
780
|
--responsive-nav-decorator-hovered-bg (default: color-mix(in oklch, var(--theme-text) 8%, transparent))
|
|
781
|
+
--responsive-nav-decorator-indicator-height (default: 2px)
|
|
782
|
+
--responsive-nav-decorator-hovered-border-radius (default: 4px)
|
|
783
|
+
--responsive-nav-decorator-transition-duration (default: 200ms)
|
|
780
784
|
|
|
781
785
|
--responsive-header-link-font-size (default: inherit)
|
|
782
786
|
--responsive-header-link-padding-block (default: 0.8rem)
|
|
783
787
|
--responsive-header-link-padding-inline (default: 0.2rem)
|
|
784
788
|
--responsive-header-nav-item-gap (default: 30px)
|
|
789
|
+
--responsive-header-link-icon-size (default: 1.35em)
|
|
790
|
+
--responsive-header-link-icon-gap (default: 6px)
|
|
791
|
+
--responsive-header-nav-group-gap (default: 60px)
|
|
785
792
|
--responsive-header-main-nav-justify-content (default: space-between)
|
|
786
793
|
──────────────────────────────────────────────────────────────────────── */
|
|
787
794
|
|
|
@@ -825,7 +832,7 @@ watch(
|
|
|
825
832
|
flex-wrap: nowrap;
|
|
826
833
|
flex-grow: 1;
|
|
827
834
|
justify-content: var(--responsive-header-main-nav-justify-content, space-between);
|
|
828
|
-
gap: 60px;
|
|
835
|
+
gap: var(--responsive-header-nav-group-gap, 60px);
|
|
829
836
|
overflow-x: hidden;
|
|
830
837
|
margin-inline-end: v-bind(mainNavigationMarginBlockEndStr);
|
|
831
838
|
|
|
@@ -856,7 +863,7 @@ watch(
|
|
|
856
863
|
|
|
857
864
|
.main-navigation-link {
|
|
858
865
|
display: flex;
|
|
859
|
-
gap: 6px;
|
|
866
|
+
gap: var(--responsive-header-link-icon-gap, 6px);
|
|
860
867
|
white-space: nowrap;
|
|
861
868
|
font-size: var(--responsive-header-link-font-size, inherit);
|
|
862
869
|
color: var(--_link-color, var(--responsive-header-link-color, inherit));
|
|
@@ -880,8 +887,8 @@ watch(
|
|
|
880
887
|
(the wrapper's own box doesn't necessarily change size when it happens). */
|
|
881
888
|
.decorator-icon {
|
|
882
889
|
flex-shrink: 0;
|
|
883
|
-
width: 1.35em;
|
|
884
|
-
height: 1.35em;
|
|
890
|
+
width: var(--responsive-header-link-icon-size, 1.35em);
|
|
891
|
+
height: var(--responsive-header-link-icon-size, 1.35em);
|
|
885
892
|
}
|
|
886
893
|
|
|
887
894
|
.main-navigation-details {
|
|
@@ -895,7 +902,7 @@ watch(
|
|
|
895
902
|
|
|
896
903
|
.has-toggle-icon {
|
|
897
904
|
display: flex;
|
|
898
|
-
gap: 6px;
|
|
905
|
+
gap: var(--responsive-header-link-icon-gap, 6px);
|
|
899
906
|
white-space: nowrap;
|
|
900
907
|
|
|
901
908
|
/* Reserved for the same reason as .decorator-icon above — an
|
|
@@ -903,10 +910,14 @@ watch(
|
|
|
903
910
|
.icon {
|
|
904
911
|
display: block;
|
|
905
912
|
flex-shrink: 0;
|
|
906
|
-
width: 1.35em;
|
|
907
|
-
height: 1.35em;
|
|
913
|
+
width: var(--responsive-header-link-icon-size, 1.35em);
|
|
914
|
+
height: var(--responsive-header-link-icon-size, 1.35em);
|
|
908
915
|
transform: var(--_icon-transform);
|
|
909
916
|
transition: transform 0.2s ease-in-out;
|
|
917
|
+
|
|
918
|
+
@media (prefers-reduced-motion: reduce) {
|
|
919
|
+
transition: none;
|
|
920
|
+
}
|
|
910
921
|
}
|
|
911
922
|
}
|
|
912
923
|
|
|
@@ -1055,6 +1066,12 @@ watch(
|
|
|
1055
1066
|
|
|
1056
1067
|
transition: all 0.2s ease-in-out;
|
|
1057
1068
|
|
|
1069
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1070
|
+
transition:
|
|
1071
|
+
opacity 0.2s ease-in-out,
|
|
1072
|
+
visibility 0.2s ease-in-out;
|
|
1073
|
+
}
|
|
1074
|
+
|
|
1058
1075
|
&.visually-hidden {
|
|
1059
1076
|
opacity: 0;
|
|
1060
1077
|
visibility: hidden;
|
|
@@ -1191,12 +1208,12 @@ watch(
|
|
|
1191
1208
|
top: anchor(top);
|
|
1192
1209
|
bottom: anchor(bottom);
|
|
1193
1210
|
background: var(--responsive-nav-decorator-hovered-bg, color-mix(in oklch, var(--theme-text) 8%, transparent));
|
|
1194
|
-
border-radius: 4px;
|
|
1211
|
+
border-radius: var(--responsive-nav-decorator-hovered-border-radius, 4px);
|
|
1195
1212
|
z-index: 1;
|
|
1196
1213
|
opacity: 0;
|
|
1197
1214
|
transition:
|
|
1198
|
-
left 200ms ease,
|
|
1199
|
-
right 200ms ease,
|
|
1215
|
+
left var(--responsive-nav-decorator-transition-duration, 200ms) ease,
|
|
1216
|
+
right var(--responsive-nav-decorator-transition-duration, 200ms) ease,
|
|
1200
1217
|
opacity 150ms ease;
|
|
1201
1218
|
}
|
|
1202
1219
|
|
|
@@ -1214,19 +1231,30 @@ watch(
|
|
|
1214
1231
|
position-anchor: --responsive-main-nav-indicator;
|
|
1215
1232
|
left: anchor(left);
|
|
1216
1233
|
right: anchor(right);
|
|
1217
|
-
bottom: calc(anchor(bottom) - 2px);
|
|
1218
|
-
height: 2px;
|
|
1234
|
+
bottom: calc(anchor(bottom) - var(--responsive-nav-decorator-indicator-offset, 2px));
|
|
1235
|
+
height: var(--responsive-nav-decorator-indicator-height, 2px);
|
|
1219
1236
|
background: var(--responsive-nav-decorator-indicator-color, currentColor);
|
|
1220
1237
|
z-index: 3;
|
|
1221
1238
|
transition:
|
|
1222
|
-
left 200ms ease,
|
|
1223
|
-
right 200ms ease;
|
|
1239
|
+
left var(--responsive-nav-decorator-transition-duration, 200ms) ease,
|
|
1240
|
+
right var(--responsive-nav-decorator-transition-duration, 200ms) ease;
|
|
1224
1241
|
}
|
|
1225
1242
|
|
|
1226
1243
|
&:not(.is-animated) .nav-indicator-active {
|
|
1227
1244
|
transition: none;
|
|
1228
1245
|
}
|
|
1229
1246
|
|
|
1247
|
+
/* The indicators jump to the new item instead of sliding; the hover highlight still fades. */
|
|
1248
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1249
|
+
.nav-indicator-hovered {
|
|
1250
|
+
transition: opacity 150ms ease;
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
.nav-indicator-active {
|
|
1254
|
+
transition: none;
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
|
|
1230
1258
|
&:has(li.is-hovered) .nav-indicator-active {
|
|
1231
1259
|
background: var(
|
|
1232
1260
|
--responsive-nav-decorator-hovered-indicator-color,
|