@runwisp/ui 1.0.1 → 1.1.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.
@@ -1,58 +0,0 @@
1
- ---
2
- // SPDX-FileCopyrightText: PoppyCake, s.r.o.
3
- // SPDX-License-Identifier: Apache-2.0
4
-
5
- interface Props {
6
- headline: string;
7
- sub?: string;
8
- eyebrow?: string;
9
- align?: "left" | "center";
10
- size?: "md" | "lg";
11
- class?: string;
12
- }
13
-
14
- const { headline, sub, eyebrow, align = "left", size = "lg", class: className = "" } = Astro.props;
15
-
16
- const padding = size === "lg" ? "py-20 sm:py-24 lg:py-32" : "py-14 sm:py-16 lg:py-20";
17
- const headlineSize =
18
- size === "lg" ? "text-4xl sm:text-5xl lg:text-6xl" : "text-3xl sm:text-4xl lg:text-5xl";
19
- const hasMedia = Astro.slots.has("media");
20
- const hasCtas = Astro.slots.has("ctas");
21
- const layout = hasMedia ? "grid items-center gap-12 lg:grid-cols-2 lg:gap-16" : "mx-auto max-w-3xl";
22
- const textAlign = align === "center" && !hasMedia ? "text-center" : "";
23
- const ctaAlign = align === "center" && !hasMedia ? "justify-center" : "";
24
- ---
25
-
26
- <section class:list={["relative isolate overflow-hidden", className]}>
27
- <div class:list={["mx-auto max-w-6xl px-6", padding]}>
28
- <div class={layout}>
29
- <div class={textAlign}>
30
- {
31
- eyebrow && (
32
- <p class="text-info mb-4 font-mono text-[11.5px] font-medium tracking-[0.16em] uppercase">
33
- {eyebrow}
34
- </p>
35
- )
36
- }
37
- <h1 class:list={["text-on-surface font-mono font-extrabold", headlineSize]}>
38
- {headline}
39
- </h1>
40
- {sub && <p class="text-on-surface-muted mt-6 font-sans text-lg sm:text-xl">{sub}</p>}
41
- {
42
- hasCtas && (
43
- <div class:list={["mt-8 flex flex-wrap items-center gap-3", ctaAlign]}>
44
- <slot name="ctas" />
45
- </div>
46
- )
47
- }
48
- </div>
49
- {
50
- hasMedia && (
51
- <div class="lg:justify-self-end">
52
- <slot name="media" />
53
- </div>
54
- )
55
- }
56
- </div>
57
- </div>
58
- </section>
@@ -1,46 +0,0 @@
1
- ---
2
- // SPDX-FileCopyrightText: PoppyCake, s.r.o.
3
- // SPDX-License-Identifier: Apache-2.0
4
- import { Logo } from "@runwisp/ui";
5
-
6
- interface Props {
7
- homeHref?: string;
8
- wordmark?: string;
9
- class?: string;
10
- }
11
-
12
- const { homeHref = "/", wordmark = "RunWisp", class: className = "" } = Astro.props;
13
-
14
- const hasNav = Astro.slots.has("nav");
15
- const hasActions = Astro.slots.has("actions");
16
- ---
17
-
18
- <header class:list={["rw-bg-glass sticky top-0 z-40 border-b border-outline", className]}>
19
- <div class="mx-auto flex h-[52px] max-w-6xl items-center justify-between gap-6 px-6">
20
- <a
21
- href={homeHref}
22
- class="text-on-surface flex items-center gap-2"
23
- aria-label={`${wordmark} home`}
24
- >
25
- <Logo size="md" />
26
- <span class="font-mono font-bold tracking-tight">{wordmark}</span>
27
- </a>
28
- {
29
- hasNav && (
30
- <nav
31
- class="text-on-surface-muted hidden gap-6 font-mono text-sm sm:flex [&_a]:[&_a:hover]:text-primary"
32
- aria-label="Primary"
33
- >
34
- <slot name="nav" />
35
- </nav>
36
- )
37
- }
38
- {
39
- hasActions && (
40
- <div class="flex items-center gap-2">
41
- <slot name="actions" />
42
- </div>
43
- )
44
- }
45
- </div>
46
- </header>