@tempoxyz/ds 4.3.20261201063729 → 4.4.20261201070331

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.
Files changed (73) hide show
  1. package/dist/docs/AGENTS.md +1 -1
  2. package/dist/docs/arsenal.md +144 -271
  3. package/dist/docs/marketing.md +428 -329
  4. package/dist/document/templates/brief.html +3 -3
  5. package/dist/document/templates/essay.html +3 -3
  6. package/dist/document/templates/post.html +3 -3
  7. package/dist/marketing/components/Bleed.d.ts +1 -1
  8. package/dist/marketing/components/Bleed.d.ts.map +1 -1
  9. package/dist/marketing/components/Bleed.js.map +1 -1
  10. package/dist/marketing/components/Bleed.js.zyzz.json +1 -1
  11. package/dist/marketing/components/Carousel.d.ts +3 -4
  12. package/dist/marketing/components/Carousel.d.ts.map +1 -1
  13. package/dist/marketing/components/Carousel.js +3 -4
  14. package/dist/marketing/components/Carousel.js.map +1 -1
  15. package/dist/marketing/components/Cta.d.ts.map +1 -1
  16. package/dist/marketing/components/Cta.js +2 -2
  17. package/dist/marketing/components/Cta.js.map +1 -1
  18. package/dist/marketing/components/Cta.js.zyzz.json +1 -1
  19. package/dist/marketing/components/Faq.d.ts +1 -1
  20. package/dist/marketing/components/Faq.js +1 -1
  21. package/dist/marketing/components/FeatureAccordion.d.ts +1 -1
  22. package/dist/marketing/components/FeatureAccordion.js +1 -1
  23. package/dist/marketing/components/LogoWall.d.ts +9 -8
  24. package/dist/marketing/components/LogoWall.d.ts.map +1 -1
  25. package/dist/marketing/components/LogoWall.js +10 -9
  26. package/dist/marketing/components/LogoWall.js.map +1 -1
  27. package/dist/marketing/components/LogoWall.js.zyzz.json +1 -1
  28. package/dist/marketing/components/Section.d.ts +64 -16
  29. package/dist/marketing/components/Section.d.ts.map +1 -1
  30. package/dist/marketing/components/Section.js +25 -13
  31. package/dist/marketing/components/Section.js.map +1 -1
  32. package/dist/marketing/components/Section.js.zyzz.json +1 -1
  33. package/dist/marketing/components/SectionHeading.css +1 -1
  34. package/dist/marketing/components/SectionHeading.d.ts +132 -61
  35. package/dist/marketing/components/SectionHeading.d.ts.map +1 -1
  36. package/dist/marketing/components/SectionHeading.js +27 -25
  37. package/dist/marketing/components/SectionHeading.js.map +1 -1
  38. package/dist/marketing/components/SectionHeading.js.zyzz.json +1 -1
  39. package/dist/marketing/components/Showcase.d.ts +1 -1
  40. package/dist/marketing/components/Showcase.d.ts.map +1 -1
  41. package/dist/marketing/components/Showcase.js +2 -2
  42. package/dist/marketing/components/Showcase.js.map +1 -1
  43. package/dist/marketing/components/Showcase.js.zyzz.json +1 -1
  44. package/dist/marketing/components/Statement.d.ts +1 -1
  45. package/dist/marketing/components/Statement.d.ts.map +1 -1
  46. package/dist/marketing/components/Statement.js.map +1 -1
  47. package/dist/marketing/components/Statement.js.zyzz.json +1 -1
  48. package/dist/marketing/components/Steps.d.ts +1 -1
  49. package/dist/marketing/components/Steps.js +1 -1
  50. package/dist/marketing/components/Story.d.ts +2 -2
  51. package/dist/marketing/components/Story.d.ts.map +1 -1
  52. package/dist/marketing/components/Story.js.zyzz.json +1 -1
  53. package/dist/marketing/components/Table.d.ts +2 -2
  54. package/dist/marketing/components/Table.d.ts.map +1 -1
  55. package/dist/marketing/components/Table.js +1 -5
  56. package/dist/marketing/components/Table.js.map +1 -1
  57. package/dist/marketing/components/Table.js.zyzz.json +1 -1
  58. package/dist/marketing/index.js.zyzz.json +1 -1
  59. package/package.json +2 -2
  60. package/src/marketing/README.md +1 -1
  61. package/src/marketing/components/Bleed.tsx +4 -1
  62. package/src/marketing/components/Carousel.tsx +3 -4
  63. package/src/marketing/components/Cta.tsx +2 -7
  64. package/src/marketing/components/Faq.tsx +1 -1
  65. package/src/marketing/components/FeatureAccordion.tsx +1 -1
  66. package/src/marketing/components/LogoWall.tsx +13 -12
  67. package/src/marketing/components/Section.tsx +109 -18
  68. package/src/marketing/components/SectionHeading.tsx +167 -66
  69. package/src/marketing/components/Showcase.tsx +5 -4
  70. package/src/marketing/components/Statement.tsx +4 -1
  71. package/src/marketing/components/Steps.tsx +1 -1
  72. package/src/marketing/components/Story.tsx +2 -2
  73. package/src/marketing/components/Table.tsx +10 -16
@@ -1,43 +1,32 @@
1
- /** Renders the Marketing heading that opens a page section, or heads a page. @module */
1
+ /** Renders the Marketing heading that opens a page section, and its deprecated public alias. @module */
2
2
  import type { ComponentPropsWithRef, ReactNode } from 'react'
3
3
  import type * as zyzz from 'zyzz'
4
4
  import { style, variants } from '../zyzz.config.js'
5
5
 
6
6
  /**
7
7
  * A `<header>` that opens a page section on its title: an eyebrow that names the section, an `<h2>`
8
- * that states what the reader gets, a subtitle, and one action. Each line but the title is
8
+ * that states what the reader gets, a description, and one action. Each line but the title is
9
9
  * optional. It has no states or motion of its own.
10
10
  *
11
- * - Pass `titleId`, and the same id as the `aria-labelledby` of the `Section` around it, so the
12
- * section takes the title as its name.
13
- * - Set `heading="h1"` where it heads a page, such as a company or partners page, in place of an
14
- * index page's `Hero` with `form="index"`.
15
- * - Set `subtitle` by the copy: `heading` continues the title in its type, `body` sets running text
16
- * 24px below it, and `aside` sets a lead beside a rail.
17
- * - Pass the section's one action as `children`, and a carousel's buttons as `controls`.
18
- * - Set `appearance="inverse"` inside an inverse `Section`.
19
- *
20
- * @example
21
- * <SectionHeading
22
- * eyebrow="Business benefits"
23
- * title="Make stablecoins work for your business"
24
- * titleId="benefits"
25
- * />
11
+ * `Section` draws it from its `eyebrow`, `title`, `description` and `action`. Parts that set the
12
+ * heading inside a layout of their own, such as a grid column, draw it directly. It is not exported
13
+ * from `@tempoxyz/ds/marketing`.
26
14
  */
27
- export function SectionHeading(props: SectionHeading.Props) {
15
+ export function Heading(props: Heading.Props) {
28
16
  const {
29
- appearance,
30
- centered,
17
+ align,
31
18
  children,
32
19
  className,
33
20
  controls,
34
21
  description,
35
22
  eyebrow,
36
- ghost,
37
- heading: Heading = 'h2',
23
+ heading: Title = 'h2',
24
+ inset,
25
+ size,
38
26
  subtitle,
39
27
  title,
40
28
  titleId,
29
+ tone,
41
30
  vars,
42
31
  ...attributes
43
32
  } = props
@@ -46,31 +35,30 @@ export function SectionHeading(props: SectionHeading.Props) {
46
35
  <header
47
36
  {...attributes}
48
37
  {...styles.root({
49
- centered,
38
+ align,
50
39
  className,
51
40
  controls: controls !== undefined && controls !== null,
52
- ghost,
41
+ inset,
42
+ size,
53
43
  style: props.style,
54
44
  vars,
55
45
  })}
56
46
  >
57
- {eyebrow !== undefined && <p {...styles.eyebrow({ appearance })}>{eyebrow}</p>}
58
- <Heading id={titleId} {...styles.title({ appearance })}>
47
+ {eyebrow !== undefined && <p {...styles.eyebrow({ tone })}>{eyebrow}</p>}
48
+ <Title id={titleId} {...styles.title({ tone })}>
59
49
  {title}
60
- </Heading>
61
- {description !== undefined && (
62
- <p {...styles.subtitle({ appearance, subtitle })}>{description}</p>
63
- )}
50
+ </Title>
51
+ {description !== undefined && <p {...styles.subtitle({ subtitle, tone })}>{description}</p>}
64
52
  {children !== undefined && <div {...styles.action()}>{children}</div>}
65
53
  {controls !== undefined && <div data-heading-controls="">{controls}</div>}
66
54
  </header>
67
55
  )
68
56
  }
69
57
 
70
- export namespace SectionHeading {
58
+ export namespace Heading {
71
59
  export type Props = Omit<ComponentPropsWithRef<'header'>, 'title'> &
72
60
  Omit<zyzz.Props.Variants<typeof styles.root>, 'controls'> &
73
- Pick<zyzz.Props.Variants<typeof styles.subtitle>, 'appearance' | 'subtitle'> & {
61
+ Pick<zyzz.Props.Variants<typeof styles.subtitle>, 'subtitle' | 'tone'> & {
74
62
  /**
75
63
  * The section's one action, 32px below the copy (40px from 1024px), such as a `Button.Link`
76
64
  * with `layout="card"`.
@@ -78,24 +66,133 @@ export namespace SectionHeading {
78
66
  children?: ReactNode | undefined
79
67
  /** A carousel's buttons, at the end of the row and level with the copy's last line. */
80
68
  controls?: ReactNode | undefined
81
- /** The subtitle under the title. `subtitle` sets its type. Absent by default. */
69
+ /** The line under the title. `subtitle` sets its type. Absent by default. */
82
70
  description?: ReactNode | undefined
83
71
  /** A few uppercase words above the title that name the section, such as How it works. */
84
72
  eyebrow?: ReactNode | undefined
85
73
  /**
86
- * The title's element: an `h2` under a page's hero, or the page's `h1` where the heading heads
87
- * the page.
74
+ * The title's element. Only the deprecated `SectionHeading` sets `h1`.
88
75
  *
89
76
  * @default 'h2'
90
77
  */
91
78
  heading?: 'h1' | 'h2' | undefined
92
79
  /** The title, in sentence case without a closing period. */
93
80
  title: ReactNode
94
- /** The title's `id`, which the `Section` around it passes as `aria-labelledby`. */
81
+ /** The title's `id`, which names the section around it. */
95
82
  titleId?: string | undefined
96
83
  }
97
84
  }
98
85
 
86
+ /**
87
+ * A `<header>` that opens a page section on its title, with an eyebrow, a description and one
88
+ * action.
89
+ *
90
+ * @deprecated Use `Section`'s `eyebrow`, `title`, `description` and `action`. `SectionHeading`
91
+ * remains for one release.
92
+ * @example
93
+ * <Section eyebrow="Business benefits" title="Make stablecoins work for your business" />
94
+ */
95
+ export function SectionHeading(props: SectionHeading.Props) {
96
+ const {
97
+ appearance,
98
+ centered,
99
+ ghost,
100
+ align = centered ? 'center' : undefined,
101
+ size = ghost ? 'wide' : undefined,
102
+ subtitle,
103
+ tone = appearance === 'inverse' ? 'inverse' : undefined,
104
+ ...attributes
105
+ } = props
106
+
107
+ return (
108
+ <Heading
109
+ {...attributes}
110
+ align={align}
111
+ size={size}
112
+ subtitle={subtitle === 'aside' ? 'body' : subtitle}
113
+ tone={tone}
114
+ />
115
+ )
116
+ }
117
+
118
+ export namespace SectionHeading {
119
+ export type Props = Omit<Heading.Props, 'align' | 'inset' | 'size' | 'subtitle' | 'tone'> & {
120
+ /**
121
+ * The description's type: `heading` continues the title in its type, and `body` sets Body B1
122
+ * up to 480px, 24px below it. `aside` is the old name of `body`.
123
+ *
124
+ * @default 'heading'
125
+ * @deprecated `Section` sets the description in Body B1, and continues the title only at
126
+ * `size="wide"`. `subtitle` remains for one release.
127
+ */
128
+ subtitle?: 'aside' | 'body' | 'heading' | undefined
129
+ } & (
130
+ | {
131
+ /**
132
+ * Centers each line and the action on the section.
133
+ *
134
+ * @default 'start'
135
+ */
136
+ align?: Heading.Props['align']
137
+ centered?: undefined
138
+ }
139
+ | {
140
+ align?: undefined
141
+ /**
142
+ * The old name of `align="center"`.
143
+ *
144
+ * @default false
145
+ * @deprecated Use `align="center"`. `centered` remains for one release.
146
+ */
147
+ centered?: boolean | undefined
148
+ }
149
+ ) &
150
+ (
151
+ | {
152
+ ghost?: undefined
153
+ /**
154
+ * The title's measure: 600px at `regular`, or 1000px from 1024px at `wide`, which also
155
+ * pulls the content closer.
156
+ *
157
+ * @default 'regular'
158
+ */
159
+ size?: Heading.Props['size']
160
+ }
161
+ | {
162
+ /**
163
+ * The old name of `size="wide"`.
164
+ *
165
+ * @default false
166
+ * @deprecated Use `size="wide"`. `ghost` remains for one release.
167
+ */
168
+ ghost?: boolean | undefined
169
+ size?: undefined
170
+ }
171
+ ) &
172
+ (
173
+ | {
174
+ appearance?: undefined
175
+ /**
176
+ * The ground under the heading: `page` on the page or a light tone, or `inverse` in an
177
+ * inverse `Section`, which takes the near-white text roles.
178
+ *
179
+ * @default 'page'
180
+ */
181
+ tone?: Heading.Props['tone']
182
+ }
183
+ | {
184
+ /**
185
+ * The old name of `tone`, where `base` is `page`.
186
+ *
187
+ * @default 'base'
188
+ * @deprecated Use `tone`. `appearance` remains for one release.
189
+ */
190
+ appearance?: 'base' | 'inverse' | undefined
191
+ tone?: undefined
192
+ }
193
+ )
194
+ }
195
+
99
196
  namespace styles {
100
197
  export const action = style(
101
198
  { display: 'flex', paddingBlockStart: 'textPair.bodyAction' },
@@ -111,8 +208,8 @@ namespace styles {
111
208
  textWrap: 'pretty',
112
209
  typography: 'utility.eyebrow',
113
210
  },
114
- defaultVariants: { appearance: 'base' },
115
- variants: { appearance: { base: {}, inverse: { color: 'inverse.content.secondary' } } },
211
+ defaultVariants: { tone: 'page' },
212
+ variants: { tone: { inverse: { color: 'inverse.content.secondary' }, page: {} } },
116
213
  },
117
214
  { id: 'tds/marketing/section-heading/eyebrow' },
118
215
  )
@@ -125,27 +222,25 @@ namespace styles {
125
222
  paddingBlockEnd: 'layoutGap.content',
126
223
  selectors: {
127
224
  '& > p + :is(h1, h2)': { marginBlockStart: 'textPair.eyebrowTitle' },
128
- '& > :is(h1, h2) + p[data-subtitle="aside"], & > :is(h1, h2) + p[data-subtitle="body"]': {
129
- marginBlockStart: 'textPair.titleBody',
130
- },
225
+ '& > :is(h1, h2) + p[data-subtitle="body"]': { marginBlockStart: 'textPair.titleBody' },
131
226
  },
132
227
  },
133
- defaultVariants: { centered: false, controls: false, ghost: false },
228
+ defaultVariants: { align: 'start', controls: false, inset: false, size: 'regular' },
134
229
  variants: {
135
230
  /**
136
- * Centers each line and the action on the section, as the event pages open theirs.
231
+ * Sets each line and the action at the start, or centers them on the section.
137
232
  *
138
- * @default false
233
+ * @default 'start'
139
234
  */
140
- centered: {
141
- false: {},
142
- true: {
235
+ align: {
236
+ center: {
143
237
  textAlign: 'center',
144
238
  selectors: {
145
239
  '& > :is(h1, h2), & > p': { marginInline: 'auto' },
146
240
  '& > div': { justifyContent: 'center' },
147
241
  },
148
242
  },
243
+ start: {},
149
244
  },
150
245
  // Set from `controls`: the copy in the first column and the controls in the second, level
151
246
  // with the copy's last line, 24px apart.
@@ -157,7 +252,7 @@ namespace styles {
157
252
  gridTemplateColumns: 'minmax(0, 1fr) auto',
158
253
  selectors: {
159
254
  '& > *': { gridColumn: 1 },
160
- // Across every line the header can hold: eyebrow, title, subtitle and action.
255
+ // Across every line the header can hold: eyebrow, title, description and action.
161
256
  '& > [data-heading-controls]': {
162
257
  alignSelf: 'end',
163
258
  gridColumn: 2,
@@ -167,14 +262,21 @@ namespace styles {
167
262
  },
168
263
  },
169
264
  /**
170
- * The one exception to the 600px title measure, for a title that keeps its period: the
171
- * title and subtitle run to 1000px from 1024px, and the content follows closer.
265
+ * Keeps the page margins on the heading, where the section around it bleeds its content
266
+ * to the page's edges.
172
267
  *
173
268
  * @default false
174
269
  */
175
- ghost: {
176
- false: {},
177
- true: {
270
+ inset: { false: {}, true: { paddingInline: 'page.margin' } },
271
+ /**
272
+ * The title's measure: 600px at `regular`. At `wide`, the one exception, the title and
273
+ * description run to 1000px from 1024px, and the content follows closer.
274
+ *
275
+ * @default 'regular'
276
+ */
277
+ size: {
278
+ regular: {},
279
+ wide: {
178
280
  paddingBlockEnd: 'layoutGap.element',
179
281
  '@media >=1024': {
180
282
  selectors: { '& > :is(h1, h2), & > p': { maxWidth: '1000' } },
@@ -189,26 +291,25 @@ namespace styles {
189
291
  export const subtitle = variants(
190
292
  {
191
293
  base: { color: 'content.secondary', margin: '0', maxWidth: '600' },
192
- defaultVariants: { appearance: 'base', subtitle: 'heading' },
294
+ defaultVariants: { subtitle: 'heading', tone: 'page' },
193
295
  variants: {
194
296
  /**
195
- * The ground under the heading: the page or a light tone for `base`, an inverse `Section`
196
- * for `inverse`, which takes the near-white text roles.
197
- *
198
- * @default 'base'
199
- */
200
- appearance: { base: {}, inverse: { color: 'inverse.content.secondary' } },
201
- /**
202
- * The subtitle's type: `heading` continues the title in its type, `body` sets running text
203
- * in Body B1 up to 480px, and `aside` sets a lead in Body B1 up to 480px beside a rail.
297
+ * The description's type: `heading` continues the title in its type, and `body` sets
298
+ * running text in Body B1 up to 480px.
204
299
  *
205
300
  * @default 'heading'
206
301
  */
207
302
  subtitle: {
208
- aside: { maxWidth: '480', textWrap: 'pretty', typography: 'body.b1' },
209
303
  body: { maxWidth: '480', textWrap: 'wrap', typography: 'body.b1' },
210
304
  heading: { textWrap: 'balance', typography: 'heading.h2' },
211
305
  },
306
+ /**
307
+ * The ground under the heading: the page or a light tone for `page`, an inverse `Section`
308
+ * for `inverse`, which takes the near-white text roles.
309
+ *
310
+ * @default 'page'
311
+ */
312
+ tone: { inverse: { color: 'inverse.content.secondary' }, page: {} },
212
313
  },
213
314
  },
214
315
  { id: 'tds/marketing/section-heading/subtitle' },
@@ -223,8 +324,8 @@ namespace styles {
223
324
  textWrap: 'balance',
224
325
  typography: 'heading.h2',
225
326
  },
226
- defaultVariants: { appearance: 'base' },
227
- variants: { appearance: { base: {}, inverse: { color: 'inverse.content.primary' } } },
327
+ defaultVariants: { tone: 'page' },
328
+ variants: { tone: { inverse: { color: 'inverse.content.primary' }, page: {} } },
228
329
  },
229
330
  { id: 'tds/marketing/section-heading/title' },
230
331
  )
@@ -3,7 +3,7 @@ import { type ComponentPropsWithRef, type ReactNode, useId } from 'react'
3
3
  import type * as zyzz from 'zyzz'
4
4
  import { style, variants } from '../zyzz.config.js'
5
5
  import { Section } from './Section.js'
6
- import { SectionHeading } from './SectionHeading.js'
6
+ import { Heading } from './SectionHeading.js'
7
7
 
8
8
  /**
9
9
  * One feature told through a large picture. Renders a `Section` named by its heading, over the art
@@ -51,15 +51,16 @@ export function Showcase(props: Showcase.Props) {
51
51
  <Section aria-labelledby={id} {...attributes}>
52
52
  <div {...styles.root({ variant })}>
53
53
  <div {...styles.header({ variant })}>
54
- <SectionHeading
54
+ <Heading
55
55
  description={description}
56
56
  eyebrow={eyebrow}
57
57
  subtitle="body"
58
58
  title={title}
59
59
  titleId={id}
60
+ tone={attributes.tone === 'inverse' ? 'inverse' : 'page'}
60
61
  >
61
62
  {action}
62
- </SectionHeading>
63
+ </Heading>
63
64
  </div>
64
65
  <div {...styles.body({ variant })}>
65
66
  {art && <div {...styles.art({ variant })}>{art}</div>}
@@ -78,7 +79,7 @@ export namespace Showcase {
78
79
  /** How the items and heading sit around the art. */
79
80
  export type Variant = 'contained' | 'split' | 'stacked'
80
81
 
81
- export type Props = Omit<Section.Props, 'children' | 'title'> &
82
+ export type Props = Omit<Section.Props, 'children' | keyof Section.HeadingProps> &
82
83
  Omit<zyzz.Props.Variants<typeof styles.root>, 'className' | 'style' | 'vars'> & {
83
84
  /** The section's one action under the heading, such as a `Button.Link`. */
84
85
  action?: ReactNode | undefined
@@ -38,7 +38,10 @@ export function Statement(props: Statement.Props) {
38
38
  }
39
39
 
40
40
  export namespace Statement {
41
- export type Props = Omit<Section.Props, 'bleed' | 'children' | 'space'> & {
41
+ export type Props = Omit<
42
+ Section.Props,
43
+ 'bleed' | 'children' | 'space' | keyof Section.HeadingProps
44
+ > & {
42
45
  /** One action under the sentence, such as a Marketing `Button.Link`. Absent by default. */
43
46
  action?: ReactNode | undefined
44
47
  /** The sentence, in sentence case. */
@@ -19,7 +19,7 @@ import { style, variants, vars } from '../zyzz.config.js'
19
19
  *
20
20
  * - Use it for a process that runs in order, in two to five steps.
21
21
  * - Start each title with a verb, such as Shape the strategy, and keep each sentence short.
22
- * - Place it under a heading, such as a `SectionHeading`, since each title is an `<h3>`.
22
+ * - Place it in a `Section` with a `title`, since each title is an `<h3>`.
23
23
  *
24
24
  * @example
25
25
  * <Steps
@@ -43,7 +43,7 @@ export function Story(props: Story.Props) {
43
43
 
44
44
  export namespace Story {
45
45
  /** The props of the `feature` variant. */
46
- export type FeatureProps = Omit<Section.Props, 'children' | 'title'> & {
46
+ export type FeatureProps = Omit<Section.Props, 'children' | keyof Section.HeadingProps> & {
47
47
  /** The link to the whole story, such as a Marketing `Link` that names the customer. */
48
48
  action?: ReactNode | undefined
49
49
  /** One line on what the customer does with Tempo. */
@@ -69,7 +69,7 @@ export namespace Story {
69
69
  /** The props of the `quote` variant. */
70
70
  export type QuoteProps = Omit<
71
71
  Section.Props,
72
- 'bleed' | 'children' | 'close' | 'space' | 'tone'
72
+ 'bleed' | 'children' | 'close' | 'space' | 'tone' | keyof Section.HeadingProps
73
73
  > & {
74
74
  /** A link under the speaker, such as a Marketing `Button.Link` to the case study. */
75
75
  action?: ReactNode | undefined
@@ -1,10 +1,9 @@
1
1
  /** Renders the deprecated Marketing table: a few linked articles as open cards under a heading. Card's open look replaces it. @module */
2
2
  import { useRender } from '@base-ui/react/use-render'
3
- import { type ReactNode, useId } from 'react'
3
+ import type { ReactNode } from 'react'
4
4
  import type * as zyzz from 'zyzz'
5
5
  import { style, variants } from '../zyzz.config.js'
6
6
  import { Section } from './Section.js'
7
- import { SectionHeading } from './SectionHeading.js'
8
7
 
9
8
  /**
10
9
  * A page section that sets a few linked entries side by side under its heading. Renders a
@@ -39,20 +38,15 @@ import { SectionHeading } from './SectionHeading.js'
39
38
  export function Table(props: Table.Props) {
40
39
  const { action, children, description, eyebrow, title, titleId, variant, ...attributes } = props
41
40
 
42
- const generated = useId()
43
- const id = titleId ?? generated
44
-
45
41
  return (
46
- <Section aria-labelledby={id} {...attributes}>
47
- <SectionHeading
48
- description={description}
49
- eyebrow={eyebrow}
50
- subtitle="body"
51
- title={title}
52
- titleId={id}
53
- >
54
- {action}
55
- </SectionHeading>
42
+ <Section
43
+ action={action}
44
+ description={description}
45
+ eyebrow={eyebrow}
46
+ title={title}
47
+ titleId={titleId}
48
+ {...attributes}
49
+ >
56
50
  <div {...styles.root({ variant })}>{children}</div>
57
51
  </Section>
58
52
  )
@@ -60,7 +54,7 @@ export function Table(props: Table.Props) {
60
54
 
61
55
  export namespace Table {
62
56
  /** @deprecated Use `Section.Props` and `Card.Props`. */
63
- export type Props = Omit<Section.Props, 'title'> &
57
+ export type Props = Omit<Section.Props, keyof Section.HeadingProps> &
64
58
  Omit<zyzz.Props.Variants<typeof styles.root>, 'className' | 'style' | 'vars'> & {
65
59
  /** The section's one action under the heading, such as a link to every article. */
66
60
  action?: ReactNode | undefined