@sdxc/ui 2026.10.28 → 2026.10.29
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/README.md +41 -4
- package/dist/components/accordion.d.ts +3 -1
- package/dist/components/accordion.js +3 -1
- package/dist/components/button.d.ts +4 -0
- package/dist/components/button.js +2 -0
- package/dist/components/card.d.ts +6 -4
- package/dist/components/carousel.d.ts +15 -0
- package/dist/components/carousel.js +15 -0
- package/dist/components/cta-group.d.ts +45 -0
- package/dist/components/cta-group.js +26 -0
- package/dist/components/empty.d.ts +5 -3
- package/dist/components/feature.d.ts +102 -0
- package/dist/components/feature.js +151 -0
- package/dist/components/heading.d.ts +20 -4
- package/dist/components/heading.js +25 -11
- package/dist/components/index.d.ts +7 -0
- package/dist/components/index.js +7 -0
- package/dist/components/link-button.d.ts +2 -0
- package/dist/components/logo-cloud.d.ts +42 -0
- package/dist/components/logo-cloud.js +41 -0
- package/dist/components/marketing-header.d.ts +71 -0
- package/dist/components/marketing-header.js +81 -0
- package/dist/components/marketing-section.d.ts +81 -0
- package/dist/components/marketing-section.js +103 -0
- package/dist/components/nav-link.d.ts +2 -1
- package/dist/components/split.d.ts +66 -0
- package/dist/components/split.js +115 -0
- package/dist/components/stat-strip.d.ts +52 -0
- package/dist/components/stat-strip.js +64 -0
- package/dist/patterns/accent-text.d.ts +30 -0
- package/dist/patterns/accent-text.js +17 -0
- package/dist/patterns/announcement-chip.d.ts +41 -0
- package/dist/patterns/announcement-chip.js +49 -0
- package/dist/patterns/bento.d.ts +67 -0
- package/dist/patterns/bento.js +95 -0
- package/dist/patterns/check-row.d.ts +67 -0
- package/dist/patterns/check-row.js +76 -0
- package/dist/patterns/closing-cta.d.ts +60 -0
- package/dist/patterns/closing-cta.js +31 -0
- package/dist/patterns/code-stage.d.ts +63 -0
- package/dist/patterns/code-stage.js +82 -0
- package/dist/patterns/faq-band.d.ts +67 -0
- package/dist/patterns/faq-band.js +43 -0
- package/dist/patterns/feature-band.d.ts +85 -0
- package/dist/patterns/feature-band.js +50 -0
- package/dist/patterns/icon-well.d.ts +38 -0
- package/dist/patterns/icon-well.js +38 -0
- package/dist/patterns/index.d.ts +23 -0
- package/dist/patterns/index.js +23 -0
- package/dist/patterns/install-tabs.d.ts +77 -0
- package/dist/patterns/install-tabs.js +87 -0
- package/dist/patterns/landing-hero.d.ts +93 -0
- package/dist/patterns/landing-hero.js +126 -0
- package/dist/patterns/product-frame.d.ts +60 -0
- package/dist/patterns/product-frame.js +70 -0
- package/dist/patterns/proof-strip.d.ts +48 -0
- package/dist/patterns/proof-strip.js +29 -0
- package/dist/patterns/step-list.d.ts +45 -0
- package/dist/patterns/step-list.js +84 -0
- package/dist/patterns/tabbed-stage.d.ts +74 -0
- package/dist/patterns/tabbed-stage.js +77 -0
- package/dist/styles/marketing.d.ts +12 -0
- package/dist/styles/marketing.js +17 -0
- package/package.json +3 -2
|
@@ -34,6 +34,7 @@ export * from "./combobox.js";
|
|
|
34
34
|
export * from "./command.js";
|
|
35
35
|
export * from "./confirm.js";
|
|
36
36
|
export * from "./context-menu.js";
|
|
37
|
+
export * from "./cta-group.js";
|
|
37
38
|
export * from "./date-field.js";
|
|
38
39
|
export * from "./date-picker.js";
|
|
39
40
|
export * from "./date-range-picker.js";
|
|
@@ -44,6 +45,7 @@ export * from "./drawer.js";
|
|
|
44
45
|
export * from "./drop-indicator.js";
|
|
45
46
|
export * from "./drop-zone.js";
|
|
46
47
|
export * from "./empty.js";
|
|
48
|
+
export * from "./feature.js";
|
|
47
49
|
export * from "./field-error.js";
|
|
48
50
|
export * from "./file-trigger.js";
|
|
49
51
|
export * from "./form.js";
|
|
@@ -63,7 +65,10 @@ export * from "./link.js";
|
|
|
63
65
|
export * from "./link-button.js";
|
|
64
66
|
export * from "./listbox.js";
|
|
65
67
|
export * from "./logo.js";
|
|
68
|
+
export * from "./logo-cloud.js";
|
|
66
69
|
export * from "./marker.js";
|
|
70
|
+
export * from "./marketing-header.js";
|
|
71
|
+
export * from "./marketing-section.js";
|
|
67
72
|
export * from "./menu.js";
|
|
68
73
|
export * from "./menubar.js";
|
|
69
74
|
export * from "./message.js";
|
|
@@ -95,6 +100,8 @@ export * from "./sidebar.js";
|
|
|
95
100
|
export * from "./skeleton.js";
|
|
96
101
|
export * from "./slider.js";
|
|
97
102
|
export * from "./spinner.js";
|
|
103
|
+
export * from "./split.js";
|
|
104
|
+
export * from "./stat-strip.js";
|
|
98
105
|
export * from "./switch.js";
|
|
99
106
|
export * from "./table.js";
|
|
100
107
|
export * from "./tabs.js";
|
package/dist/components/index.js
CHANGED
|
@@ -34,6 +34,7 @@ export * from "./combobox.js";
|
|
|
34
34
|
export * from "./command.js";
|
|
35
35
|
export * from "./confirm.js";
|
|
36
36
|
export * from "./context-menu.js";
|
|
37
|
+
export * from "./cta-group.js";
|
|
37
38
|
export * from "./date-field.js";
|
|
38
39
|
export * from "./date-picker.js";
|
|
39
40
|
export * from "./date-range-picker.js";
|
|
@@ -44,6 +45,7 @@ export * from "./drawer.js";
|
|
|
44
45
|
export * from "./drop-indicator.js";
|
|
45
46
|
export * from "./drop-zone.js";
|
|
46
47
|
export * from "./empty.js";
|
|
48
|
+
export * from "./feature.js";
|
|
47
49
|
export * from "./field-error.js";
|
|
48
50
|
export * from "./file-trigger.js";
|
|
49
51
|
export * from "./form.js";
|
|
@@ -63,7 +65,10 @@ export * from "./link.js";
|
|
|
63
65
|
export * from "./link-button.js";
|
|
64
66
|
export * from "./listbox.js";
|
|
65
67
|
export * from "./logo.js";
|
|
68
|
+
export * from "./logo-cloud.js";
|
|
66
69
|
export * from "./marker.js";
|
|
70
|
+
export * from "./marketing-header.js";
|
|
71
|
+
export * from "./marketing-section.js";
|
|
67
72
|
export * from "./menu.js";
|
|
68
73
|
export * from "./menubar.js";
|
|
69
74
|
export * from "./message.js";
|
|
@@ -95,6 +100,8 @@ export * from "./sidebar.js";
|
|
|
95
100
|
export * from "./skeleton.js";
|
|
96
101
|
export * from "./slider.js";
|
|
97
102
|
export * from "./spinner.js";
|
|
103
|
+
export * from "./split.js";
|
|
104
|
+
export * from "./stat-strip.js";
|
|
98
105
|
export * from "./switch.js";
|
|
99
106
|
export * from "./table.js";
|
|
100
107
|
export * from "./tabs.js";
|
|
@@ -27,6 +27,8 @@ export declare namespace LinkButton {
|
|
|
27
27
|
type Variant = "solid" | "outline" | "ghost";
|
|
28
28
|
/**
|
|
29
29
|
* Size variant controlling the link's padding and font size.
|
|
30
|
+
* Marketing pairing: `"sm"` is ~32px for nav rows, `"lg"` is ~48px for
|
|
31
|
+
* hero {@link CtaGroup} actions — keep those slots on different sizes.
|
|
30
32
|
*/
|
|
31
33
|
type Size = "sm" | "md" | "lg";
|
|
32
34
|
/**
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A wrapping row of adopter marks for marketing proof strips. Each child is
|
|
3
|
+
* forced to the marketing logo height with muted currentColor treatment so
|
|
4
|
+
* the row reads as one quiet band.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link LogoCloud}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace LogoCloud {
|
|
14
|
+
/**
|
|
15
|
+
* Props accepted by {@link LogoCloud}.
|
|
16
|
+
*/
|
|
17
|
+
interface Props extends TagProps<"div"> {
|
|
18
|
+
/**
|
|
19
|
+
* Softens the whole row further through the muted foreground token.
|
|
20
|
+
* Individual marks already carry `logoCloudMark()` opacity.
|
|
21
|
+
*/
|
|
22
|
+
muted?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Consumer-supplied marks — {@link Logo}, `<img>`, or inline SVG
|
|
25
|
+
* children. The cloud applies mark sizing to each direct child.
|
|
26
|
+
*/
|
|
27
|
+
children: RemixNode;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Lays logo children in a wrapping, centered row and forces each direct child
|
|
32
|
+
* to the marketing logo height with muted currentColor treatment.
|
|
33
|
+
*
|
|
34
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
35
|
+
* @returns The render function producing the cloud's markup.
|
|
36
|
+
* @example
|
|
37
|
+
* <LogoCloud muted>
|
|
38
|
+
* <img src={acme} alt="" />
|
|
39
|
+
* <img src={globex} alt="" />
|
|
40
|
+
* </LogoCloud>
|
|
41
|
+
*/
|
|
42
|
+
export declare function LogoCloud(handle: Handle<LogoCloud.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { fg } from "@sdxc/u/color";
|
|
3
|
+
import { opacity } from "@sdxc/u/effects";
|
|
4
|
+
import { raw, var as varUtility } from "@sdxc/u/general";
|
|
5
|
+
import { flexWrap, gap, inlineFlex, items, justify } from "@sdxc/u/layout";
|
|
6
|
+
import { bs, is } from "@sdxc/u/size";
|
|
7
|
+
import { when } from "@sdxc/u/state";
|
|
8
|
+
/** Forced height each direct child mark settles at. */
|
|
9
|
+
const LOGO_HEIGHT = varUtility("ui-marketing-logo-height", "1rem");
|
|
10
|
+
/**
|
|
11
|
+
* Lays logo children in a wrapping, centered row and forces each direct child
|
|
12
|
+
* to the marketing logo height with muted currentColor treatment.
|
|
13
|
+
*
|
|
14
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
15
|
+
* @returns The render function producing the cloud's markup.
|
|
16
|
+
* @example
|
|
17
|
+
* <LogoCloud muted>
|
|
18
|
+
* <img src={acme} alt="" />
|
|
19
|
+
* <img src={globex} alt="" />
|
|
20
|
+
* </LogoCloud>
|
|
21
|
+
*/
|
|
22
|
+
export function LogoCloud(handle) {
|
|
23
|
+
return () => {
|
|
24
|
+
let { mix, muted, ...rest } = handle.props;
|
|
25
|
+
return (_jsx("div", { ...rest, "data-muted": muted ? "true" : undefined, "data-slot": "logo-cloud", mix: [
|
|
26
|
+
inlineFlex(),
|
|
27
|
+
flexWrap(),
|
|
28
|
+
items("center"),
|
|
29
|
+
justify("center"),
|
|
30
|
+
gap(6),
|
|
31
|
+
muted ? fg("neutral.muted") : fg("neutral"),
|
|
32
|
+
when("& > *", [
|
|
33
|
+
bs(LOGO_HEIGHT),
|
|
34
|
+
is("auto"),
|
|
35
|
+
opacity(65),
|
|
36
|
+
raw({ objectFit: "contain", color: "currentColor" }),
|
|
37
|
+
]),
|
|
38
|
+
mix,
|
|
39
|
+
] }));
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Eyebrow, chapter title, and lead copy that open a marketing band. The title
|
|
3
|
+
* uses display chapter typography; the lead stays on the marketing lead measure
|
|
4
|
+
* so the claim reads first and the support follows.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link MarketingHeader}.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace MarketingHeader {
|
|
14
|
+
/**
|
|
15
|
+
* Whether the stack stretches start-aligned or centers as one statement.
|
|
16
|
+
*/
|
|
17
|
+
type Align = "start" | "center";
|
|
18
|
+
/**
|
|
19
|
+
* How the optional eyebrow reads: a filled pill, a mono label, or a chip
|
|
20
|
+
* with stronger tracking for short announcements.
|
|
21
|
+
*/
|
|
22
|
+
type EyebrowVariant = "pill" | "mono" | "chip";
|
|
23
|
+
/**
|
|
24
|
+
* Per-part styling for the elements the header renders besides its host.
|
|
25
|
+
*/
|
|
26
|
+
interface PartsProps {
|
|
27
|
+
/** Styling for the optional eyebrow label. */
|
|
28
|
+
eyebrow?: TagProps<"span">["mix"];
|
|
29
|
+
/** Styling for the title {@link Heading}. */
|
|
30
|
+
title?: TagProps<"h1">["mix"];
|
|
31
|
+
/** Styling for the optional lead paragraph. */
|
|
32
|
+
description?: TagProps<"p">["mix"];
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Props accepted by {@link MarketingHeader}.
|
|
36
|
+
*/
|
|
37
|
+
interface Props extends TagProps<"header"> {
|
|
38
|
+
/** Short label above the title. */
|
|
39
|
+
eyebrow?: RemixNode;
|
|
40
|
+
/**
|
|
41
|
+
* Eyebrow chrome. Defaults to {@link DEFAULT_EYEBROW_VARIANT} when an
|
|
42
|
+
* eyebrow is present.
|
|
43
|
+
*/
|
|
44
|
+
eyebrowVariant?: EyebrowVariant;
|
|
45
|
+
/** Supporting copy under the title. */
|
|
46
|
+
description?: RemixNode;
|
|
47
|
+
/** Stack alignment. Defaults to {@link DEFAULT_ALIGN}. */
|
|
48
|
+
align?: Align;
|
|
49
|
+
/** Per-part styling for eyebrow, title, and description. */
|
|
50
|
+
parts?: PartsProps;
|
|
51
|
+
/** Title copy — rendered through {@link Heading} at chapter display size. */
|
|
52
|
+
children: RemixNode;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Renders an optional eyebrow, a chapter-sized {@link Heading} from `children`,
|
|
57
|
+
* and an optional lead paragraph. Nest inside a {@link HeadingScope} so the
|
|
58
|
+
* title picks up the band's outline depth.
|
|
59
|
+
*
|
|
60
|
+
* @param handle Runtime handle carrying the host `<header>`'s props.
|
|
61
|
+
* @returns The render function producing the header's markup.
|
|
62
|
+
* @example
|
|
63
|
+
* <MarketingHeader eyebrow={t("badge")} description={t("lead")} align="center">
|
|
64
|
+
* {t("title")}
|
|
65
|
+
* </MarketingHeader>
|
|
66
|
+
* @example
|
|
67
|
+
* <MarketingHeader eyebrow={t("new")} eyebrowVariant="chip" description={t("lead")}>
|
|
68
|
+
* {t("title")}
|
|
69
|
+
* </MarketingHeader>
|
|
70
|
+
*/
|
|
71
|
+
export declare function MarketingHeader(handle: Handle<MarketingHeader.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
|
|
2
|
+
import { bg, border, fg } from "@sdxc/u/color";
|
|
3
|
+
import { rounded } from "@sdxc/u/effects";
|
|
4
|
+
import { inlineFlex, items, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { m, mbe, mi, pb, pi } from "@sdxc/u/size";
|
|
6
|
+
import { when } from "@sdxc/u/state";
|
|
7
|
+
import { font, leading, text, textAlign, textTransform, tracking, weight, } from "@sdxc/u/typography";
|
|
8
|
+
import { marketingLead } from "../styles/marketing.js";
|
|
9
|
+
import { Heading } from "./heading.js";
|
|
10
|
+
/** Content alignment {@link MarketingHeader} applies when `align` is omitted. */
|
|
11
|
+
const DEFAULT_ALIGN = "start";
|
|
12
|
+
/** Eyebrow chrome {@link MarketingHeader} applies when `eyebrowVariant` is omitted. */
|
|
13
|
+
const DEFAULT_EYEBROW_VARIANT = "pill";
|
|
14
|
+
/**
|
|
15
|
+
* Renders an optional eyebrow, a chapter-sized {@link Heading} from `children`,
|
|
16
|
+
* and an optional lead paragraph. Nest inside a {@link HeadingScope} so the
|
|
17
|
+
* title picks up the band's outline depth.
|
|
18
|
+
*
|
|
19
|
+
* @param handle Runtime handle carrying the host `<header>`'s props.
|
|
20
|
+
* @returns The render function producing the header's markup.
|
|
21
|
+
* @example
|
|
22
|
+
* <MarketingHeader eyebrow={t("badge")} description={t("lead")} align="center">
|
|
23
|
+
* {t("title")}
|
|
24
|
+
* </MarketingHeader>
|
|
25
|
+
* @example
|
|
26
|
+
* <MarketingHeader eyebrow={t("new")} eyebrowVariant="chip" description={t("lead")}>
|
|
27
|
+
* {t("title")}
|
|
28
|
+
* </MarketingHeader>
|
|
29
|
+
*/
|
|
30
|
+
export function MarketingHeader(handle) {
|
|
31
|
+
return () => {
|
|
32
|
+
let { align, children, description, eyebrow, eyebrowVariant, mix, parts, ...rest } = handle.props;
|
|
33
|
+
let resolvedAlign = align ?? DEFAULT_ALIGN;
|
|
34
|
+
let resolvedEyebrowVariant = eyebrowVariant ?? DEFAULT_EYEBROW_VARIANT;
|
|
35
|
+
let isCenter = resolvedAlign === "center";
|
|
36
|
+
return (_jsxs("header", { ...rest, "data-align": resolvedAlign, mix: [
|
|
37
|
+
vstack({
|
|
38
|
+
align: isCenter ? "center" : "stretch",
|
|
39
|
+
gap: 2,
|
|
40
|
+
}),
|
|
41
|
+
isCenter ? [textAlign("center"), mi("auto")] : [],
|
|
42
|
+
mbe(10),
|
|
43
|
+
mix,
|
|
44
|
+
], children: [eyebrow ? (_jsx("span", { "data-variant": resolvedEyebrowVariant, mix: [
|
|
45
|
+
inlineFlex(),
|
|
46
|
+
items("center"),
|
|
47
|
+
text("xs"),
|
|
48
|
+
weight("semibold"),
|
|
49
|
+
when('&[data-variant="pill"]', [
|
|
50
|
+
pb(0.5),
|
|
51
|
+
pi(2.5),
|
|
52
|
+
rounded("full"),
|
|
53
|
+
border({ color: "brand", width: 1, style: "solid" }),
|
|
54
|
+
bg("brand.tint"),
|
|
55
|
+
fg("brand"),
|
|
56
|
+
]),
|
|
57
|
+
when('&[data-variant="mono"]', [
|
|
58
|
+
font("mono"),
|
|
59
|
+
tracking("wide"),
|
|
60
|
+
textTransform("uppercase"),
|
|
61
|
+
fg("neutral.muted"),
|
|
62
|
+
]),
|
|
63
|
+
when('&[data-variant="chip"]', [
|
|
64
|
+
pb(0.5),
|
|
65
|
+
pi(2.5),
|
|
66
|
+
rounded("full"),
|
|
67
|
+
border({ color: "brand", width: 1, style: "solid" }),
|
|
68
|
+
bg("brand.solid"),
|
|
69
|
+
fg("brand.onSolid"),
|
|
70
|
+
tracking("wider"),
|
|
71
|
+
textTransform("uppercase"),
|
|
72
|
+
]),
|
|
73
|
+
parts?.eyebrow,
|
|
74
|
+
], children: eyebrow })) : null, _jsx(Heading, { size: "chapter", mix: [m(0), description ? mbe(2) : [], parts?.title], children: children }), description ? (_jsx("p", { mix: [
|
|
75
|
+
marketingLead(),
|
|
76
|
+
leading("relaxed"),
|
|
77
|
+
isCenter ? mi("auto") : [],
|
|
78
|
+
parts?.description,
|
|
79
|
+
], children: description })) : null] }));
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A landing-page band: a `<section>` host that applies marketing tone, spacing,
|
|
3
|
+
* and content measure so pages share one rhythm. Distinct from the listbox
|
|
4
|
+
* {@link Section}, which groups menu items.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
import type { MarketingBandTone, MarketingSectionSpacing } from "../styles/marketing.js";
|
|
11
|
+
/**
|
|
12
|
+
* Prop types for {@link MarketingSection}.
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace MarketingSection {
|
|
15
|
+
/**
|
|
16
|
+
* What sits behind the band: nothing, a quiet tint, a faded grid, or an
|
|
17
|
+
* inverted solid for a closing call-to-action.
|
|
18
|
+
*/
|
|
19
|
+
type Tone = MarketingBandTone;
|
|
20
|
+
/**
|
|
21
|
+
* How much block padding the band leaves around its content.
|
|
22
|
+
*/
|
|
23
|
+
type Spacing = MarketingSectionSpacing;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the inner column stretches start-aligned or centers as one
|
|
26
|
+
* statement.
|
|
27
|
+
*/
|
|
28
|
+
type Align = "start" | "center";
|
|
29
|
+
/**
|
|
30
|
+
* Outer chrome: a plain band, or a framed column with dashed rails and
|
|
31
|
+
* corner markers where a top rule meets them.
|
|
32
|
+
*/
|
|
33
|
+
type Variant = "default" | "frame";
|
|
34
|
+
/**
|
|
35
|
+
* Per-part styling for the elements the band renders besides its host.
|
|
36
|
+
*/
|
|
37
|
+
interface PartsProps {
|
|
38
|
+
/** Styling for the measured content column inside the band. */
|
|
39
|
+
container?: TagProps<"div">["mix"];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Props accepted by {@link MarketingSection}.
|
|
43
|
+
*/
|
|
44
|
+
interface Props extends TagProps<"section"> {
|
|
45
|
+
/** Band fill. Defaults to {@link DEFAULT_TONE}. */
|
|
46
|
+
tone?: Tone;
|
|
47
|
+
/** Block padding step. Defaults to {@link DEFAULT_SPACING}. */
|
|
48
|
+
spacing?: Spacing;
|
|
49
|
+
/** Content alignment. Defaults to {@link DEFAULT_ALIGN}. */
|
|
50
|
+
align?: Align;
|
|
51
|
+
/**
|
|
52
|
+
* Draws a low-contrast 1px rule along the block-start edge so stacked
|
|
53
|
+
* bands separate cleanly.
|
|
54
|
+
*/
|
|
55
|
+
ruled?: boolean;
|
|
56
|
+
/** Outer chrome. Defaults to {@link DEFAULT_VARIANT}. */
|
|
57
|
+
variant?: Variant;
|
|
58
|
+
/** Per-part styling for the measured inner column. */
|
|
59
|
+
parts?: PartsProps;
|
|
60
|
+
/** Band content — headers, splits, feature grids, and so on. */
|
|
61
|
+
children: RemixNode;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Renders a marketing band: tone and spacing on the `<section>`, a named
|
|
66
|
+
* container for descendant queries, and a measured inner column from the
|
|
67
|
+
* marketing gutters. Pair the host with `viewReveal()` from the animations
|
|
68
|
+
* entry when the band should enter on scroll.
|
|
69
|
+
*
|
|
70
|
+
* @param handle Runtime handle carrying the host `<section>`'s props.
|
|
71
|
+
* @returns The render function producing the band's markup.
|
|
72
|
+
* @example
|
|
73
|
+
* <MarketingSection tone="tinted" spacing="normal" ruled>
|
|
74
|
+
* {children}
|
|
75
|
+
* </MarketingSection>
|
|
76
|
+
* @example
|
|
77
|
+
* <MarketingSection tone="grid" spacing="hero" align="center" variant="frame">
|
|
78
|
+
* {children}
|
|
79
|
+
* </MarketingSection>
|
|
80
|
+
*/
|
|
81
|
+
export declare function MarketingSection(handle: Handle<MarketingSection.Props>): () => import("remix/component").RemixElement;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as _jsx } from "remix/component/jsx-runtime";
|
|
2
|
+
import { borderEdge } from "@sdxc/u/color";
|
|
3
|
+
import { raw } from "@sdxc/u/general";
|
|
4
|
+
import { container, relative, vstack } from "@sdxc/u/layout";
|
|
5
|
+
import { at } from "@sdxc/u/responsive";
|
|
6
|
+
import { is } from "@sdxc/u/size";
|
|
7
|
+
import { after, before } from "@sdxc/u/state";
|
|
8
|
+
import { textAlign } from "@sdxc/u/typography";
|
|
9
|
+
import { marketingBandTone, marketingContainer, marketingHairline, marketingSectionSpace, } from "../styles/marketing.js";
|
|
10
|
+
/** Band fill {@link MarketingSection} applies when `tone` is omitted. */
|
|
11
|
+
const DEFAULT_TONE = "plain";
|
|
12
|
+
/** Block padding {@link MarketingSection} applies when `spacing` is omitted. */
|
|
13
|
+
const DEFAULT_SPACING = "normal";
|
|
14
|
+
/** Content alignment {@link MarketingSection} applies when `align` is omitted. */
|
|
15
|
+
const DEFAULT_ALIGN = "start";
|
|
16
|
+
/** Chrome {@link MarketingSection} applies when `variant` is omitted. */
|
|
17
|
+
const DEFAULT_VARIANT = "default";
|
|
18
|
+
/**
|
|
19
|
+
* Renders a marketing band: tone and spacing on the `<section>`, a named
|
|
20
|
+
* container for descendant queries, and a measured inner column from the
|
|
21
|
+
* marketing gutters. Pair the host with `viewReveal()` from the animations
|
|
22
|
+
* entry when the band should enter on scroll.
|
|
23
|
+
*
|
|
24
|
+
* @param handle Runtime handle carrying the host `<section>`'s props.
|
|
25
|
+
* @returns The render function producing the band's markup.
|
|
26
|
+
* @example
|
|
27
|
+
* <MarketingSection tone="tinted" spacing="normal" ruled>
|
|
28
|
+
* {children}
|
|
29
|
+
* </MarketingSection>
|
|
30
|
+
* @example
|
|
31
|
+
* <MarketingSection tone="grid" spacing="hero" align="center" variant="frame">
|
|
32
|
+
* {children}
|
|
33
|
+
* </MarketingSection>
|
|
34
|
+
*/
|
|
35
|
+
export function MarketingSection(handle) {
|
|
36
|
+
return () => {
|
|
37
|
+
let { align, children, mix, parts, ruled, spacing, tone, variant, ...rest } = handle.props;
|
|
38
|
+
let resolvedTone = tone ?? DEFAULT_TONE;
|
|
39
|
+
let resolvedSpacing = spacing ?? DEFAULT_SPACING;
|
|
40
|
+
let resolvedAlign = align ?? DEFAULT_ALIGN;
|
|
41
|
+
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
42
|
+
let isCenter = resolvedAlign === "center";
|
|
43
|
+
let isFrame = resolvedVariant === "frame";
|
|
44
|
+
return (_jsx("section", { ...rest, "data-tone": resolvedTone, "data-spacing": resolvedSpacing, "data-align": resolvedAlign, "data-variant": resolvedVariant, mix: [
|
|
45
|
+
container("ui-marketing-section"),
|
|
46
|
+
relative(),
|
|
47
|
+
vstack({ align: "center" }),
|
|
48
|
+
is("100%"),
|
|
49
|
+
raw({ isolation: "isolate" }),
|
|
50
|
+
marketingBandTone(resolvedTone),
|
|
51
|
+
marketingSectionSpace(resolvedSpacing),
|
|
52
|
+
ruled ? marketingHairline() : [],
|
|
53
|
+
mix,
|
|
54
|
+
], children: _jsx("div", { mix: [
|
|
55
|
+
marketingContainer(),
|
|
56
|
+
vstack({
|
|
57
|
+
align: isCenter ? "center" : "stretch",
|
|
58
|
+
gap: 0,
|
|
59
|
+
}),
|
|
60
|
+
relative(),
|
|
61
|
+
is("100%"),
|
|
62
|
+
isCenter ? textAlign("center") : [],
|
|
63
|
+
isFrame
|
|
64
|
+
? [
|
|
65
|
+
at("md", "ui-marketing-section", [
|
|
66
|
+
borderEdge("inline-start", {
|
|
67
|
+
color: "neutral",
|
|
68
|
+
width: 1,
|
|
69
|
+
style: "dashed",
|
|
70
|
+
}),
|
|
71
|
+
borderEdge("inline-end", {
|
|
72
|
+
color: "neutral",
|
|
73
|
+
width: 1,
|
|
74
|
+
style: "dashed",
|
|
75
|
+
}),
|
|
76
|
+
ruled
|
|
77
|
+
? [
|
|
78
|
+
before(frameMarker({ insetInlineStart: "-4px" })),
|
|
79
|
+
after(frameMarker({ insetInlineEnd: "-4px" })),
|
|
80
|
+
]
|
|
81
|
+
: [],
|
|
82
|
+
]),
|
|
83
|
+
]
|
|
84
|
+
: [],
|
|
85
|
+
parts?.container,
|
|
86
|
+
], children: children }) }));
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The square drawn where a framed band's top rule crosses a rail, so the rails
|
|
91
|
+
* read as a frame the rule is fixed to.
|
|
92
|
+
*/
|
|
93
|
+
function frameMarker(edge) {
|
|
94
|
+
return raw({
|
|
95
|
+
content: '""',
|
|
96
|
+
position: "absolute",
|
|
97
|
+
insetBlockStart: "-4px",
|
|
98
|
+
...edge,
|
|
99
|
+
inlineSize: "7px",
|
|
100
|
+
blockSize: "7px",
|
|
101
|
+
backgroundColor: "var(--ui-brand-bg-solid)",
|
|
102
|
+
});
|
|
103
|
+
}
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* role and underlined to read as a link among surrounding prose. Its
|
|
4
4
|
* current-page state comes straight from `aria-current` set on the host
|
|
5
5
|
* server-side, rendering the emphasized, non-underlined treatment directly
|
|
6
|
-
* from that attribute.
|
|
6
|
+
* from that attribute. Marketing sticky headers usually mix `text("sm")`
|
|
7
|
+
* (~13–15px) and a quiet hover so the bar stays dense beside the brand.
|
|
7
8
|
*
|
|
8
9
|
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
9
10
|
* @copyright Sergio Xalambrí 2026
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Two-column marketing band content: prose on one side and the media it
|
|
3
|
+
* describes on the other. Stacks to a single column under the nearest
|
|
4
|
+
* container; `lean` hands the wider track to copy or media.
|
|
5
|
+
*
|
|
6
|
+
* @author [Sergio Xalambrí](https://sergiodxa.com)
|
|
7
|
+
* @copyright Sergio Xalambrí 2026
|
|
8
|
+
*/
|
|
9
|
+
import type { Handle, Props as TagProps, RemixNode } from "remix/component";
|
|
10
|
+
/**
|
|
11
|
+
* Prop types for {@link Split} and its compound parts.
|
|
12
|
+
*/
|
|
13
|
+
export declare namespace Split {
|
|
14
|
+
/**
|
|
15
|
+
* Which column receives the wider track above the stack breakpoint.
|
|
16
|
+
*/
|
|
17
|
+
type Lean = "copy" | "media";
|
|
18
|
+
/**
|
|
19
|
+
* Props accepted by {@link Split}.
|
|
20
|
+
*/
|
|
21
|
+
interface Props extends TagProps<"div"> {
|
|
22
|
+
/**
|
|
23
|
+
* Which column is wider. Defaults to {@link DEFAULT_LEAN} so media
|
|
24
|
+
* usually leads the layout.
|
|
25
|
+
*/
|
|
26
|
+
lean?: Lean;
|
|
27
|
+
/** {@link Split.Copy} and {@link Split.Media} columns. */
|
|
28
|
+
children: RemixNode;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Props accepted by {@link Split.Copy}.
|
|
32
|
+
*/
|
|
33
|
+
interface CopyProps extends TagProps<"div"> {
|
|
34
|
+
/**
|
|
35
|
+
* When set, unordered lists inside the copy render as checked claims
|
|
36
|
+
* rather than bullets.
|
|
37
|
+
*/
|
|
38
|
+
checks?: boolean;
|
|
39
|
+
/** Prose, claims, and supporting copy for the column. */
|
|
40
|
+
children: RemixNode;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Props accepted by {@link Split.Media}.
|
|
44
|
+
*/
|
|
45
|
+
interface MediaProps extends TagProps<"div"> {
|
|
46
|
+
/** Media, samples, or staged UI for the column. */
|
|
47
|
+
children: RemixNode;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Lays {@link Split.Copy} and {@link Split.Media} as a two-track grid that
|
|
52
|
+
* collapses to one column below `lg` on its own named container.
|
|
53
|
+
*
|
|
54
|
+
* @param handle Runtime handle carrying the host `<div>`'s props.
|
|
55
|
+
* @returns The render function producing the split's markup.
|
|
56
|
+
* @example
|
|
57
|
+
* <Split lean="copy">
|
|
58
|
+
* <Split.Copy checks>{claims}</Split.Copy>
|
|
59
|
+
* <Split.Media>{shot}</Split.Media>
|
|
60
|
+
* </Split>
|
|
61
|
+
*/
|
|
62
|
+
export declare function Split(handle: Handle<Split.Props>): () => import("remix/component").RemixElement;
|
|
63
|
+
export declare namespace Split {
|
|
64
|
+
var Copy: (handle: Handle<Split.CopyProps>) => () => import("remix/component").RemixElement;
|
|
65
|
+
var Media: (handle: Handle<Split.MediaProps>) => () => import("remix/component").RemixElement;
|
|
66
|
+
}
|