{
  "$schema": "https://registry.buildy.tw/schema/registry-item.json",
  "dependencies": [],
  "description": "UI8Kit 3 Link primitive (unstyled), from @ui8kit/registry",
  "devDependencies": [],
  "digest": "0.1.0",
  "files": [
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n// ui.link — shared TypeScript contract (types + classes helpers)\n\nimport { cn } from \"../../utils\";\n\n/** Link renders an anchor; External opens a new tab with rel=noopener noreferrer. */\nexport type LinkBaseProps = {\n  target?: string;\n  rel?: string;\n  external?: boolean;\n};\n\nexport type LinkClassesInput = {\n  className?: string;\n};\n\n/** Compose Link classes without rendering — the cross-runtime `asChild` substitute. */\nexport function linkClasses(input: LinkClassesInput = {}): string {\n  return cn(input.className);\n}\n",
      "path": "kit/ui/link/link.shared.ts",
      "target": "kit/ui/link/link.shared.ts"
    },
    {
      "content": "// Code generated by @ui8kit/codegen. DO NOT EDIT.\n/**\n * Link renders a semantic anchor for navigation. Use Button for actions.\n */\n\nimport { splitProps, type JSX, type Component } from \"solid-js\";\nimport { linkClasses } from \"./link.shared\";\nimport { eqStr, isSetStr, orUndef, safeRest } from \"../../utils/expr\";\n\n/**\n * Link renders an anchor; External opens a new tab with rel=noopener noreferrer.\n */\nexport type LinkProps = Omit<JSX.AnchorHTMLAttributes<HTMLAnchorElement>, \"class\" | \"className\" | \"children\" | \"target\" | \"rel\" | \"external\"> & {\n  target?: string;\n  rel?: string;\n  external?: boolean;\n  class?: string;\n  className?: string;\n  children?: JSX.Element;\n};\n\nexport const Link: Component<LinkProps> = (props) => {\n  const [local, rest] = splitProps(props, [\"target\", \"rel\", \"external\", \"class\", \"className\", \"children\"]);\n  const targetValue = () => (isSetStr(local.target) ? local.target : (local.external ? \"_blank\" : \"\"));\n  const relValue = () => (isSetStr(local.rel) ? local.rel : ((local.external || eqStr(targetValue(), \"_blank\")) ? \"noopener noreferrer\" : \"\"));\n  const cls = () => linkClasses({ className: local.class ?? local.className });\n  return (\n    <a {...(cls() ? { class: cls() } : {})} target={orUndef(targetValue())} rel={orUndef(relValue())} {...safeRest(rest, { blank: [\"href\", \"download\", \"aria-current\", \"aria-label\"] })}>\n      {local.children}\n    </a>\n  );\n};\n",
      "path": "kit/ui/link/link.solid.tsx",
      "target": "kit/ui/link/link.solid.tsx"
    }
  ],
  "meta": {
    "category": "kit",
    "kind": "primitive",
    "tags": [
      "solid",
      "primitive"
    ]
  },
  "name": "kit-link",
  "registryDependencies": [
    "utils"
  ],
  "runtime": "solid",
  "title": "Kit Link",
  "type": "registry:ui"
}
