@slipstream-ui/core 0.11.0 → 0.11.1
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/index.d.mts +10 -6
- package/dist/index.d.ts +10 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/manifests/accordion.manifest.json +1 -1
- package/dist/manifests/alert.manifest.json +1 -1
- package/dist/manifests/announcement-bar.manifest.json +1 -1
- package/dist/manifests/app-shell.manifest.json +1 -1
- package/dist/manifests/applied-filters.manifest.json +1 -1
- package/dist/manifests/article-card.manifest.json +1 -1
- package/dist/manifests/auth-layout.manifest.json +1 -1
- package/dist/manifests/autocomplete.manifest.json +1 -1
- package/dist/manifests/avatar.manifest.json +1 -1
- package/dist/manifests/badge.manifest.json +1 -1
- package/dist/manifests/block.manifest.json +1 -1
- package/dist/manifests/bottom-nav.manifest.json +1 -1
- package/dist/manifests/breadcrumb.manifest.json +1 -1
- package/dist/manifests/button-group.manifest.json +1 -1
- package/dist/manifests/button.manifest.json +1 -1
- package/dist/manifests/calendar.manifest.json +1 -1
- package/dist/manifests/card.manifest.json +1 -1
- package/dist/manifests/checkbox.manifest.json +1 -1
- package/dist/manifests/comparison-table.manifest.json +1 -1
- package/dist/manifests/confirm-dialog.manifest.json +1 -1
- package/dist/manifests/contact-strip.manifest.json +1 -1
- package/dist/manifests/container.manifest.json +1 -1
- package/dist/manifests/cta-section.manifest.json +1 -1
- package/dist/manifests/data-table.manifest.json +1 -1
- package/dist/manifests/date-picker-popover.manifest.json +1 -1
- package/dist/manifests/date-picker.manifest.json +1 -1
- package/dist/manifests/date-range-picker.manifest.json +1 -1
- package/dist/manifests/deal-card.manifest.json +1 -1
- package/dist/manifests/dialog.manifest.json +1 -1
- package/dist/manifests/document-card.manifest.json +1 -1
- package/dist/manifests/drawer.manifest.json +1 -1
- package/dist/manifests/empty-state.manifest.json +1 -1
- package/dist/manifests/entity-card.manifest.json +1 -1
- package/dist/manifests/feature-grid.manifest.json +1 -1
- package/dist/manifests/feature-row.manifest.json +1 -1
- package/dist/manifests/fieldset.manifest.json +1 -1
- package/dist/manifests/file-upload.manifest.json +1 -1
- package/dist/manifests/filter-bar.manifest.json +1 -1
- package/dist/manifests/filter-chips.manifest.json +1 -1
- package/dist/manifests/filter-panel.manifest.json +1 -1
- package/dist/manifests/flex.manifest.json +1 -1
- package/dist/manifests/form-field.manifest.json +1 -1
- package/dist/manifests/form-layout.manifest.json +1 -1
- package/dist/manifests/form.manifest.json +1 -1
- package/dist/manifests/grid.manifest.json +1 -1
- package/dist/manifests/heading.manifest.json +1 -1
- package/dist/manifests/hero.manifest.json +1 -1
- package/dist/manifests/image.manifest.json +1 -1
- package/dist/manifests/input-group.manifest.json +1 -1
- package/dist/manifests/input.manifest.json +1 -1
- package/dist/manifests/label.manifest.json +1 -1
- package/dist/manifests/link-tabs.manifest.json +1 -1
- package/dist/manifests/link.manifest.json +1 -1
- package/dist/manifests/list.manifest.json +1 -1
- package/dist/manifests/load-more.manifest.json +1 -1
- package/dist/manifests/logo-cloud.manifest.json +1 -1
- package/dist/manifests/menu.manifest.json +1 -1
- package/dist/manifests/metric-card.manifest.json +1 -1
- package/dist/manifests/multi-select.manifest.json +1 -1
- package/dist/manifests/newsletter.manifest.json +1 -1
- package/dist/manifests/page-header.manifest.json +5 -5
- package/dist/manifests/pagination.manifest.json +1 -1
- package/dist/manifests/password-input.manifest.json +1 -1
- package/dist/manifests/popover.manifest.json +1 -1
- package/dist/manifests/process-steps.manifest.json +1 -1
- package/dist/manifests/progress.manifest.json +1 -1
- package/dist/manifests/prose.manifest.json +1 -1
- package/dist/manifests/radio.manifest.json +1 -1
- package/dist/manifests/range-slider.manifest.json +1 -1
- package/dist/manifests/search.manifest.json +1 -1
- package/dist/manifests/section-heading.manifest.json +3 -3
- package/dist/manifests/section.manifest.json +1 -1
- package/dist/manifests/segmented-control.manifest.json +1 -1
- package/dist/manifests/select-menu.manifest.json +1 -1
- package/dist/manifests/select.manifest.json +1 -1
- package/dist/manifests/separator.manifest.json +1 -1
- package/dist/manifests/site-footer.manifest.json +1 -1
- package/dist/manifests/site-header.manifest.json +1 -1
- package/dist/manifests/skeleton.manifest.json +1 -1
- package/dist/manifests/spinner.manifest.json +1 -1
- package/dist/manifests/stat-band.manifest.json +1 -1
- package/dist/manifests/stepper.manifest.json +1 -1
- package/dist/manifests/switch.manifest.json +1 -1
- package/dist/manifests/table-card.manifest.json +1 -1
- package/dist/manifests/table-of-contents.manifest.json +1 -1
- package/dist/manifests/table.manifest.json +1 -1
- package/dist/manifests/tabs.manifest.json +1 -1
- package/dist/manifests/testimonial.manifest.json +1 -1
- package/dist/manifests/text.manifest.json +1 -1
- package/dist/manifests/textarea.manifest.json +1 -1
- package/dist/manifests/theme-toggle.manifest.json +1 -1
- package/dist/manifests/time-picker.manifest.json +1 -1
- package/dist/manifests/timeline.manifest.json +1 -1
- package/dist/manifests/toast.manifest.json +1 -1
- package/dist/manifests/tombstone-card.manifest.json +1 -1
- package/dist/manifests/tooltip.manifest.json +1 -1
- package/dist/src/components/page-header/PageHeader.d.ts +6 -4
- package/dist/src/components/page-header/PageHeader.js.map +1 -1
- package/dist/src/components/page-header/PageHeader.mjs.map +1 -1
- package/dist/src/components/section-heading/SectionHeading.d.ts +4 -2
- package/dist/src/components/section-heading/SectionHeading.js.map +1 -1
- package/dist/src/components/section-heading/SectionHeading.mjs.map +1 -1
- package/package.json +2 -2
- package/src/components/page-header/PageHeader.test.tsx +16 -0
- package/src/components/page-header/PageHeader.tsx +3 -2
- package/src/components/section-heading/SectionHeading.test.tsx +16 -0
- package/src/components/section-heading/SectionHeading.tsx +2 -1
- package/src/manifests/accordion.manifest.json +1 -1
- package/src/manifests/alert.manifest.json +1 -1
- package/src/manifests/announcement-bar.manifest.json +1 -1
- package/src/manifests/app-shell.manifest.json +1 -1
- package/src/manifests/applied-filters.manifest.json +1 -1
- package/src/manifests/article-card.manifest.json +1 -1
- package/src/manifests/auth-layout.manifest.json +1 -1
- package/src/manifests/autocomplete.manifest.json +1 -1
- package/src/manifests/avatar.manifest.json +1 -1
- package/src/manifests/badge.manifest.json +1 -1
- package/src/manifests/block.manifest.json +1 -1
- package/src/manifests/bottom-nav.manifest.json +1 -1
- package/src/manifests/breadcrumb.manifest.json +1 -1
- package/src/manifests/button-group.manifest.json +1 -1
- package/src/manifests/button.manifest.json +1 -1
- package/src/manifests/calendar.manifest.json +1 -1
- package/src/manifests/card.manifest.json +1 -1
- package/src/manifests/checkbox.manifest.json +1 -1
- package/src/manifests/comparison-table.manifest.json +1 -1
- package/src/manifests/confirm-dialog.manifest.json +1 -1
- package/src/manifests/contact-strip.manifest.json +1 -1
- package/src/manifests/container.manifest.json +1 -1
- package/src/manifests/cta-section.manifest.json +1 -1
- package/src/manifests/data-table.manifest.json +1 -1
- package/src/manifests/date-picker-popover.manifest.json +1 -1
- package/src/manifests/date-picker.manifest.json +1 -1
- package/src/manifests/date-range-picker.manifest.json +1 -1
- package/src/manifests/deal-card.manifest.json +1 -1
- package/src/manifests/dialog.manifest.json +1 -1
- package/src/manifests/document-card.manifest.json +1 -1
- package/src/manifests/drawer.manifest.json +1 -1
- package/src/manifests/empty-state.manifest.json +1 -1
- package/src/manifests/entity-card.manifest.json +1 -1
- package/src/manifests/feature-grid.manifest.json +1 -1
- package/src/manifests/feature-row.manifest.json +1 -1
- package/src/manifests/fieldset.manifest.json +1 -1
- package/src/manifests/file-upload.manifest.json +1 -1
- package/src/manifests/filter-bar.manifest.json +1 -1
- package/src/manifests/filter-chips.manifest.json +1 -1
- package/src/manifests/filter-panel.manifest.json +1 -1
- package/src/manifests/flex.manifest.json +1 -1
- package/src/manifests/form-field.manifest.json +1 -1
- package/src/manifests/form-layout.manifest.json +1 -1
- package/src/manifests/form.manifest.json +1 -1
- package/src/manifests/grid.manifest.json +1 -1
- package/src/manifests/heading.manifest.json +1 -1
- package/src/manifests/hero.manifest.json +1 -1
- package/src/manifests/image.manifest.json +1 -1
- package/src/manifests/input-group.manifest.json +1 -1
- package/src/manifests/input.manifest.json +1 -1
- package/src/manifests/label.manifest.json +1 -1
- package/src/manifests/link-tabs.manifest.json +1 -1
- package/src/manifests/link.manifest.json +1 -1
- package/src/manifests/list.manifest.json +1 -1
- package/src/manifests/load-more.manifest.json +1 -1
- package/src/manifests/logo-cloud.manifest.json +1 -1
- package/src/manifests/menu.manifest.json +1 -1
- package/src/manifests/metric-card.manifest.json +1 -1
- package/src/manifests/multi-select.manifest.json +1 -1
- package/src/manifests/newsletter.manifest.json +1 -1
- package/src/manifests/page-header.manifest.json +5 -5
- package/src/manifests/pagination.manifest.json +1 -1
- package/src/manifests/password-input.manifest.json +1 -1
- package/src/manifests/popover.manifest.json +1 -1
- package/src/manifests/process-steps.manifest.json +1 -1
- package/src/manifests/progress.manifest.json +1 -1
- package/src/manifests/prose.manifest.json +1 -1
- package/src/manifests/radio.manifest.json +1 -1
- package/src/manifests/range-slider.manifest.json +1 -1
- package/src/manifests/search.manifest.json +1 -1
- package/src/manifests/section-heading.manifest.json +3 -3
- package/src/manifests/section.manifest.json +1 -1
- package/src/manifests/segmented-control.manifest.json +1 -1
- package/src/manifests/select-menu.manifest.json +1 -1
- package/src/manifests/select.manifest.json +1 -1
- package/src/manifests/separator.manifest.json +1 -1
- package/src/manifests/site-footer.manifest.json +1 -1
- package/src/manifests/site-header.manifest.json +1 -1
- package/src/manifests/skeleton.manifest.json +1 -1
- package/src/manifests/spinner.manifest.json +1 -1
- package/src/manifests/stat-band.manifest.json +1 -1
- package/src/manifests/stepper.manifest.json +1 -1
- package/src/manifests/switch.manifest.json +1 -1
- package/src/manifests/table-card.manifest.json +1 -1
- package/src/manifests/table-of-contents.manifest.json +1 -1
- package/src/manifests/table.manifest.json +1 -1
- package/src/manifests/tabs.manifest.json +1 -1
- package/src/manifests/testimonial.manifest.json +1 -1
- package/src/manifests/text.manifest.json +1 -1
- package/src/manifests/textarea.manifest.json +1 -1
- package/src/manifests/theme-toggle.manifest.json +1 -1
- package/src/manifests/time-picker.manifest.json +1 -1
- package/src/manifests/timeline.manifest.json +1 -1
- package/src/manifests/toast.manifest.json +1 -1
- package/src/manifests/tombstone-card.manifest.json +1 -1
- package/src/manifests/tooltip.manifest.json +1 -1
|
@@ -13,15 +13,15 @@
|
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"name": "description",
|
|
16
|
-
"type": "
|
|
16
|
+
"type": "ReactNode",
|
|
17
17
|
"required": false,
|
|
18
|
-
"description": "Supporting summary under the title."
|
|
18
|
+
"description": "Supporting summary under the title; accepts links and inline markup."
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"name": "subtitle",
|
|
22
|
-
"type": "
|
|
22
|
+
"type": "ReactNode",
|
|
23
23
|
"required": false,
|
|
24
|
-
"description": "Alias for description (migration-friendly)."
|
|
24
|
+
"description": "Alias for description (migration-friendly); accepts links and inline markup."
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"name": "breadcrumbs",
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
],
|
|
148
148
|
"package": "@slipstream-ui/core",
|
|
149
149
|
"importPath": "@slipstream-ui/core",
|
|
150
|
-
"version": "0.11.
|
|
150
|
+
"version": "0.11.1",
|
|
151
151
|
"sourceDir": "page-header",
|
|
152
152
|
"exportName": "PageHeader"
|
|
153
153
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "process-steps",
|
|
9
9
|
"exportName": "ProcessSteps",
|
|
10
10
|
"description": "Ordered process cards with derived step numbers or custom icons.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "prose",
|
|
9
9
|
"exportName": "Prose",
|
|
10
10
|
"description": "Self-contained long-form typography for rendered markdown/MDX: headings, links, lists, code, tables, quotes and figures.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "range-slider",
|
|
9
9
|
"exportName": "RangeSlider",
|
|
10
10
|
"description": "Dual-thumb numeric range slider with labeled native inputs and formatted values.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "section-heading",
|
|
9
9
|
"exportName": "SectionHeading",
|
|
10
10
|
"description": "Section heading block: eyebrow, title (level 2-4), description and actions, with left/center alignment and three sizes.",
|
|
@@ -18,9 +18,9 @@
|
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"name": "description",
|
|
21
|
-
"type": "
|
|
21
|
+
"type": "ReactNode",
|
|
22
22
|
"required": false,
|
|
23
|
-
"description": "Supporting copy."
|
|
23
|
+
"description": "Supporting copy; accepts links and inline markup."
|
|
24
24
|
},
|
|
25
25
|
{
|
|
26
26
|
"name": "eyebrow",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "section",
|
|
9
9
|
"exportName": "Section",
|
|
10
10
|
"description": "Full-width page section with a surface tone, vertical rhythm and an optional centered container.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "segmented-control",
|
|
9
9
|
"exportName": "SegmentedControl",
|
|
10
10
|
"description": "Single- or multi-select segmented control for view and filter switches.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "select-menu",
|
|
9
9
|
"exportName": "SelectMenu",
|
|
10
10
|
"description": "Custom listbox select for rich options: descriptions, icons, groups, multi-select, custom rows and hidden inputs for forms.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "site-footer",
|
|
9
9
|
"exportName": "SiteFooter",
|
|
10
10
|
"description": "Marketing footer: brand + tagline column, link columns and a legal bar; router-agnostic via linkComponent.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "organism",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "site-header",
|
|
9
9
|
"exportName": "SiteHeader",
|
|
10
10
|
"description": "Marketing/site header: sticky bar with brand, horizontal navigation with prefix-aware active states, right-aligned actions and a mobile drawer.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "stat-band",
|
|
9
9
|
"exportName": "StatBand",
|
|
10
10
|
"description": "Semantic description list of headline stats with labels, optional hints and column presets.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "table-card",
|
|
9
9
|
"exportName": "TableCard",
|
|
10
10
|
"description": "Table shell with title/description, header actions, optional toolbar, edge-to-edge body and a footer row.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "table-of-contents",
|
|
9
9
|
"exportName": "TableOfContents",
|
|
10
10
|
"description": "Sticky 'On this page' navigation with real anchor links, nested levels and aria-current, plus a useScrollSpy hook for the active heading.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "testimonial",
|
|
9
9
|
"exportName": "Testimonial",
|
|
10
10
|
"description": "Semantic written testimonial with quote, person, role, company, avatar and logo slots.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "molecule",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.1",
|
|
8
8
|
"sourceDir": "tombstone-card",
|
|
9
9
|
"exportName": "TombstoneCard",
|
|
10
10
|
"description": "Placeholder card for archived, closed or unavailable marketplace items.",
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
title: string;
|
|
4
|
-
|
|
4
|
+
/** Supporting summary under the title; accepts links and inline markup. */
|
|
5
|
+
description?: React.ReactNode;
|
|
5
6
|
/** Alias for `description` (migration-friendly). */
|
|
6
|
-
subtitle?:
|
|
7
|
+
subtitle?: React.ReactNode;
|
|
7
8
|
/** Breadcrumbs/eyebrow above the title. */
|
|
8
9
|
breadcrumbs?: React.ReactNode;
|
|
9
10
|
/** Right-aligned actions (buttons, menus). */
|
|
@@ -30,9 +31,10 @@ export type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
30
31
|
*/
|
|
31
32
|
export declare const PageHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
32
33
|
title: string;
|
|
33
|
-
|
|
34
|
+
/** Supporting summary under the title; accepts links and inline markup. */
|
|
35
|
+
description?: React.ReactNode;
|
|
34
36
|
/** Alias for `description` (migration-friendly). */
|
|
35
|
-
subtitle?:
|
|
37
|
+
subtitle?: React.ReactNode;
|
|
36
38
|
/** Breadcrumbs/eyebrow above the title. */
|
|
37
39
|
breadcrumbs?: React.ReactNode;
|
|
38
40
|
/** Right-aligned actions (buttons, menus). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/page-header/PageHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n title: string;\n description?:
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/page-header/PageHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n title: string;\n /** Supporting summary under the title; accepts links and inline markup. */\n description?: React.ReactNode;\n /** Alias for `description` (migration-friendly). */\n subtitle?: React.ReactNode;\n /** Breadcrumbs/eyebrow above the title. */\n breadcrumbs?: React.ReactNode;\n /** Right-aligned actions (buttons, menus). */\n actions?: React.ReactNode;\n /** Small slot under the title row (tabs, filters). */\n children?: React.ReactNode;\n /** Eyebrow/kicker above the title (category, date, overline). */\n eyebrow?: React.ReactNode;\n /** Heading scale - 'hero' is for marketing landing pages. */\n size?: 'sm' | 'md' | 'lg' | 'hero';\n /** Text alignment; hero marketing pages often center. */\n align?: 'left' | 'center';\n /** Extra classes for the h1, for host display typography. */\n titleClassName?: string;\n /** Extra classes for the description. */\n descriptionClassName?: string;\n /** Extra classes for the eyebrow. */\n eyebrowClassName?: string;\n};\n\nconst sizeClasses: Record<NonNullable<PageHeaderProps['size']>, string> = {\n sm: 'text-xl',\n md: 'text-2xl',\n lg: 'text-3xl',\n hero: 'text-4xl sm:text-5xl lg:text-[3.4rem] lg:leading-[1.1]',\n};\n\n/**\n * Standard page heading block: optional breadcrumbs, title, description and\n * a right-aligned action cluster. Pages stop inventing their own spacing\n * and heading hierarchy.\n */\nexport const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(function PageHeader(\n { title, description, subtitle, breadcrumbs, actions, eyebrow, size = 'md', align = 'left', titleClassName, descriptionClassName, eyebrowClassName, className, children, ...props },\n ref\n) {\n const supporting = description ?? subtitle;\n return (\n <div ref={ref} className={cn('flex flex-col gap-2', align === 'center' && 'items-center text-center', className)} {...props}>\n {breadcrumbs && <div className=\"text-sm text-muted-foreground\">{breadcrumbs}</div>}\n {eyebrow && (\n <div className={cn('text-xs font-medium uppercase tracking-wide text-primary-ink', eyebrowClassName)}>{eyebrow}</div>\n )}\n <div className={cn('flex w-full flex-wrap items-start justify-between gap-3', align === 'center' && 'justify-center')}>\n <div className={cn('min-w-0', align === 'center' && 'flex flex-col items-center')}>\n <h1 className={cn('font-semibold tracking-tight', sizeClasses[size], titleClassName)}>{title}</h1>\n {supporting && <p className={cn('mt-2 max-w-2xl text-base text-muted-foreground', descriptionClassName)}>{supporting}</p>}\n </div>\n {actions && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </div>\n {children && <div className=\"mt-2\">{children}</div>}\n </div>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAgDsB;AAhDtB,YAAuB;AACvB,gBAAmB;AA4BnB,MAAM,cAAoE;AAAA,EACxE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AACR;AAOO,MAAM,aAAa,MAAM,WAA4C,SAASA,YACnF,EAAE,OAAO,aAAa,UAAU,aAAa,SAAS,SAAS,OAAO,MAAM,QAAQ,QAAQ,gBAAgB,sBAAsB,kBAAkB,WAAW,UAAU,GAAG,MAAM,GAClL,KACA;AACA,QAAM,aAAa,eAAe;AAClC,SACE,6CAAC,SAAI,KAAU,eAAW,cAAG,uBAAuB,UAAU,YAAY,4BAA4B,SAAS,GAAI,GAAG,OACnH;AAAA,mBAAe,4CAAC,SAAI,WAAU,iCAAiC,uBAAY;AAAA,IAC3E,WACC,4CAAC,SAAI,eAAW,cAAG,gEAAgE,gBAAgB,GAAI,mBAAQ;AAAA,IAEjH,6CAAC,SAAI,eAAW,cAAG,2DAA2D,UAAU,YAAY,gBAAgB,GAClH;AAAA,mDAAC,SAAI,eAAW,cAAG,WAAW,UAAU,YAAY,4BAA4B,GAC9E;AAAA,oDAAC,QAAG,eAAW,cAAG,gCAAgC,YAAY,IAAI,GAAG,cAAc,GAAI,iBAAM;AAAA,QAC5F,cAAc,4CAAC,OAAE,eAAW,cAAG,kDAAkD,oBAAoB,GAAI,sBAAW;AAAA,SACvH;AAAA,MACC,WAAW,4CAAC,SAAI,WAAU,oCAAoC,mBAAQ;AAAA,OACzE;AAAA,IACC,YAAY,4CAAC,SAAI,WAAU,QAAQ,UAAS;AAAA,KAC/C;AAEJ,CAAC;","names":["PageHeader"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/page-header/PageHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n title: string;\n description?:
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/page-header/PageHeader.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n title: string;\n /** Supporting summary under the title; accepts links and inline markup. */\n description?: React.ReactNode;\n /** Alias for `description` (migration-friendly). */\n subtitle?: React.ReactNode;\n /** Breadcrumbs/eyebrow above the title. */\n breadcrumbs?: React.ReactNode;\n /** Right-aligned actions (buttons, menus). */\n actions?: React.ReactNode;\n /** Small slot under the title row (tabs, filters). */\n children?: React.ReactNode;\n /** Eyebrow/kicker above the title (category, date, overline). */\n eyebrow?: React.ReactNode;\n /** Heading scale - 'hero' is for marketing landing pages. */\n size?: 'sm' | 'md' | 'lg' | 'hero';\n /** Text alignment; hero marketing pages often center. */\n align?: 'left' | 'center';\n /** Extra classes for the h1, for host display typography. */\n titleClassName?: string;\n /** Extra classes for the description. */\n descriptionClassName?: string;\n /** Extra classes for the eyebrow. */\n eyebrowClassName?: string;\n};\n\nconst sizeClasses: Record<NonNullable<PageHeaderProps['size']>, string> = {\n sm: 'text-xl',\n md: 'text-2xl',\n lg: 'text-3xl',\n hero: 'text-4xl sm:text-5xl lg:text-[3.4rem] lg:leading-[1.1]',\n};\n\n/**\n * Standard page heading block: optional breadcrumbs, title, description and\n * a right-aligned action cluster. Pages stop inventing their own spacing\n * and heading hierarchy.\n */\nexport const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(function PageHeader(\n { title, description, subtitle, breadcrumbs, actions, eyebrow, size = 'md', align = 'left', titleClassName, descriptionClassName, eyebrowClassName, className, children, ...props },\n ref\n) {\n const supporting = description ?? subtitle;\n return (\n <div ref={ref} className={cn('flex flex-col gap-2', align === 'center' && 'items-center text-center', className)} {...props}>\n {breadcrumbs && <div className=\"text-sm text-muted-foreground\">{breadcrumbs}</div>}\n {eyebrow && (\n <div className={cn('text-xs font-medium uppercase tracking-wide text-primary-ink', eyebrowClassName)}>{eyebrow}</div>\n )}\n <div className={cn('flex w-full flex-wrap items-start justify-between gap-3', align === 'center' && 'justify-center')}>\n <div className={cn('min-w-0', align === 'center' && 'flex flex-col items-center')}>\n <h1 className={cn('font-semibold tracking-tight', sizeClasses[size], titleClassName)}>{title}</h1>\n {supporting && <p className={cn('mt-2 max-w-2xl text-base text-muted-foreground', descriptionClassName)}>{supporting}</p>}\n </div>\n {actions && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </div>\n {children && <div className=\"mt-2\">{children}</div>}\n </div>\n );\n});\n"],"mappings":"AAgDsB,cAKd,YALc;AAhDtB,YAAY,WAAW;AACvB,SAAS,UAAU;AA4BnB,MAAM,cAAoE;AAAA,EACxE,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,MAAM;AACR;AAOO,MAAM,aAAa,MAAM,WAA4C,SAASA,YACnF,EAAE,OAAO,aAAa,UAAU,aAAa,SAAS,SAAS,OAAO,MAAM,QAAQ,QAAQ,gBAAgB,sBAAsB,kBAAkB,WAAW,UAAU,GAAG,MAAM,GAClL,KACA;AACA,QAAM,aAAa,eAAe;AAClC,SACE,qBAAC,SAAI,KAAU,WAAW,GAAG,uBAAuB,UAAU,YAAY,4BAA4B,SAAS,GAAI,GAAG,OACnH;AAAA,mBAAe,oBAAC,SAAI,WAAU,iCAAiC,uBAAY;AAAA,IAC3E,WACC,oBAAC,SAAI,WAAW,GAAG,gEAAgE,gBAAgB,GAAI,mBAAQ;AAAA,IAEjH,qBAAC,SAAI,WAAW,GAAG,2DAA2D,UAAU,YAAY,gBAAgB,GAClH;AAAA,2BAAC,SAAI,WAAW,GAAG,WAAW,UAAU,YAAY,4BAA4B,GAC9E;AAAA,4BAAC,QAAG,WAAW,GAAG,gCAAgC,YAAY,IAAI,GAAG,cAAc,GAAI,iBAAM;AAAA,QAC5F,cAAc,oBAAC,OAAE,WAAW,GAAG,kDAAkD,oBAAoB,GAAI,sBAAW;AAAA,SACvH;AAAA,MACC,WAAW,oBAAC,SAAI,WAAU,oCAAoC,mBAAQ;AAAA,OACzE;AAAA,IACC,YAAY,oBAAC,SAAI,WAAU,QAAQ,UAAS;AAAA,KAC/C;AAEJ,CAAC;","names":["PageHeader"]}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
export type SectionHeadingProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
3
3
|
title: string;
|
|
4
|
-
|
|
4
|
+
/** Supporting copy under the title; accepts links and inline markup. */
|
|
5
|
+
description?: React.ReactNode;
|
|
5
6
|
/** Kicker above the title (category, step, overline). */
|
|
6
7
|
eyebrow?: React.ReactNode;
|
|
7
8
|
/** Right-aligned actions (link to all, buttons). */
|
|
@@ -24,7 +25,8 @@ export type SectionHeadingProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
24
25
|
*/
|
|
25
26
|
export declare const SectionHeading: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
|
26
27
|
title: string;
|
|
27
|
-
|
|
28
|
+
/** Supporting copy under the title; accepts links and inline markup. */
|
|
29
|
+
description?: React.ReactNode;
|
|
28
30
|
/** Kicker above the title (category, step, overline). */
|
|
29
31
|
eyebrow?: React.ReactNode;
|
|
30
32
|
/** Right-aligned actions (link to all, buttons). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/section-heading/SectionHeading.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type SectionHeadingProps = React.HTMLAttributes<HTMLDivElement> & {\n title: string;\n description?:
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/section-heading/SectionHeading.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type SectionHeadingProps = React.HTMLAttributes<HTMLDivElement> & {\n title: string;\n /** Supporting copy under the title; accepts links and inline markup. */\n description?: React.ReactNode;\n /** Kicker above the title (category, step, overline). */\n eyebrow?: React.ReactNode;\n /** Right-aligned actions (link to all, buttons). */\n actions?: React.ReactNode;\n /** Heading level rendered for the title (default h2). */\n level?: 2 | 3 | 4;\n align?: 'left' | 'center';\n size?: 'sm' | 'md' | 'lg';\n /** Extra classes for the title, for host typography (display fonts, scales). */\n titleClassName?: string;\n /** Extra classes for the description. */\n descriptionClassName?: string;\n /** Extra classes for the eyebrow. */\n eyebrowClassName?: string;\n};\n\nconst sizeClasses: Record<NonNullable<SectionHeadingProps['size']>, string> = {\n sm: 'text-lg',\n md: 'text-2xl',\n lg: 'text-3xl',\n};\n\n/**\n * Marketing/content section heading: eyebrow, title, description and an\n * actions slot, with heading level and alignment control. Complements\n * PageHeader (which owns the page's single h1).\n */\nexport const SectionHeading = React.forwardRef<HTMLDivElement, SectionHeadingProps>(function SectionHeading(\n { title, description, eyebrow, actions, level = 2, align = 'left', size = 'md', titleClassName, descriptionClassName, eyebrowClassName, className, ...props },\n ref\n) {\n const Heading = `h${level}` as 'h2' | 'h3' | 'h4';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'flex flex-col gap-2',\n align === 'center' ? 'items-center text-center' : 'sm:flex-row sm:items-end sm:justify-between',\n className\n )}\n {...props}\n >\n <div className={cn('min-w-0', align === 'center' && 'flex flex-col items-center')}>\n {eyebrow && <div className={cn('mb-1 text-xs font-medium uppercase tracking-wide text-primary-ink', eyebrowClassName)}>{eyebrow}</div>}\n <Heading className={cn('font-semibold tracking-tight', sizeClasses[size], titleClassName)}>{title}</Heading>\n {description && (\n <p className={cn('mt-2 max-w-2xl text-muted-foreground', align === 'center' ? 'mx-auto' : '', descriptionClassName)}>{description}</p>\n )}\n </div>\n {actions && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </div>\n );\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkDM;AAlDN,YAAuB;AACvB,gBAAmB;AAsBnB,MAAM,cAAwE;AAAA,EAC5E,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAOO,MAAM,iBAAiB,MAAM,WAAgD,SAASA,gBAC3F,EAAE,OAAO,aAAa,SAAS,SAAS,QAAQ,GAAG,QAAQ,QAAQ,OAAO,MAAM,gBAAgB,sBAAsB,kBAAkB,WAAW,GAAG,MAAM,GAC5J,KACA;AACA,QAAM,UAAU,IAAI,KAAK;AAEzB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,eAAW;AAAA,QACT;AAAA,QACA,UAAU,WAAW,6BAA6B;AAAA,QAClD;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,qDAAC,SAAI,eAAW,cAAG,WAAW,UAAU,YAAY,4BAA4B,GAC7E;AAAA,qBAAW,4CAAC,SAAI,eAAW,cAAG,qEAAqE,gBAAgB,GAAI,mBAAQ;AAAA,UAChI,4CAAC,WAAQ,eAAW,cAAG,gCAAgC,YAAY,IAAI,GAAG,cAAc,GAAI,iBAAM;AAAA,UACjG,eACC,4CAAC,OAAE,eAAW,cAAG,wCAAwC,UAAU,WAAW,YAAY,IAAI,oBAAoB,GAAI,uBAAY;AAAA,WAEtI;AAAA,QACC,WAAW,4CAAC,SAAI,WAAU,oCAAoC,mBAAQ;AAAA;AAAA;AAAA,EACzE;AAEJ,CAAC;","names":["SectionHeading"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/section-heading/SectionHeading.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type SectionHeadingProps = React.HTMLAttributes<HTMLDivElement> & {\n title: string;\n description?:
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/section-heading/SectionHeading.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type SectionHeadingProps = React.HTMLAttributes<HTMLDivElement> & {\n title: string;\n /** Supporting copy under the title; accepts links and inline markup. */\n description?: React.ReactNode;\n /** Kicker above the title (category, step, overline). */\n eyebrow?: React.ReactNode;\n /** Right-aligned actions (link to all, buttons). */\n actions?: React.ReactNode;\n /** Heading level rendered for the title (default h2). */\n level?: 2 | 3 | 4;\n align?: 'left' | 'center';\n size?: 'sm' | 'md' | 'lg';\n /** Extra classes for the title, for host typography (display fonts, scales). */\n titleClassName?: string;\n /** Extra classes for the description. */\n descriptionClassName?: string;\n /** Extra classes for the eyebrow. */\n eyebrowClassName?: string;\n};\n\nconst sizeClasses: Record<NonNullable<SectionHeadingProps['size']>, string> = {\n sm: 'text-lg',\n md: 'text-2xl',\n lg: 'text-3xl',\n};\n\n/**\n * Marketing/content section heading: eyebrow, title, description and an\n * actions slot, with heading level and alignment control. Complements\n * PageHeader (which owns the page's single h1).\n */\nexport const SectionHeading = React.forwardRef<HTMLDivElement, SectionHeadingProps>(function SectionHeading(\n { title, description, eyebrow, actions, level = 2, align = 'left', size = 'md', titleClassName, descriptionClassName, eyebrowClassName, className, ...props },\n ref\n) {\n const Heading = `h${level}` as 'h2' | 'h3' | 'h4';\n\n return (\n <div\n ref={ref}\n className={cn(\n 'flex flex-col gap-2',\n align === 'center' ? 'items-center text-center' : 'sm:flex-row sm:items-end sm:justify-between',\n className\n )}\n {...props}\n >\n <div className={cn('min-w-0', align === 'center' && 'flex flex-col items-center')}>\n {eyebrow && <div className={cn('mb-1 text-xs font-medium uppercase tracking-wide text-primary-ink', eyebrowClassName)}>{eyebrow}</div>}\n <Heading className={cn('font-semibold tracking-tight', sizeClasses[size], titleClassName)}>{title}</Heading>\n {description && (\n <p className={cn('mt-2 max-w-2xl text-muted-foreground', align === 'center' ? 'mx-auto' : '', descriptionClassName)}>{description}</p>\n )}\n </div>\n {actions && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </div>\n );\n});\n"],"mappings":"AAkDM,SACc,KADd;AAlDN,YAAY,WAAW;AACvB,SAAS,UAAU;AAsBnB,MAAM,cAAwE;AAAA,EAC5E,IAAI;AAAA,EACJ,IAAI;AAAA,EACJ,IAAI;AACN;AAOO,MAAM,iBAAiB,MAAM,WAAgD,SAASA,gBAC3F,EAAE,OAAO,aAAa,SAAS,SAAS,QAAQ,GAAG,QAAQ,QAAQ,OAAO,MAAM,gBAAgB,sBAAsB,kBAAkB,WAAW,GAAG,MAAM,GAC5J,KACA;AACA,QAAM,UAAU,IAAI,KAAK;AAEzB,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,WAAW;AAAA,QACT;AAAA,QACA,UAAU,WAAW,6BAA6B;AAAA,QAClD;AAAA,MACF;AAAA,MACC,GAAG;AAAA,MAEJ;AAAA,6BAAC,SAAI,WAAW,GAAG,WAAW,UAAU,YAAY,4BAA4B,GAC7E;AAAA,qBAAW,oBAAC,SAAI,WAAW,GAAG,qEAAqE,gBAAgB,GAAI,mBAAQ;AAAA,UAChI,oBAAC,WAAQ,WAAW,GAAG,gCAAgC,YAAY,IAAI,GAAG,cAAc,GAAI,iBAAM;AAAA,UACjG,eACC,oBAAC,OAAE,WAAW,GAAG,wCAAwC,UAAU,WAAW,YAAY,IAAI,oBAAoB,GAAI,uBAAY;AAAA,WAEtI;AAAA,QACC,WAAW,oBAAC,SAAI,WAAU,oCAAoC,mBAAQ;AAAA;AAAA;AAAA,EACzE;AAEJ,CAAC;","names":["SectionHeading"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slipstream-ui/core",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/michaelmcshinsky/slipstream-ui.git",
|
|
@@ -58,8 +58,8 @@
|
|
|
58
58
|
"typescript": "^5.3.3",
|
|
59
59
|
"vitest": "^5.0.5",
|
|
60
60
|
"@slipstream-ui/eslint-config": "0.0.1",
|
|
61
|
-
"@slipstream-ui/tailwind-config": "0.0.1",
|
|
62
61
|
"@slipstream-ui/typescript-config": "0.0.1",
|
|
62
|
+
"@slipstream-ui/tailwind-config": "0.0.1",
|
|
63
63
|
"@slipstream-ui/vitest-config": "0.0.1"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
@@ -58,4 +58,20 @@ describe('PageHeader migration aliases', () => {
|
|
|
58
58
|
expect(screen.getByText('Canonical')).toBeInTheDocument();
|
|
59
59
|
expect(screen.queryByText('Alias')).not.toBeInTheDocument();
|
|
60
60
|
});
|
|
61
|
+
|
|
62
|
+
it('renders ReactNode descriptions with links', () => {
|
|
63
|
+
render(
|
|
64
|
+
<PageHeader
|
|
65
|
+
title="Events"
|
|
66
|
+
description={
|
|
67
|
+
<>
|
|
68
|
+
Browse the <a href="/events">competitions page</a> or{' '}
|
|
69
|
+
<a href="/subscribe">subscribe to the ICS feed</a>.
|
|
70
|
+
</>
|
|
71
|
+
}
|
|
72
|
+
/>
|
|
73
|
+
);
|
|
74
|
+
expect(screen.getByRole('link', { name: 'competitions page' })).toHaveAttribute('href', '/events');
|
|
75
|
+
expect(screen.getByRole('link', { name: 'subscribe to the ICS feed' })).toHaveAttribute('href', '/subscribe');
|
|
76
|
+
});
|
|
61
77
|
});
|
|
@@ -3,9 +3,10 @@ import { cn } from '../../utils/cn';
|
|
|
3
3
|
|
|
4
4
|
export type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
5
5
|
title: string;
|
|
6
|
-
|
|
6
|
+
/** Supporting summary under the title; accepts links and inline markup. */
|
|
7
|
+
description?: React.ReactNode;
|
|
7
8
|
/** Alias for `description` (migration-friendly). */
|
|
8
|
-
subtitle?:
|
|
9
|
+
subtitle?: React.ReactNode;
|
|
9
10
|
/** Breadcrumbs/eyebrow above the title. */
|
|
10
11
|
breadcrumbs?: React.ReactNode;
|
|
11
12
|
/** Right-aligned actions (buttons, menus). */
|
|
@@ -29,4 +29,20 @@ describe('SectionHeading', () => {
|
|
|
29
29
|
const { container } = render(<SectionHeading title="Section" description="Copy" />);
|
|
30
30
|
expect(await axe(container)).toHaveNoViolations();
|
|
31
31
|
});
|
|
32
|
+
|
|
33
|
+
it('renders ReactNode descriptions with links', () => {
|
|
34
|
+
render(
|
|
35
|
+
<SectionHeading
|
|
36
|
+
title="Deadlines"
|
|
37
|
+
description={
|
|
38
|
+
<>
|
|
39
|
+
See the <a href="/deadlines">full list</a> or{' '}
|
|
40
|
+
<a href="/submit">submit an event</a>.
|
|
41
|
+
</>
|
|
42
|
+
}
|
|
43
|
+
/>
|
|
44
|
+
);
|
|
45
|
+
expect(screen.getByRole('link', { name: 'full list' })).toHaveAttribute('href', '/deadlines');
|
|
46
|
+
expect(screen.getByRole('link', { name: 'submit an event' })).toHaveAttribute('href', '/submit');
|
|
47
|
+
});
|
|
32
48
|
});
|