@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,288 @@
|
|
|
1
|
+
/** Renders one customer's words large on a full-bleed band over a photo, and the centered pull quote. @module */
|
|
2
|
+
import type { ComponentPropsWithRef, ReactNode } from 'react'
|
|
3
|
+
import type * as zyzz from 'zyzz'
|
|
4
|
+
import { style, variants } from '../zyzz.config.js'
|
|
5
|
+
import { Section } from './Section.js'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* One customer's words set large on a full-bleed band over a photo, as on Home. Renders a `Section`
|
|
9
|
+
* with the turn above it, run to the page's edges, around a `figure`: the logo, the quote in the
|
|
10
|
+
* serif display face in a `blockquote`, the speaker in its `figcaption`, and an optional action.
|
|
11
|
+
*
|
|
12
|
+
* - Pass the quote as `children`, without quotation marks. The band adds the marks the page's
|
|
13
|
+
* language uses, and screen readers skip them.
|
|
14
|
+
* - Pass the photo in `image`. The band hides it from screen readers and crops it to cover.
|
|
15
|
+
* - Pass the action as a Marketing `Button.Link` with `appearance="overlay"` and
|
|
16
|
+
* `variant="secondary"`, such as Read the case study.
|
|
17
|
+
* - Use `QuoteBand.Block` for a quote inside a story, or any quote without a photo.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* <QuoteBand author="Patrick Collison" image={<img alt="" src="/quote.webp" />} jobTitle="CEO, Stripe">
|
|
21
|
+
* Tempo is now Stripe’s default blockchain for new features.
|
|
22
|
+
* </QuoteBand>
|
|
23
|
+
*
|
|
24
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html | WCAG 2.2 Info and Relationships}
|
|
25
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/non-text-content.html | WCAG 2.2 Non-text Content}
|
|
26
|
+
*/
|
|
27
|
+
export function QuoteBand(props: QuoteBand.Props) {
|
|
28
|
+
const { action, author, children, image, jobTitle, logo, ...attributes } = props
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<Section {...attributes} bleed space="turn">
|
|
32
|
+
<figure {...styles.figure()}>
|
|
33
|
+
{image && (
|
|
34
|
+
<div aria-hidden="true" {...styles.image()}>
|
|
35
|
+
{image}
|
|
36
|
+
</div>
|
|
37
|
+
)}
|
|
38
|
+
{logo && <div {...styles.logo()}>{logo}</div>}
|
|
39
|
+
<blockquote {...styles.quote()}>
|
|
40
|
+
<p dir="auto" {...styles.text()}>
|
|
41
|
+
{children}
|
|
42
|
+
</p>
|
|
43
|
+
</blockquote>
|
|
44
|
+
<figcaption {...styles.caption()}>
|
|
45
|
+
<span {...styles.author()}>{author}</span>
|
|
46
|
+
{jobTitle && (
|
|
47
|
+
<>
|
|
48
|
+
<br />
|
|
49
|
+
{jobTitle}
|
|
50
|
+
</>
|
|
51
|
+
)}
|
|
52
|
+
</figcaption>
|
|
53
|
+
{action && <div {...styles.action()}>{action}</div>}
|
|
54
|
+
</figure>
|
|
55
|
+
</Section>
|
|
56
|
+
)
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export namespace QuoteBand {
|
|
60
|
+
export type Props = Omit<Section.Props, 'bleed' | 'children' | 'close' | 'space' | 'tone'> & {
|
|
61
|
+
/** A link under the speaker, such as a Marketing `Button.Link` to the case study. */
|
|
62
|
+
action?: ReactNode | undefined
|
|
63
|
+
/** The speaker's name. */
|
|
64
|
+
author: ReactNode
|
|
65
|
+
/** The quote, without quotation marks. */
|
|
66
|
+
children: ReactNode
|
|
67
|
+
/** The photo behind the quote, such as an `img` or a `picture`. It covers the band. */
|
|
68
|
+
image?: ReactNode | undefined
|
|
69
|
+
/** The speaker's job title and company, such as CEO, Stripe. */
|
|
70
|
+
jobTitle?: ReactNode | undefined
|
|
71
|
+
/**
|
|
72
|
+
* The company's logo above the quote, such as an `img` named by the company. It draws white
|
|
73
|
+
* at 24px tall.
|
|
74
|
+
*/
|
|
75
|
+
logo?: ReactNode | undefined
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* A centered pull quote: one person's words in Heading H3 between curly quotation marks, with
|
|
80
|
+
* their name and job title 24px under them. Renders a `figure` around a `blockquote` and a
|
|
81
|
+
* `figcaption`. Pass the quote as `children`, without quotation marks.
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* <QuoteBand.Block author="Andy Fang" jobTitle="Co-founder, DoorDash">
|
|
85
|
+
* There’s real promise with stablecoins transforming financial infrastructure.
|
|
86
|
+
* </QuoteBand.Block>
|
|
87
|
+
*/
|
|
88
|
+
export function Block(props: Block.Props) {
|
|
89
|
+
const { appearance, author, children, className, jobTitle, vars, ...attributes } = props
|
|
90
|
+
|
|
91
|
+
return (
|
|
92
|
+
<figure
|
|
93
|
+
{...attributes}
|
|
94
|
+
{...styles.block({ appearance, className, style: props.style, vars })}
|
|
95
|
+
>
|
|
96
|
+
<blockquote {...styles.blockQuote()}>“{children}”</blockquote>
|
|
97
|
+
<figcaption {...styles.blockCaption()}>
|
|
98
|
+
<strong {...styles.blockAuthor()}>{author}</strong>
|
|
99
|
+
{jobTitle && <span {...styles.blockJobTitle({ appearance })}>{jobTitle}</span>}
|
|
100
|
+
</figcaption>
|
|
101
|
+
</figure>
|
|
102
|
+
)
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export namespace Block {
|
|
106
|
+
export type Props = Omit<ComponentPropsWithRef<'figure'>, 'children'> &
|
|
107
|
+
zyzz.Props.Variants<typeof styles.block> & {
|
|
108
|
+
/** The speaker's name. */
|
|
109
|
+
author: ReactNode
|
|
110
|
+
/** The quote, without quotation marks. */
|
|
111
|
+
children: ReactNode
|
|
112
|
+
/**
|
|
113
|
+
* The speaker's job title, then the company, separated by a comma, such as Co-founder,
|
|
114
|
+
* DoorDash.
|
|
115
|
+
*/
|
|
116
|
+
jobTitle?: ReactNode | undefined
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
namespace styles {
|
|
122
|
+
export const action = style({ position: 'relative' }, { id: 'tds/marketing/quote-band/action' })
|
|
123
|
+
|
|
124
|
+
export const author = style({ whiteSpace: 'nowrap' }, { id: 'tds/marketing/quote-band/author' })
|
|
125
|
+
|
|
126
|
+
// Name and job title share the secondary tone: the tertiary tone falls under 4.5:1 at this size.
|
|
127
|
+
export const caption = style(
|
|
128
|
+
{ color: 'inverse.content.secondary', position: 'relative', typography: 'body.b1' },
|
|
129
|
+
{ id: 'tds/marketing/quote-band/caption' },
|
|
130
|
+
)
|
|
131
|
+
|
|
132
|
+
// The band's black shows until the photo loads, and wherever a photo leaves room.
|
|
133
|
+
export const figure = style(
|
|
134
|
+
{
|
|
135
|
+
alignItems: 'center',
|
|
136
|
+
backgroundColor: 'inverse.background.primary',
|
|
137
|
+
boxSizing: 'border-box',
|
|
138
|
+
color: 'neutral.000',
|
|
139
|
+
display: 'flex',
|
|
140
|
+
flexDirection: 'column',
|
|
141
|
+
gap: '40',
|
|
142
|
+
isolation: 'isolate',
|
|
143
|
+
justifyContent: 'center',
|
|
144
|
+
margin: '0',
|
|
145
|
+
minHeight: '600px !custom',
|
|
146
|
+
paddingBlock: '80px !custom',
|
|
147
|
+
// Keeps the three-line rag of the quote on phones narrower than 430px.
|
|
148
|
+
paddingInline: '24',
|
|
149
|
+
position: 'relative',
|
|
150
|
+
textAlign: 'center',
|
|
151
|
+
'@media >=768': { minHeight: '752px !custom', paddingInline: '48' },
|
|
152
|
+
'@media >=1280': { minHeight: '684px !custom' },
|
|
153
|
+
},
|
|
154
|
+
{ id: 'tds/marketing/quote-band/figure' },
|
|
155
|
+
)
|
|
156
|
+
|
|
157
|
+
// Out of the figure's flex flow, so the photo takes no gap, and under the copy.
|
|
158
|
+
export const image = style(
|
|
159
|
+
{
|
|
160
|
+
inset: '0',
|
|
161
|
+
overflow: 'hidden',
|
|
162
|
+
position: 'absolute',
|
|
163
|
+
zIndex: '-1 !custom',
|
|
164
|
+
selectors: {
|
|
165
|
+
'& > *': { display: 'block', height: '100% !custom', width: '100% !custom' },
|
|
166
|
+
'& img, & video': {
|
|
167
|
+
display: 'block',
|
|
168
|
+
height: '100% !custom',
|
|
169
|
+
objectFit: 'cover',
|
|
170
|
+
width: '100% !custom',
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
},
|
|
174
|
+
{ id: 'tds/marketing/quote-band/image' },
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
// Any logo draws white: brightness takes it to black, and invert to white.
|
|
178
|
+
export const logo = style(
|
|
179
|
+
{
|
|
180
|
+
display: 'flex',
|
|
181
|
+
flexShrink: '0 !custom',
|
|
182
|
+
height: '24',
|
|
183
|
+
justifyContent: 'center',
|
|
184
|
+
position: 'relative',
|
|
185
|
+
selectors: {
|
|
186
|
+
'& > img, & > svg': {
|
|
187
|
+
display: 'block',
|
|
188
|
+
filter: 'brightness(0) invert(1) !custom',
|
|
189
|
+
height: '100% !custom',
|
|
190
|
+
width: 'auto !custom',
|
|
191
|
+
},
|
|
192
|
+
},
|
|
193
|
+
'@media (forced-colors: active)': {
|
|
194
|
+
selectors: { '& > img, & > svg': { filter: 'none !custom' } },
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
{ id: 'tds/marketing/quote-band/logo' },
|
|
198
|
+
)
|
|
199
|
+
|
|
200
|
+
// Display D1's serif at the band's own sizes: 36px at 430px wide, 50px at 834px, 72px at 1440px
|
|
201
|
+
// and 82px at 1728px, each with its own measure. The sizes follow the typography token.
|
|
202
|
+
export const quote = style(
|
|
203
|
+
{
|
|
204
|
+
margin: '0',
|
|
205
|
+
maxWidth: '450px !custom',
|
|
206
|
+
position: 'relative',
|
|
207
|
+
typography: 'display.d1',
|
|
208
|
+
fontSize: '36px !custom',
|
|
209
|
+
lineHeight: '0.95 !custom',
|
|
210
|
+
'@media >=768': { fontSize: '50px !custom', maxWidth: '625px !custom' },
|
|
211
|
+
'@media >=1024': { fontSize: '72px !custom', maxWidth: '900px !custom' },
|
|
212
|
+
'@media >=1512': { fontSize: '82px !custom', maxWidth: '1025px !custom' },
|
|
213
|
+
},
|
|
214
|
+
{ id: 'tds/marketing/quote-band/quote' },
|
|
215
|
+
)
|
|
216
|
+
|
|
217
|
+
// The marks follow the language of the content around them. Their alternative text is empty, so
|
|
218
|
+
// screen readers skip them and a selection leaves them out.
|
|
219
|
+
export const text = style(
|
|
220
|
+
{
|
|
221
|
+
margin: '0',
|
|
222
|
+
quotes: 'auto !custom',
|
|
223
|
+
textWrap: 'balance',
|
|
224
|
+
selectors: {
|
|
225
|
+
'&::after': { content: 'close-quote / "" !custom', userSelect: 'none' },
|
|
226
|
+
'&::before': { content: 'open-quote / "" !custom', userSelect: 'none' },
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
{ id: 'tds/marketing/quote-band/text' },
|
|
230
|
+
)
|
|
231
|
+
|
|
232
|
+
export const block = variants(
|
|
233
|
+
{
|
|
234
|
+
base: {
|
|
235
|
+
alignItems: 'center',
|
|
236
|
+
display: 'flex',
|
|
237
|
+
flexDirection: 'column',
|
|
238
|
+
gap: '24',
|
|
239
|
+
margin: '0',
|
|
240
|
+
textAlign: 'center',
|
|
241
|
+
},
|
|
242
|
+
defaultVariants: { appearance: 'base' },
|
|
243
|
+
variants: {
|
|
244
|
+
/**
|
|
245
|
+
* The ground under the quote: the light page for `base`, or a dark section for `inverse`,
|
|
246
|
+
* which sets the quote in near-white and the job title in the inverse secondary tone.
|
|
247
|
+
*
|
|
248
|
+
* @default 'base'
|
|
249
|
+
*/
|
|
250
|
+
appearance: {
|
|
251
|
+
base: { color: 'content.primary' },
|
|
252
|
+
inverse: { color: 'inverse.content.primary' },
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
{ id: 'tds/marketing/quote-band/block' },
|
|
257
|
+
)
|
|
258
|
+
|
|
259
|
+
// The credit names the author with `strong` and keeps the credit's weight.
|
|
260
|
+
export const blockAuthor = style(
|
|
261
|
+
{ fontWeight: 'inherit !custom' },
|
|
262
|
+
{ id: 'tds/marketing/quote-band/block-author' },
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
export const blockCaption = style(
|
|
266
|
+
{ display: 'flex', flexDirection: 'column', typography: 'body.b1' },
|
|
267
|
+
{ id: 'tds/marketing/quote-band/block-caption' },
|
|
268
|
+
)
|
|
269
|
+
|
|
270
|
+
export const blockJobTitle = variants(
|
|
271
|
+
{
|
|
272
|
+
base: {},
|
|
273
|
+
defaultVariants: { appearance: 'base' },
|
|
274
|
+
variants: {
|
|
275
|
+
appearance: {
|
|
276
|
+
base: { color: 'content.secondary' },
|
|
277
|
+
inverse: { color: 'inverse.content.secondary' },
|
|
278
|
+
},
|
|
279
|
+
},
|
|
280
|
+
},
|
|
281
|
+
{ id: 'tds/marketing/quote-band/block-job-title' },
|
|
282
|
+
)
|
|
283
|
+
|
|
284
|
+
export const blockQuote = style(
|
|
285
|
+
{ margin: '0', maxWidth: '1000', textWrap: 'balance', typography: 'heading.h3' },
|
|
286
|
+
{ id: 'tds/marketing/quote-band/block-quote' },
|
|
287
|
+
)
|
|
288
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/** Renders the Marketing page section: its container, its tone and the space above its content. @module */
|
|
2
|
+
import type { ComponentPropsWithRef } from 'react'
|
|
3
|
+
import type * as zyzz from 'zyzz'
|
|
4
|
+
import { variants } from '../zyzz.config.js'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A native `<section>` that holds one page section below the hero: the page margins, the 2560px
|
|
8
|
+
* cap, and the space above its content. The section below holds the space between two sections, so
|
|
9
|
+
* the spaces never add up, and a section pads its end only to close the page.
|
|
10
|
+
*
|
|
11
|
+
* - Set `space="turn"` where the register changes, such as into or out of a dark panel, a
|
|
12
|
+
* full-bleed band or the closing band.
|
|
13
|
+
* - Set `close` on the page's last section, so it keeps the XL space above the footer.
|
|
14
|
+
* - Set `bleed` to run a band to the page's edges, never margins of your own.
|
|
15
|
+
* - Set `tone` to paint the section. Parts inside an `inverse` section take their own
|
|
16
|
+
* `appearance="inverse"`.
|
|
17
|
+
* - Name the section by its title: pass the `titleId` of its `SectionHeading` as
|
|
18
|
+
* `aria-labelledby`. Leave it unnamed when it holds a band that names itself, such as `Contact`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <Section aria-labelledby="benefits">
|
|
22
|
+
* <SectionHeading eyebrow="Business benefits" title="Make stablecoins work for your business" titleId="benefits" />
|
|
23
|
+
* </Section>
|
|
24
|
+
*
|
|
25
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/region.html | WAI-ARIA APG Region landmark}
|
|
26
|
+
*/
|
|
27
|
+
export function Section(props: Section.Props) {
|
|
28
|
+
const { bleed, className, close, space, tone, vars, ...attributes } = props
|
|
29
|
+
|
|
30
|
+
return (
|
|
31
|
+
<section
|
|
32
|
+
{...attributes}
|
|
33
|
+
{...styles.root({ bleed, className, close, space, style: props.style, tone, vars })}
|
|
34
|
+
/>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export namespace Section {
|
|
39
|
+
export type Props = ComponentPropsWithRef<'section'> & zyzz.Props.Variants<typeof styles.root>
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
namespace styles {
|
|
43
|
+
export const root = variants(
|
|
44
|
+
{
|
|
45
|
+
base: {
|
|
46
|
+
boxSizing: 'border-box',
|
|
47
|
+
// Centers the box once the cap stops it growing.
|
|
48
|
+
marginInline: 'auto !custom',
|
|
49
|
+
maxWidth: '2560',
|
|
50
|
+
paddingBlockStart: 'section.gap',
|
|
51
|
+
paddingInline: 'page.margin',
|
|
52
|
+
},
|
|
53
|
+
// A painted tone pads its end by the space it holds above, so the paint frames the content
|
|
54
|
+
// evenly. The page's last section keeps its XL close.
|
|
55
|
+
compoundVariants: [
|
|
56
|
+
{
|
|
57
|
+
when: { space: 'gap', tone: ['grey', 'inverse', 'outline', 'white'] },
|
|
58
|
+
style: { paddingBlockEnd: 'section.gap' },
|
|
59
|
+
},
|
|
60
|
+
{
|
|
61
|
+
when: { space: 'turn', tone: ['grey', 'inverse', 'outline', 'white'] },
|
|
62
|
+
style: { paddingBlockEnd: 'section.xl' },
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
when: { close: true, tone: ['grey', 'inverse', 'outline', 'white'] },
|
|
66
|
+
style: { paddingBlockEnd: 'section.xl' },
|
|
67
|
+
},
|
|
68
|
+
],
|
|
69
|
+
defaultVariants: { bleed: false, close: false, space: 'gap', tone: 'page' },
|
|
70
|
+
variants: {
|
|
71
|
+
/**
|
|
72
|
+
* Runs the content to the page's edges, inside the 2560px cap.
|
|
73
|
+
*
|
|
74
|
+
* @default false
|
|
75
|
+
*/
|
|
76
|
+
bleed: { false: {}, true: { paddingInline: 'none' } },
|
|
77
|
+
/**
|
|
78
|
+
* Keeps the XL space below the page's last section, above the footer.
|
|
79
|
+
*
|
|
80
|
+
* @default false
|
|
81
|
+
*/
|
|
82
|
+
close: { false: {}, true: { paddingBlockEnd: 'section.xl' } },
|
|
83
|
+
/**
|
|
84
|
+
* The space above the content: the section `gap`, or the larger `turn` where the register
|
|
85
|
+
* changes.
|
|
86
|
+
*
|
|
87
|
+
* @default 'gap'
|
|
88
|
+
*/
|
|
89
|
+
space: { gap: {}, turn: { paddingBlockStart: 'section.xl' } },
|
|
90
|
+
/**
|
|
91
|
+
* The section's fill: none on the `page`, `white`, the page's `grey` step, an `outline`
|
|
92
|
+
* hairline, or black with near-white text for `inverse`.
|
|
93
|
+
*
|
|
94
|
+
* @default 'page'
|
|
95
|
+
*/
|
|
96
|
+
tone: {
|
|
97
|
+
grey: { backgroundColor: 'container.surface' },
|
|
98
|
+
inverse: {
|
|
99
|
+
backgroundColor: 'inverse.background.primary',
|
|
100
|
+
color: 'inverse.content.primary',
|
|
101
|
+
},
|
|
102
|
+
outline: { borderColor: 'line.secondary', borderStyle: 'solid', borderWidth: 'regular' },
|
|
103
|
+
page: {},
|
|
104
|
+
white: { backgroundColor: 'background.secondary' },
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
{ id: 'tds/marketing/section' },
|
|
109
|
+
)
|
|
110
|
+
}
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/** Renders the Marketing heading that opens a page section, or heads a page. @module */
|
|
2
|
+
import type { ComponentPropsWithRef, ReactNode } from 'react'
|
|
3
|
+
import type * as zyzz from 'zyzz'
|
|
4
|
+
import { style, variants } from '../zyzz.config.js'
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A `<header>` that opens a page section on its title: an eyebrow that names the section, an `<h2>`
|
|
8
|
+
* that states what the reader gets, a subtitle, and one action. Each line but the title is
|
|
9
|
+
* optional. It has no states or motion of its own.
|
|
10
|
+
*
|
|
11
|
+
* - Pass `titleId`, and the same id as the `aria-labelledby` of the `Section` around it, so the
|
|
12
|
+
* section takes the title as its name.
|
|
13
|
+
* - Set `heading="h1"` where it heads a page, such as a company or partners page, in place of an
|
|
14
|
+
* index page's `Hero` with `form="index"`.
|
|
15
|
+
* - Set `subtitle` by the copy: `heading` continues the title in its type, `body` sets running text
|
|
16
|
+
* 24px below it, and `aside` sets a lead beside a rail.
|
|
17
|
+
* - Pass the section's one action as `children`, and a carousel's buttons as `controls`.
|
|
18
|
+
* - Set `appearance="inverse"` inside an inverse `Section`.
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* <SectionHeading
|
|
22
|
+
* eyebrow="Business benefits"
|
|
23
|
+
* title="Make stablecoins work for your business"
|
|
24
|
+
* titleId="benefits"
|
|
25
|
+
* />
|
|
26
|
+
*/
|
|
27
|
+
export function SectionHeading(props: SectionHeading.Props) {
|
|
28
|
+
const {
|
|
29
|
+
appearance,
|
|
30
|
+
centered,
|
|
31
|
+
children,
|
|
32
|
+
className,
|
|
33
|
+
controls,
|
|
34
|
+
description,
|
|
35
|
+
eyebrow,
|
|
36
|
+
ghost,
|
|
37
|
+
heading: Heading = 'h2',
|
|
38
|
+
subtitle,
|
|
39
|
+
title,
|
|
40
|
+
titleId,
|
|
41
|
+
vars,
|
|
42
|
+
...attributes
|
|
43
|
+
} = props
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<header
|
|
47
|
+
{...attributes}
|
|
48
|
+
{...styles.root({
|
|
49
|
+
centered,
|
|
50
|
+
className,
|
|
51
|
+
controls: controls !== undefined && controls !== null,
|
|
52
|
+
ghost,
|
|
53
|
+
style: props.style,
|
|
54
|
+
vars,
|
|
55
|
+
})}
|
|
56
|
+
>
|
|
57
|
+
{eyebrow !== undefined && <p {...styles.eyebrow({ appearance })}>{eyebrow}</p>}
|
|
58
|
+
<Heading id={titleId} {...styles.title({ appearance })}>
|
|
59
|
+
{title}
|
|
60
|
+
</Heading>
|
|
61
|
+
{description !== undefined && (
|
|
62
|
+
<p {...styles.subtitle({ appearance, subtitle })}>{description}</p>
|
|
63
|
+
)}
|
|
64
|
+
{children !== undefined && <div {...styles.action()}>{children}</div>}
|
|
65
|
+
{controls !== undefined && <div data-heading-controls="">{controls}</div>}
|
|
66
|
+
</header>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export namespace SectionHeading {
|
|
71
|
+
export type Props = Omit<ComponentPropsWithRef<'header'>, 'title'> &
|
|
72
|
+
Omit<zyzz.Props.Variants<typeof styles.root>, 'controls'> &
|
|
73
|
+
Pick<zyzz.Props.Variants<typeof styles.subtitle>, 'appearance' | 'subtitle'> & {
|
|
74
|
+
/** The section's one action, 32px below the copy, such as a `Button.Link` with `layout="card"`. */
|
|
75
|
+
children?: ReactNode | undefined
|
|
76
|
+
/** A carousel's buttons, at the end of the row and level with the copy's last line. */
|
|
77
|
+
controls?: ReactNode | undefined
|
|
78
|
+
/** The subtitle under the title. `subtitle` sets its type. Absent by default. */
|
|
79
|
+
description?: ReactNode | undefined
|
|
80
|
+
/** A few uppercase words above the title that name the section, such as How it works. */
|
|
81
|
+
eyebrow?: ReactNode | undefined
|
|
82
|
+
/**
|
|
83
|
+
* The title's element: an `h2` under a page's hero, or the page's `h1` where the heading heads
|
|
84
|
+
* the page.
|
|
85
|
+
*
|
|
86
|
+
* @default 'h2'
|
|
87
|
+
*/
|
|
88
|
+
heading?: 'h1' | 'h2' | undefined
|
|
89
|
+
/** The title, in sentence case without a closing period. */
|
|
90
|
+
title: ReactNode
|
|
91
|
+
/** The title's `id`, which the `Section` around it passes as `aria-labelledby`. */
|
|
92
|
+
titleId?: string | undefined
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
namespace styles {
|
|
97
|
+
export const action = style(
|
|
98
|
+
{ display: 'flex', paddingBlockStart: '32' },
|
|
99
|
+
{ id: 'tds/marketing/section-heading/action' },
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
export const eyebrow = variants(
|
|
103
|
+
{
|
|
104
|
+
base: {
|
|
105
|
+
color: 'content.secondary',
|
|
106
|
+
margin: '0',
|
|
107
|
+
textTransform: 'uppercase',
|
|
108
|
+
typography: 'utility.eyebrow',
|
|
109
|
+
},
|
|
110
|
+
defaultVariants: { appearance: 'base' },
|
|
111
|
+
variants: { appearance: { base: {}, inverse: { color: 'inverse.content.secondary' } } },
|
|
112
|
+
},
|
|
113
|
+
{ id: 'tds/marketing/section-heading/eyebrow' },
|
|
114
|
+
)
|
|
115
|
+
|
|
116
|
+
// The gaps between the lines live on the header and land on the line below, so they outrank a
|
|
117
|
+
// page's reset of its headings' and paragraphs' margins.
|
|
118
|
+
export const root = variants(
|
|
119
|
+
{
|
|
120
|
+
base: {
|
|
121
|
+
paddingBlockEnd: 'layoutGap.content',
|
|
122
|
+
selectors: {
|
|
123
|
+
'& > p + :is(h1, h2)': { marginBlockStart: 'layoutGap.heading' },
|
|
124
|
+
'& > :is(h1, h2) + p[data-subtitle="aside"], & > :is(h1, h2) + p[data-subtitle="body"]': {
|
|
125
|
+
marginBlockStart: '24',
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
defaultVariants: { centered: false, controls: false, ghost: false },
|
|
130
|
+
variants: {
|
|
131
|
+
/**
|
|
132
|
+
* Centers each line and the action on the section, as the event pages open theirs.
|
|
133
|
+
*
|
|
134
|
+
* @default false
|
|
135
|
+
*/
|
|
136
|
+
centered: {
|
|
137
|
+
false: {},
|
|
138
|
+
true: {
|
|
139
|
+
textAlign: 'center',
|
|
140
|
+
selectors: {
|
|
141
|
+
'& > :is(h1, h2), & > p': { marginInline: 'auto !custom' },
|
|
142
|
+
'& > div': { justifyContent: 'center' },
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
},
|
|
146
|
+
// Set from `controls`: the copy in the first column and the controls in the second, level
|
|
147
|
+
// with the copy's last line, 24px apart.
|
|
148
|
+
controls: {
|
|
149
|
+
false: {},
|
|
150
|
+
true: {
|
|
151
|
+
columnGap: '24',
|
|
152
|
+
display: 'grid',
|
|
153
|
+
gridTemplateColumns: 'minmax(0, 1fr) auto !custom',
|
|
154
|
+
selectors: {
|
|
155
|
+
'& > *': { gridColumn: '1 !custom' },
|
|
156
|
+
// Across every line the header can hold: eyebrow, title, subtitle and action.
|
|
157
|
+
'& > [data-heading-controls]': {
|
|
158
|
+
alignSelf: 'end',
|
|
159
|
+
gridColumn: '2 !custom',
|
|
160
|
+
gridRow: '1 / span 4 !custom',
|
|
161
|
+
},
|
|
162
|
+
},
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
/**
|
|
166
|
+
* The one exception to the 600px title measure, for a title that keeps its period: the
|
|
167
|
+
* title and subtitle run to 1000px from 1024px, and the content follows closer.
|
|
168
|
+
*
|
|
169
|
+
* @default false
|
|
170
|
+
*/
|
|
171
|
+
ghost: {
|
|
172
|
+
false: {},
|
|
173
|
+
true: {
|
|
174
|
+
paddingBlockEnd: 'section.xs',
|
|
175
|
+
'@media >=1024': {
|
|
176
|
+
selectors: { '& > :is(h1, h2), & > p': { maxWidth: '1000' } },
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
},
|
|
180
|
+
},
|
|
181
|
+
},
|
|
182
|
+
{ id: 'tds/marketing/section-heading' },
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
export const subtitle = variants(
|
|
186
|
+
{
|
|
187
|
+
base: { color: 'content.secondary', margin: '0', maxWidth: '600' },
|
|
188
|
+
defaultVariants: { appearance: 'base', subtitle: 'heading' },
|
|
189
|
+
variants: {
|
|
190
|
+
/**
|
|
191
|
+
* The ground under the heading: the page or a light tone for `base`, an inverse `Section`
|
|
192
|
+
* for `inverse`, which takes the near-white text roles.
|
|
193
|
+
*
|
|
194
|
+
* @default 'base'
|
|
195
|
+
*/
|
|
196
|
+
appearance: { base: {}, inverse: { color: 'inverse.content.secondary' } },
|
|
197
|
+
/**
|
|
198
|
+
* The subtitle's type: `heading` continues the title in its type, `body` sets running text
|
|
199
|
+
* in Body B1 up to 480px, and `aside` sets a lead in Body B1 up to 360px beside a rail.
|
|
200
|
+
*
|
|
201
|
+
* @default 'heading'
|
|
202
|
+
*/
|
|
203
|
+
subtitle: {
|
|
204
|
+
aside: { maxWidth: '360', textWrap: 'pretty', typography: 'body.b1' },
|
|
205
|
+
body: { maxWidth: '480', textWrap: 'wrap', typography: 'body.b1' },
|
|
206
|
+
heading: { textWrap: 'balance', typography: 'heading.h2' },
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
{ id: 'tds/marketing/section-heading/subtitle' },
|
|
211
|
+
)
|
|
212
|
+
|
|
213
|
+
export const title = variants(
|
|
214
|
+
{
|
|
215
|
+
base: {
|
|
216
|
+
color: 'content.primary',
|
|
217
|
+
margin: '0',
|
|
218
|
+
maxWidth: '600',
|
|
219
|
+
textWrap: 'balance',
|
|
220
|
+
typography: 'heading.h2',
|
|
221
|
+
},
|
|
222
|
+
defaultVariants: { appearance: 'base' },
|
|
223
|
+
variants: { appearance: { base: {}, inverse: { color: 'inverse.content.primary' } } },
|
|
224
|
+
},
|
|
225
|
+
{ id: 'tds/marketing/section-heading/title' },
|
|
226
|
+
)
|
|
227
|
+
}
|