@hubpav/hwio-ui 0.7.7 → 0.7.8
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 +4 -4
- package/src/components/HWioChoiceCards.astro +1 -1
- package/src/components/HWioContactSection.astro +1 -1
- package/src/components/HWioFeatureGrid.astro +1 -1
- package/src/components/HWioFooter.astro +2 -2
- package/src/components/HWioHeroSplit.astro +1 -1
- package/src/components/HWioHubSpotForm.astro +1 -1
- package/src/components/HWioPricingTiers.astro +1 -1
- package/src/components/HWioProcessSteps.astro +1 -1
- package/src/components/HWioSectionHeader.astro +1 -1
- package/src/components/HWioStatsBand.astro +1 -1
- package/src/styles/styles.css +33 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubpav/hwio-ui",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.8",
|
|
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.7.
|
|
35
|
-
"@hubpav/hwio-web-runtime": "0.7.
|
|
36
|
-
"@hubpav/hwio-web-worker": "0.7.
|
|
34
|
+
"@hubpav/hwio-brand": "0.7.8",
|
|
35
|
+
"@hubpav/hwio-web-runtime": "0.7.8",
|
|
36
|
+
"@hubpav/hwio-web-worker": "0.7.8",
|
|
37
37
|
"daisyui": "5.7.47"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
@@ -6,7 +6,7 @@ import HWioIcon from './HWioIcon.astro';
|
|
|
6
6
|
interface Choice { label: string; title: string; text: string; points?: string[]; cta: HWioCta }
|
|
7
7
|
interface Props { items: Choice[]; lead?: number; class?: string }
|
|
8
8
|
const { items, lead = 0, class: className = '' } = Astro.props;
|
|
9
|
-
const COLS = { 1: 'grid gap-6', 2: 'grid gap-6 md:grid-cols-2', 3: 'grid gap-6 md:grid-cols-3' } as const;
|
|
9
|
+
const COLS = { 1: 'grid grid-cols-1 gap-6', 2: 'grid grid-cols-1 gap-6 md:grid-cols-2', 3: 'grid grid-cols-1 gap-6 md:grid-cols-3' } as const;
|
|
10
10
|
const cols = COLS[(Math.min(Math.max(items.length, 1), 3) as 1 | 2 | 3)];
|
|
11
11
|
---
|
|
12
12
|
<div class:list={[cols, 'mx-auto max-w-[65rem]', className]}>
|
|
@@ -16,7 +16,7 @@ interface Props {
|
|
|
16
16
|
const { id = 'contact', eyebrow, title, lead, person, tone = 'alt', class: className = '' } = Astro.props;
|
|
17
17
|
---
|
|
18
18
|
<HWioSection id={id} tone={tone} class={className}>
|
|
19
|
-
<div class="grid gap-12 lg:grid-cols-[
|
|
19
|
+
<div class="grid grid-cols-1 gap-12 lg:grid-cols-[minmax(0,2fr)_minmax(0,3fr)]">
|
|
20
20
|
<div>
|
|
21
21
|
<HWioSectionHeader eyebrow={eyebrow} title={title} lead={lead} align="left" />
|
|
22
22
|
{person && (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
import HWioFeatureCard from './HWioFeatureCard.astro';
|
|
3
3
|
interface Props { items: { title: string; text: string; icon?: string; href?: string }[]; columns?: 2 | 3 | 4; class?: string }
|
|
4
|
-
const COLS = { 2: 'grid gap-6 md:grid-cols-2', 3: 'grid gap-6 md:grid-cols-2 lg:grid-cols-3', 4: 'grid gap-6 md:grid-cols-2 lg:grid-cols-4' } as const;
|
|
4
|
+
const COLS = { 2: 'grid grid-cols-1 gap-6 md:grid-cols-2', 3: 'grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3', 4: 'grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4' } as const;
|
|
5
5
|
const { items, columns = 3, class: className = '' } = Astro.props;
|
|
6
6
|
---
|
|
7
7
|
<div class:list={[COLS[columns], className]}>
|
|
@@ -37,8 +37,8 @@ const linkClass = 'inline-flex items-center gap-1 text-neutral-content/80 transi
|
|
|
37
37
|
|
|
38
38
|
<div class="container py-12 lg:py-16">
|
|
39
39
|
{/* Long compound words (DE "Datenschutzerklärung", "Rechtsdokumente") are wider than a column on
|
|
40
|
-
phones and at 1024 px: hyphenate them
|
|
41
|
-
<div class="grid grid-cols-2 gap-8
|
|
40
|
+
phones and at 1024 px: hyphenate them; words under 10 letters (brand names) stay whole. */}
|
|
41
|
+
<div class="grid grid-cols-2 gap-8 hwio-hyphenate md:grid-cols-3 lg:grid-cols-6">
|
|
42
42
|
<div class="hidden md:col-span-3 md:flex lg:col-span-1 lg:block">
|
|
43
43
|
<slot name="logo" />
|
|
44
44
|
</div>
|
|
@@ -8,7 +8,7 @@ const { id, eyebrow, title, accent, lead, actions = [], checklist = [], reverse
|
|
|
8
8
|
const VARIANT = { primary: 'primary', secondary: 'secondary', ghost: 'ghost' } as const;
|
|
9
9
|
---
|
|
10
10
|
<section id={id} class:list={['bg-base-100 text-base-content', className]}>
|
|
11
|
-
<div class:list={['container grid items-center gap-12 py-16 lg:grid-cols-[
|
|
11
|
+
<div class:list={['container grid grid-cols-1 items-center gap-12 py-16 lg:grid-cols-[minmax(0,7fr)_minmax(0,5fr)] lg:gap-16 lg:py-24', reverse ? 'lg:[&>*:first-child]:order-2' : '']}>
|
|
12
12
|
<div>
|
|
13
13
|
{eyebrow && <p class="hwio-kicker mb-5">{eyebrow}</p>}
|
|
14
14
|
<h1><slot name="title"><span class="block">{title}</span>{accent && <span class="block text-accent">{accent}</span>}</slot></h1>
|
|
@@ -17,7 +17,7 @@ interface Props {
|
|
|
17
17
|
class?: string;
|
|
18
18
|
}
|
|
19
19
|
const { form, fields, labels, locale, turnstileSiteKey, layout = 'grid', class: className = '' } = Astro.props;
|
|
20
|
-
const LAYOUT = { grid: 'grid gap-4 md:grid-cols-2', inline: 'flex flex-col gap-3 sm:flex-row sm:items-end' } as const;
|
|
20
|
+
const LAYOUT = { grid: 'grid grid-cols-1 gap-4 md:grid-cols-2', inline: 'flex flex-col gap-3 sm:flex-row sm:items-end' } as const;
|
|
21
21
|
---
|
|
22
22
|
<form
|
|
23
23
|
class:list={['hwio-form', className]}
|
|
@@ -5,7 +5,7 @@ import HWioIcon from './HWioIcon.astro';
|
|
|
5
5
|
interface Tier { eyebrow?: string; name: string; price?: string; pricePrefix?: string; period?: string; description?: string; features: string[]; cta?: HWioCta; featured?: boolean; badge?: string }
|
|
6
6
|
interface Props { tiers: Tier[]; class?: string }
|
|
7
7
|
const { tiers, class: className = '' } = Astro.props;
|
|
8
|
-
const COLS = { 1: 'grid gap-6', 2: 'grid gap-6 md:grid-cols-2', 3: 'grid gap-6 md:grid-cols-3', 4: 'grid gap-6 md:grid-cols-2 lg:grid-cols-4' } as const;
|
|
8
|
+
const COLS = { 1: 'grid grid-cols-1 gap-6', 2: 'grid grid-cols-1 gap-6 md:grid-cols-2', 3: 'grid grid-cols-1 gap-6 md:grid-cols-3', 4: 'grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-4' } as const;
|
|
9
9
|
const cols = (Math.min(Math.max(tiers.length, 1), 4) as 1 | 2 | 3 | 4);
|
|
10
10
|
---
|
|
11
11
|
<div class:list={[COLS[cols], className]}>
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
/** `number` overrides the rendered ordinal (sites whose copy numbers steps "01", "02"…). */
|
|
4
4
|
interface Props { items: { title: string; text: string; number?: string }[]; orientation?: 'horizontal' | 'vertical'; class?: string }
|
|
5
5
|
const { items, orientation = 'horizontal', class: className = '' } = Astro.props;
|
|
6
|
-
const LAYOUT = { horizontal: 'grid gap-8 md:grid-cols-2 lg:grid-cols-4', vertical: 'grid gap-8' } as const;
|
|
6
|
+
const LAYOUT = { horizontal: 'grid grid-cols-1 gap-8 md:grid-cols-2 lg:grid-cols-4', vertical: 'grid grid-cols-1 gap-8' } as const;
|
|
7
7
|
---
|
|
8
8
|
<ol class:list={[LAYOUT[orientation], className]} data-hwio-steps>
|
|
9
9
|
{items.map((step, i) => (
|
|
@@ -6,7 +6,7 @@ const { eyebrow, title, lead, align = 'center', layout = 'stack', level = 2, cla
|
|
|
6
6
|
const Heading = `h${level}` as 'h1' | 'h2' | 'h3';
|
|
7
7
|
---
|
|
8
8
|
{layout === 'split' ? (
|
|
9
|
-
<div class:list={['grid gap-8 lg:grid-cols-[
|
|
9
|
+
<div class:list={['grid grid-cols-1 gap-8 lg:grid-cols-[minmax(0,5fr)_minmax(0,7fr)] lg:items-end', className]}>
|
|
10
10
|
<div>
|
|
11
11
|
{eyebrow && <p class="hwio-kicker mb-4">{eyebrow}</p>}
|
|
12
12
|
<Heading><slot name="title">{title}</slot></Heading>
|
|
@@ -6,7 +6,7 @@ const COLS = { 2: 'sm:grid-cols-2', 3: 'sm:grid-cols-3', 4: 'sm:grid-cols-2 lg:g
|
|
|
6
6
|
const cols = COLS[(Math.min(Math.max(items.length, 2), 5) as 2 | 3 | 4 | 5)];
|
|
7
7
|
---
|
|
8
8
|
<section id={id} class:list={['border-y border-base-300 bg-base-100 text-base-content', className]}>
|
|
9
|
-
<div class:list={['container grid py-9', cols]}>
|
|
9
|
+
<div class:list={['container grid grid-cols-1 py-9', cols]}>
|
|
10
10
|
{items.map((s, i) => {
|
|
11
11
|
const numeric = typeof s.value === 'number';
|
|
12
12
|
return (
|
package/src/styles/styles.css
CHANGED
|
@@ -20,6 +20,19 @@
|
|
|
20
20
|
--font-sans: var(--hwio-font-sans);
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
+
/* Long words (CS/DE/PL compounds) hyphenate instead of overflowing a narrow column. At least five
|
|
24
|
+
letters on each side of the hyphen, so no word under 10 letters ever splits; this keeps the brand
|
|
25
|
+
names whole (HARDWARIO, ProXimos, CHESTER) in Safari too, which ignores hyphenate-limit-chars and
|
|
26
|
+
reads only the -webkit- limits. A word no browser can hyphenate still breaks rather than widening
|
|
27
|
+
its grid or flex parent (`anywhere` lowers min-content). */
|
|
28
|
+
@utility hwio-hyphenate {
|
|
29
|
+
overflow-wrap: anywhere;
|
|
30
|
+
hyphens: auto;
|
|
31
|
+
hyphenate-limit-chars: 10 5 5;
|
|
32
|
+
-webkit-hyphenate-limit-before: 5;
|
|
33
|
+
-webkit-hyphenate-limit-after: 5;
|
|
34
|
+
}
|
|
35
|
+
|
|
23
36
|
/* One container for the fleet; width comes from the theme (hub) or the site (landing).
|
|
24
37
|
Unlayered on purpose: Tailwind's built-in `container` utility caps max-width at each
|
|
25
38
|
breakpoint (40/48/64/80/96rem) and would otherwise win over the theme's width. */
|
|
@@ -68,6 +81,16 @@
|
|
|
68
81
|
@media (width >= 64rem) {
|
|
69
82
|
h1 { font-size: 3.5rem; }
|
|
70
83
|
}
|
|
84
|
+
/* Phones: a heading word wider than its column (a 40 px H1 gets 218-288 px) hyphenates instead
|
|
85
|
+
of running past the screen, and a token longer than the line (a URL, an ID) breaks. */
|
|
86
|
+
@media (width < 40rem) {
|
|
87
|
+
h1, h2, h3 {
|
|
88
|
+
@apply hwio-hyphenate;
|
|
89
|
+
}
|
|
90
|
+
main {
|
|
91
|
+
overflow-wrap: break-word;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
71
94
|
:focus-visible {
|
|
72
95
|
outline: 2px solid var(--color-secondary);
|
|
73
96
|
outline-offset: 2px;
|
|
@@ -83,6 +106,16 @@
|
|
|
83
106
|
}
|
|
84
107
|
|
|
85
108
|
@layer components {
|
|
109
|
+
/* Phones: a button label wider than its column wraps onto a second line instead of pushing the
|
|
110
|
+
page sideways; one-line buttons keep their height. */
|
|
111
|
+
@media (width < 40rem) {
|
|
112
|
+
.btn {
|
|
113
|
+
max-width: 100%;
|
|
114
|
+
height: auto;
|
|
115
|
+
min-height: var(--size);
|
|
116
|
+
padding-block: 0.375rem;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
86
119
|
/* Rhythm (direction A): 80 / 112 px sections, 40 / 48 px compact bands. */
|
|
87
120
|
.hwio-section { padding-block: calc(var(--spacing) * 20); }
|
|
88
121
|
.hwio-section-compact { padding-block: calc(var(--spacing) * 10); }
|