@slipstream-ui/core 0.11.7 → 0.11.8
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 +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- 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/cover-image.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 +13 -2
- 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 +1 -1
- 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 +7 -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 +4 -0
- package/dist/src/components/page-header/PageHeader.js +2 -2
- package/dist/src/components/page-header/PageHeader.js.map +1 -1
- package/dist/src/components/page-header/PageHeader.mjs +2 -2
- package/dist/src/components/page-header/PageHeader.mjs.map +1 -1
- package/dist/src/components/site-footer/SiteFooter.d.ts +3 -1
- package/dist/src/components/site-footer/SiteFooter.js +3 -1
- package/dist/src/components/site-footer/SiteFooter.js.map +1 -1
- package/dist/src/components/site-footer/SiteFooter.mjs +3 -1
- package/dist/src/components/site-footer/SiteFooter.mjs.map +1 -1
- package/package.json +3 -3
- package/src/components/page-header/PageHeader.test.tsx +13 -0
- package/src/components/page-header/PageHeader.tsx +4 -2
- package/src/components/site-footer/SiteFooter.test.tsx +12 -0
- package/src/components/site-footer/SiteFooter.tsx +4 -0
- 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/cover-image.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 +13 -2
- 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 +1 -1
- 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 +7 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/site-footer/SiteFooter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type SiteFooterLink = {\n label: string;\n href: string;\n external?: boolean;\n};\n\nexport type SiteFooterColumn = {\n title: string;\n links: SiteFooterLink[];\n};\n\nexport type SiteFooterProps = React.HTMLAttributes<HTMLElement> & {\n /** Brand slot (logo/lockup). */\n brand?: React.ReactNode;\n /** Short line under the brand. */\n tagline?: string;\n columns: SiteFooterColumn[];\n /** Bottom bar (copyright, legal links). */\n legal?: React.ReactNode;\n /** Router link element. */\n linkComponent?: React.ElementType;\n /**\n * Prop used to pass the destination to `linkComponent`.\n * `href` (default) covers anchors and Next.js Link; `to` covers\n * react-router and other routers that use a `to` prop.\n */\n linkHrefProp?: 'href' | 'to';\n /** Current route, used to mark the matching link with aria-current=\"page\". */\n activeHref?: string;\n /** Prefix matching highlights /docs when on /docs/installation (default). */\n match?: 'prefix' | 'exact';\n};\n\nfunction isActive(itemHref: string, activeHref: string | undefined, match: 'prefix' | 'exact'): boolean {\n if (!activeHref) return false;\n if (itemHref === activeHref) return true;\n if (match === 'exact') return false;\n return activeHref.startsWith(itemHref.endsWith('/') ? itemHref : `${itemHref}/`);\n}\n\n/**\n * Marketing footer: brand + tagline column, link columns, and a legal bar.\n * Router-agnostic through `linkComponent` + `linkHrefProp`; external links\n * get safe rel, and the current route is marked with aria-current.\n */\nexport function SiteFooter({\n brand,\n tagline,\n columns,\n legal,\n linkComponent,\n linkHrefProp = 'href',\n activeHref,\n match = 'prefix',\n className,\n ...props\n}: SiteFooterProps) {\n const Link = linkComponent ?? 'a';\n const destination = (href: string) =>\n linkHrefProp === 'to' ? { to: href } : { href };\n\n return (\n <footer className={cn('border-t border-border bg-muted/30', className)} {...props}>\n <div className=\"mx-auto grid w-full max-w-7xl gap-8 px-4 py-12 sm:grid-cols-2 sm:px-6 lg:grid-cols-4\">\n <div className=\"min-w-0\">\n {brand}\n {tagline && <p className=\"mt-3 max-w-56 text-sm text-muted-foreground\">{tagline}</p>}\n </div>\n {columns.map((column) => (\n <div key={column.title}>\n <h2 className=\"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {column.title}\n </h2>\n <ul className=\"m-0 list-none space-y-2 p-0 text-sm\">\n {column.links.map((link) => {\n const active = isActive(link.href, activeHref, match);\n return (\n <li key={`${column.title}-${link.href}-${link.label}`}>\n <Link\n {...destination(link.href)}\n aria-current={active ? 'page' : undefined}\n {...(link.external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n className={cn(\n 'transition-colors hover:text-foreground',\n active ? 'font-medium text-foreground' : 'text-muted-foreground'\n )}\n >\n {link.label}\n </Link>\n </li>\n );\n })}\n </ul>\n </div>\n ))}\n </div>\n {legal && (\n <div className=\"border-t border-border\">\n <div className=\"mx-auto flex w-full max-w-7xl flex-wrap items-center justify-between gap-2 px-4 py-4 text-xs text-muted-foreground sm:px-6\">\n {legal}\n </div>\n </div>\n )}\n </footer>\n );\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/site-footer/SiteFooter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { cn } from '../../utils/cn';\n\nexport type SiteFooterLink = {\n label: string;\n href: string;\n external?: boolean;\n};\n\nexport type SiteFooterColumn = {\n title: string;\n links: SiteFooterLink[];\n};\n\nexport type SiteFooterProps = React.HTMLAttributes<HTMLElement> & {\n /** Brand slot (logo/lockup). */\n brand?: React.ReactNode;\n /** Short line under the brand. */\n tagline?: string;\n /** Contact block under the tagline (address, email, phone). */\n contact?: React.ReactNode;\n columns: SiteFooterColumn[];\n /** Bottom bar (copyright, legal links). */\n legal?: React.ReactNode;\n /** Router link element. */\n linkComponent?: React.ElementType;\n /**\n * Prop used to pass the destination to `linkComponent`.\n * `href` (default) covers anchors and Next.js Link; `to` covers\n * react-router and other routers that use a `to` prop.\n */\n linkHrefProp?: 'href' | 'to';\n /** Current route, used to mark the matching link with aria-current=\"page\". */\n activeHref?: string;\n /** Prefix matching highlights /docs when on /docs/installation (default). */\n match?: 'prefix' | 'exact';\n};\n\nfunction isActive(itemHref: string, activeHref: string | undefined, match: 'prefix' | 'exact'): boolean {\n if (!activeHref) return false;\n if (itemHref === activeHref) return true;\n if (match === 'exact') return false;\n return activeHref.startsWith(itemHref.endsWith('/') ? itemHref : `${itemHref}/`);\n}\n\n/**\n * Marketing footer: brand + tagline column, link columns, and a legal bar.\n * Router-agnostic through `linkComponent` + `linkHrefProp`; external links\n * get safe rel, and the current route is marked with aria-current.\n */\nexport function SiteFooter({\n brand,\n tagline,\n contact,\n columns,\n legal,\n linkComponent,\n linkHrefProp = 'href',\n activeHref,\n match = 'prefix',\n className,\n ...props\n}: SiteFooterProps) {\n const Link = linkComponent ?? 'a';\n const destination = (href: string) =>\n linkHrefProp === 'to' ? { to: href } : { href };\n\n return (\n <footer className={cn('border-t border-border bg-muted/30', className)} {...props}>\n <div className=\"mx-auto grid w-full max-w-7xl gap-8 px-4 py-12 sm:grid-cols-2 sm:px-6 lg:grid-cols-4\">\n <div className=\"min-w-0\">\n {brand}\n {tagline && <p className=\"mt-3 max-w-56 text-sm text-muted-foreground\">{tagline}</p>}\n {contact && <div className=\"mt-3 max-w-56 text-sm text-muted-foreground\">{contact}</div>}\n </div>\n {columns.map((column) => (\n <div key={column.title}>\n <h2 className=\"mb-3 text-xs font-semibold uppercase tracking-wider text-muted-foreground\">\n {column.title}\n </h2>\n <ul className=\"m-0 list-none space-y-2 p-0 text-sm\">\n {column.links.map((link) => {\n const active = isActive(link.href, activeHref, match);\n return (\n <li key={`${column.title}-${link.href}-${link.label}`}>\n <Link\n {...destination(link.href)}\n aria-current={active ? 'page' : undefined}\n {...(link.external ? { target: '_blank', rel: 'noopener noreferrer' } : {})}\n className={cn(\n 'transition-colors hover:text-foreground',\n active ? 'font-medium text-foreground' : 'text-muted-foreground'\n )}\n >\n {link.label}\n </Link>\n </li>\n );\n })}\n </ul>\n </div>\n ))}\n </div>\n {legal && (\n <div className=\"border-t border-border\">\n <div className=\"mx-auto flex w-full max-w-7xl flex-wrap items-center justify-between gap-2 px-4 py-4 text-xs text-muted-foreground sm:px-6\">\n {legal}\n </div>\n </div>\n )}\n </footer>\n );\n}\n"],"mappings":"AAsEQ,SAEc,KAFd;AArER,SAAS,UAAU;AAqCnB,SAAS,SAAS,UAAkB,YAAgC,OAAoC;AACtG,MAAI,CAAC,WAAY,QAAO;AACxB,MAAI,aAAa,WAAY,QAAO;AACpC,MAAI,UAAU,QAAS,QAAO;AAC9B,SAAO,WAAW,WAAW,SAAS,SAAS,GAAG,IAAI,WAAW,GAAG,QAAQ,GAAG;AACjF;AAOO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA,QAAQ;AAAA,EACR;AAAA,EACA,GAAG;AACL,GAAoB;AAClB,QAAM,OAAO,iBAAiB;AAC9B,QAAM,cAAc,CAAC,SACnB,iBAAiB,OAAO,EAAE,IAAI,KAAK,IAAI,EAAE,KAAK;AAEhD,SACE,qBAAC,YAAO,WAAW,GAAG,sCAAsC,SAAS,GAAI,GAAG,OAC1E;AAAA,yBAAC,SAAI,WAAU,wFACb;AAAA,2BAAC,SAAI,WAAU,WACZ;AAAA;AAAA,QACA,WAAW,oBAAC,OAAE,WAAU,+CAA+C,mBAAQ;AAAA,QAC/E,WAAW,oBAAC,SAAI,WAAU,+CAA+C,mBAAQ;AAAA,SACpF;AAAA,MACC,QAAQ,IAAI,CAAC,WACZ,qBAAC,SACC;AAAA,4BAAC,QAAG,WAAU,6EACX,iBAAO,OACV;AAAA,QACA,oBAAC,QAAG,WAAU,uCACX,iBAAO,MAAM,IAAI,CAAC,SAAS;AAC1B,gBAAM,SAAS,SAAS,KAAK,MAAM,YAAY,KAAK;AACpD,iBACE,oBAAC,QACC;AAAA,YAAC;AAAA;AAAA,cACE,GAAG,YAAY,KAAK,IAAI;AAAA,cACzB,gBAAc,SAAS,SAAS;AAAA,cAC/B,GAAI,KAAK,WAAW,EAAE,QAAQ,UAAU,KAAK,sBAAsB,IAAI,CAAC;AAAA,cACzE,WAAW;AAAA,gBACT;AAAA,gBACA,SAAS,gCAAgC;AAAA,cAC3C;AAAA,cAEC,eAAK;AAAA;AAAA,UACR,KAXO,GAAG,OAAO,KAAK,IAAI,KAAK,IAAI,IAAI,KAAK,KAAK,EAYnD;AAAA,QAEJ,CAAC,GACH;AAAA,WAvBQ,OAAO,KAwBjB,CACD;AAAA,OACH;AAAA,IACC,SACC,oBAAC,SAAI,WAAU,0BACb,8BAAC,SAAI,WAAU,8HACZ,iBACH,GACF;AAAA,KAEJ;AAEJ;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slipstream-ui/core",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/michaelmcshinsky/slipstream-ui.git",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"vitest": "^5.0.5",
|
|
60
60
|
"@slipstream-ui/eslint-config": "0.0.1",
|
|
61
61
|
"@slipstream-ui/tailwind-config": "0.0.1",
|
|
62
|
-
"@slipstream-ui/
|
|
63
|
-
"@slipstream-ui/
|
|
62
|
+
"@slipstream-ui/vitest-config": "0.0.1",
|
|
63
|
+
"@slipstream-ui/typescript-config": "0.0.1"
|
|
64
64
|
},
|
|
65
65
|
"peerDependencies": {
|
|
66
66
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -47,6 +47,19 @@ describe('PageHeader hero options', () => {
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
+
describe('PageHeader heading level', () => {
|
|
51
|
+
it('renders an h2 when as="h2"', () => {
|
|
52
|
+
render(<PageHeader as="h2" title="Section header" />);
|
|
53
|
+
expect(screen.getByRole('heading', { level: 2, name: 'Section header' })).toBeInTheDocument();
|
|
54
|
+
expect(screen.queryByRole('heading', { level: 1 })).not.toBeInTheDocument();
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
it('defaults to h1', () => {
|
|
58
|
+
render(<PageHeader title="Page title" />);
|
|
59
|
+
expect(screen.getByRole('heading', { level: 1, name: 'Page title' })).toBeInTheDocument();
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
50
63
|
describe('PageHeader migration aliases', () => {
|
|
51
64
|
it('renders subtitle when description is absent', () => {
|
|
52
65
|
render(<PageHeader title="Billing" subtitle="Manage invoices." />);
|
|
@@ -17,6 +17,8 @@ export type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
17
17
|
eyebrow?: React.ReactNode;
|
|
18
18
|
/** Heading scale - 'hero' is for marketing landing pages. */
|
|
19
19
|
size?: 'sm' | 'md' | 'lg' | 'hero';
|
|
20
|
+
/** Heading element. Default 'h1' for pages; use 'h2' inside sections/modals. */
|
|
21
|
+
as?: 'h1' | 'h2';
|
|
20
22
|
/** Text alignment; hero marketing pages often center. */
|
|
21
23
|
align?: 'left' | 'center';
|
|
22
24
|
/** Extra classes for the h1, for host display typography. */
|
|
@@ -40,7 +42,7 @@ const sizeClasses: Record<NonNullable<PageHeaderProps['size']>, string> = {
|
|
|
40
42
|
* and heading hierarchy.
|
|
41
43
|
*/
|
|
42
44
|
export const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(function PageHeader(
|
|
43
|
-
{ title, description, subtitle, breadcrumbs, actions, eyebrow, size = 'md', align = 'left', titleClassName, descriptionClassName, eyebrowClassName, className, children, ...props },
|
|
45
|
+
{ title, description, subtitle, breadcrumbs, actions, eyebrow, size = 'md', as: Heading = 'h1', align = 'left', titleClassName, descriptionClassName, eyebrowClassName, className, children, ...props },
|
|
44
46
|
ref
|
|
45
47
|
) {
|
|
46
48
|
const supporting = description ?? subtitle;
|
|
@@ -52,7 +54,7 @@ export const PageHeader = React.forwardRef<HTMLDivElement, PageHeaderProps>(func
|
|
|
52
54
|
)}
|
|
53
55
|
<div className={cn('flex w-full flex-wrap items-start justify-between gap-3', align === 'center' && 'justify-center')}>
|
|
54
56
|
<div className={cn('min-w-0', align === 'center' && 'flex flex-col items-center')}>
|
|
55
|
-
<
|
|
57
|
+
<Heading className={cn('font-semibold tracking-tight', sizeClasses[size], titleClassName)}>{title}</Heading>
|
|
56
58
|
{supporting && <p className={cn('mt-2 max-w-2xl text-base text-muted-foreground', descriptionClassName)}>{supporting}</p>}
|
|
57
59
|
</div>
|
|
58
60
|
{actions && <div className="flex shrink-0 items-center gap-2">{actions}</div>}
|
|
@@ -40,6 +40,18 @@ describe('SiteFooter', () => {
|
|
|
40
40
|
expect(tools).toHaveAttribute('data-to', '/tools');
|
|
41
41
|
});
|
|
42
42
|
|
|
43
|
+
it('renders the contact slot under the tagline', () => {
|
|
44
|
+
render(
|
|
45
|
+
<SiteFooter
|
|
46
|
+
brand={<span>Acme</span>}
|
|
47
|
+
tagline="Ship faster."
|
|
48
|
+
contact={<address>1 Main St<br />Salt Lake City, UT</address>}
|
|
49
|
+
columns={[{ title: 'Product', links: [{ label: 'Docs', href: '/docs' }] }]}
|
|
50
|
+
/>
|
|
51
|
+
);
|
|
52
|
+
expect(screen.getByText(/1 Main St/)).toBeInTheDocument();
|
|
53
|
+
});
|
|
54
|
+
|
|
43
55
|
it('has no accessibility violations', async () => {
|
|
44
56
|
const { container } = render(<SiteFooter columns={[{ title: 'Docs', links: [{ label: 'Intro', href: '/docs' }] }]} />);
|
|
45
57
|
expect(await axe(container)).toHaveNoViolations();
|
|
@@ -17,6 +17,8 @@ export type SiteFooterProps = React.HTMLAttributes<HTMLElement> & {
|
|
|
17
17
|
brand?: React.ReactNode;
|
|
18
18
|
/** Short line under the brand. */
|
|
19
19
|
tagline?: string;
|
|
20
|
+
/** Contact block under the tagline (address, email, phone). */
|
|
21
|
+
contact?: React.ReactNode;
|
|
20
22
|
columns: SiteFooterColumn[];
|
|
21
23
|
/** Bottom bar (copyright, legal links). */
|
|
22
24
|
legal?: React.ReactNode;
|
|
@@ -49,6 +51,7 @@ function isActive(itemHref: string, activeHref: string | undefined, match: 'pref
|
|
|
49
51
|
export function SiteFooter({
|
|
50
52
|
brand,
|
|
51
53
|
tagline,
|
|
54
|
+
contact,
|
|
52
55
|
columns,
|
|
53
56
|
legal,
|
|
54
57
|
linkComponent,
|
|
@@ -68,6 +71,7 @@ export function SiteFooter({
|
|
|
68
71
|
<div className="min-w-0">
|
|
69
72
|
{brand}
|
|
70
73
|
{tagline && <p className="mt-3 max-w-56 text-sm text-muted-foreground">{tagline}</p>}
|
|
74
|
+
{contact && <div className="mt-3 max-w-56 text-sm text-muted-foreground">{contact}</div>}
|
|
71
75
|
</div>
|
|
72
76
|
{columns.map((column) => (
|
|
73
77
|
<div key={column.title}>
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "announcement-bar",
|
|
9
9
|
"exportName": "AnnouncementBar",
|
|
10
10
|
"description": "Dismissible announcement bar with optional action, tone and sticky positioning.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "applied-filters",
|
|
9
9
|
"exportName": "AppliedFilters",
|
|
10
10
|
"description": "Applied-filter summary with a live count, removable chips and an edit action.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "article-card",
|
|
9
9
|
"exportName": "ArticleCard",
|
|
10
10
|
"description": "Linked article or resource card with media, eyebrow, title, summary and metadata.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "comparison-table",
|
|
9
9
|
"exportName": "ComparisonTable",
|
|
10
10
|
"description": "Marketing comparison table with check/dash boolean cells, a highlighted column and responsive overflow.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "confirm-dialog",
|
|
9
9
|
"exportName": "ConfirmDialog",
|
|
10
10
|
"description": "Accessible confirmation dialog with async pending state, destructive variant and cancellable actions, built on Dialog.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "contact-strip",
|
|
9
9
|
"exportName": "ContactStrip",
|
|
10
10
|
"description": "Compact labelled contact rows with optional icons and links.",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"tier": "atom",
|
|
5
5
|
"package": "@slipstream-ui/core",
|
|
6
6
|
"importPath": "@slipstream-ui/core",
|
|
7
|
-
"version": "0.11.
|
|
7
|
+
"version": "0.11.8",
|
|
8
8
|
"sourceDir": "container",
|
|
9
9
|
"exportName": "Container",
|
|
10
10
|
"description": "Centered, width-constrained page container with shared gutters and four width presets.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "cta-section",
|
|
9
9
|
"exportName": "CTASection",
|
|
10
10
|
"description": "Full-width conversion band with eyebrow, headline, supporting copy and actions.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "date-range-picker",
|
|
9
9
|
"exportName": "DateRangePicker",
|
|
10
10
|
"description": "Start/end date range with ISO strings and quick presets.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "deal-card",
|
|
9
9
|
"exportName": "DealCard",
|
|
10
10
|
"description": "Deal opportunity card with sector, status, metrics, NDA/CIM badges and access actions.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "document-card",
|
|
9
9
|
"exportName": "DocumentCard",
|
|
10
10
|
"description": "Document row with file metadata, access status and an optional download action.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "entity-card",
|
|
9
9
|
"exportName": "EntityCard",
|
|
10
10
|
"description": "Firm or member profile card with logo, type, location, stats, tags and actions.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "feature-grid",
|
|
9
9
|
"exportName": "FeatureGrid",
|
|
10
10
|
"description": "Grid of feature or benefit cards with an icon, title, copy and optional link.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "feature-row",
|
|
9
9
|
"exportName": "FeatureRow",
|
|
10
10
|
"description": "Alternating media and copy row for mid-page feature sections.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "filter-chips",
|
|
9
9
|
"exportName": "FilterChips",
|
|
10
10
|
"description": "Active-filter summary with removable chips and a clear-all action.",
|
|
@@ -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.8",
|
|
8
8
|
"sourceDir": "filter-panel",
|
|
9
9
|
"exportName": "FilterPanel",
|
|
10
10
|
"description": "Structured filter panel with collapsible sections and reset/apply actions.",
|