/*! Strand UI | MIT License | dillingerstaffing.com */ import type { JSX } from "preact"; import { forwardRef } from "preact/compat"; import { cx, styled } from "../../internal/index.js"; /** Reference-page chrome: a sidebar and main grid with the blocks that fill it. */ export const LabShell = styled("div", "strand-ref-shell", "LabShell"); export const LabSidebar = styled("aside", "strand-ref-shell__sidebar", "LabSidebar"); export const LabSidebarHead = styled("div", "strand-ref-shell__sidebar-head", "LabSidebarHead"); export const LabSidebarScroll = styled("div", "strand-ref-shell__sidebar-scroll", "LabSidebarScroll"); export const LabBrand = styled("div", "strand-ref-shell__brand", "LabBrand"); export const LabBrandMark = styled("div", "strand-ref-shell__brand-mark", "LabBrandMark"); export const LabBrandTitle = styled("span", "strand-ref-shell__brand-title", "LabBrandTitle"); export const LabBrandSub = styled("span", "strand-ref-shell__brand-sub", "LabBrandSub"); export const LabSidebarGroup = styled("div", "strand-ref-shell__group", "LabSidebarGroup"); export const LabSidebarGroupLabel = styled("span", "strand-ref-shell__group-label", "LabSidebarGroupLabel"); export const LabSidebarGroupList = styled("nav", "strand-ref-shell__group-list", "LabSidebarGroupList"); export const LabSidebarGroupDot = styled("span", "strand-ref-shell__group-dot", "LabSidebarGroupDot"); export const LabMain = styled("main", "strand-ref-shell__main", "LabMain"); export const LabHeader = styled("header", "strand-ref-header", "LabHeader"); export const LabHeaderTitle = styled("h1", "strand-ref-header__title", "LabHeaderTitle"); export const LabHeaderLead = styled("p", "strand-ref-header__lead", "LabHeaderLead"); export const LabHeaderMeta = styled("div", "strand-ref-header__meta", "LabHeaderMeta"); export const LabHeaderMetaItem = styled("div", "strand-ref-header__meta-item", "LabHeaderMetaItem"); export const LabHeaderMetaLabel = styled("span", "strand-ref-header__meta-label", "LabHeaderMetaLabel"); export const LabHeaderMetaValue = styled("span", "strand-ref-header__meta-value", "LabHeaderMetaValue"); export const LabTaxonomy = styled("div", "strand-ref-taxonomy", "LabTaxonomy"); export const LabTaxonomyTitle = styled("span", "strand-ref-taxonomy__title", "LabTaxonomyTitle"); export const LabTaxonomyList = styled("dl", "strand-ref-taxonomy__list", "LabTaxonomyList"); export const LabSection = styled("section", "strand-ref-section", "LabSection"); export const LabSectionHead = styled("div", "strand-ref-section__head", "LabSectionHead"); export const LabSectionHeadNote = styled("span", "strand-ref-section__head-note", "LabSectionHeadNote"); export const LabSectionBody = styled("div", "strand-ref-section__body", "LabSectionBody"); export const LabExample = styled("div", "strand-ref-example", "LabExample"); export const LabExampleMeta = styled("div", "strand-ref-example__meta", "LabExampleMeta"); export const LabExampleLabel = styled("span", "strand-ref-example__label", "LabExampleLabel"); export const LabExampleCode = styled("span", "strand-ref-example__code", "LabExampleCode"); export const LabExampleCaption = styled("p", "strand-ref-example__caption", "LabExampleCaption"); export type LabTaxonomyListProps = JSX.HTMLAttributes; export interface LabSidebarGroupLinkProps extends JSX.HTMLAttributes { /** Section anchor, e.g. "#typography". */ href?: string; } /** A sidebar link with its group dot. */ export const LabSidebarGroupLink = forwardRef( ({ className = "", children, ...rest }, ref) => ( {children} ), ); LabSidebarGroupLink.displayName = "LabSidebarGroupLink"; export interface LabExampleDemoProps extends JSX.HTMLAttributes { /** Drop the demo's inset. */ padNone?: boolean; /** Recessed surface instead of white. */ recessed?: boolean; } /** The demo panel of an example. */ export const LabExampleDemo = forwardRef( ({ padNone = false, recessed = false, className = "", children, ...rest }, ref) => (
{children}
), ); LabExampleDemo.displayName = "LabExampleDemo";