@hubpav/hwio-ui 0.6.5 → 0.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubpav/hwio-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
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.
|
|
35
|
-
"@hubpav/hwio-web-runtime": "0.
|
|
36
|
-
"@hubpav/hwio-web-worker": "0.
|
|
34
|
+
"@hubpav/hwio-brand": "0.7.0",
|
|
35
|
+
"@hubpav/hwio-web-runtime": "0.7.0",
|
|
36
|
+
"@hubpav/hwio-web-worker": "0.7.0",
|
|
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/prose.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
.hwio-prose ul { list-style: disc; padding-left: calc(var(--spacing) * 6); margin-bottom: calc(var(--spacing) * 4); }
|
|
9
9
|
.hwio-prose ol { list-style: decimal; padding-left: calc(var(--spacing) * 6); margin-bottom: calc(var(--spacing) * 4); }
|
|
10
10
|
.hwio-prose li { padding-left: calc(var(--spacing) * 1); margin-bottom: calc(var(--spacing) * 2); }
|
|
11
|
-
.hwio-prose a { color: var(--color-secondary); text-decoration: underline; text-underline-offset: 0.2em; }
|
|
11
|
+
.hwio-prose a { color: var(--hwio-link, var(--color-secondary)); text-decoration: underline; text-underline-offset: 0.2em; }
|
|
12
12
|
.hwio-prose a:hover { color: var(--color-primary); }
|
|
13
13
|
.hwio-prose strong { font-weight: 600; }
|
|
14
14
|
.hwio-prose blockquote { border-left: 4px solid var(--color-secondary); padding-left: calc(var(--spacing) * 4); font-style: italic; margin-block: calc(var(--spacing) * 6); }
|
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;
|
|
@@ -242,3 +241,11 @@
|
|
|
242
241
|
.btn-lg { height: var(--size); --fontsize: 0.9375rem; padding-inline: 1.75rem; }
|
|
243
242
|
.btn-square, .btn-circle { padding-inline: 0; }
|
|
244
243
|
.card .card-body { --card-p: 2rem; }
|
|
244
|
+
/* DaisyUI sets .label to 60 % of the text colour, which fails AA at 14 px (4.1:1 on white). R5:
|
|
245
|
+
darken muted text only. 78 % keeps the label visibly secondary and clears 4.5:1 on every theme. */
|
|
246
|
+
.label { color: color-mix(in oklab, currentColor 78%, transparent); }
|
|
247
|
+
/* Same for inactive tabs (DaisyUI: 50 %, 3.1:1 on white at 14 px). */
|
|
248
|
+
.tab:not(.tab-active, :hover, :focus-visible) { color: color-mix(in oklab, currentColor 78%, transparent); }
|
|
249
|
+
/* Text links: themes whose primary is too light for text on the page ground (er3o teal) set
|
|
250
|
+
--hwio-link to their text-safe hue; the default keeps DaisyUI's primary. */
|
|
251
|
+
.btn-link { color: var(--hwio-link, var(--color-primary)); }
|
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
--er3o-gradient-to: #14A0C0;
|
|
43
43
|
--hwio-footer-hover: #ffffff;
|
|
44
44
|
--hwio-nav-active: #296ea7;
|
|
45
|
+
--hwio-kicker-on-neutral: #01CC9B;
|
|
46
|
+
--hwio-link: #0C6678;
|
|
45
47
|
}
|
|
46
48
|
|
|
47
49
|
/* ENEROOO carries its gradient as a theme rule: DaisyUI slots are single colours. Only the filled
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
--color-base-content: #e7e7ee;
|
|
11
11
|
--color-primary: #009cfa;
|
|
12
12
|
--color-primary-content: #0f0f14;
|
|
13
|
-
--color-secondary: #
|
|
14
|
-
--color-secondary-content: #
|
|
13
|
+
--color-secondary: #009cfa;
|
|
14
|
+
--color-secondary-content: #0f0f14;
|
|
15
15
|
--color-accent: #f43f5e;
|
|
16
16
|
--color-accent-content: #0f0f14;
|
|
17
17
|
--color-neutral: #23232f;
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
--color-base-content: #e7e7ee;
|
|
11
11
|
--color-primary: #5aa864;
|
|
12
12
|
--color-primary-content: #0f0f14;
|
|
13
|
-
--color-secondary: #
|
|
14
|
-
--color-secondary-content: #
|
|
13
|
+
--color-secondary: #009cfa;
|
|
14
|
+
--color-secondary-content: #0f0f14;
|
|
15
15
|
--color-accent: #5aa864;
|
|
16
16
|
--color-accent-content: #0f0f14;
|
|
17
17
|
--color-neutral: #23232f;
|