@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,448 @@
|
|
|
1
|
+
/** Renders the Marketing partners index: the partners or assets a page covers, as cards with filters. @module */
|
|
2
|
+
import { useRender } from '@base-ui/react/use-render'
|
|
3
|
+
import { type ComponentPropsWithRef, type CSSProperties, type ReactNode, useState } from 'react'
|
|
4
|
+
import type * as zyzz from 'zyzz'
|
|
5
|
+
import { keyframes } from 'zyzz/web'
|
|
6
|
+
import { ArrowUpRight } from '../icons/ArrowUpRight.js'
|
|
7
|
+
import { ChevronRight } from '../icons/ChevronRight.js'
|
|
8
|
+
import { style, variants, vars } from '../zyzz.config.js'
|
|
9
|
+
import { Button } from './Button.js'
|
|
10
|
+
import { Tab } from './Tab.js'
|
|
11
|
+
import * as Links from './internal/Links.js'
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* A grid of white cards, each one link to a partner or asset, under one row of category filters.
|
|
15
|
+
* Each filter is a `Tab` in a named group: All lists every partner, and a category lists its own.
|
|
16
|
+
* The row never wraps and scrolls sideways where it is wider than the column. The grid shows a page
|
|
17
|
+
* of cards at a time, and Show more adds the next page. Cards rise into place as they mount.
|
|
18
|
+
*
|
|
19
|
+
* - Use it for every partner on the Partners index, filtered by category, or for the providers that
|
|
20
|
+
* carry an asset.
|
|
21
|
+
* - Pass each partner's mark as a `SymbolTile` in `logo`.
|
|
22
|
+
* - Set `size="large"` for a short list read card by card, and leave `compact` for a long list to
|
|
23
|
+
* scan.
|
|
24
|
+
* - Pass `render` for router links, such as `<NextLink href="" />`. A card whose `href` starts with
|
|
25
|
+
* `http` opens in a new tab and ends in an arrow up right.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* <PartnersIndex
|
|
29
|
+
* categories={[{ label: 'Wallets', value: 'wallets' }]}
|
|
30
|
+
* items={[{ categories: ['wallets'], href: '/partners/acme', line: 'Wallets for teams.', name: 'Acme' }]}
|
|
31
|
+
* />
|
|
32
|
+
*
|
|
33
|
+
* @see {@link https://www.w3.org/WAI/ARIA/apg/patterns/button/ | WAI-ARIA APG Button pattern (toggle button)}
|
|
34
|
+
*/
|
|
35
|
+
export function PartnersIndex(props: PartnersIndex.Props) {
|
|
36
|
+
const {
|
|
37
|
+
categories = [],
|
|
38
|
+
className,
|
|
39
|
+
defaultValue = null,
|
|
40
|
+
items,
|
|
41
|
+
messages,
|
|
42
|
+
onValueChange,
|
|
43
|
+
pageSize = 12,
|
|
44
|
+
render,
|
|
45
|
+
size,
|
|
46
|
+
value: controlled,
|
|
47
|
+
vars,
|
|
48
|
+
...attributes
|
|
49
|
+
} = props
|
|
50
|
+
|
|
51
|
+
const text = {
|
|
52
|
+
all: messages?.all ?? 'All',
|
|
53
|
+
empty: messages?.empty ?? 'No partners match these filters.',
|
|
54
|
+
filters: messages?.filters ?? 'Filter by category',
|
|
55
|
+
more: messages?.more ?? 'Show {count} more',
|
|
56
|
+
newTab: messages?.newTab ?? '(opens in a new tab)',
|
|
57
|
+
}
|
|
58
|
+
const [uncontrolled, setUncontrolled] = useState<string | null>(defaultValue)
|
|
59
|
+
const [shown, setShown] = useState(pageSize)
|
|
60
|
+
|
|
61
|
+
const selected = controlled === undefined ? uncontrolled : controlled
|
|
62
|
+
const listed =
|
|
63
|
+
selected === null ? items : items.filter((item) => item.categories.includes(selected))
|
|
64
|
+
const rest = Math.min(pageSize, listed.length - shown)
|
|
65
|
+
|
|
66
|
+
// A change of category starts again from the first page.
|
|
67
|
+
function choose(next: string | null) {
|
|
68
|
+
if (next === selected) return
|
|
69
|
+
setUncontrolled(next)
|
|
70
|
+
setShown(pageSize)
|
|
71
|
+
onValueChange?.(next)
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return (
|
|
75
|
+
<div {...attributes} {...styles.root({ className, size, style: props.style, vars })}>
|
|
76
|
+
{categories.length > 0 && (
|
|
77
|
+
// Toggle buttons outside a form, so a named group rather than a fieldset.
|
|
78
|
+
// oxlint-disable-next-line jsx-a11y/prefer-tag-over-role
|
|
79
|
+
<div aria-label={text.filters} role="group" {...styles.filters()}>
|
|
80
|
+
<Tab onClick={() => choose(null)} selected={selected === null} size="large">
|
|
81
|
+
{text.all}
|
|
82
|
+
</Tab>
|
|
83
|
+
{categories.map((category) => (
|
|
84
|
+
<Tab
|
|
85
|
+
key={category.value}
|
|
86
|
+
onClick={() => choose(category.value)}
|
|
87
|
+
selected={selected === category.value}
|
|
88
|
+
size="large"
|
|
89
|
+
>
|
|
90
|
+
{category.label}
|
|
91
|
+
</Tab>
|
|
92
|
+
))}
|
|
93
|
+
</div>
|
|
94
|
+
)}
|
|
95
|
+
<div>
|
|
96
|
+
<ul {...styles.grid()}>
|
|
97
|
+
{listed.slice(0, shown).map((item, index) => {
|
|
98
|
+
const external = /^https?:/.test(item.href)
|
|
99
|
+
const Cue = external ? ArrowUpRight : ChevronRight
|
|
100
|
+
|
|
101
|
+
return (
|
|
102
|
+
<li
|
|
103
|
+
key={item.href}
|
|
104
|
+
{...styles.item({ style: { '--i': Math.min(index, 7) } as CSSProperties })}
|
|
105
|
+
>
|
|
106
|
+
<Anchor
|
|
107
|
+
href={item.href}
|
|
108
|
+
render={render}
|
|
109
|
+
{...(external ? { rel: 'noreferrer', target: '_blank' } : {})}
|
|
110
|
+
{...styles.card({ size })}
|
|
111
|
+
>
|
|
112
|
+
{item.logo}
|
|
113
|
+
<span {...styles.copy({ size })}>
|
|
114
|
+
<span {...styles.name({ size })}>
|
|
115
|
+
{item.name}
|
|
116
|
+
<Cue {...styles.cue()} />
|
|
117
|
+
</span>
|
|
118
|
+
<span {...styles.line({ size })}>{item.line}</span>
|
|
119
|
+
</span>
|
|
120
|
+
{external && <span {...styles.hidden()}> {text.newTab}</span>}
|
|
121
|
+
</Anchor>
|
|
122
|
+
</li>
|
|
123
|
+
)
|
|
124
|
+
})}
|
|
125
|
+
</ul>
|
|
126
|
+
{listed.length === 0 && <p {...styles.empty()}>{text.empty}</p>}
|
|
127
|
+
{rest > 0 && (
|
|
128
|
+
<div {...styles.more()}>
|
|
129
|
+
<Button onClick={() => setShown(shown + pageSize)} variant="secondary">
|
|
130
|
+
{text.more.replace('{count}', String(rest))}
|
|
131
|
+
</Button>
|
|
132
|
+
</div>
|
|
133
|
+
)}
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export namespace PartnersIndex {
|
|
140
|
+
/** One filter. */
|
|
141
|
+
export type Category = {
|
|
142
|
+
/** The filter's text, such as Wallets & custody. */
|
|
143
|
+
label: string
|
|
144
|
+
/** Identifies the category in an item's `categories` and in `value`. */
|
|
145
|
+
value: string
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
/** One partner or asset card. */
|
|
149
|
+
export type Item = {
|
|
150
|
+
/** The `value` of each category that lists it. */
|
|
151
|
+
categories: readonly string[]
|
|
152
|
+
/** The partner's page, or its own site when it starts with `http`. It also keys the card. */
|
|
153
|
+
href: string
|
|
154
|
+
/** What the partner does for a business on Tempo, in one line. It clamps at two lines. */
|
|
155
|
+
line: string
|
|
156
|
+
/** The partner's mark, as a `SymbolTile`. Absent by default. */
|
|
157
|
+
logo?: ReactNode | undefined
|
|
158
|
+
/** The partner's name. */
|
|
159
|
+
name: string
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/** The index's own words, each with an English default. */
|
|
163
|
+
export type Messages = {
|
|
164
|
+
/**
|
|
165
|
+
* The filter that lists every partner.
|
|
166
|
+
*
|
|
167
|
+
* @default 'All'
|
|
168
|
+
*/
|
|
169
|
+
all?: string | undefined
|
|
170
|
+
/**
|
|
171
|
+
* The line that shows when a category lists no partner.
|
|
172
|
+
*
|
|
173
|
+
* @default 'No partners match these filters.'
|
|
174
|
+
*/
|
|
175
|
+
empty?: string | undefined
|
|
176
|
+
/**
|
|
177
|
+
* The name of the group of filters.
|
|
178
|
+
*
|
|
179
|
+
* @default 'Filter by category'
|
|
180
|
+
*/
|
|
181
|
+
filters?: string | undefined
|
|
182
|
+
/**
|
|
183
|
+
* The button that adds the next page, where `{count}` stands for the cards it adds.
|
|
184
|
+
*
|
|
185
|
+
* @default 'Show {count} more'
|
|
186
|
+
*/
|
|
187
|
+
more?: string | undefined
|
|
188
|
+
/**
|
|
189
|
+
* The hidden end of the name of a card that opens another site in a new tab.
|
|
190
|
+
*
|
|
191
|
+
* @default '(opens in a new tab)'
|
|
192
|
+
*/
|
|
193
|
+
newTab?: string | undefined
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
export type Props = Omit<ComponentPropsWithRef<'div'>, 'children' | 'defaultValue'> &
|
|
197
|
+
zyzz.Props.Variants<typeof styles.root> & {
|
|
198
|
+
/** The filters, in order, after All. Without them there is no filter row. */
|
|
199
|
+
categories?: readonly Category[] | undefined
|
|
200
|
+
/** The category listed at first, when `value` is not set. `null` lists every partner. */
|
|
201
|
+
defaultValue?: string | null | undefined
|
|
202
|
+
/** The partners, in the order the grid lists them. */
|
|
203
|
+
items: readonly Item[]
|
|
204
|
+
/** Replaces the index's English words. */
|
|
205
|
+
messages?: Messages | undefined
|
|
206
|
+
/** Called with the category a filter press lists, or `null` for All. */
|
|
207
|
+
onValueChange?: ((value: string | null) => void) | undefined
|
|
208
|
+
/**
|
|
209
|
+
* The cards per page. Show more adds this many.
|
|
210
|
+
*
|
|
211
|
+
* @default 12
|
|
212
|
+
*/
|
|
213
|
+
pageSize?: number | undefined
|
|
214
|
+
/** Renders every card's link, such as `<NextLink href="" />` for client-side routing. */
|
|
215
|
+
render?: useRender.ComponentProps<'a'>['render']
|
|
216
|
+
/** The category listed, for a controlled index. `null` lists every partner. */
|
|
217
|
+
value?: string | null | undefined
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
/** A link that a caller's `render` can replace, such as with a router link. */
|
|
222
|
+
function Anchor(props: useRender.ComponentProps<'a'>) {
|
|
223
|
+
const { ref, render, ...attributes } = props
|
|
224
|
+
|
|
225
|
+
return useRender({ defaultTagName: 'a', props: attributes, ref, render: Links.shared(render) })
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
// Cards rise 8px into place as they mount, on load and as a filter or Show more brings them in.
|
|
229
|
+
const rise = keyframes(
|
|
230
|
+
{ from: { opacity: '0 !custom', translate: '0 8px !custom' } },
|
|
231
|
+
{ id: 'tds/marketing/partners-index/rise' },
|
|
232
|
+
)
|
|
233
|
+
|
|
234
|
+
namespace styles {
|
|
235
|
+
// A white tile, the whole of it one link. On a fine pointer hover nudges the cue toward where the
|
|
236
|
+
// link goes and darkens it, and a press dims the card to 72%. Keyboard focus draws the ring outside
|
|
237
|
+
// its corner.
|
|
238
|
+
export const card = variants(
|
|
239
|
+
{
|
|
240
|
+
base: {
|
|
241
|
+
backgroundColor: 'background.secondary',
|
|
242
|
+
boxSizing: 'border-box',
|
|
243
|
+
color: 'content.primary',
|
|
244
|
+
display: 'flex',
|
|
245
|
+
height: '100% !custom',
|
|
246
|
+
opacity: 'full',
|
|
247
|
+
outlineColor: 'neutral.100',
|
|
248
|
+
outlineOffset: 'ring',
|
|
249
|
+
outlineStyle: 'none',
|
|
250
|
+
outlineWidth: 'ring',
|
|
251
|
+
textDecoration: 'none !custom',
|
|
252
|
+
transitionDuration: 'hoverOut',
|
|
253
|
+
transitionProperty: 'opacity !custom',
|
|
254
|
+
transitionTimingFunction: 'standard',
|
|
255
|
+
width: '100% !custom',
|
|
256
|
+
selectors: {
|
|
257
|
+
'&:active': { opacity: 'pressSurface', transitionDuration: 'press' },
|
|
258
|
+
'&:focus-visible': { outlineStyle: 'solid' },
|
|
259
|
+
},
|
|
260
|
+
// Forced colors drop the white fill, so an edge draws the card.
|
|
261
|
+
'@media (forced-colors: active)': {
|
|
262
|
+
borderColor: 'CanvasText !custom',
|
|
263
|
+
borderStyle: 'solid',
|
|
264
|
+
borderWidth: 'regular',
|
|
265
|
+
selectors: { '&:focus-visible': { outlineColor: 'Highlight !custom' } },
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
defaultVariants: { size: 'compact' },
|
|
269
|
+
variants: {
|
|
270
|
+
size: {
|
|
271
|
+
// The mark leads, top-aligned with the copy, so names line up across a row.
|
|
272
|
+
compact: {
|
|
273
|
+
alignItems: 'flex-start',
|
|
274
|
+
borderRadius: 'sm',
|
|
275
|
+
gap: '16',
|
|
276
|
+
padding: '16',
|
|
277
|
+
'@media >=768': { padding: '20' },
|
|
278
|
+
},
|
|
279
|
+
// The mark on top and the copy at the foot.
|
|
280
|
+
large: {
|
|
281
|
+
alignItems: 'flex-start',
|
|
282
|
+
borderRadius: 'md',
|
|
283
|
+
flexDirection: 'column',
|
|
284
|
+
gap: '24',
|
|
285
|
+
padding: '24',
|
|
286
|
+
'@media >=768': { borderRadius: 'lg', gap: '32', padding: '32' },
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
{ id: 'tds/marketing/partners-index/card' },
|
|
292
|
+
)
|
|
293
|
+
|
|
294
|
+
export const copy = variants(
|
|
295
|
+
{
|
|
296
|
+
base: { display: 'flex', flexDirection: 'column', minWidth: '0 !custom' },
|
|
297
|
+
defaultVariants: { size: 'compact' },
|
|
298
|
+
variants: {
|
|
299
|
+
size: {
|
|
300
|
+
compact: { gap: '2' },
|
|
301
|
+
large: { gap: 'textPair.h4B1', marginBlockStart: 'auto !custom' },
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
{ id: 'tds/marketing/partners-index/copy' },
|
|
306
|
+
)
|
|
307
|
+
|
|
308
|
+
// The cue nudges toward where the link goes and darkens, out and back at the state pace. Under
|
|
309
|
+
// reduced motion it only darkens.
|
|
310
|
+
export const cue = style(
|
|
311
|
+
{
|
|
312
|
+
color: 'content.tertiary',
|
|
313
|
+
flexShrink: '0 !custom',
|
|
314
|
+
fontSize: '16px !custom',
|
|
315
|
+
transitionDuration: 'state',
|
|
316
|
+
transitionProperty: 'translate, color !custom',
|
|
317
|
+
transitionTimingFunction: 'standard',
|
|
318
|
+
selectors: { ':dir(rtl) &': { scale: '-1 1 !custom' } },
|
|
319
|
+
'@media (hover: hover) and (pointer: fine)': {
|
|
320
|
+
selectors: { 'a:hover &': { color: 'neutral.100', translate: 'nudge' } },
|
|
321
|
+
},
|
|
322
|
+
},
|
|
323
|
+
{ id: 'tds/marketing/partners-index/cue' },
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
export const empty = style(
|
|
327
|
+
{
|
|
328
|
+
color: 'content.secondary',
|
|
329
|
+
margin: '0',
|
|
330
|
+
maxWidth: '320',
|
|
331
|
+
paddingBlock: '24',
|
|
332
|
+
typography: 'body.b2',
|
|
333
|
+
},
|
|
334
|
+
{ id: 'tds/marketing/partners-index/empty' },
|
|
335
|
+
)
|
|
336
|
+
|
|
337
|
+
// One row that never wraps, so no filter is left alone on a second line. Where the row is wider
|
|
338
|
+
// than the column it scrolls sideways, with room inside it for the focus ring.
|
|
339
|
+
export const filters = style(
|
|
340
|
+
{
|
|
341
|
+
display: 'flex',
|
|
342
|
+
gap: '8',
|
|
343
|
+
marginBlock: '-6px !custom',
|
|
344
|
+
marginInline: '-6px !custom',
|
|
345
|
+
minWidth: '0 !custom',
|
|
346
|
+
overflowX: 'auto',
|
|
347
|
+
paddingBlock: '6px !custom',
|
|
348
|
+
paddingInline: '6px !custom',
|
|
349
|
+
scrollbarWidth: 'none',
|
|
350
|
+
'@media >=1024': { selectors: { '& > button': { paddingInline: '24' } } },
|
|
351
|
+
},
|
|
352
|
+
{ id: 'tds/marketing/partners-index/filters' },
|
|
353
|
+
)
|
|
354
|
+
|
|
355
|
+
export const grid = style(
|
|
356
|
+
{
|
|
357
|
+
display: 'grid',
|
|
358
|
+
gap: '24',
|
|
359
|
+
gridTemplateColumns: 'minmax(0, 1fr) !custom',
|
|
360
|
+
listStyle: 'none !custom',
|
|
361
|
+
margin: '0',
|
|
362
|
+
padding: '0',
|
|
363
|
+
'@media >=768': { gridTemplateColumns: 'repeat(2, minmax(0, 1fr)) !custom' },
|
|
364
|
+
'@media >=1024': { gridTemplateColumns: 'repeat(3, minmax(0, 1fr)) !custom' },
|
|
365
|
+
'@media >=1512': { gridTemplateColumns: 'repeat(4, minmax(0, 1fr)) !custom' },
|
|
366
|
+
},
|
|
367
|
+
{ id: 'tds/marketing/partners-index/grid' },
|
|
368
|
+
)
|
|
369
|
+
|
|
370
|
+
export const hidden = style(
|
|
371
|
+
{
|
|
372
|
+
clip: 'rect(0 0 0 0) !custom',
|
|
373
|
+
height: '1px !custom',
|
|
374
|
+
overflow: 'hidden',
|
|
375
|
+
position: 'absolute',
|
|
376
|
+
whiteSpace: 'nowrap',
|
|
377
|
+
width: '1px !custom',
|
|
378
|
+
},
|
|
379
|
+
{ id: 'tds/marketing/partners-index/hidden' },
|
|
380
|
+
)
|
|
381
|
+
|
|
382
|
+
// A few cards at a time, 25ms apart, eight at most.
|
|
383
|
+
export const item = style(
|
|
384
|
+
{
|
|
385
|
+
'@media (prefers-reduced-motion: no-preference)': {
|
|
386
|
+
animation: `${rise} 300ms ${vars.ease.enter} both !custom`,
|
|
387
|
+
animationDelay: 'calc(var(--i, 0) * 25ms) !custom',
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
{ id: 'tds/marketing/partners-index/item' },
|
|
391
|
+
)
|
|
392
|
+
|
|
393
|
+
// Two lines at most.
|
|
394
|
+
export const line = variants(
|
|
395
|
+
{
|
|
396
|
+
base: {
|
|
397
|
+
color: 'content.secondary',
|
|
398
|
+
display: '-webkit-box !custom',
|
|
399
|
+
overflow: 'hidden',
|
|
400
|
+
textWrap: 'pretty',
|
|
401
|
+
typography: 'body.b2',
|
|
402
|
+
WebkitBoxOrient: 'vertical',
|
|
403
|
+
WebkitLineClamp: '2 !custom',
|
|
404
|
+
},
|
|
405
|
+
defaultVariants: { size: 'compact' },
|
|
406
|
+
variants: { size: { compact: {}, large: { maxWidth: '320' } } },
|
|
407
|
+
},
|
|
408
|
+
{ id: 'tds/marketing/partners-index/line' },
|
|
409
|
+
)
|
|
410
|
+
|
|
411
|
+
export const more = style(
|
|
412
|
+
{ display: 'flex', justifyContent: 'center', paddingBlockStart: '32' },
|
|
413
|
+
{ id: 'tds/marketing/partners-index/more' },
|
|
414
|
+
)
|
|
415
|
+
|
|
416
|
+
export const name = variants(
|
|
417
|
+
{
|
|
418
|
+
base: { alignItems: 'center', display: 'inline-flex', gap: '2' },
|
|
419
|
+
defaultVariants: { size: 'compact' },
|
|
420
|
+
variants: {
|
|
421
|
+
size: { compact: { typography: 'body.b1' }, large: { typography: 'heading.h4' } },
|
|
422
|
+
},
|
|
423
|
+
},
|
|
424
|
+
{ id: 'tds/marketing/partners-index/name' },
|
|
425
|
+
)
|
|
426
|
+
|
|
427
|
+
export const root = variants(
|
|
428
|
+
{
|
|
429
|
+
base: {
|
|
430
|
+
display: 'flex',
|
|
431
|
+
flexDirection: 'column',
|
|
432
|
+
gap: 'layoutGap.content',
|
|
433
|
+
minWidth: '0 !custom',
|
|
434
|
+
},
|
|
435
|
+
defaultVariants: { size: 'compact' },
|
|
436
|
+
variants: {
|
|
437
|
+
/**
|
|
438
|
+
* The cards: `compact`, the mark beside the name over its line, for a long list to scan, or
|
|
439
|
+
* `large`, the mark over the name and line with room for each, for a short list.
|
|
440
|
+
*
|
|
441
|
+
* @default 'compact'
|
|
442
|
+
*/
|
|
443
|
+
size: { compact: {}, large: {} },
|
|
444
|
+
},
|
|
445
|
+
},
|
|
446
|
+
{ id: 'tds/marketing/partners-index' },
|
|
447
|
+
)
|
|
448
|
+
}
|