@hubpav/hwio-ui 0.6.5 → 0.6.6
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubpav/hwio-ui",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.6",
|
|
4
4
|
"description": "HARDWARIO web design system for Astro: DaisyUI 5 themes generated from the brand tokens, the Tailwind entry stylesheet and the HWio* components.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,9 +31,9 @@
|
|
|
31
31
|
"build": "node scripts/build-themes.mjs"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@hubpav/hwio-brand": "0.6.
|
|
35
|
-
"@hubpav/hwio-web-runtime": "0.6.
|
|
36
|
-
"@hubpav/hwio-web-worker": "0.6.
|
|
34
|
+
"@hubpav/hwio-brand": "0.6.6",
|
|
35
|
+
"@hubpav/hwio-web-runtime": "0.6.6",
|
|
36
|
+
"@hubpav/hwio-web-worker": "0.6.6",
|
|
37
37
|
"daisyui": "5.7.28"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -45,7 +45,7 @@ const linkAttrs = (item: HWioLinkItem) => (item.external ? { target: '_blank', r
|
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
47
|
<nav class={bp.nav} aria-label={labels.nav} data-hwio-scrollspy={scrollspy ? 'true' : undefined}>
|
|
48
|
-
<ul class="menu menu-horizontal h-full flex-nowrap items-
|
|
48
|
+
<ul class="menu hwio-nav menu-horizontal h-full flex-nowrap items-stretch gap-0 px-0 py-0 whitespace-nowrap">
|
|
49
49
|
{nav.map((item) => (
|
|
50
50
|
<li class:list={[item.current && 'hwio-nav-current']}>
|
|
51
51
|
{item.mega ? (
|
|
@@ -54,7 +54,7 @@ const linkAttrs = (item: HWioLinkItem) => (item.external ? { target: '_blank', r
|
|
|
54
54
|
<HWioIcon name="chevron-down" size="sm" class="opacity-50 transition-transform duration-200" />
|
|
55
55
|
</button>
|
|
56
56
|
) : (
|
|
57
|
-
<a href={item.href} class="px-3 text-[15px] font-medium text-base-content/80 hover:text-accent" aria-current={item.current ? 'page' : undefined} data-track={item.track?.id} data-track-location={item.track?.location ?? 'header'}>{item.label}</a>
|
|
57
|
+
<a href={item.href} class="px-3 text-[15px] font-medium text-base-content/80 hover:text-accent aria-[current=page]:text-[var(--hwio-nav-active,var(--color-primary))]" aria-current={item.current ? 'page' : undefined} data-track={item.track?.id} data-track-location={item.track?.location ?? 'header'}>{item.label}</a>
|
|
58
58
|
)}
|
|
59
59
|
</li>
|
|
60
60
|
))}
|
package/src/styles/styles.css
CHANGED
|
@@ -94,13 +94,12 @@
|
|
|
94
94
|
/* Current page in the header nav: coloured label plus a 2px bar on the header's bottom edge
|
|
95
95
|
(the nav stretches to the bar's full height, so the li reaches the border). Themes set
|
|
96
96
|
--hwio-nav-active; the primary colour is the default. */
|
|
97
|
+
.hwio-nav > li {
|
|
98
|
+
justify-content: center; /* items span the bar's full height; the link stays centred */
|
|
99
|
+
}
|
|
97
100
|
.hwio-nav-current {
|
|
98
101
|
position: relative;
|
|
99
102
|
}
|
|
100
|
-
.hwio-nav-current > a,
|
|
101
|
-
.hwio-nav-current > button {
|
|
102
|
-
color: var(--hwio-nav-active, var(--color-primary));
|
|
103
|
-
}
|
|
104
103
|
.hwio-nav-current::after {
|
|
105
104
|
content: '';
|
|
106
105
|
position: absolute;
|