@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,440 @@
|
|
|
1
|
+
/** Renders the site footer: the whole site map, the sign-up and the social and legal links on a black band. @module */
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render'
|
|
3
|
+
import { type ComponentPropsWithRef, type CSSProperties, type ReactNode, useId } from 'react'
|
|
4
|
+
import type * as zyzz from 'zyzz'
|
|
5
|
+
import { style, variants } from '../zyzz.config.js'
|
|
6
|
+
import { Mark } from './Mark.js'
|
|
7
|
+
import * as Links from './internal/Links.js'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Ends every page with the whole site map on a black band. Renders a `footer` that holds one `nav`
|
|
11
|
+
* named Footer navigation: the Tempo mark that links home, the sign-up, a section of links for each
|
|
12
|
+
* group named by its `h2`, then the social links, the legal links and the language picker.
|
|
13
|
+
*
|
|
14
|
+
* Groups fill lanes left to right: one column on a phone, two lanes from 768px, and four lanes from
|
|
15
|
+
* column 5 of the 12-column grid from 1280px. A group past the lane count stacks under the first
|
|
16
|
+
* lane's groups, the next under the second's, and so on. While the pointer or keyboard focus is on
|
|
17
|
+
* a link, the group headings recede, so the link stands out.
|
|
18
|
+
*
|
|
19
|
+
* - Pass the groups in reading order. Add a new product or solution page to its group's links.
|
|
20
|
+
* - Pass the sign-up form in `newsletter` and the language picker in `language`. The footer lays
|
|
21
|
+
* them out and never posts or routes.
|
|
22
|
+
* - Pass `linkRender` for a router link, such as `<NextLink href="" />`. Every link renders through
|
|
23
|
+
* it with its own `href`.
|
|
24
|
+
* - Use the site navigation for the way into the site's sections from the top, and a `Cta` for a
|
|
25
|
+
* page's own sign-up.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <Footer
|
|
29
|
+
* groups={[{ links: [{ href: '/earn', label: 'Earn' }], title: 'Products' }]}
|
|
30
|
+
* legal={[{ href: '/privacy-policy', label: 'Privacy policy' }]}
|
|
31
|
+
* socials={[{ href: 'https://x.com/tempo', label: 'X' }]}
|
|
32
|
+
* />
|
|
33
|
+
*
|
|
34
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/landmarks/examples/contentinfo.html | WAI-ARIA APG Contentinfo landmark}
|
|
35
|
+
* @see {@link https://www.w3.org/WAI/WCAG22/Understanding/multiple-ways.html | WCAG 2.2 Multiple Ways}
|
|
36
|
+
*/
|
|
37
|
+
export function Footer(props: Footer.Props) {
|
|
38
|
+
const {
|
|
39
|
+
className,
|
|
40
|
+
groups,
|
|
41
|
+
homeHref = '/',
|
|
42
|
+
homeLabel = 'Tempo home',
|
|
43
|
+
language,
|
|
44
|
+
legal = [],
|
|
45
|
+
linkRender,
|
|
46
|
+
navigationLabel = 'Footer navigation',
|
|
47
|
+
newsletter,
|
|
48
|
+
socials = [],
|
|
49
|
+
vars,
|
|
50
|
+
...attributes
|
|
51
|
+
} = props
|
|
52
|
+
|
|
53
|
+
const id = useId()
|
|
54
|
+
const levels = Math.ceil(groups.length / 4)
|
|
55
|
+
|
|
56
|
+
return (
|
|
57
|
+
<footer {...attributes} {...styles.root({ className, style: props.style, vars })}>
|
|
58
|
+
<div {...styles.panel()}>
|
|
59
|
+
<nav
|
|
60
|
+
aria-label={navigationLabel}
|
|
61
|
+
data-footer-map=""
|
|
62
|
+
{...styles.map({
|
|
63
|
+
// From 1280px the sign-up takes the row under the lanes, and the meta links the next.
|
|
64
|
+
style: {
|
|
65
|
+
'--footer-last-row': `${levels + 2}`,
|
|
66
|
+
'--footer-newsletter-row': `${levels + 1}`,
|
|
67
|
+
} as CSSProperties,
|
|
68
|
+
})}
|
|
69
|
+
>
|
|
70
|
+
<FooterLink aria-label={homeLabel} href={homeHref} kind="mark" render={linkRender}>
|
|
71
|
+
<Mark {...styles.markImage()} />
|
|
72
|
+
</FooterLink>
|
|
73
|
+
|
|
74
|
+
{newsletter && <div {...styles.newsletter()}>{newsletter}</div>}
|
|
75
|
+
|
|
76
|
+
{groups.map((group, index) => (
|
|
77
|
+
<section
|
|
78
|
+
aria-labelledby={`${id}-${index}`}
|
|
79
|
+
key={index}
|
|
80
|
+
{...styles.group({ style: placement(index, groups.length) })}
|
|
81
|
+
>
|
|
82
|
+
<h2 id={`${id}-${index}`} {...styles.heading()}>
|
|
83
|
+
{group.title}
|
|
84
|
+
</h2>
|
|
85
|
+
<ul {...styles.links()}>
|
|
86
|
+
{group.links.map((link) => (
|
|
87
|
+
<li key={link.href}>
|
|
88
|
+
<FooterLink href={link.href} kind="list" render={linkRender}>
|
|
89
|
+
{link.label}
|
|
90
|
+
</FooterLink>
|
|
91
|
+
</li>
|
|
92
|
+
))}
|
|
93
|
+
</ul>
|
|
94
|
+
</section>
|
|
95
|
+
))}
|
|
96
|
+
|
|
97
|
+
<div {...styles.meta()}>
|
|
98
|
+
{socials.length > 0 && (
|
|
99
|
+
<div {...styles.row()}>
|
|
100
|
+
{socials.map((link) => (
|
|
101
|
+
<FooterLink href={link.href} key={link.href} kind="inline" render={linkRender}>
|
|
102
|
+
{link.label}
|
|
103
|
+
</FooterLink>
|
|
104
|
+
))}
|
|
105
|
+
</div>
|
|
106
|
+
)}
|
|
107
|
+
{(legal.length > 0 || language) && (
|
|
108
|
+
<div {...styles.legal()}>
|
|
109
|
+
{legal.map((link) => (
|
|
110
|
+
<FooterLink href={link.href} key={link.href} kind="inline" render={linkRender}>
|
|
111
|
+
{link.label}
|
|
112
|
+
</FooterLink>
|
|
113
|
+
))}
|
|
114
|
+
{language}
|
|
115
|
+
</div>
|
|
116
|
+
)}
|
|
117
|
+
</div>
|
|
118
|
+
</nav>
|
|
119
|
+
</div>
|
|
120
|
+
</footer>
|
|
121
|
+
)
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export namespace Footer {
|
|
125
|
+
/** One group of the site map, such as Products, with its links. */
|
|
126
|
+
export type Group = {
|
|
127
|
+
/** The group's links, in reading order. */
|
|
128
|
+
links: readonly Link[]
|
|
129
|
+
/** The group's `h2`, which names its section. */
|
|
130
|
+
title: ReactNode
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/** One link of the footer. */
|
|
134
|
+
export type Link = {
|
|
135
|
+
/** Where the link goes. */
|
|
136
|
+
href: string
|
|
137
|
+
/** The link's text. */
|
|
138
|
+
label: ReactNode
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export type Props = Omit<ComponentPropsWithRef<'footer'>, 'children'> &
|
|
142
|
+
zyzz.Props.Variants<typeof styles.root> & {
|
|
143
|
+
/** The site map's groups, in reading order. */
|
|
144
|
+
groups: readonly Group[]
|
|
145
|
+
/**
|
|
146
|
+
* Where the mark links.
|
|
147
|
+
* @default '/'
|
|
148
|
+
*/
|
|
149
|
+
homeHref?: string | undefined
|
|
150
|
+
/**
|
|
151
|
+
* The name of the mark's link home.
|
|
152
|
+
* @default 'Tempo home'
|
|
153
|
+
*/
|
|
154
|
+
homeLabel?: string | undefined
|
|
155
|
+
/** The language picker, after the legal links, such as a menu of this page in each language. */
|
|
156
|
+
language?: ReactNode | undefined
|
|
157
|
+
/** The legal links, such as Privacy policy, before the language picker. */
|
|
158
|
+
legal?: readonly Link[] | undefined
|
|
159
|
+
/** An element every link renders as, such as a router link. Each link sets its own `href`. */
|
|
160
|
+
linkRender?: useRender.ComponentProps<'a'>['render'] | undefined
|
|
161
|
+
/**
|
|
162
|
+
* The name of the footer's navigation landmark.
|
|
163
|
+
* @default 'Footer navigation'
|
|
164
|
+
*/
|
|
165
|
+
navigationLabel?: string | undefined
|
|
166
|
+
/** The sign-up form, under the mark below 1280px and under the lanes from 1280px. */
|
|
167
|
+
newsletter?: ReactNode | undefined
|
|
168
|
+
/** The social links, such as LinkedIn and X, at the start of the last row. */
|
|
169
|
+
socials?: readonly Link[] | undefined
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/** One link of the footer, as an `a` or through the caller's router link. */
|
|
174
|
+
function FooterLink(props: FooterLink.Props) {
|
|
175
|
+
const { kind, render, ...attributes } = props
|
|
176
|
+
|
|
177
|
+
return useRender({
|
|
178
|
+
defaultTagName: 'a',
|
|
179
|
+
props: { ...attributes, ...styles.link({ kind }) },
|
|
180
|
+
render: Links.shared(render),
|
|
181
|
+
})
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
declare namespace FooterLink {
|
|
185
|
+
type Props = ComponentPropsWithRef<'a'> &
|
|
186
|
+
Pick<zyzz.Props.Variants<typeof styles.link>, 'kind'> & {
|
|
187
|
+
render?: useRender.ComponentProps<'a'>['render'] | undefined
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/**
|
|
192
|
+
* The lane and rows of the group at `index` of `count`, in `lanes` lanes from row `firstRow`. A
|
|
193
|
+
* group past the lane count stacks under its lane's groups at the same level as its neighbors, and
|
|
194
|
+
* each lane's last group spans the rows left, so a group holds a row open only for the group under
|
|
195
|
+
* it.
|
|
196
|
+
*/
|
|
197
|
+
function lane(index: number, count: number, lanes: number, firstRow: number) {
|
|
198
|
+
const level = Math.floor(index / lanes)
|
|
199
|
+
const levels = index + lanes >= count ? Math.ceil(count / lanes) - level : 1
|
|
200
|
+
|
|
201
|
+
return { column: index % lanes, row: `${firstRow + level} / span ${levels}` }
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
/**
|
|
205
|
+
* The custom properties that place the group at `index`: two lanes from 768px, under the mark and
|
|
206
|
+
* the sign-up, and four lanes of two columns each from column 5 from 1280px.
|
|
207
|
+
*/
|
|
208
|
+
function placement(index: number, count: number) {
|
|
209
|
+
const tablet = lane(index, count, 2, 3)
|
|
210
|
+
const desktop = lane(index, count, 4, 1)
|
|
211
|
+
|
|
212
|
+
return {
|
|
213
|
+
'--footer-desktop-column': `${5 + desktop.column * 2} / span 2`,
|
|
214
|
+
'--footer-desktop-row': desktop.row,
|
|
215
|
+
'--footer-tablet-column': `${tablet.column + 1}`,
|
|
216
|
+
'--footer-tablet-row': tablet.row,
|
|
217
|
+
} as CSSProperties
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
namespace styles {
|
|
221
|
+
export const root = variants(
|
|
222
|
+
{
|
|
223
|
+
base: {
|
|
224
|
+
boxSizing: 'border-box',
|
|
225
|
+
// Centers the 2560px footer on a wider window.
|
|
226
|
+
marginInline: 'auto !custom',
|
|
227
|
+
maxWidth: '2560',
|
|
228
|
+
typography: 'body.b2',
|
|
229
|
+
width: '100% !custom',
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
{ id: 'tds/marketing/footer' },
|
|
233
|
+
)
|
|
234
|
+
|
|
235
|
+
export const group = style(
|
|
236
|
+
{
|
|
237
|
+
alignSelf: 'start',
|
|
238
|
+
display: 'flex',
|
|
239
|
+
flexDirection: 'column',
|
|
240
|
+
gap: '16',
|
|
241
|
+
overflowWrap: 'anywhere',
|
|
242
|
+
'@media >=768': {
|
|
243
|
+
gridColumn: 'var(--footer-tablet-column) !custom',
|
|
244
|
+
gridRow: 'var(--footer-tablet-row) !custom',
|
|
245
|
+
},
|
|
246
|
+
'@media >=1280': {
|
|
247
|
+
gridColumn: 'var(--footer-desktop-column) !custom',
|
|
248
|
+
gridRow: 'var(--footer-desktop-row) !custom',
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
{ id: 'tds/marketing/footer/group' },
|
|
252
|
+
)
|
|
253
|
+
|
|
254
|
+
// The headings recede while the pointer or keyboard focus is on a link of the site map, or a menu
|
|
255
|
+
// in it is open: hover in as they dim, hover out as they return.
|
|
256
|
+
export const heading = style(
|
|
257
|
+
{
|
|
258
|
+
color: 'neutral.000',
|
|
259
|
+
margin: '0',
|
|
260
|
+
transitionDuration: 'hoverOut',
|
|
261
|
+
transitionProperty: 'color !custom',
|
|
262
|
+
transitionTimingFunction: 'standard',
|
|
263
|
+
typography: 'body.b2',
|
|
264
|
+
selectors: {
|
|
265
|
+
'[data-footer-map]:has(a:focus-visible, button:focus-visible, [data-popup-open]) &': {
|
|
266
|
+
color: 'inverse.content.secondary',
|
|
267
|
+
transitionDuration: 'hoverIn',
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
271
|
+
selectors: {
|
|
272
|
+
'[data-footer-map]:has(a:hover, button:hover) &': {
|
|
273
|
+
color: 'inverse.content.secondary',
|
|
274
|
+
transitionDuration: 'hoverIn',
|
|
275
|
+
},
|
|
276
|
+
},
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
{ id: 'tds/marketing/footer/heading' },
|
|
280
|
+
)
|
|
281
|
+
|
|
282
|
+
export const legal = style(
|
|
283
|
+
{ alignItems: 'center', display: 'flex', flexWrap: 'wrap', gap: '24', whiteSpace: 'nowrap' },
|
|
284
|
+
{ id: 'tds/marketing/footer/legal' },
|
|
285
|
+
)
|
|
286
|
+
|
|
287
|
+
// Links rest at 60% white and turn white on hover and keyboard focus. A press dims them.
|
|
288
|
+
export const link = variants(
|
|
289
|
+
{
|
|
290
|
+
base: {
|
|
291
|
+
color: 'inverse.content.secondary',
|
|
292
|
+
opacity: 'full',
|
|
293
|
+
outlineColor: 'neutral.000',
|
|
294
|
+
outlineOffset: 'ringInline',
|
|
295
|
+
outlineStyle: 'none',
|
|
296
|
+
outlineWidth: 'ring',
|
|
297
|
+
textDecoration: 'none !custom',
|
|
298
|
+
// At rest is where hover out and a release land.
|
|
299
|
+
transitionDuration: 'hoverOut',
|
|
300
|
+
transitionProperty: 'color, opacity !custom',
|
|
301
|
+
transitionTimingFunction: 'standard',
|
|
302
|
+
selectors: {
|
|
303
|
+
'&:active': { opacity: 'pressSurface', transitionDuration: 'press' },
|
|
304
|
+
'&:focus-visible': {
|
|
305
|
+
color: 'neutral.000',
|
|
306
|
+
outlineStyle: 'solid',
|
|
307
|
+
transitionDuration: 'hoverIn',
|
|
308
|
+
},
|
|
309
|
+
},
|
|
310
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
311
|
+
selectors: {
|
|
312
|
+
'&:hover:not(:active)': { color: 'neutral.000', transitionDuration: 'hoverIn' },
|
|
313
|
+
},
|
|
314
|
+
},
|
|
315
|
+
'@media (forced-colors: active)': {
|
|
316
|
+
textDecorationLine: 'underline',
|
|
317
|
+
selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
defaultVariants: { kind: 'inline' },
|
|
321
|
+
variants: {
|
|
322
|
+
// A link in a social or legal row, in a group's list, or the mark home.
|
|
323
|
+
kind: {
|
|
324
|
+
inline: {},
|
|
325
|
+
list: { display: 'block', paddingBlock: '4', width: 'fit-content !custom' },
|
|
326
|
+
mark: {
|
|
327
|
+
display: 'block',
|
|
328
|
+
gridColumn: '1 / -1 !custom',
|
|
329
|
+
height: '20',
|
|
330
|
+
marginBlockEnd: '64',
|
|
331
|
+
outlineOffset: 'ring',
|
|
332
|
+
width: '20',
|
|
333
|
+
'@media >=1280': {
|
|
334
|
+
gridColumn: '1 / span 2 !custom',
|
|
335
|
+
gridRow: '1 !custom',
|
|
336
|
+
marginBlockEnd: '0',
|
|
337
|
+
},
|
|
338
|
+
// The mark keeps its ink, so its hover is the opacity.
|
|
339
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
340
|
+
selectors: { '&:hover:not(:active)': { opacity: '0.64 !custom' } },
|
|
341
|
+
},
|
|
342
|
+
'@media (forced-colors: active)': { textDecorationLine: 'none' },
|
|
343
|
+
},
|
|
344
|
+
},
|
|
345
|
+
},
|
|
346
|
+
},
|
|
347
|
+
{ id: 'tds/marketing/footer/link' },
|
|
348
|
+
)
|
|
349
|
+
|
|
350
|
+
// Each list link pads 4px above and below, so the list pulls 4px out to keep its edges.
|
|
351
|
+
export const links = style(
|
|
352
|
+
{
|
|
353
|
+
display: 'flex',
|
|
354
|
+
flexDirection: 'column',
|
|
355
|
+
listStyle: 'none !custom',
|
|
356
|
+
marginBlock: '-4px !custom',
|
|
357
|
+
marginInline: '0',
|
|
358
|
+
padding: '0',
|
|
359
|
+
},
|
|
360
|
+
{ id: 'tds/marketing/footer/links' },
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
// One column, two lanes from 768px, and the 12-column grid from 1280px.
|
|
364
|
+
export const map = style(
|
|
365
|
+
{
|
|
366
|
+
columnGap: '12',
|
|
367
|
+
display: 'grid',
|
|
368
|
+
gridTemplateColumns: 'minmax(0, 1fr) !custom',
|
|
369
|
+
rowGap: '48',
|
|
370
|
+
'@media >=768': { gridTemplateColumns: 'repeat(2, minmax(0, 1fr)) !custom' },
|
|
371
|
+
'@media >=1280': {
|
|
372
|
+
columnGap: '20',
|
|
373
|
+
gridTemplateColumns: 'repeat(12, minmax(0, 1fr)) !custom',
|
|
374
|
+
},
|
|
375
|
+
},
|
|
376
|
+
{ id: 'tds/marketing/footer/map' },
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
// The mark draws black, which the invert turns white. Forced colors drop the invert and draw it
|
|
380
|
+
// in the system text color.
|
|
381
|
+
export const markImage = style(
|
|
382
|
+
{
|
|
383
|
+
display: 'block',
|
|
384
|
+
filter: 'invert(1) !custom',
|
|
385
|
+
height: '20px !custom',
|
|
386
|
+
width: '20px !custom',
|
|
387
|
+
},
|
|
388
|
+
{ id: 'tds/marketing/footer/mark-image' },
|
|
389
|
+
)
|
|
390
|
+
|
|
391
|
+
export const meta = style(
|
|
392
|
+
{
|
|
393
|
+
alignItems: 'start',
|
|
394
|
+
color: 'inverse.content.secondary',
|
|
395
|
+
display: 'flex',
|
|
396
|
+
flexDirection: 'column',
|
|
397
|
+
flexWrap: 'wrap',
|
|
398
|
+
gap: '24',
|
|
399
|
+
gridColumn: '1 / -1 !custom',
|
|
400
|
+
paddingBlockStart: '48',
|
|
401
|
+
'@media >=768': { alignItems: 'center', flexDirection: 'row' },
|
|
402
|
+
// With the site map's 48px row gap, 80px under the sign-up.
|
|
403
|
+
'@media >=1280': {
|
|
404
|
+
gridColumn: '5 / -1 !custom',
|
|
405
|
+
gridRow: 'var(--footer-last-row) !custom',
|
|
406
|
+
paddingBlockStart: '32',
|
|
407
|
+
},
|
|
408
|
+
},
|
|
409
|
+
{ id: 'tds/marketing/footer/meta' },
|
|
410
|
+
)
|
|
411
|
+
|
|
412
|
+
// Under the mark until 1280px. From there it takes its own row between the lanes and the meta
|
|
413
|
+
// links, in the lanes' columns, 80px from each with the site map's 48px row gap.
|
|
414
|
+
export const newsletter = style(
|
|
415
|
+
{
|
|
416
|
+
gridColumn: '1 / -1 !custom',
|
|
417
|
+
paddingBlockEnd: '32',
|
|
418
|
+
'@media >=768': { gridRow: '2 !custom' },
|
|
419
|
+
'@media >=1280': {
|
|
420
|
+
gridColumn: '5 / -1 !custom',
|
|
421
|
+
gridRow: 'var(--footer-newsletter-row) !custom',
|
|
422
|
+
paddingBlockEnd: '0',
|
|
423
|
+
paddingBlockStart: '32',
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
{ id: 'tds/marketing/footer/newsletter' },
|
|
427
|
+
)
|
|
428
|
+
|
|
429
|
+
export const panel = style(
|
|
430
|
+
{
|
|
431
|
+
backgroundColor: 'inverse.background.primary',
|
|
432
|
+
color: 'neutral.000',
|
|
433
|
+
padding: '48',
|
|
434
|
+
'@media >=1280': { padding: '80px !custom' },
|
|
435
|
+
},
|
|
436
|
+
{ id: 'tds/marketing/footer/panel' },
|
|
437
|
+
)
|
|
438
|
+
|
|
439
|
+
export const row = style({ display: 'flex', gap: '24' }, { id: 'tds/marketing/footer/row' })
|
|
440
|
+
}
|