@tempoxyz/ds 0.3.19 → 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/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/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,784 @@
|
|
|
1
|
+
/** Renders the text of a blog post, Learn guide or customer story, and of a legal page, with its presentational blocks. @module */
|
|
2
|
+
import {
|
|
3
|
+
type ComponentPropsWithRef,
|
|
4
|
+
createContext,
|
|
5
|
+
createElement,
|
|
6
|
+
type HTMLAttributes,
|
|
7
|
+
type ReactNode,
|
|
8
|
+
type Ref,
|
|
9
|
+
useContext,
|
|
10
|
+
} from 'react'
|
|
11
|
+
import type * as zyzz from 'zyzz'
|
|
12
|
+
import { keyframes, property } from 'zyzz/web'
|
|
13
|
+
import { variants, vars } from '../zyzz.config.js'
|
|
14
|
+
import { Button } from './Button.js'
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* The text of an article, drawn from its Markdown: headings, paragraphs, lists, term rows, tables,
|
|
18
|
+
* quotes, media, code, questions in `<details>`, and sources. Every block takes one spacing rule:
|
|
19
|
+
* neighbors share the larger of their spaces, and anything under a heading takes the tight gap. The
|
|
20
|
+
* `article` variant sets prose in black up to 600px wide. The `legal` variant sets a legal page as
|
|
21
|
+
* one centered 720px column in secondary text, with the line under its `h1` as an eyebrow. It has no
|
|
22
|
+
* states. Its links draw an underline and a focus ring.
|
|
23
|
+
*
|
|
24
|
+
* - Render the Markdown's elements as children, and the blocks that Markdown cannot express as the
|
|
25
|
+
* parts: `ArticleBody.Callout`, `ArticleBody.Rows`, `ArticleBody.Quote`, `ArticleBody.Table`,
|
|
26
|
+
* `ArticleBody.Figure` and `ArticleBody.NextSteps`.
|
|
27
|
+
* - Open the article with an `ArticleBody.Callout`, its summary.
|
|
28
|
+
* - Start the text's headings at `h2`, under the hero's `h1`, and give every image its alt text.
|
|
29
|
+
* - Set no margins on blocks. The body spaces them.
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* <ArticleBody>
|
|
33
|
+
* <ArticleBody.Callout>Stablecoin payments move fiat-referenced assets onchain.</ArticleBody.Callout>
|
|
34
|
+
* <h2>The three layers</h2>
|
|
35
|
+
* <p>Every production stablecoin payment depends on three layers.</p>
|
|
36
|
+
* </ArticleBody>
|
|
37
|
+
*
|
|
38
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/info-and-relationships.html | WCAG 2.2 Info and Relationships}
|
|
39
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/reflow.html | WCAG 2.2 Reflow}
|
|
40
|
+
*/
|
|
41
|
+
export function ArticleBody(props: ArticleBody.Props) {
|
|
42
|
+
const { className, place, variant, vars, ...attributes } = props
|
|
43
|
+
|
|
44
|
+
return (
|
|
45
|
+
<div
|
|
46
|
+
data-article-body=""
|
|
47
|
+
{...attributes}
|
|
48
|
+
{...styles.root({ className, place, style: props.style, variant, vars })}
|
|
49
|
+
/>
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export namespace ArticleBody {
|
|
54
|
+
export type Props = ComponentPropsWithRef<'div'> & zyzz.Props.Variants<typeof styles.root>
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* The summary that opens an article, in a grey box at the 16px corner, as a `<p>`. Bold inside it
|
|
58
|
+
* keeps the body weight. Only the text's first paragraph draws the box, and a first paragraph that
|
|
59
|
+
* opens in emphasis draws it too.
|
|
60
|
+
*/
|
|
61
|
+
export function Callout(props: Callout.Props) {
|
|
62
|
+
return <p data-lede="" {...props} />
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export namespace Callout {
|
|
66
|
+
export type Props = ComponentPropsWithRef<'p'>
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** An image or a video across the column at the 16px corner, with an optional caption under it. */
|
|
70
|
+
export function Figure(props: Figure.Props) {
|
|
71
|
+
const { caption, children, ...attributes } = props
|
|
72
|
+
|
|
73
|
+
return (
|
|
74
|
+
<figure data-article-media="" {...attributes}>
|
|
75
|
+
{children}
|
|
76
|
+
{caption !== undefined && <figcaption>{caption}</figcaption>}
|
|
77
|
+
</figure>
|
|
78
|
+
)
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export namespace Figure {
|
|
82
|
+
export type Props = ComponentPropsWithRef<'figure'> & {
|
|
83
|
+
/** A caption under the media, in Body B2 at 56% black. */
|
|
84
|
+
caption?: ReactNode | undefined
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* A short lead-in that labels what follows, as a `<p>` in the subhead style with a heading's
|
|
90
|
+
* space above it. Use a heading instead when the label belongs in the outline.
|
|
91
|
+
*/
|
|
92
|
+
export function Label(props: Label.Props) {
|
|
93
|
+
return <p data-article-label="" {...props} />
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export namespace Label {
|
|
97
|
+
export type Props = ComponentPropsWithRef<'p'>
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/**
|
|
101
|
+
* Next steps as rows: each heading in the term column, and its line and a small secondary
|
|
102
|
+
* `Button.Link` beside it, as a `<ul>` of `<li>`s with an `<h3>` each.
|
|
103
|
+
*/
|
|
104
|
+
export function NextSteps(props: NextSteps.Props) {
|
|
105
|
+
const { action = 'Learn more', items, ...attributes } = props
|
|
106
|
+
|
|
107
|
+
return (
|
|
108
|
+
<ul data-article-steps="" {...attributes}>
|
|
109
|
+
{items.map((item) => (
|
|
110
|
+
<li data-article-row="" key={item.href}>
|
|
111
|
+
<h3 data-article-term="">{item.heading}</h3>
|
|
112
|
+
<div data-article-description="">
|
|
113
|
+
{item.description !== undefined && <p>{item.description}</p>}
|
|
114
|
+
<Button.Link href={item.href} render={item.render} size="small" variant="secondary">
|
|
115
|
+
{item.action ?? action}
|
|
116
|
+
</Button.Link>
|
|
117
|
+
</div>
|
|
118
|
+
</li>
|
|
119
|
+
))}
|
|
120
|
+
</ul>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export namespace NextSteps {
|
|
125
|
+
export type Props = Omit<ComponentPropsWithRef<'ul'>, 'children'> & {
|
|
126
|
+
/**
|
|
127
|
+
* The label of every step's button that sets none of its own.
|
|
128
|
+
*
|
|
129
|
+
* @default 'Learn more'
|
|
130
|
+
*/
|
|
131
|
+
action?: string | undefined
|
|
132
|
+
/** The steps, in order. */
|
|
133
|
+
items: readonly {
|
|
134
|
+
/** The button's label. Defaults to the list's `action`. */
|
|
135
|
+
action?: string | undefined
|
|
136
|
+
/** A line under the heading. */
|
|
137
|
+
description?: ReactNode | undefined
|
|
138
|
+
/** The step's heading, in the term column. */
|
|
139
|
+
heading: ReactNode
|
|
140
|
+
/** Where the button goes. */
|
|
141
|
+
href: string
|
|
142
|
+
/** A router link for the button, such as `<NextLink href="/contact" />`. */
|
|
143
|
+
render?: Button.Link.Props['render'] | undefined
|
|
144
|
+
}[]
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* A credited quote, as a `<figure>`: the words in a `<blockquote>` beside a 2px rule, and the
|
|
150
|
+
* credit in its `<figcaption>`, the author over their affiliation. Set `marks` for words written
|
|
151
|
+
* without quotation marks, and the quote draws them outside the accessible text.
|
|
152
|
+
*/
|
|
153
|
+
export function Quote(props: Quote.Props) {
|
|
154
|
+
const { affiliation, author, children, marks = false, ...attributes } = props
|
|
155
|
+
|
|
156
|
+
return (
|
|
157
|
+
<figure data-article-quote="" data-marks={marks ? '' : undefined} {...attributes}>
|
|
158
|
+
<blockquote>{children}</blockquote>
|
|
159
|
+
<figcaption data-article-attribution="">
|
|
160
|
+
<span>{author}</span>
|
|
161
|
+
{affiliation !== undefined && <span data-article-affiliation="">{affiliation}</span>}
|
|
162
|
+
</figcaption>
|
|
163
|
+
</figure>
|
|
164
|
+
)
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
export namespace Quote {
|
|
168
|
+
export type Props = ComponentPropsWithRef<'figure'> & {
|
|
169
|
+
/** The author's role and company, such as Co-founder and CPO, ARQ, at 56% black. */
|
|
170
|
+
affiliation?: ReactNode | undefined
|
|
171
|
+
/** The person quoted, such as Zach Garman. */
|
|
172
|
+
author: ReactNode
|
|
173
|
+
/**
|
|
174
|
+
* Draws opening and closing quotation marks around the words, outside the accessible text.
|
|
175
|
+
*
|
|
176
|
+
* @default false
|
|
177
|
+
*/
|
|
178
|
+
marks?: boolean | undefined
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* A term and its description as one row under a hairline: stacked below 1024px, and side by
|
|
184
|
+
* side from it, the description in secondary text until then. It renders a `<p>`, or an `<li>`
|
|
185
|
+
* inside `ArticleBody.Rows`.
|
|
186
|
+
*/
|
|
187
|
+
export function Row(props: Row.Props) {
|
|
188
|
+
const { children, term, ...attributes } = props
|
|
189
|
+
const listed = useContext(RowsContext)
|
|
190
|
+
|
|
191
|
+
return createElement(
|
|
192
|
+
listed ? 'li' : 'p',
|
|
193
|
+
{ ...attributes, 'data-article-row': '' },
|
|
194
|
+
<span data-article-term="">{term}</span>,
|
|
195
|
+
<span data-article-description="">{children}</span>,
|
|
196
|
+
)
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
export namespace Row {
|
|
200
|
+
export type Props = HTMLAttributes<HTMLElement> & {
|
|
201
|
+
/** The row's element, a `<p>` or an `<li>`. */
|
|
202
|
+
ref?: Ref<HTMLElement> | undefined
|
|
203
|
+
/** The term, in the first column. Its link keeps the term's color. */
|
|
204
|
+
term: ReactNode
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/** Two or more `ArticleBody.Row`s as one block, in a `<ul>` without markers. */
|
|
209
|
+
export function Rows(props: Rows.Props) {
|
|
210
|
+
return (
|
|
211
|
+
<RowsContext.Provider value>
|
|
212
|
+
<ul data-article-rows="" {...props} />
|
|
213
|
+
</RowsContext.Provider>
|
|
214
|
+
)
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export namespace Rows {
|
|
218
|
+
export type Props = ComponentPropsWithRef<'ul'>
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/**
|
|
222
|
+
* A table that scrolls sideways inside the column, at least 600px wide, with hairlines over its
|
|
223
|
+
* rows. The scroller is a focusable group, named Scrollable table, so the arrow keys move a wide
|
|
224
|
+
* table. Where scroll timelines exist, its cut-off edges fade.
|
|
225
|
+
*/
|
|
226
|
+
export function Table(props: Table.Props) {
|
|
227
|
+
const { label = 'Scrollable table', ...attributes } = props
|
|
228
|
+
|
|
229
|
+
return (
|
|
230
|
+
// oxlint-disable-next-line jsx-a11y/prefer-tag-over-role, jsx-a11y/no-noninteractive-tabindex
|
|
231
|
+
<div aria-label={label} data-article-table="" role="group" tabIndex={0}>
|
|
232
|
+
<table {...attributes} />
|
|
233
|
+
</div>
|
|
234
|
+
)
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export namespace Table {
|
|
238
|
+
export type Props = ComponentPropsWithRef<'table'> & {
|
|
239
|
+
/**
|
|
240
|
+
* The name of the scroller's group.
|
|
241
|
+
*
|
|
242
|
+
* @default 'Scrollable table'
|
|
243
|
+
*/
|
|
244
|
+
label?: string | undefined
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
const RowsContext = createContext(false)
|
|
250
|
+
|
|
251
|
+
// The edge fade: the scroll position sets how much of each edge fades, so a table that fits, which
|
|
252
|
+
// has no scroll range, fades neither edge.
|
|
253
|
+
property(
|
|
254
|
+
{ inherits: false, initialValue: '0px', name: '--tds-article-fade-end', syntax: '<length>' },
|
|
255
|
+
{ id: 'tds/marketing/article-body/fade-end' },
|
|
256
|
+
)
|
|
257
|
+
|
|
258
|
+
property(
|
|
259
|
+
{ inherits: false, initialValue: '0px', name: '--tds-article-fade-start', syntax: '<length>' },
|
|
260
|
+
{ id: 'tds/marketing/article-body/fade-start' },
|
|
261
|
+
)
|
|
262
|
+
|
|
263
|
+
const fade = keyframes(
|
|
264
|
+
{
|
|
265
|
+
'0%': { '--tds-article-fade-end': '48px', '--tds-article-fade-start': '0px' },
|
|
266
|
+
'20%': { '--tds-article-fade-start': '48px' },
|
|
267
|
+
'80%': { '--tds-article-fade-end': '48px' },
|
|
268
|
+
'100%': { '--tds-article-fade-end': '0px', '--tds-article-fade-start': '48px' },
|
|
269
|
+
},
|
|
270
|
+
{ id: 'tds/marketing/article-body/fade' },
|
|
271
|
+
)
|
|
272
|
+
|
|
273
|
+
namespace styles {
|
|
274
|
+
// Every block rule sits under the root. Text rules reach only the blocks named in their `:where()`
|
|
275
|
+
// lists, so an embedded part keeps its own type, and the spacing rules are flattened with
|
|
276
|
+
// `:where()`, so their order decides. The order of the rules is intentional.
|
|
277
|
+
export const root = variants(
|
|
278
|
+
{
|
|
279
|
+
base: { inlineSize: '100% !custom', minInlineSize: '0' },
|
|
280
|
+
compoundVariants: [
|
|
281
|
+
// On the reading column: the article grid's columns 4 to 9, 600px wide and centered in them,
|
|
282
|
+
// beside a rail on 1 to 3.
|
|
283
|
+
{
|
|
284
|
+
when: { place: 'reading', variant: 'article' },
|
|
285
|
+
style: {
|
|
286
|
+
'@media >=1024': {
|
|
287
|
+
gridColumn: '4 / span 6 !custom',
|
|
288
|
+
gridRow: '1 / span 2 !custom',
|
|
289
|
+
justifySelf: 'center',
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
],
|
|
294
|
+
defaultVariants: { place: 'reading', variant: 'article' },
|
|
295
|
+
variants: {
|
|
296
|
+
/**
|
|
297
|
+
* Where an article's text sits: `reading` on the article grid's reading column from 1024px
|
|
298
|
+
* (columns 4 to 9, 600px wide and centered, beside an `ArticleRail`), or `start`, at the start
|
|
299
|
+
* of its box, as a customer story's text beside its company facts. A legal page's text
|
|
300
|
+
* centers itself.
|
|
301
|
+
*
|
|
302
|
+
* @default 'reading'
|
|
303
|
+
*/
|
|
304
|
+
place: { reading: {}, start: {} },
|
|
305
|
+
/**
|
|
306
|
+
* The kind of text: `article` for a blog post, Learn guide or customer story, or `legal`
|
|
307
|
+
* for a legal page, such as the privacy policy.
|
|
308
|
+
*
|
|
309
|
+
* @default 'article'
|
|
310
|
+
*/
|
|
311
|
+
variant: {
|
|
312
|
+
// Prose in Body Prose (Body B1 to 1024px, then 17/24px), in black, up to 600px wide. Each
|
|
313
|
+
// block asks for space above and below, and neighboring margins collapse to the larger
|
|
314
|
+
// ask: paragraphs and list items take the B1 paragraph spacing, text blocks (lists, tables
|
|
315
|
+
// and rows) 24px, and feature blocks (media, quotes, the callout and embeds) 32px.
|
|
316
|
+
article: {
|
|
317
|
+
'--space-feature': vars.spacing['32'],
|
|
318
|
+
'--space-heading': vars.spacing.section.sm,
|
|
319
|
+
'--space-paragraph': vars.spacing.paragraph.body.b1,
|
|
320
|
+
'--space-subheading': vars.spacing['32'],
|
|
321
|
+
'--space-text': vars.spacing['24'],
|
|
322
|
+
'--space-under-heading': vars.spacing['16'],
|
|
323
|
+
containerType: 'inline-size',
|
|
324
|
+
maxInlineSize: '600',
|
|
325
|
+
selectors: {
|
|
326
|
+
// Type. The text blocks only, so an embedded part keeps its own type and ink.
|
|
327
|
+
'& > :where(p, ul, ol, blockquote, figure, details, .footnotes, [data-article-table], [data-article-label])':
|
|
328
|
+
{ color: 'content.primary', typography: 'body.prose' },
|
|
329
|
+
'& > :where(h2, h3, h4, h5, h6, [data-article-label])': {
|
|
330
|
+
color: 'content.primary',
|
|
331
|
+
textWrap: 'balance',
|
|
332
|
+
typography: 'heading.subhead',
|
|
333
|
+
},
|
|
334
|
+
// H3 and below take Heading H4, a step under H2 from 1024px, so the levels read apart.
|
|
335
|
+
'& > :where(h3, h4, h5, h6)': { typography: 'heading.h4' },
|
|
336
|
+
// No italic or bold in the text: Marketing sets every Pilat word in Book, so strong and
|
|
337
|
+
// emphasis keep the body's style.
|
|
338
|
+
'& > :where(p, ul, ol, blockquote, figure, details, .footnotes, [data-article-table], h2, h3, h4, h5, h6) :where(strong, b, em, i)':
|
|
339
|
+
{ fontStyle: 'normal', fontWeight: 'inherit !custom' },
|
|
340
|
+
'& > p[data-disclosure]': { fontStyle: 'italic', typography: 'body.b2' },
|
|
341
|
+
// Inline code reads as text.
|
|
342
|
+
'& > :where(p, ul, ol, blockquote, figure) code': {
|
|
343
|
+
font: 'inherit !custom',
|
|
344
|
+
letterSpacing: 'inherit !custom',
|
|
345
|
+
},
|
|
346
|
+
'& sup': { typography: 'body.b3', verticalAlign: 'super' },
|
|
347
|
+
// A link in a sentence takes the text's black and an underline. A press dims it to the
|
|
348
|
+
// surfaces' press, and keyboard focus rings it.
|
|
349
|
+
'& a:not([class])': {
|
|
350
|
+
color: 'content.primary',
|
|
351
|
+
outlineColor: 'currentColor !custom',
|
|
352
|
+
outlineOffset: 'ringInline',
|
|
353
|
+
outlineStyle: 'none',
|
|
354
|
+
outlineWidth: 'ring',
|
|
355
|
+
textDecorationLine: 'underline',
|
|
356
|
+
textUnderlineOffset: '3px !custom',
|
|
357
|
+
transitionDuration: 'hoverOut',
|
|
358
|
+
transitionProperty: 'color, opacity !custom',
|
|
359
|
+
transitionTimingFunction: 'standard',
|
|
360
|
+
},
|
|
361
|
+
'& a:not([class]):active': { opacity: 'pressSurface', transitionDuration: 'press' },
|
|
362
|
+
'& a:not([class]):focus-visible': { outlineStyle: 'solid' },
|
|
363
|
+
// The summary callout: the text's first paragraph, set in emphasis in the source.
|
|
364
|
+
'& > p:first-of-type:is([data-lede], :has(> em:first-child))': {
|
|
365
|
+
backgroundColor: 'container.surface',
|
|
366
|
+
borderRadius: 'sm',
|
|
367
|
+
padding: '32',
|
|
368
|
+
},
|
|
369
|
+
// Term rows.
|
|
370
|
+
'& [data-article-rows]': { listStyle: 'none !custom', padding: '0' },
|
|
371
|
+
'& [data-article-row]': {
|
|
372
|
+
borderBlockStartColor: 'line.secondary',
|
|
373
|
+
borderBlockStartStyle: 'solid',
|
|
374
|
+
borderBlockStartWidth: 'regular',
|
|
375
|
+
display: 'grid',
|
|
376
|
+
gridTemplateColumns: 'minmax(0, 1fr) !custom',
|
|
377
|
+
paddingBlock: '16',
|
|
378
|
+
rowGap: '4',
|
|
379
|
+
},
|
|
380
|
+
'& [data-article-row] > [data-article-description]': { color: 'content.secondary' },
|
|
381
|
+
// Rows right after media or a quote start without a line or inset: the block's own
|
|
382
|
+
// edge separates them. So do rows after the questions, whose closing hairline is right
|
|
383
|
+
// above them.
|
|
384
|
+
'& > :where([data-article-media], [data-article-quote], blockquote) + [data-article-row], & > :where([data-article-media], [data-article-quote], blockquote) + [data-article-rows] > [data-article-row]:first-child':
|
|
385
|
+
{ borderBlockStartWidth: 'none', paddingBlockStart: '0' },
|
|
386
|
+
'& > :where(details, [data-faq-section]) + [data-article-row], & > :where(details, [data-faq-section]) + hr + [data-article-row]':
|
|
387
|
+
{ borderBlockStartWidth: 'none', paddingBlockStart: '0' },
|
|
388
|
+
// A linked term keeps the term's color, and the underline marks the link.
|
|
389
|
+
'& [data-article-term] a:not([class])': { color: 'currentColor !custom' },
|
|
390
|
+
// Quote: a 2px rule at 40% black down the quote's height, the words 32px from it and
|
|
391
|
+
// the credit 24px below them.
|
|
392
|
+
'& > blockquote, & [data-article-quote]': {
|
|
393
|
+
backgroundImage: `linear-gradient(${vars.color.content.tertiary}, ${vars.color.content.tertiary}) !custom`,
|
|
394
|
+
backgroundPosition: 'left !custom',
|
|
395
|
+
backgroundRepeat: 'no-repeat',
|
|
396
|
+
backgroundSize: '2px 100% !custom',
|
|
397
|
+
display: 'flex',
|
|
398
|
+
flexDirection: 'column',
|
|
399
|
+
gap: 'var(--space-text) !custom',
|
|
400
|
+
marginInline: '0',
|
|
401
|
+
paddingInlineStart: '34px !custom',
|
|
402
|
+
},
|
|
403
|
+
'& [data-article-quote] > blockquote': {
|
|
404
|
+
display: 'flex',
|
|
405
|
+
flexDirection: 'column',
|
|
406
|
+
gap: 'var(--space-text) !custom',
|
|
407
|
+
margin: '0',
|
|
408
|
+
quotes: 'auto !custom',
|
|
409
|
+
},
|
|
410
|
+
'& > blockquote > *, & [data-article-quote] > blockquote > *': { margin: '0' },
|
|
411
|
+
'& [data-article-quote][data-marks] > blockquote > p:first-child::before': {
|
|
412
|
+
content: 'open-quote / "" !custom',
|
|
413
|
+
},
|
|
414
|
+
'& [data-article-quote][data-marks] > blockquote > p:last-child::after': {
|
|
415
|
+
content: 'close-quote / "" !custom',
|
|
416
|
+
},
|
|
417
|
+
'& [data-article-attribution]': { display: 'flex', flexDirection: 'column' },
|
|
418
|
+
'& [data-article-affiliation]': { color: 'content.secondary' },
|
|
419
|
+
':dir(rtl) & > blockquote, :dir(rtl) & [data-article-quote]': {
|
|
420
|
+
backgroundPosition: 'right !custom',
|
|
421
|
+
},
|
|
422
|
+
// Table. Wide tables scroll inside the column. Scrolled to, the scroller stops clear
|
|
423
|
+
// of the fixed navigation. Focused, it shows its whole width, so the fade does not
|
|
424
|
+
// hide its ring, and the ring stands off the text, which runs to the table's edges.
|
|
425
|
+
'& [data-article-table]': {
|
|
426
|
+
outlineColor: 'content.primary',
|
|
427
|
+
outlineOffset: '8px !custom',
|
|
428
|
+
outlineStyle: 'none',
|
|
429
|
+
outlineWidth: 'ring',
|
|
430
|
+
overflowX: 'auto',
|
|
431
|
+
scrollMarginBlockStart: 'section.lg',
|
|
432
|
+
},
|
|
433
|
+
'& [data-article-table]:focus-visible': {
|
|
434
|
+
maskImage: 'none !custom',
|
|
435
|
+
outlineStyle: 'solid',
|
|
436
|
+
},
|
|
437
|
+
// At least the column's full measure, so a narrow column scrolls rather than
|
|
438
|
+
// crushing the cells.
|
|
439
|
+
'& [data-article-table] table': {
|
|
440
|
+
borderCollapse: 'collapse',
|
|
441
|
+
inlineSize: '100% !custom',
|
|
442
|
+
minInlineSize: '600',
|
|
443
|
+
tableLayout: 'fixed',
|
|
444
|
+
},
|
|
445
|
+
'& [data-article-table] :is(th, td)': {
|
|
446
|
+
borderBlockEndWidth: 'none',
|
|
447
|
+
borderBlockStartColor: 'line.secondary',
|
|
448
|
+
borderBlockStartStyle: 'solid',
|
|
449
|
+
borderBlockStartWidth: 'regular',
|
|
450
|
+
borderInlineWidth: 'none',
|
|
451
|
+
font: 'inherit !custom',
|
|
452
|
+
overflowWrap: 'break-word',
|
|
453
|
+
paddingBlock: '16',
|
|
454
|
+
paddingInlineEnd: '16',
|
|
455
|
+
paddingInlineStart: '0',
|
|
456
|
+
textAlign: 'start',
|
|
457
|
+
verticalAlign: 'top',
|
|
458
|
+
},
|
|
459
|
+
'& [data-article-table] :is(th, td):last-child': { paddingInlineEnd: '0' },
|
|
460
|
+
// Header labels take the text's color and weight.
|
|
461
|
+
'& [data-article-table] th': {
|
|
462
|
+
color: 'inherit !custom',
|
|
463
|
+
fontWeight: 'inherit !custom',
|
|
464
|
+
},
|
|
465
|
+
// A labelled header row needs no line above it.
|
|
466
|
+
'& [data-article-table] thead :is(th, td)': { borderBlockStartWidth: 'none' },
|
|
467
|
+
'& [data-article-table] caption': {
|
|
468
|
+
captionSide: 'bottom',
|
|
469
|
+
color: 'content.secondary',
|
|
470
|
+
paddingBlockStart: '16',
|
|
471
|
+
textAlign: 'start',
|
|
472
|
+
typography: 'body.b2',
|
|
473
|
+
},
|
|
474
|
+
// Media spans the column with the 16px corner, and a caption sits 12px under it in
|
|
475
|
+
// Body B2 at 56% black.
|
|
476
|
+
'& > video, & [data-article-media] img, & [data-article-media] video, & > img': {
|
|
477
|
+
blockSize: 'auto !custom',
|
|
478
|
+
borderRadius: 'sm',
|
|
479
|
+
display: 'block',
|
|
480
|
+
inlineSize: '100% !custom',
|
|
481
|
+
},
|
|
482
|
+
'& > figure:not([data-article-quote]) > figcaption': {
|
|
483
|
+
color: 'content.secondary',
|
|
484
|
+
marginBlockStart: '12',
|
|
485
|
+
typography: 'body.b2',
|
|
486
|
+
},
|
|
487
|
+
'& > figure': { marginInline: '0' },
|
|
488
|
+
// A rule before a closing note or row goes. The next block's space or line separates.
|
|
489
|
+
'& > hr': { display: 'none' },
|
|
490
|
+
// Code blocks: mono at the B2 size, which reads as large as the text, in a grey box at
|
|
491
|
+
// the 16px corner. Long lines scroll inside it.
|
|
492
|
+
'& pre': {
|
|
493
|
+
backgroundColor: 'container.surface',
|
|
494
|
+
borderRadius: 'sm',
|
|
495
|
+
color: 'content.prose',
|
|
496
|
+
fontFamily: 'mono',
|
|
497
|
+
fontSize: 'body.b2',
|
|
498
|
+
fontWeight: 'regular',
|
|
499
|
+
lineHeight: 'body.b2',
|
|
500
|
+
overflowX: 'auto',
|
|
501
|
+
padding: '24',
|
|
502
|
+
},
|
|
503
|
+
'& pre code': { font: 'inherit !custom', letterSpacing: 'inherit !custom' },
|
|
504
|
+
// Lists. Items step like paragraphs. A 4px dot at 40% black centers on the first
|
|
505
|
+
// line, or the number at 56%, 24px in from the text. Lists in items and in questions
|
|
506
|
+
// take them too, and term rows and next steps do not.
|
|
507
|
+
'& > :where(ul, ol):not([data-article-rows], [data-article-steps]), & > details > :where(ul, ol), & li > :where(ul, ol)':
|
|
508
|
+
{ counterReset: 'body-list !custom', listStyle: 'none !custom', padding: '0' },
|
|
509
|
+
'& > :where(ul, ol):not([data-article-rows], [data-article-steps]) > li, & > details > :where(ul, ol) > li, & li > :where(ul, ol) > li':
|
|
510
|
+
{
|
|
511
|
+
counterIncrement: 'body-list !custom',
|
|
512
|
+
paddingInlineStart: '24',
|
|
513
|
+
position: 'relative',
|
|
514
|
+
},
|
|
515
|
+
'& > :where(ul, ol):not([data-article-rows], [data-article-steps]) > li + li, & > details > :where(ul, ol) > li + li, & li > :where(ul, ol) > li + li':
|
|
516
|
+
{ marginBlockStart: 'var(--space-paragraph) !custom' },
|
|
517
|
+
'& li > :where(ul, ol)': { marginBlockStart: '8' },
|
|
518
|
+
'& li > p': { margin: '0' },
|
|
519
|
+
'& li > p + p': { marginBlockStart: '8' },
|
|
520
|
+
'& > ul:not([data-article-rows], [data-article-steps]) > li::before, & > details > ul > li::before, & li > ul > li::before':
|
|
521
|
+
{
|
|
522
|
+
backgroundColor: 'content.tertiary',
|
|
523
|
+
blockSize: '4',
|
|
524
|
+
borderRadius: 'full',
|
|
525
|
+
content: '"" !custom',
|
|
526
|
+
cornerShape: 'round',
|
|
527
|
+
inlineSize: '4',
|
|
528
|
+
insetBlockStart: 'calc(0.5lh - 2px) !custom',
|
|
529
|
+
insetInlineStart: '8',
|
|
530
|
+
position: 'absolute',
|
|
531
|
+
},
|
|
532
|
+
'& > ol > li::before, & > details > ol > li::before, & li > ol > li::before': {
|
|
533
|
+
color: 'content.secondary',
|
|
534
|
+
content: 'counter(body-list) "." !custom',
|
|
535
|
+
insetInlineStart: '0',
|
|
536
|
+
position: 'absolute',
|
|
537
|
+
},
|
|
538
|
+
// An embedded demo with no type of its own takes the text's size in black.
|
|
539
|
+
'& > section[aria-label]': { color: 'content.primary', typography: 'body.prose' },
|
|
540
|
+
'& > section[aria-label] > :where(h2, h3)': {
|
|
541
|
+
marginBlockEnd: 'var(--space-under-heading) !custom',
|
|
542
|
+
marginBlockStart: 'var(--space-feature) !custom',
|
|
543
|
+
typography: 'heading.subhead',
|
|
544
|
+
},
|
|
545
|
+
'& > section[aria-label] > :where(:first-child)': { marginBlockStart: '0' },
|
|
546
|
+
// Next steps: rows whose heading reads as a term.
|
|
547
|
+
'& > [data-article-steps]': { listStyle: 'none !custom', padding: '0' },
|
|
548
|
+
'& [data-article-steps] [data-article-term]': {
|
|
549
|
+
color: 'inherit !custom',
|
|
550
|
+
font: 'inherit !custom',
|
|
551
|
+
letterSpacing: 'inherit !custom',
|
|
552
|
+
margin: '0',
|
|
553
|
+
},
|
|
554
|
+
'& [data-article-steps] [data-article-description]': {
|
|
555
|
+
alignItems: 'flex-start',
|
|
556
|
+
display: 'flex',
|
|
557
|
+
flexDirection: 'column',
|
|
558
|
+
gap: '16',
|
|
559
|
+
},
|
|
560
|
+
'& [data-article-steps] [data-article-description] > p': { margin: '0' },
|
|
561
|
+
// Questions read as the site's question rows, whichever way the text writes them (a
|
|
562
|
+
// `<details>`, or a heading over its answers): a hairline over each, the question in
|
|
563
|
+
// Body B1 black and its answer in Body B2 at 56% black under it. The row's space sits
|
|
564
|
+
// on its question, so the whole row opens it.
|
|
565
|
+
'& details': {
|
|
566
|
+
borderBlockStartColor: 'line.secondary',
|
|
567
|
+
borderBlockStartStyle: 'solid',
|
|
568
|
+
borderBlockStartWidth: 'regular',
|
|
569
|
+
},
|
|
570
|
+
'& details[open]': { paddingBlockEnd: '24' },
|
|
571
|
+
'& details > summary, & > [data-faq-question]': {
|
|
572
|
+
color: 'content.primary',
|
|
573
|
+
textWrap: 'balance',
|
|
574
|
+
typography: 'body.b1',
|
|
575
|
+
},
|
|
576
|
+
'& details > summary': {
|
|
577
|
+
alignItems: 'start',
|
|
578
|
+
cursor: 'pointer',
|
|
579
|
+
display: 'grid',
|
|
580
|
+
gap: '24',
|
|
581
|
+
gridTemplateColumns: 'minmax(0, 1fr) 22px !custom',
|
|
582
|
+
listStyle: 'none !custom',
|
|
583
|
+
outlineColor: 'content.primary',
|
|
584
|
+
outlineOffset: 'ringInline',
|
|
585
|
+
outlineStyle: 'none',
|
|
586
|
+
outlineWidth: 'ring',
|
|
587
|
+
paddingBlock: '24',
|
|
588
|
+
},
|
|
589
|
+
'& details > summary:focus-visible': { outlineStyle: 'solid' },
|
|
590
|
+
'& details[open] > summary': { paddingBlockEnd: '0' },
|
|
591
|
+
'& details > summary::-webkit-details-marker': { display: 'none' },
|
|
592
|
+
// The Plus and Minus glyphs in the text color, in a box one B1 line (22px) tall.
|
|
593
|
+
'& details > summary::after': {
|
|
594
|
+
backgroundColor: 'currentColor !custom',
|
|
595
|
+
blockSize: '22px !custom',
|
|
596
|
+
content: '"" !custom',
|
|
597
|
+
inlineSize: '22px !custom',
|
|
598
|
+
maskImage:
|
|
599
|
+
"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M8.5 7.5H13V8.5H8.5V13H7.5V8.5H3V7.5H7.5V3H8.5V7.5Z'/%3E%3C/svg%3E\") !custom",
|
|
600
|
+
maskPosition: 'center !custom',
|
|
601
|
+
maskRepeat: 'no-repeat !custom',
|
|
602
|
+
maskSize: '16px !custom',
|
|
603
|
+
},
|
|
604
|
+
'& details[open] > summary::after': {
|
|
605
|
+
maskImage:
|
|
606
|
+
"url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M13 8.5H3V7.5H13V8.5Z'/%3E%3C/svg%3E\") !custom",
|
|
607
|
+
},
|
|
608
|
+
// An answer keeps clear of the glyph: its box and the gap before it.
|
|
609
|
+
'& details > :not(summary), & > [data-faq-answer]': {
|
|
610
|
+
color: 'content.secondary',
|
|
611
|
+
margin: '0',
|
|
612
|
+
typography: 'body.b2',
|
|
613
|
+
},
|
|
614
|
+
'& details > :not(summary)': {
|
|
615
|
+
paddingBlockStart: 'textPair.b1B2',
|
|
616
|
+
paddingInlineEnd: '46px !custom',
|
|
617
|
+
},
|
|
618
|
+
'& details > :not(summary) + :not(summary)': { paddingBlockStart: 'textPair.b2B2' },
|
|
619
|
+
'& > :where(details):last-of-type, & > [data-faq-section] > details:last-of-type': {
|
|
620
|
+
borderBlockEndColor: 'line.secondary',
|
|
621
|
+
borderBlockEndStyle: 'solid',
|
|
622
|
+
borderBlockEndWidth: 'regular',
|
|
623
|
+
},
|
|
624
|
+
// A question written as a heading takes its row's hairline and inset, with its
|
|
625
|
+
// answers under it.
|
|
626
|
+
'& > [data-faq-question]': {
|
|
627
|
+
borderBlockStartColor: 'line.secondary',
|
|
628
|
+
borderBlockStartStyle: 'solid',
|
|
629
|
+
borderBlockStartWidth: 'regular',
|
|
630
|
+
margin: '0',
|
|
631
|
+
paddingBlockStart: '24',
|
|
632
|
+
},
|
|
633
|
+
'& > [data-faq-question] + [data-faq-answer]': { marginBlockStart: 'textPair.b1B2' },
|
|
634
|
+
'& > [data-faq-answer] + [data-faq-answer]': { marginBlockStart: 'textPair.b2B2' },
|
|
635
|
+
'& > [data-faq-answer]:has(+ [data-faq-question])': { marginBlockEnd: '24' },
|
|
636
|
+
// A guide's questions under their own heading.
|
|
637
|
+
'& > [data-faq-section] > h2': {
|
|
638
|
+
color: 'content.primary',
|
|
639
|
+
marginBlockEnd: 'var(--space-under-heading) !custom',
|
|
640
|
+
marginBlockStart: '0',
|
|
641
|
+
marginInline: '0',
|
|
642
|
+
typography: 'heading.subhead',
|
|
643
|
+
},
|
|
644
|
+
// Sources (Markdown footnotes): a heading, then one line per numbered source.
|
|
645
|
+
'& > .footnotes > h2': {
|
|
646
|
+
color: 'content.primary',
|
|
647
|
+
marginBlockEnd: 'var(--space-under-heading) !custom',
|
|
648
|
+
marginBlockStart: '0',
|
|
649
|
+
marginInline: '0',
|
|
650
|
+
typography: 'heading.subhead',
|
|
651
|
+
},
|
|
652
|
+
'& > .footnotes ol': {
|
|
653
|
+
listStyle: 'decimal !custom',
|
|
654
|
+
margin: '0',
|
|
655
|
+
paddingInlineStart: '24',
|
|
656
|
+
},
|
|
657
|
+
'& > .footnotes li + li': { marginBlockStart: '8' },
|
|
658
|
+
'& > .footnotes p': { margin: '0' },
|
|
659
|
+
// Spacing between blocks. Feature blocks: quotes, media, the callout and embeds.
|
|
660
|
+
'& > :where(*)': { marginBlock: 'var(--space-feature) !custom' },
|
|
661
|
+
'& > :where(p)': { marginBlock: 'var(--space-paragraph) !custom' },
|
|
662
|
+
// Text blocks read with the text: lists, tables and term rows.
|
|
663
|
+
'& > :where(ul, ol, [data-article-table], [data-article-row], [data-article-rows], [data-article-steps])':
|
|
664
|
+
{ marginBlock: 'var(--space-text) !custom' },
|
|
665
|
+
'& > :where(p:first-of-type:is([data-lede], :has(> em:first-child)), [data-article-media])':
|
|
666
|
+
{ marginBlock: 'var(--space-feature) !custom' },
|
|
667
|
+
'& > :where(h2, h3, h4, h5, h6, [data-article-label], [data-faq-section], .footnotes)':
|
|
668
|
+
{
|
|
669
|
+
marginBlockEnd: 'var(--space-under-heading) !custom',
|
|
670
|
+
marginBlockStart: 'var(--space-heading) !custom',
|
|
671
|
+
},
|
|
672
|
+
// The same headings as the type rule above, listed in another order to keep a key of
|
|
673
|
+
// their own.
|
|
674
|
+
'& > :where(h4, h5, h6, h3)': { marginBlockStart: 'var(--space-subheading) !custom' },
|
|
675
|
+
'& > :where([data-faq-section], .footnotes)': { marginBlockEnd: '0' },
|
|
676
|
+
// Consecutive rows read as one block: no gap, hairlines between them.
|
|
677
|
+
'& > :where([data-article-row] + [data-article-row], details + details)': {
|
|
678
|
+
marginBlockStart: '0',
|
|
679
|
+
},
|
|
680
|
+
'& > :where([data-article-row]:has(+ [data-article-row]), details:has(+ details))': {
|
|
681
|
+
marginBlockEnd: '0',
|
|
682
|
+
},
|
|
683
|
+
'& > :where(h2, h3, h4, h5, h6, [data-article-label]) + :where(*)': {
|
|
684
|
+
marginBlockStart: '0',
|
|
685
|
+
},
|
|
686
|
+
'& > :where(:first-child)': { marginBlockStart: '0' },
|
|
687
|
+
'& > :where(:last-child)': { marginBlockEnd: '0' },
|
|
688
|
+
},
|
|
689
|
+
// Rows set the term and its description side by side, the description in the text's
|
|
690
|
+
// color, and the gaps under headings widen.
|
|
691
|
+
'@media >=1024': {
|
|
692
|
+
'--space-subheading': vars.spacing['40'],
|
|
693
|
+
'--space-under-heading': vars.spacing['24'],
|
|
694
|
+
selectors: {
|
|
695
|
+
'& [data-article-row]': {
|
|
696
|
+
columnGap: '16',
|
|
697
|
+
gridTemplateColumns: 'minmax(0, 281fr) minmax(0, 477fr) !custom',
|
|
698
|
+
},
|
|
699
|
+
'& [data-article-row] > [data-article-description]': { color: 'inherit !custom' },
|
|
700
|
+
},
|
|
701
|
+
},
|
|
702
|
+
// Only where scroll timelines exist: elsewhere the animation would stop at its last
|
|
703
|
+
// frame and fade the start edge of every table.
|
|
704
|
+
'@supports (animation-timeline: scroll())': {
|
|
705
|
+
selectors: {
|
|
706
|
+
'& [data-article-table]': {
|
|
707
|
+
animationFillMode: 'both',
|
|
708
|
+
animationName: `${fade} !custom`,
|
|
709
|
+
animationTimeline: 'scroll(self inline) !custom',
|
|
710
|
+
animationTimingFunction: 'linear !custom',
|
|
711
|
+
maskImage:
|
|
712
|
+
'linear-gradient(to right, transparent, black var(--tds-article-fade-start), black calc(100% - var(--tds-article-fade-end)), transparent) !custom',
|
|
713
|
+
},
|
|
714
|
+
'& [data-article-table]:focus-visible': { maskImage: 'none !custom' },
|
|
715
|
+
},
|
|
716
|
+
},
|
|
717
|
+
},
|
|
718
|
+
// A legal document in one readable 720px column, centered: an H1 title over the "Last
|
|
719
|
+
// updated" eyebrow, H2 sections and H4 subsections, Body B1 in secondary text with terms
|
|
720
|
+
// in black, and underlined links in the link color.
|
|
721
|
+
legal: {
|
|
722
|
+
color: 'content.secondary',
|
|
723
|
+
marginInline: 'auto !custom',
|
|
724
|
+
maxInlineSize: '720',
|
|
725
|
+
overflowWrap: 'break-word',
|
|
726
|
+
typography: 'body.b1',
|
|
727
|
+
selectors: {
|
|
728
|
+
'& :is(h1, h2, h3, p, ul)': { margin: '0' },
|
|
729
|
+
'& :is(h1, h2, h3, strong)': { color: 'content.primary' },
|
|
730
|
+
'& :is(h1, h2, h3)': { textWrap: 'balance' },
|
|
731
|
+
'& h1': { typography: 'heading.h1' },
|
|
732
|
+
// The line under the title reads as its eyebrow.
|
|
733
|
+
'& h1 + p': {
|
|
734
|
+
color: 'content.secondary',
|
|
735
|
+
marginBlockStart: 'layoutGap.heading',
|
|
736
|
+
textTransform: 'uppercase',
|
|
737
|
+
typography: 'utility.eyebrow',
|
|
738
|
+
},
|
|
739
|
+
'& h1 + p + p': { marginBlockStart: 'section.sm' },
|
|
740
|
+
'& h2': {
|
|
741
|
+
marginBlockEnd: '24',
|
|
742
|
+
marginBlockStart: 'section.sm',
|
|
743
|
+
typography: 'heading.h2',
|
|
744
|
+
},
|
|
745
|
+
'& h3': { marginBlockEnd: '12', marginBlockStart: '40', typography: 'heading.h4' },
|
|
746
|
+
'& h2 + h3': { marginBlockStart: '32' },
|
|
747
|
+
'& p': { textWrap: 'pretty' },
|
|
748
|
+
'& p + p': { marginBlockStart: '16' },
|
|
749
|
+
'& ul': {
|
|
750
|
+
listStyle: 'disc !custom',
|
|
751
|
+
marginBlockEnd: '24',
|
|
752
|
+
marginBlockStart: '16',
|
|
753
|
+
paddingInlineStart: '24',
|
|
754
|
+
},
|
|
755
|
+
'& li::marker': { color: 'content.tertiary' },
|
|
756
|
+
'& li + li': { marginBlockStart: '12' },
|
|
757
|
+
'& strong': { fontWeight: 'book' },
|
|
758
|
+
'& a:not([class])': {
|
|
759
|
+
color: 'link.rest',
|
|
760
|
+
outlineColor: 'currentColor !custom',
|
|
761
|
+
outlineOffset: 'ringInline',
|
|
762
|
+
outlineStyle: 'none',
|
|
763
|
+
outlineWidth: 'ring',
|
|
764
|
+
textDecorationLine: 'underline',
|
|
765
|
+
textUnderlineOffset: '3px !custom',
|
|
766
|
+
transitionDuration: 'hoverOut',
|
|
767
|
+
transitionProperty: 'color, opacity !custom',
|
|
768
|
+
transitionTimingFunction: 'standard',
|
|
769
|
+
},
|
|
770
|
+
'& a:not([class]):active': { opacity: 'pressSurface', transitionDuration: 'press' },
|
|
771
|
+
'& a:not([class]):focus-visible': { outlineStyle: 'solid' },
|
|
772
|
+
},
|
|
773
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
774
|
+
selectors: {
|
|
775
|
+
'& a:not([class]):hover': { color: 'link.hover', transitionDuration: 'hoverIn' },
|
|
776
|
+
},
|
|
777
|
+
},
|
|
778
|
+
},
|
|
779
|
+
},
|
|
780
|
+
},
|
|
781
|
+
},
|
|
782
|
+
{ id: 'tds/marketing/article-body' },
|
|
783
|
+
)
|
|
784
|
+
}
|