@tempoxyz/ds 0.3.18 → 0.3.20
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/dist/arsenal/icons/Icon.d.ts +57 -0
- package/dist/arsenal/icons/Icon.d.ts.map +1 -0
- package/dist/arsenal/icons/Icon.js +117 -0
- package/dist/arsenal/icons/Icon.js.map +1 -0
- package/dist/arsenal/icons/glyphs.d.ts +5238 -0
- package/dist/arsenal/icons/glyphs.d.ts.map +1 -0
- package/dist/arsenal/icons/glyphs.js +2888 -0
- package/dist/arsenal/icons/glyphs.js.map +1 -0
- package/dist/arsenal/icons/index.d.ts +4 -0
- package/dist/arsenal/icons/index.d.ts.map +1 -0
- package/dist/arsenal/icons/index.js +4 -0
- package/dist/arsenal/icons/index.js.map +1 -0
- package/dist/docs/AGENTS.md +2 -2
- package/dist/docs/arsenal.md +4555 -0
- package/dist/docs/marketing.md +7082 -480
- package/dist/docs/product/documents.md +17 -1
- package/dist/document/Document.d.ts +1 -1
- package/dist/document/Document.d.ts.map +1 -1
- package/dist/document/Document.js +1 -0
- package/dist/document/Document.js.map +1 -1
- package/dist/document/document.css +12 -1
- package/dist/document/templates/brief.html +3 -3
- package/dist/document/templates/essay.html +3 -3
- package/dist/document/templates/post.html +3 -3
- package/dist/marketing/components/ArticleBody.css +1 -0
- package/dist/marketing/components/ArticleBody.d.ts +1013 -0
- package/dist/marketing/components/ArticleBody.d.ts.map +1 -0
- package/dist/marketing/components/ArticleBody.js +120 -0
- package/dist/marketing/components/ArticleBody.js.map +1 -0
- package/dist/marketing/components/ArticleBody.js.zyzz.json +1 -0
- package/dist/marketing/components/ArticleHero.css +1 -0
- package/dist/marketing/components/ArticleHero.d.ts +168 -0
- package/dist/marketing/components/ArticleHero.d.ts.map +1 -0
- package/dist/marketing/components/ArticleHero.js +74 -0
- package/dist/marketing/components/ArticleHero.js.map +1 -0
- package/dist/marketing/components/ArticleHero.js.zyzz.json +1 -0
- package/dist/marketing/components/ArticleIndex.css +1 -0
- package/dist/marketing/components/ArticleIndex.d.ts +164 -0
- package/dist/marketing/components/ArticleIndex.d.ts.map +1 -0
- package/dist/marketing/components/ArticleIndex.js +100 -0
- package/dist/marketing/components/ArticleIndex.js.map +1 -0
- package/dist/marketing/components/ArticleIndex.js.zyzz.json +1 -0
- package/dist/marketing/components/ArticleRail.css +1 -0
- package/dist/marketing/components/ArticleRail.d.ts +105 -0
- package/dist/marketing/components/ArticleRail.d.ts.map +1 -0
- package/dist/marketing/components/ArticleRail.js +96 -0
- package/dist/marketing/components/ArticleRail.js.map +1 -0
- package/dist/marketing/components/ArticleRail.js.zyzz.json +1 -0
- package/dist/marketing/components/AsideLayout.css +1 -0
- package/dist/marketing/components/AsideLayout.d.ts +39 -0
- package/dist/marketing/components/AsideLayout.d.ts.map +1 -0
- package/dist/marketing/components/AsideLayout.js +24 -0
- package/dist/marketing/components/AsideLayout.js.map +1 -0
- package/dist/marketing/components/AsideLayout.js.zyzz.json +1 -0
- package/dist/marketing/components/Breadcrumbs.css +1 -0
- package/dist/marketing/components/Breadcrumbs.d.ts +132 -0
- package/dist/marketing/components/Breadcrumbs.d.ts.map +1 -0
- package/dist/marketing/components/Breadcrumbs.js +75 -0
- package/dist/marketing/components/Breadcrumbs.js.map +1 -0
- package/dist/marketing/components/Breadcrumbs.js.zyzz.json +1 -0
- package/dist/marketing/components/Button.css +1 -0
- package/dist/marketing/components/Button.d.ts +421 -0
- package/dist/marketing/components/Button.d.ts.map +1 -0
- package/dist/marketing/components/Button.js +87 -0
- package/dist/marketing/components/Button.js.map +1 -0
- package/dist/marketing/components/Button.js.zyzz.json +1 -0
- package/dist/marketing/components/Card.css +1 -0
- package/dist/marketing/components/Card.d.ts +563 -0
- package/dist/marketing/components/Card.d.ts.map +1 -0
- package/dist/marketing/components/Card.js +171 -0
- package/dist/marketing/components/Card.js.map +1 -0
- package/dist/marketing/components/Card.js.zyzz.json +1 -0
- package/dist/marketing/components/Contact.css +1 -0
- package/dist/marketing/components/Contact.d.ts +51 -0
- package/dist/marketing/components/Contact.d.ts.map +1 -0
- package/dist/marketing/components/Contact.js +44 -0
- package/dist/marketing/components/Contact.js.map +1 -0
- package/dist/marketing/components/Contact.js.zyzz.json +1 -0
- package/dist/marketing/components/Cta.css +1 -0
- package/dist/marketing/components/Cta.d.ts +138 -0
- package/dist/marketing/components/Cta.d.ts.map +1 -0
- package/dist/marketing/components/Cta.js +71 -0
- package/dist/marketing/components/Cta.js.map +1 -0
- package/dist/marketing/components/Cta.js.zyzz.json +1 -0
- package/dist/marketing/components/CustomerStoryFeature.css +1 -0
- package/dist/marketing/components/CustomerStoryFeature.d.ts +48 -0
- package/dist/marketing/components/CustomerStoryFeature.d.ts.map +1 -0
- package/dist/marketing/components/CustomerStoryFeature.js +58 -0
- package/dist/marketing/components/CustomerStoryFeature.js.map +1 -0
- package/dist/marketing/components/CustomerStoryFeature.js.zyzz.json +1 -0
- package/dist/marketing/components/Faq.css +1 -0
- package/dist/marketing/components/Faq.d.ts +99 -0
- package/dist/marketing/components/Faq.d.ts.map +1 -0
- package/dist/marketing/components/Faq.js +83 -0
- package/dist/marketing/components/Faq.js.map +1 -0
- package/dist/marketing/components/Faq.js.zyzz.json +1 -0
- package/dist/marketing/components/FeatureAccordion.css +1 -0
- package/dist/marketing/components/FeatureAccordion.d.ts +230 -0
- package/dist/marketing/components/FeatureAccordion.d.ts.map +1 -0
- package/dist/marketing/components/FeatureAccordion.js +117 -0
- package/dist/marketing/components/FeatureAccordion.js.map +1 -0
- package/dist/marketing/components/FeatureAccordion.js.zyzz.json +1 -0
- package/dist/marketing/components/Footer.css +1 -0
- package/dist/marketing/components/Footer.d.ts +178 -0
- package/dist/marketing/components/Footer.d.ts.map +1 -0
- package/dist/marketing/components/Footer.js +109 -0
- package/dist/marketing/components/Footer.js.map +1 -0
- package/dist/marketing/components/Footer.js.zyzz.json +1 -0
- package/dist/marketing/components/Hero.css +1 -0
- package/dist/marketing/components/Hero.d.ts +200 -0
- package/dist/marketing/components/Hero.d.ts.map +1 -0
- package/dist/marketing/components/Hero.js +67 -0
- package/dist/marketing/components/Hero.js.map +1 -0
- package/dist/marketing/components/Hero.js.zyzz.json +1 -0
- package/dist/marketing/components/LeadCapture.css +1 -0
- package/dist/marketing/components/LeadCapture.d.ts +102 -0
- package/dist/marketing/components/LeadCapture.d.ts.map +1 -0
- package/dist/marketing/components/LeadCapture.js +78 -0
- package/dist/marketing/components/LeadCapture.js.map +1 -0
- package/dist/marketing/components/LeadCapture.js.zyzz.json +1 -0
- package/dist/marketing/components/Link.css +1 -0
- package/dist/marketing/components/Link.d.ts +342 -0
- package/dist/marketing/components/Link.d.ts.map +1 -0
- package/dist/marketing/components/Link.js +152 -0
- package/dist/marketing/components/Link.js.map +1 -0
- package/dist/marketing/components/Link.js.zyzz.json +1 -0
- package/dist/marketing/components/Logo.css +1 -0
- package/dist/marketing/components/Logo.d.ts +30 -0
- package/dist/marketing/components/Logo.d.ts.map +1 -0
- package/dist/marketing/components/Logo.js +38 -0
- package/dist/marketing/components/Logo.js.map +1 -0
- package/dist/marketing/components/Logo.js.zyzz.json +1 -0
- package/dist/marketing/components/LogoWall.css +1 -0
- package/dist/marketing/components/LogoWall.d.ts +156 -0
- package/dist/marketing/components/LogoWall.d.ts.map +1 -0
- package/dist/marketing/components/LogoWall.js +41 -0
- package/dist/marketing/components/LogoWall.js.map +1 -0
- package/dist/marketing/components/LogoWall.js.zyzz.json +1 -0
- package/dist/marketing/components/Mark.css +1 -0
- package/dist/marketing/components/Mark.d.ts +30 -0
- package/dist/marketing/components/Mark.d.ts.map +1 -0
- package/dist/marketing/components/Mark.js +38 -0
- package/dist/marketing/components/Mark.js.map +1 -0
- package/dist/marketing/components/Mark.js.zyzz.json +1 -0
- package/dist/marketing/components/Media.css +1 -0
- package/dist/marketing/components/Media.d.ts +74 -0
- package/dist/marketing/components/Media.d.ts.map +1 -0
- package/dist/marketing/components/Media.js +80 -0
- package/dist/marketing/components/Media.js.map +1 -0
- package/dist/marketing/components/Media.js.zyzz.json +1 -0
- package/dist/marketing/components/Nav.css +1 -0
- package/dist/marketing/components/Nav.d.ts +303 -0
- package/dist/marketing/components/Nav.d.ts.map +1 -0
- package/dist/marketing/components/Nav.js +166 -0
- package/dist/marketing/components/Nav.js.map +1 -0
- package/dist/marketing/components/Nav.js.zyzz.json +1 -0
- package/dist/marketing/components/PartnersIndex.css +1 -0
- package/dist/marketing/components/PartnersIndex.d.ts +267 -0
- package/dist/marketing/components/PartnersIndex.d.ts.map +1 -0
- package/dist/marketing/components/PartnersIndex.js +96 -0
- package/dist/marketing/components/PartnersIndex.js.map +1 -0
- package/dist/marketing/components/PartnersIndex.js.zyzz.json +1 -0
- package/dist/marketing/components/QuoteBand.css +1 -0
- package/dist/marketing/components/QuoteBand.d.ts +128 -0
- package/dist/marketing/components/QuoteBand.d.ts.map +1 -0
- package/dist/marketing/components/QuoteBand.js +73 -0
- package/dist/marketing/components/QuoteBand.js.map +1 -0
- package/dist/marketing/components/QuoteBand.js.zyzz.json +1 -0
- package/dist/marketing/components/Section.css +1 -0
- package/dist/marketing/components/Section.d.ts +132 -0
- package/dist/marketing/components/Section.d.ts.map +1 -0
- package/dist/marketing/components/Section.js +33 -0
- package/dist/marketing/components/Section.js.map +1 -0
- package/dist/marketing/components/Section.js.zyzz.json +1 -0
- package/dist/marketing/components/SectionHeading.css +1 -0
- package/dist/marketing/components/SectionHeading.d.ts +215 -0
- package/dist/marketing/components/SectionHeading.d.ts.map +1 -0
- package/dist/marketing/components/SectionHeading.js +48 -0
- package/dist/marketing/components/SectionHeading.js.map +1 -0
- package/dist/marketing/components/SectionHeading.js.zyzz.json +1 -0
- package/dist/marketing/components/Showcase.css +1 -0
- package/dist/marketing/components/Showcase.d.ts +269 -0
- package/dist/marketing/components/Showcase.d.ts.map +1 -0
- package/dist/marketing/components/Showcase.js +67 -0
- package/dist/marketing/components/Showcase.js.map +1 -0
- package/dist/marketing/components/Showcase.js.zyzz.json +1 -0
- package/dist/marketing/components/Stats.css +1 -0
- package/dist/marketing/components/Stats.d.ts +133 -0
- package/dist/marketing/components/Stats.d.ts.map +1 -0
- package/dist/marketing/components/Stats.js +34 -0
- package/dist/marketing/components/Stats.js.map +1 -0
- package/dist/marketing/components/Stats.js.zyzz.json +1 -0
- package/dist/marketing/components/Steps.css +1 -0
- package/dist/marketing/components/Steps.d.ts +53 -0
- package/dist/marketing/components/Steps.d.ts.map +1 -0
- package/dist/marketing/components/Steps.js +78 -0
- package/dist/marketing/components/Steps.js.map +1 -0
- package/dist/marketing/components/Steps.js.zyzz.json +1 -0
- package/dist/marketing/components/SymbolTile.css +1 -0
- package/dist/marketing/components/SymbolTile.d.ts +85 -0
- package/dist/marketing/components/SymbolTile.d.ts.map +1 -0
- package/dist/marketing/components/SymbolTile.js +35 -0
- package/dist/marketing/components/SymbolTile.js.map +1 -0
- package/dist/marketing/components/SymbolTile.js.zyzz.json +1 -0
- package/dist/marketing/components/Tab.css +1 -0
- package/dist/marketing/components/Tab.d.ts +280 -0
- package/dist/marketing/components/Tab.d.ts.map +1 -0
- package/dist/marketing/components/Tab.js +43 -0
- package/dist/marketing/components/Tab.js.map +1 -0
- package/dist/marketing/components/Tab.js.zyzz.json +1 -0
- package/dist/marketing/components/Table.css +1 -0
- package/dist/marketing/components/Table.d.ts +157 -0
- package/dist/marketing/components/Table.d.ts.map +1 -0
- package/dist/marketing/components/Table.js +80 -0
- package/dist/marketing/components/Table.js.map +1 -0
- package/dist/marketing/components/Table.js.zyzz.json +1 -0
- package/dist/marketing/components/Tag.css +1 -0
- package/dist/marketing/components/Tag.d.ts +254 -0
- package/dist/marketing/components/Tag.d.ts.map +1 -0
- package/dist/marketing/components/Tag.js +59 -0
- package/dist/marketing/components/Tag.js.map +1 -0
- package/dist/marketing/components/Tag.js.zyzz.json +1 -0
- package/dist/marketing/components/internal/Links.d.ts +9 -0
- package/dist/marketing/components/internal/Links.d.ts.map +1 -0
- package/dist/marketing/components/internal/Links.js +15 -0
- package/dist/marketing/components/internal/Links.js.map +1 -0
- package/dist/marketing/icons/ArrowUpRight.d.ts +6 -0
- package/dist/marketing/icons/ArrowUpRight.d.ts.map +1 -0
- package/dist/marketing/icons/ArrowUpRight.js +5 -0
- package/dist/marketing/icons/ArrowUpRight.js.map +1 -0
- package/dist/marketing/icons/Checkmark.d.ts +6 -0
- package/dist/marketing/icons/Checkmark.d.ts.map +1 -0
- package/dist/marketing/icons/Checkmark.js +5 -0
- package/dist/marketing/icons/Checkmark.js.map +1 -0
- package/dist/marketing/icons/ChevronRight.d.ts +6 -0
- package/dist/marketing/icons/ChevronRight.d.ts.map +1 -0
- package/dist/marketing/icons/ChevronRight.js +5 -0
- package/dist/marketing/icons/ChevronRight.js.map +1 -0
- package/dist/marketing/icons/Link.d.ts +6 -0
- package/dist/marketing/icons/Link.d.ts.map +1 -0
- package/dist/marketing/icons/Link.js +5 -0
- package/dist/marketing/icons/Link.js.map +1 -0
- package/dist/marketing/icons/Play.d.ts +6 -0
- package/dist/marketing/icons/Play.d.ts.map +1 -0
- package/dist/marketing/icons/Play.js +5 -0
- package/dist/marketing/icons/Play.js.map +1 -0
- package/dist/marketing/icons/Spinner.d.ts +6 -0
- package/dist/marketing/icons/Spinner.d.ts.map +1 -0
- package/dist/marketing/icons/Spinner.js +5 -0
- package/dist/marketing/icons/Spinner.js.map +1 -0
- package/dist/marketing/icons/Xmark.d.ts +6 -0
- package/dist/marketing/icons/Xmark.d.ts.map +1 -0
- package/dist/marketing/icons/Xmark.js +5 -0
- package/dist/marketing/icons/Xmark.js.map +1 -0
- package/dist/marketing/index.d.ts +34 -1
- package/dist/marketing/index.d.ts.map +1 -1
- package/dist/marketing/index.js +34 -1
- package/dist/marketing/index.js.map +1 -1
- package/dist/marketing/index.js.zyzz.json +1 -1
- package/package.json +8 -2
- package/src/arsenal/icons/CATALOGUE.md +471 -0
- package/src/arsenal/icons/CHANGELOG.md +181 -0
- package/src/arsenal/icons/Icon.tsx +187 -0
- package/src/arsenal/icons/README.md +53 -0
- package/src/arsenal/icons/glyphs.ts +2901 -0
- package/src/arsenal/icons/index.ts +12 -0
- package/src/document/Document.ts +1 -0
- package/src/document/document.css +12 -1
- package/src/marketing/README.md +13 -1
- package/src/marketing/components/ArticleBody.tsx +784 -0
- package/src/marketing/components/ArticleHero.tsx +331 -0
- package/src/marketing/components/ArticleIndex.tsx +457 -0
- package/src/marketing/components/ArticleRail.tsx +384 -0
- package/src/marketing/components/AsideLayout.tsx +52 -0
- package/src/marketing/components/Breadcrumbs.tsx +197 -0
- package/src/marketing/components/Button.tsx +469 -0
- package/src/marketing/components/Card.tsx +865 -0
- package/src/marketing/components/Contact.tsx +157 -0
- package/src/marketing/components/Cta.tsx +297 -0
- package/src/marketing/components/CustomerStoryFeature.tsx +218 -0
- package/src/marketing/components/Faq.tsx +334 -0
- package/src/marketing/components/FeatureAccordion.tsx +459 -0
- package/src/marketing/components/Footer.tsx +440 -0
- package/src/marketing/components/Hero.tsx +275 -0
- package/src/marketing/components/LeadCapture.tsx +322 -0
- package/src/marketing/components/Link.tsx +508 -0
- package/src/marketing/components/Logo.tsx +71 -0
- package/src/marketing/components/LogoWall.tsx +185 -0
- package/src/marketing/components/Mark.tsx +67 -0
- package/src/marketing/components/Media.tsx +275 -0
- package/src/marketing/components/Nav.tsx +1030 -0
- package/src/marketing/components/PartnersIndex.tsx +448 -0
- package/src/marketing/components/QuoteBand.tsx +288 -0
- package/src/marketing/components/Section.tsx +110 -0
- package/src/marketing/components/SectionHeading.tsx +227 -0
- package/src/marketing/components/Showcase.tsx +301 -0
- package/src/marketing/components/Stats.tsx +130 -0
- package/src/marketing/components/Steps.tsx +215 -0
- package/src/marketing/components/SymbolTile.tsx +89 -0
- package/src/marketing/components/Tab.tsx +306 -0
- package/src/marketing/components/Table.tsx +255 -0
- package/src/marketing/components/Tag.tsx +289 -0
- package/src/marketing/components/internal/Links.ts +19 -0
- package/src/marketing/icons/ArrowUpRight.tsx +25 -0
- package/src/marketing/icons/Checkmark.tsx +25 -0
- package/src/marketing/icons/ChevronRight.tsx +25 -0
- package/src/marketing/icons/Link.tsx +25 -0
- package/src/marketing/icons/Play.tsx +25 -0
- package/src/marketing/icons/Spinner.tsx +25 -0
- package/src/marketing/icons/Xmark.tsx +25 -0
- package/src/marketing/index.ts +34 -1
|
@@ -0,0 +1,331 @@
|
|
|
1
|
+
/** Renders the opening of a blog post, Learn guide or customer story, and its date and read time. @module */
|
|
2
|
+
import type { ComponentPropsWithRef, ReactNode } from 'react'
|
|
3
|
+
import type * as zyzz from 'zyzz'
|
|
4
|
+
import { style, variants, vars } from '../zyzz.config.js'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* An article's opening, in a `<header>`: an optional eyebrow, the title, an optional line under it,
|
|
8
|
+
* and a row with the date and read time, below the inset that clears the navigation. It has no
|
|
9
|
+
* states or motion. Centered by default. With `align="start"`, an `h1` title sits on the reading
|
|
10
|
+
* column from 1024px, where the article's body sits, and `media` shares the page's width with the
|
|
11
|
+
* lines at a 7:5 split.
|
|
12
|
+
*
|
|
13
|
+
* - Give the page one `h1`, in its hero. Set `heading="h2"` where the hero shows inside another page.
|
|
14
|
+
* - Set `description` on a Learn guide or customer story, in one or two sentences.
|
|
15
|
+
* - Set `eyebrow` only on a customer story, to name its company.
|
|
16
|
+
* - Put an `ArticleHero.Meta` in the children for the date and read time.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* <ArticleHero title="Tempo Mainnet is live">
|
|
20
|
+
* <ArticleHero.Meta date={{ dateTime: '2026-03-18', label: 'Mar 18, 2026' }} minutes={5} />
|
|
21
|
+
* </ArticleHero>
|
|
22
|
+
*
|
|
23
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/practices/landmark-regions/ | WAI-ARIA APG Landmark Regions}
|
|
24
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/headings-and-labels.html | WCAG 2.2 Headings and Labels}
|
|
25
|
+
*/
|
|
26
|
+
export function ArticleHero(props: ArticleHero.Props) {
|
|
27
|
+
const {
|
|
28
|
+
align,
|
|
29
|
+
children,
|
|
30
|
+
className,
|
|
31
|
+
description,
|
|
32
|
+
eyebrow,
|
|
33
|
+
heading: Title = 'h1',
|
|
34
|
+
media,
|
|
35
|
+
title,
|
|
36
|
+
vars,
|
|
37
|
+
...attributes
|
|
38
|
+
} = props
|
|
39
|
+
|
|
40
|
+
const lines = (
|
|
41
|
+
<>
|
|
42
|
+
{eyebrow !== undefined && <p {...styles.eyebrow()}>{eyebrow}</p>}
|
|
43
|
+
<Title {...styles.title()}>{title}</Title>
|
|
44
|
+
{description !== undefined && <p {...styles.description()}>{description}</p>}
|
|
45
|
+
{children !== undefined && <div {...styles.meta()}>{children}</div>}
|
|
46
|
+
</>
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<header
|
|
51
|
+
{...attributes}
|
|
52
|
+
{...styles.root({ align, className, style: props.style, vars })}
|
|
53
|
+
data-align={align ?? 'center'}
|
|
54
|
+
data-media={media === undefined ? undefined : ''}
|
|
55
|
+
>
|
|
56
|
+
{media === undefined ? (
|
|
57
|
+
lines
|
|
58
|
+
) : (
|
|
59
|
+
<>
|
|
60
|
+
<div {...styles.lines()}>{lines}</div>
|
|
61
|
+
{media}
|
|
62
|
+
</>
|
|
63
|
+
)}
|
|
64
|
+
</header>
|
|
65
|
+
)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export namespace ArticleHero {
|
|
69
|
+
export type Props = Omit<ComponentPropsWithRef<'header'>, 'title'> &
|
|
70
|
+
zyzz.Props.Variants<typeof styles.root> & {
|
|
71
|
+
/** A line under the title, as Learn guides and customer stories have. */
|
|
72
|
+
description?: ReactNode | undefined
|
|
73
|
+
/** A line above the title that names the article's subject, such as a customer story's company. */
|
|
74
|
+
eyebrow?: ReactNode | undefined
|
|
75
|
+
/**
|
|
76
|
+
* The title's element: the page's `h1` on an article, or an `h2` where the hero shows inside
|
|
77
|
+
* another page.
|
|
78
|
+
*
|
|
79
|
+
* @default 'h1'
|
|
80
|
+
*/
|
|
81
|
+
heading?: 'h1' | 'h2' | undefined
|
|
82
|
+
/**
|
|
83
|
+
* Media that closes the hero, such as a customer story's `Media`: below the lines, or beside
|
|
84
|
+
* them from 1024px when `align` is `start`. What follows sets the space below it.
|
|
85
|
+
*/
|
|
86
|
+
media?: ReactNode | undefined
|
|
87
|
+
/** The article's title. */
|
|
88
|
+
title: ReactNode
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* An article's date and read time. The `compact` form renders a `<time>` and a `<span>` as items
|
|
93
|
+
* of the row around it, such as the `ArticleHero` row. The `labelled` form renders a `<dl>` named
|
|
94
|
+
* Article metadata, each label a `<dt>` before its value. It has no states or motion.
|
|
95
|
+
*
|
|
96
|
+
* @example
|
|
97
|
+
* <ArticleHero.Meta date={{ dateTime: '2026-08-19', label: 'Aug 19, 2026' }} minutes={8} />
|
|
98
|
+
*/
|
|
99
|
+
export function Meta(props: Meta.Props) {
|
|
100
|
+
const { date, form = 'compact', messages = {}, minutes } = props
|
|
101
|
+
|
|
102
|
+
if (form === 'compact')
|
|
103
|
+
return (
|
|
104
|
+
<>
|
|
105
|
+
{date && <time dateTime={date.dateTime}>{date.label}</time>}
|
|
106
|
+
{minutes !== undefined && (
|
|
107
|
+
<span>
|
|
108
|
+
{(messages.read ?? '{minutes} min read').replaceAll('{minutes}', `${minutes}`)}
|
|
109
|
+
</span>
|
|
110
|
+
)}
|
|
111
|
+
</>
|
|
112
|
+
)
|
|
113
|
+
|
|
114
|
+
const { className, vars } = props
|
|
115
|
+
|
|
116
|
+
return (
|
|
117
|
+
<dl
|
|
118
|
+
aria-label={messages.label ?? 'Article metadata'}
|
|
119
|
+
{...styles.list({ className, style: props.style, vars })}
|
|
120
|
+
>
|
|
121
|
+
{date && (
|
|
122
|
+
<div {...styles.pair()}>
|
|
123
|
+
<dt {...styles.label()}>{messages.date ?? 'Date'}</dt>
|
|
124
|
+
<dd {...styles.value()}>
|
|
125
|
+
<time dateTime={date.dateTime}>{date.label}</time>
|
|
126
|
+
</dd>
|
|
127
|
+
</div>
|
|
128
|
+
)}
|
|
129
|
+
{minutes !== undefined && (
|
|
130
|
+
<div {...styles.pair()}>
|
|
131
|
+
<dt {...styles.label()}>{messages.time ?? 'Time'}</dt>
|
|
132
|
+
<dd {...styles.value()}>
|
|
133
|
+
{(messages.minutes ?? '{minutes} min').replaceAll('{minutes}', `${minutes}`)}
|
|
134
|
+
</dd>
|
|
135
|
+
</div>
|
|
136
|
+
)}
|
|
137
|
+
</dl>
|
|
138
|
+
)
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export namespace Meta {
|
|
142
|
+
/** `className`, `style` and `vars` reach the `labelled` form's list. */
|
|
143
|
+
export type Props = zyzz.Props.Variants<typeof styles.list> & {
|
|
144
|
+
/**
|
|
145
|
+
* When the article was published: `dateTime` holds the ISO date for the `<time>` element, and
|
|
146
|
+
* `label` the date as a reader sees it, such as Aug 19, 2026.
|
|
147
|
+
*/
|
|
148
|
+
date?: { dateTime: string; label: string } | undefined
|
|
149
|
+
/**
|
|
150
|
+
* How it reads: `compact` sets the date and "N min read" as items of the row around it, and
|
|
151
|
+
* `labelled` sets labelled pairs in a description list.
|
|
152
|
+
*
|
|
153
|
+
* @default 'compact'
|
|
154
|
+
*/
|
|
155
|
+
form?: 'compact' | 'labelled' | undefined
|
|
156
|
+
/** The labels, in English by default. `{minutes}` stands for `minutes`. */
|
|
157
|
+
messages?:
|
|
158
|
+
| {
|
|
159
|
+
/** The date's label in the `labelled` form. @default 'Date' */
|
|
160
|
+
date?: string | undefined
|
|
161
|
+
/** The name of the `labelled` form's list. @default 'Article metadata' */
|
|
162
|
+
label?: string | undefined
|
|
163
|
+
/** The read time in the `labelled` form. @default '{minutes} min' */
|
|
164
|
+
minutes?: string | undefined
|
|
165
|
+
/** The read time in the `compact` form. @default '{minutes} min read' */
|
|
166
|
+
read?: string | undefined
|
|
167
|
+
/** The read time's label in the `labelled` form. @default 'Time' */
|
|
168
|
+
time?: string | undefined
|
|
169
|
+
}
|
|
170
|
+
| undefined
|
|
171
|
+
/** The read time, in whole minutes. */
|
|
172
|
+
minutes?: number | undefined
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
namespace styles {
|
|
178
|
+
// The page's body type at 56% black, the heading gap under the title, up to 480px wide.
|
|
179
|
+
export const description = style(
|
|
180
|
+
{
|
|
181
|
+
color: 'content.secondary',
|
|
182
|
+
marginBlockEnd: '0',
|
|
183
|
+
marginBlockStart: 'layoutGap.heading',
|
|
184
|
+
marginInline: '0',
|
|
185
|
+
maxInlineSize: '480',
|
|
186
|
+
textWrap: 'pretty',
|
|
187
|
+
typography: 'body.b1',
|
|
188
|
+
},
|
|
189
|
+
{ id: 'tds/marketing/article-hero/description' },
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
// Utility Eyebrow in capitals at 56% black, the heading gap above the title.
|
|
193
|
+
export const eyebrow = style(
|
|
194
|
+
{
|
|
195
|
+
color: 'content.secondary',
|
|
196
|
+
marginBlockEnd: 'layoutGap.heading',
|
|
197
|
+
marginBlockStart: '0',
|
|
198
|
+
marginInline: '0',
|
|
199
|
+
textTransform: 'uppercase',
|
|
200
|
+
typography: 'utility.eyebrow',
|
|
201
|
+
},
|
|
202
|
+
{ id: 'tds/marketing/article-hero/eyebrow' },
|
|
203
|
+
)
|
|
204
|
+
|
|
205
|
+
// Black at 56%, which holds 4.5:1 on the page and on white.
|
|
206
|
+
export const label = style(
|
|
207
|
+
{ color: 'content.secondary' },
|
|
208
|
+
{ id: 'tds/marketing/article-hero/label' },
|
|
209
|
+
)
|
|
210
|
+
|
|
211
|
+
// Beside media, the lines stack as the hero does alone, centered when it is.
|
|
212
|
+
export const lines = style(
|
|
213
|
+
{
|
|
214
|
+
alignItems: 'flex-start',
|
|
215
|
+
display: 'flex',
|
|
216
|
+
flexDirection: 'column',
|
|
217
|
+
selectors: {
|
|
218
|
+
'[data-align="center"] > &': { alignItems: 'center', textAlign: 'center' },
|
|
219
|
+
},
|
|
220
|
+
},
|
|
221
|
+
{ id: 'tds/marketing/article-hero/lines' },
|
|
222
|
+
)
|
|
223
|
+
|
|
224
|
+
// Body B2. The pairs sit 24px apart and wrap 8px apart.
|
|
225
|
+
export const list = variants(
|
|
226
|
+
{
|
|
227
|
+
base: {
|
|
228
|
+
columnGap: '24',
|
|
229
|
+
display: 'flex',
|
|
230
|
+
flexWrap: 'wrap',
|
|
231
|
+
margin: '0',
|
|
232
|
+
rowGap: '8',
|
|
233
|
+
typography: 'body.b2',
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
{ id: 'tds/marketing/article-hero/list' },
|
|
237
|
+
)
|
|
238
|
+
|
|
239
|
+
// Body B2, 32px under what is above it: items 24px apart (16px when centered) in a row that wraps
|
|
240
|
+
// 16px apart.
|
|
241
|
+
export const meta = style(
|
|
242
|
+
{
|
|
243
|
+
alignItems: 'center',
|
|
244
|
+
columnGap: '24',
|
|
245
|
+
display: 'flex',
|
|
246
|
+
flexWrap: 'wrap',
|
|
247
|
+
inlineSize: '100% !custom',
|
|
248
|
+
marginBlockStart: '32',
|
|
249
|
+
rowGap: '16',
|
|
250
|
+
typography: 'body.b2',
|
|
251
|
+
selectors: {
|
|
252
|
+
'[data-align="center"] &': { columnGap: '16', justifyContent: 'center' },
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
{ id: 'tds/marketing/article-hero/meta' },
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
// The label and its value 8px apart, on one baseline.
|
|
259
|
+
export const pair = style(
|
|
260
|
+
{ alignItems: 'baseline', display: 'flex', gap: '8' },
|
|
261
|
+
{ id: 'tds/marketing/article-hero/pair' },
|
|
262
|
+
)
|
|
263
|
+
|
|
264
|
+
// The hero inset above, which clears the fixed navigation, and Section SM below, to the article.
|
|
265
|
+
// With media, the lines and the media stack 40px apart (48px from 1024px), and the media closes
|
|
266
|
+
// the hero, so what follows sets the space below it.
|
|
267
|
+
export const root = variants(
|
|
268
|
+
{
|
|
269
|
+
base: {
|
|
270
|
+
alignItems: 'flex-start',
|
|
271
|
+
color: 'content.primary',
|
|
272
|
+
display: 'flex',
|
|
273
|
+
flexDirection: 'column',
|
|
274
|
+
paddingBlockEnd: 'section.sm',
|
|
275
|
+
paddingBlockStart: 'section.hero',
|
|
276
|
+
selectors: {
|
|
277
|
+
'&[data-media]': {
|
|
278
|
+
alignItems: 'start',
|
|
279
|
+
display: 'grid',
|
|
280
|
+
gap: '40',
|
|
281
|
+
gridTemplateColumns: 'minmax(0, 1fr) !custom',
|
|
282
|
+
paddingBlockEnd: '0',
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
'@media >=1024': { selectors: { '&[data-media]': { gap: '48' } } },
|
|
286
|
+
},
|
|
287
|
+
defaultVariants: { align: 'center' },
|
|
288
|
+
variants: {
|
|
289
|
+
/**
|
|
290
|
+
* Where the lines sit: `center`, over the page, as on every article, or `start`. At the start
|
|
291
|
+
* from 1024px, an `h1` title's lines sit on the article grid's reading column (columns 4 to
|
|
292
|
+
* 9, at most 600px wide and centered in them), and media sits beside the lines at 7:5.
|
|
293
|
+
*
|
|
294
|
+
* @default 'center'
|
|
295
|
+
*/
|
|
296
|
+
align: {
|
|
297
|
+
center: { alignItems: 'center', textAlign: 'center' },
|
|
298
|
+
start: {
|
|
299
|
+
// The reading column starts a quarter of the width and a quarter of the 24px gutter in.
|
|
300
|
+
'@media >=1024': {
|
|
301
|
+
selectors: {
|
|
302
|
+
'&:has(> h1)': {
|
|
303
|
+
paddingInline: `max(calc(25% + 6px), calc(50% - ${vars.container['600']} / 2)) !custom`,
|
|
304
|
+
},
|
|
305
|
+
'&[data-media]': {
|
|
306
|
+
gridTemplateColumns: 'minmax(0, 7fr) minmax(0, 5fr) !custom',
|
|
307
|
+
},
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
},
|
|
311
|
+
},
|
|
312
|
+
},
|
|
313
|
+
},
|
|
314
|
+
{ id: 'tds/marketing/article-hero' },
|
|
315
|
+
)
|
|
316
|
+
|
|
317
|
+
// Heading H1 in balanced lines, up to 600px wide, and a page title up to 720px from 1512px.
|
|
318
|
+
export const title = style(
|
|
319
|
+
{
|
|
320
|
+
margin: '0',
|
|
321
|
+
maxInlineSize: '600',
|
|
322
|
+
overflowWrap: 'break-word',
|
|
323
|
+
textWrap: 'balance',
|
|
324
|
+
typography: 'heading.h1',
|
|
325
|
+
'@media >=1512': { selectors: { '&:is(h1)': { maxInlineSize: '720' } } },
|
|
326
|
+
},
|
|
327
|
+
{ id: 'tds/marketing/article-hero/title' },
|
|
328
|
+
)
|
|
329
|
+
|
|
330
|
+
export const value = style({ margin: '0' }, { id: 'tds/marketing/article-hero/value' })
|
|
331
|
+
}
|