{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "footer",
  "title": "Footer",
  "description": "The end of a page: brand, groups of links, and a line for copyright.",
  "registryDependencies": [
    "https://creance.pages.dev/r/creance-base.json"
  ],
  "files": [
    {
      "path": "footer/Footer.css",
      "content": ".cr-footer {\n  display: flex;\n  flex-direction: column;\n  gap: var(--cr-space-6);\n  color: var(--cr-color-text-default);\n  font-family: var(--cr-font-family-sans);\n  font-size: var(--cr-font-size-md);\n}\n\n.cr-footer__top {\n  display: flex;\n  flex-wrap: wrap;\n  gap: var(--cr-space-8) var(--cr-space-12);\n}\n\n.cr-footer__about {\n  display: flex;\n  flex: 1 1 260px;\n  flex-direction: column;\n  gap: var(--cr-space-2);\n  max-width: 340px;\n  margin-inline-end: auto;\n}\n\n.cr-footer__brand {\n  font-size: var(--cr-font-size-lg);\n  font-weight: var(--cr-font-weight-bold);\n  letter-spacing: var(--cr-font-tracking-tight);\n}\n\n.cr-footer__brand a {\n  display: inline-flex;\n  align-items: center;\n  gap: var(--cr-space-2);\n  border-radius: var(--cr-radius-sm);\n  color: inherit;\n  text-decoration: none;\n}\n\n.cr-footer__description,\n.cr-footer__legal {\n  margin: 0;\n  color: var(--cr-color-text-muted);\n  font-size: var(--cr-font-size-sm);\n}\n\n.cr-footer__column {\n  min-width: 140px;\n}\n\n.cr-footer__title {\n  margin: 0 0 var(--cr-space-3);\n  font-size: var(--cr-font-size-sm);\n  font-weight: var(--cr-font-weight-semibold);\n}\n\n.cr-footer__list,\n.cr-footer__inline {\n  display: flex;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n\n.cr-footer__list {\n  flex-direction: column;\n  gap: var(--cr-space-2);\n}\n\n.cr-footer__inline {\n  flex-wrap: wrap;\n  gap: var(--cr-space-2) var(--cr-space-4);\n  font-size: var(--cr-font-size-sm);\n}\n\n.cr-footer__link {\n  border-radius: 6px;\n  color: var(--cr-color-text-secondary);\n  text-decoration: none;\n}\n\n.cr-footer__link[href]:hover {\n  color: var(--cr-color-text-default);\n  text-decoration: underline;\n  text-underline-offset: 3px;\n}\n\n.cr-footer__link:focus-visible,\n.cr-footer__brand a:focus-visible {\n  outline: var(--cr-focus-width) solid var(--cr-color-focus);\n  outline-offset: var(--cr-focus-offset);\n}\n\n.cr-footer__bottom {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  justify-content: space-between;\n  gap: var(--cr-space-2) var(--cr-space-4);\n}\n\n.cr-footer__bottom[data-ruled] {\n  padding-top: var(--cr-space-4);\n  border-top: 1px solid var(--cr-color-border-default);\n}\n\n.cr-footer__end {\n  display: flex;\n  flex-wrap: wrap;\n  align-items: center;\n  gap: var(--cr-space-2) var(--cr-space-4);\n  margin-inline-start: auto;\n  color: var(--cr-color-text-secondary);\n  font-size: var(--cr-font-size-sm);\n}\n",
      "type": "registry:file",
      "target": "@components/creance/footer/Footer.css"
    },
    {
      "path": "footer/Footer.tsx",
      "content": "'use client';\n\nimport type { MouseEventHandler, ReactNode } from 'react';\nimport { cx } from '@/lib/creance/cx';\nimport './Footer.css';\n\nexport interface FooterLink {\n  label: ReactNode;\n  href?: string;\n  onClick?: MouseEventHandler<HTMLAnchorElement>;\n}\n\nexport interface FooterColumn {\n  /** The column's heading, and the accessible name of its links. */\n  title: string;\n  links: FooterLink[];\n}\n\nexport interface FooterProps {\n  /** Logo and name. */\n  brand?: ReactNode;\n  /** A line about the product, under the brand. */\n  description?: ReactNode;\n  /** Groups of links. Leave out for a one-line footer. */\n  columns?: FooterColumn[];\n  /** Copyright and licence. */\n  legal?: ReactNode;\n  /** Links at the end of the bottom line. */\n  links?: FooterLink[];\n  /** Accessible name of the bottom links. Default \"Footer\". */\n  linksLabel?: string;\n  /** Anything else for the bottom line, such as a status. */\n  children?: ReactNode;\n  className?: string;\n}\n\nconst link = (l: FooterLink, i: number) => (\n  <li key={i}>\n    <a className=\"cr-footer__link\" href={l.href} onClick={l.onClick}>\n      {l.label}\n    </a>\n  </li>\n);\n\n/** The end of a page: brand, groups of links, and a line for copyright. With only `legal` and `links` it is one line. */\nexport function Footer({ brand, description, columns, legal, links, linksLabel = 'Footer', children, className }: FooterProps) {\n  const top = brand || description || columns?.length;\n  return (\n    <footer className={cx('cr-footer', className)}>\n      {top && (\n        <div className=\"cr-footer__top\">\n          {(brand || description) && (\n            <div className=\"cr-footer__about\">\n              {brand && <div className=\"cr-footer__brand\">{brand}</div>}\n              {description && <p className=\"cr-footer__description\">{description}</p>}\n            </div>\n          )}\n          {columns?.map((column, c) => (\n            <nav key={c} aria-label={column.title} className=\"cr-footer__column\">\n              <p className=\"cr-footer__title\">{column.title}</p>\n              <ul className=\"cr-footer__list\">{column.links.map(link)}</ul>\n            </nav>\n          ))}\n        </div>\n      )}\n      {(legal || links?.length || children) && (\n        <div className=\"cr-footer__bottom\" data-ruled={top ? '' : undefined}>\n          {legal && <p className=\"cr-footer__legal\">{legal}</p>}\n          <div className=\"cr-footer__end\">\n            {children}\n            {links && links.length > 0 && (\n              <nav aria-label={linksLabel}>\n                <ul className=\"cr-footer__inline\">{links.map(link)}</ul>\n              </nav>\n            )}\n          </div>\n        </div>\n      )}\n    </footer>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/creance/footer/Footer.tsx"
    }
  ],
  "categories": [
    "molecule",
    "navigation"
  ],
  "type": "registry:ui"
}