{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"button","type":"registry:ui","title":"Button","description":"A native button with solid, outline, soft, ghost, link and destructive variants.","dependencies":[],"registryDependencies":[],"files":[{"path":"registry/rck/ui/button.tsx","type":"registry:ui","content":"import * as React from \"react\";\nimport { cva, type VariantProps } from \"@/lib/cva\";\nimport { LoaderCircle } from \"@/lib/icons\";\nimport { Slot } from \"@/registry/rck/primitives/slot\";\nimport { cn } from \"@/lib/utils\";\n\nexport const buttonVariants = cva(\n  \"inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-[11px] font-semibold \" +\n    \"transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring \" +\n    \"focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:pointer-events-none \" +\n    \"disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 \" +\n    \"[&_[data-icon=inline-start]]:-ml-0.5 [&_[data-icon=inline-end]]:-mr-0.5\",\n  {\n    variants: {\n      variant: {\n        solid: \"bg-primary text-primary-foreground shadow-sm hover:bg-primary/90\",\n        outline:\n          \"border border-border-strong bg-transparent text-foreground shadow-sm hover:bg-surface-2\",\n        soft: \"bg-primary-soft text-primary-soft-foreground hover:bg-primary-soft/80\",\n        ghost: \"bg-transparent text-foreground hover:bg-surface-2\",\n        link: \"bg-transparent text-primary underline-offset-4 hover:underline\",\n        destructive:\n          \"bg-destructive text-destructive-foreground shadow-sm hover:bg-destructive/90\",\n      },\n      size: {\n        xs: \"h-7 px-2 text-[10px] [&_svg]:size-3\",\n        sm: \"h-8 px-2.5 text-[10px] [&_svg]:size-3\",\n        md: \"h-[39px] px-[15px] [&_svg]:size-3.5\",\n        lg: \"h-11 px-5 text-xs [&_svg]:size-4\",\n        icon: \"size-[39px] p-0 [&_svg]:size-4\",\n        \"icon-sm\": \"size-8 p-0 [&_svg]:size-3.5\",\n        \"icon-lg\": \"size-11 p-0 [&_svg]:size-4\",\n      },\n      fullWidth: {\n        true: \"w-full\",\n      },\n    },\n    defaultVariants: {\n      variant: \"solid\",\n      size: \"md\",\n    },\n  },\n);\n\nexport interface ButtonProps\n  extends\n    React.ButtonHTMLAttributes<HTMLButtonElement>,\n    VariantProps<typeof buttonVariants> {\n  /** Render the child element instead of a `<button>`, forwarding all props (Radix Slot). */\n  asChild?: boolean;\n  /** Show a spinner and disable interaction, keeping the button's width. */\n  loading?: boolean;\n  /** Screen-reader-only label announced while `loading` is true. */\n  loadingLabel?: string;\n  /** Element rendered before the label. */\n  leadingIcon?: React.ReactNode;\n  /** Element rendered after the label. */\n  trailingIcon?: React.ReactNode;\n}\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n  (\n    {\n      className,\n      variant,\n      size,\n      fullWidth,\n      asChild = false,\n      loading = false,\n      loadingLabel = \"Loading\",\n      disabled,\n      leadingIcon,\n      trailingIcon,\n      type,\n      children,\n      ...props\n    },\n    ref,\n  ) => {\n    const Comp = asChild ? Slot : \"button\";\n\n    return (\n      <Comp\n        ref={ref}\n        data-slot=\"button\"\n        type={asChild ? undefined : (type ?? \"button\")}\n        className={cn(buttonVariants({ variant, size, fullWidth }), className)}\n        disabled={disabled || loading}\n        aria-busy={loading || undefined}\n        aria-disabled={asChild && (disabled || loading) ? true : undefined}\n        {...props}\n      >\n        {asChild ? (\n          children\n        ) : (\n          <>\n            {loading ? (\n              <LoaderCircle\n                className=\"animate-spin\"\n                aria-hidden=\"true\"\n                data-icon=\"inline-start\"\n              />\n            ) : leadingIcon ? (\n              <span data-icon=\"inline-start\">{leadingIcon}</span>\n            ) : null}\n            {children}\n            {loading ? (\n              <span className=\"sr-only\">{loadingLabel}</span>\n            ) : trailingIcon ? (\n              <span data-icon=\"inline-end\">{trailingIcon}</span>\n            ) : null}\n          </>\n        )}\n      </Comp>\n    );\n  },\n);\nButton.displayName = \"Button\";\n"},{"path":"lib/utils.ts","type":"registry:lib","content":"type ClassValue =\n  | string\n  | number\n  | boolean\n  | null\n  | undefined\n  | ClassValue[]\n  | Record<string, boolean | null | undefined>;\n\nfunction flatten(input: ClassValue): string[] {\n  if (!input && input !== 0) return [];\n  if (typeof input === \"string\" || typeof input === \"number\") return [String(input)];\n  if (Array.isArray(input)) return input.flatMap(flatten);\n  return Object.entries(input)\n    .filter(([, active]) => active)\n    .map(([key]) => key);\n}\n\n/** Each inner array is a conflict group — utilities in the same group override each other. */\nconst CONFLICT_GROUPS: string[][] = [\n  [\"p\"],\n  [\"px\"],\n  [\"py\"],\n  [\"pt\"],\n  [\"pr\"],\n  [\"pb\"],\n  [\"pl\"],\n  [\"m\"],\n  [\"mx\"],\n  [\"my\"],\n  [\"mt\"],\n  [\"mr\"],\n  [\"mb\"],\n  [\"ml\"],\n  [\"w\"],\n  [\"min-w\"],\n  [\"max-w\"],\n  [\"h\"],\n  [\"min-h\"],\n  [\"max-h\"],\n  [\"size\"],\n  [\"gap\"],\n  [\"gap-x\"],\n  [\"gap-y\"],\n  [\"rounded\"],\n  [\"rounded-t\"],\n  [\"rounded-r\"],\n  [\"rounded-b\"],\n  [\"rounded-l\"],\n  [\"rounded-tl\"],\n  [\"rounded-tr\"],\n  [\"rounded-br\"],\n  [\"rounded-bl\"],\n  [\"border\"],\n  [\"border-t\"],\n  [\"border-r\"],\n  [\"border-b\"],\n  [\"border-l\"],\n  [\"border-x\"],\n  [\"border-y\"],\n  [\n    \"text-xs\",\n    \"text-sm\",\n    \"text-base\",\n    \"text-lg\",\n    \"text-xl\",\n    \"text-2xl\",\n    \"text-3xl\",\n    \"text-4xl\",\n    \"text-5xl\",\n    \"text-6xl\",\n    \"text-7xl\",\n    \"text-8xl\",\n    \"text-9xl\",\n  ],\n  [\"font\"],\n  [\"items\"],\n  [\"justify\"],\n  [\"content\"],\n  [\"self\"],\n  [\"grid\"],\n  [\"grid-cols\"],\n  [\"col-span\"],\n  [\"overflow\"],\n  [\"overflow-x\"],\n  [\"overflow-y\"],\n  [\"opacity\"],\n  [\"z\"],\n  [\"top\"],\n  [\"right\"],\n  [\"bottom\"],\n  [\"left\"],\n  [\"inset\"],\n  [\"inset-x\"],\n  [\"inset-y\"],\n  [\"translate-x\"],\n  [\"translate-y\"],\n  [\"shadow\"],\n  [\"outline\"],\n  [\"cursor\"],\n  [\"pointer-events\"],\n  [\"flex\"],\n  [\"inline-flex\"],\n  [\"block\"],\n  [\"inline-block\"],\n  [\"hidden\"],\n  [\"grid\"],\n  [\"inline-grid\"],\n  [\"table\"],\n  [\"position\"],\n];\n\nconst FONT_SIZE_TOKENS = new Set([\n  \"xs\",\n  \"sm\",\n  \"base\",\n  \"lg\",\n  \"xl\",\n  \"2xl\",\n  \"3xl\",\n  \"4xl\",\n  \"5xl\",\n  \"6xl\",\n  \"7xl\",\n  \"8xl\",\n  \"9xl\",\n]);\n\nfunction getUtilityKey(token: string): string | null {\n  const segments = token.split(\":\");\n  const base = segments.pop() ?? token;\n  const variant = segments.length ? `${segments.join(\":\")}:` : \"\";\n\n  const match = base.match(/^(-)?([a-z]+(?:-[a-z]+)?)(?:-|\\[|$)/);\n  if (!match) return null;\n  const key = match[2];\n\n  if (key === \"text\") {\n    const rest = base.slice(5);\n    if (rest.startsWith(\"[\") || FONT_SIZE_TOKENS.has(rest.split(\"-\")[0] ?? \"\")) {\n      return `${variant}text-size`;\n    }\n    return `${variant}text-color`;\n  }\n\n  if (key === \"bg\") {\n    const rest = base.slice(3);\n    if (rest.startsWith(\"opacity-\")) return `${variant}bg-opacity`;\n    return `${variant}bg-color`;\n  }\n\n  if (key === \"ring\") {\n    const rest = base.slice(5);\n    if (!rest || rest === \"inset\") return `${variant}ring-width`;\n    if (/^(0|1|2|4|8)$/.test(rest) || rest.startsWith(\"[\")) return `${variant}ring-width`;\n    return `${variant}ring-color`;\n  }\n\n  if (key === \"ring-offset\") {\n    return `${variant}ring-offset`;\n  }\n\n  for (const group of CONFLICT_GROUPS) {\n    if (group.includes(key) || group.includes(base)) return `${variant}${group[0]}`;\n  }\n\n  return `${variant}${key}`;\n}\n\nfunction mergeTailwind(classes: string[]): string {\n  const result: string[] = [];\n  const indexByGroup = new Map<string, number>();\n\n  for (const cls of classes) {\n    for (const token of cls.split(/\\s+/).filter(Boolean)) {\n      const group = getUtilityKey(token);\n      if (!group) {\n        result.push(token);\n        continue;\n      }\n      const existing = indexByGroup.get(group);\n      if (existing !== undefined) {\n        result[existing] = token;\n      } else {\n        indexByGroup.set(group, result.length);\n        result.push(token);\n      }\n    }\n  }\n\n  return result.join(\" \");\n}\n\n/** Derive display initials from a person's name. */\nexport function getInitials(name: string): string {\n  const parts = name.trim().split(/\\s+/).filter(Boolean);\n  if (parts.length === 0) return \"?\";\n  if (parts.length === 1) {\n    const word = parts[0];\n    return word.length === 1 ? word.toUpperCase() : word.slice(0, 2).toUpperCase();\n  }\n  return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();\n}\n\n/** Merge Tailwind class names, resolving conflicting utilities left-to-right. */\nexport function cn(...inputs: ClassValue[]) {\n  return mergeTailwind(flatten(inputs));\n}\n"},{"path":"lib/cva.ts","type":"registry:lib","content":"import { cn } from \"@/lib/utils\";\n\ntype ConfigSchema = Record<string, Record<string, string | null | undefined>>;\n\ntype BooleanKey<T> = Extract<keyof T, \"true\" | \"false\"> extends never ? keyof T : boolean;\n\ntype ConfigVariants<T extends ConfigSchema> = {\n  [K in keyof T]?: BooleanKey<T[K]> | null;\n};\n\nexport type VariantProps<VariantFn extends (...args: never) => string> = ConfigVariants<\n  VariantFn extends (props?: infer P) => string\n    ? P extends ConfigVariants<infer S>\n      ? S\n      : ConfigSchema\n    : ConfigSchema\n>;\n\nexport function cva<T extends ConfigSchema>(\n  base: string,\n  config?: {\n    variants?: T;\n    defaultVariants?: ConfigVariants<T>;\n    compoundVariants?: Array<ConfigVariants<T> & { class?: string; className?: string }>;\n  },\n) {\n  return (props?: ConfigVariants<T>) => {\n    const {\n      variants = {} as T,\n      defaultVariants = {},\n      compoundVariants = [],\n    } = config ?? {};\n    const resolved: Record<string, boolean | string | null | undefined> = {\n      ...defaultVariants,\n    };\n\n    if (props) {\n      for (const [key, value] of Object.entries(props)) {\n        if (value !== undefined) {\n          resolved[key] = value;\n        }\n      }\n    }\n\n    const classes: string[] = [base];\n\n    for (const [key, value] of Object.entries(resolved)) {\n      if (value == null) continue;\n      const variantGroup = variants[key as keyof T] as\n        Record<string, string | null | undefined> | undefined;\n      const variantClass = variantGroup?.[String(value)];\n      if (variantClass) classes.push(variantClass);\n    }\n\n    for (const compound of compoundVariants) {\n      const { class: className, className: altClassName, ...criteria } = compound;\n      const matches = Object.entries(criteria).every(\n        ([key, expected]) => resolved[key] === expected,\n      );\n      if (matches) {\n        const extra = className ?? altClassName;\n        if (extra) classes.push(extra);\n      }\n    }\n\n    return cn(...classes);\n  };\n}\n"},{"path":"lib/icons.tsx","type":"registry:lib","content":"import * as React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\nexport interface IconProps extends React.SVGAttributes<SVGSVGElement> {\n  size?: number | string;\n}\n\nexport type IconComponent = React.FC<IconProps>;\n\nexport function createIcon(\n  displayName: string,\n  render: (props: IconProps) => React.ReactNode,\n): IconComponent {\n  function Icon({ className, size, ...props }: IconProps) {\n    return (\n      <svg\n        xmlns=\"http://www.w3.org/2000/svg\"\n        {...(size != null ? { width: size, height: size } : {})}\n        viewBox=\"0 0 24 24\"\n        fill=\"none\"\n        stroke=\"currentColor\"\n        strokeWidth=\"2\"\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n        className={cn(\"shrink-0\", className)}\n        {...props}\n      >\n        {render(props)}\n      </svg>\n    );\n  }\n  Icon.displayName = displayName;\n  return Icon;\n}\nexport const Check = createIcon(\"Check\", () => <path d=\"M20 6 9 17l-5-5\" />);\nexport const X = createIcon(\"X\", () => (\n  <>\n    <path d=\"M18 6 6 18\" />\n    <path d=\"m6 6 12 12\" />\n  </>\n));\nexport const ChevronDown = createIcon(\"ChevronDown\", () => <path d=\"m6 9 6 6 6-6\" />);\nexport const ChevronLeft = createIcon(\"ChevronLeft\", () => <path d=\"m15 18-6-6 6-6\" />);\nexport const ChevronRight = createIcon(\"ChevronRight\", () => <path d=\"m9 18 6-6-6-6\" />);\nexport const ChevronsLeft = createIcon(\"ChevronsLeft\", () => (\n  <>\n    <path d=\"m11 17-5-5 5-5\" />\n    <path d=\"m18 17-5-5 5-5\" />\n  </>\n));\nexport const ChevronsRight = createIcon(\"ChevronsRight\", () => (\n  <>\n    <path d=\"m6 17 5-5-5-5\" />\n    <path d=\"m13 17 5-5-5-5\" />\n  </>\n));\nexport const ArrowRight = createIcon(\"ArrowRight\", () => (\n  <>\n    <path d=\"M5 12h14\" />\n    <path d=\"m12 5 7 7-7 7\" />\n  </>\n));\nexport const ArrowLeft = createIcon(\"ArrowLeft\", () => (\n  <>\n    <path d=\"M19 12H5\" />\n    <path d=\"m12 19-7-7 7-7\" />\n  </>\n));\nexport const Circle = createIcon(\"Circle\", () => <circle cx=\"12\" cy=\"12\" r=\"10\" />);\nexport const LoaderCircle = createIcon(\"LoaderCircle\", () => (\n  <>\n    <path d=\"M21 12a9 9 0 1 1-6.219-8.56\" />\n  </>\n));\nexport const MoreHorizontal = createIcon(\"MoreHorizontal\", () => (\n  <>\n    <circle cx=\"12\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n    <circle cx=\"19\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n    <circle cx=\"5\" cy=\"12\" r=\"1\" fill=\"currentColor\" stroke=\"none\" />\n  </>\n));\nexport const Calendar = createIcon(\"Calendar\", () => (\n  <>\n    <path d=\"M8 2v4\" />\n    <path d=\"M16 2v4\" />\n    <rect width=\"18\" height=\"18\" x=\"3\" y=\"4\" rx=\"2\" />\n    <path d=\"M3 10h18\" />\n  </>\n));\nexport const CircleCheck = createIcon(\"CircleCheck\", () => (\n  <>\n    <circle cx=\"12\" cy=\"12\" r=\"10\" />\n    <path d=\"m9 12 2 2 4-4\" />\n  </>\n));\nexport const Info = createIcon(\"Info\", () => (\n  <>\n    <circle cx=\"12\" cy=\"12\" r=\"10\" />\n    <path d=\"M12 16v-4\" />\n    <path d=\"M12 8h.01\" />\n  </>\n));\nexport const TriangleAlert = createIcon(\"TriangleAlert\", () => (\n  <>\n    <path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\" />\n    <path d=\"M12 9v4\" />\n    <path d=\"M12 17h.01\" />\n  </>\n));\nexport const CircleX = createIcon(\"CircleX\", () => (\n  <>\n    <circle cx=\"12\" cy=\"12\" r=\"10\" />\n    <path d=\"m15 9-6 6\" />\n    <path d=\"m9 9 6 6\" />\n  </>\n));\nexport const Star = createIcon(\"Star\", () => (\n  <path d=\"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z\" />\n));\nexport const Bell = createIcon(\"Bell\", () => (\n  <>\n    <path d=\"M10.268 21a2 2 0 0 0 3.464 0\" />\n    <path d=\"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326\" />\n  </>\n));\nexport const Copy = createIcon(\"Copy\", () => (\n  <>\n    <rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\" />\n    <path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\" />\n  </>\n));\nexport const ExternalLink = createIcon(\"ExternalLink\", () => (\n  <>\n    <path d=\"M15 3h6v6\" />\n    <path d=\"M10 14 21 3\" />\n    <path d=\"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6\" />\n  </>\n));\nexport const Heart = createIcon(\"Heart\", () => (\n  <path d=\"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z\" />\n));\nexport const Lock = createIcon(\"Lock\", () => (\n  <>\n    <rect width=\"18\" height=\"11\" x=\"3\" y=\"11\" rx=\"2\" ry=\"2\" />\n    <path d=\"M7 11V7a5 5 0 0 1 10 0v4\" />\n  </>\n));\nexport const Mail = createIcon(\"Mail\", () => (\n  <>\n    <rect width=\"20\" height=\"16\" x=\"2\" y=\"4\" rx=\"2\" />\n    <path d=\"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7\" />\n  </>\n));\nexport const Menu = createIcon(\"Menu\", () => (\n  <>\n    <path d=\"M4 12h16\" />\n    <path d=\"M4 18h16\" />\n    <path d=\"M4 6h16\" />\n  </>\n));\nexport const Moon = createIcon(\"Moon\", () => (\n  <path d=\"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z\" />\n));\nexport const Plus = createIcon(\"Plus\", () => (\n  <>\n    <path d=\"M5 12h14\" />\n    <path d=\"M12 5v14\" />\n  </>\n));\nexport const Minus = createIcon(\"Minus\", () => <path d=\"M5 12h14\" />);\nexport const Search = createIcon(\"Search\", () => (\n  <>\n    <circle cx=\"11\" cy=\"11\" r=\"8\" />\n    <path d=\"m21 21-4.3-4.3\" />\n  </>\n));\nexport const Settings = createIcon(\"Settings\", () => (\n  <>\n    <path d=\"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z\" />\n    <circle cx=\"12\" cy=\"12\" r=\"3\" />\n  </>\n));\nexport const Sun = createIcon(\"Sun\", () => (\n  <>\n    <circle cx=\"12\" cy=\"12\" r=\"4\" />\n    <path d=\"M12 2v2\" />\n    <path d=\"M12 20v2\" />\n    <path d=\"m4.93 4.93 1.41 1.41\" />\n    <path d=\"m17.66 17.66 1.41 1.41\" />\n    <path d=\"M2 12h2\" />\n    <path d=\"M20 12h2\" />\n    <path d=\"m6.34 17.66-1.41 1.41\" />\n    <path d=\"m19.07 4.93-1.41 1.41\" />\n  </>\n));\nexport const Trash2 = createIcon(\"Trash2\", () => (\n  <>\n    <path d=\"M3 6h18\" />\n    <path d=\"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\" />\n    <path d=\"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\" />\n    <line x1=\"10\" x2=\"10\" y1=\"11\" y2=\"17\" />\n    <line x1=\"14\" x2=\"14\" y1=\"11\" y2=\"17\" />\n  </>\n));\nexport const User = createIcon(\"User\", () => (\n  <>\n    <path d=\"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2\" />\n    <circle cx=\"12\" cy=\"7\" r=\"4\" />\n  </>\n));\nexport const Blocks = createIcon(\"Blocks\", () => (\n  <>\n    <rect width=\"7\" height=\"7\" x=\"14\" y=\"3\" rx=\"1\" />\n    <path d=\"M10 21V8a1 1 0 0 0-1-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2\" />\n  </>\n));\nexport const KeyRound = createIcon(\"KeyRound\", () => (\n  <>\n    <path d=\"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h2.172a2 2 0 0 0 1.414-.586l.828-.828a2 2 0 0 1 2.828 0l.828.828A2 2 0 0 0 12.172 21H15a1 1 0 0 0 1-1v-2.172a2 2 0 0 0-.586-1.414l-.828-.828a2 2 0 0 1 0-2.828l.828-.828A2 2 0 0 0 15 9.172V7a1 1 0 0 0-1-1h-2.172a2 2 0 0 0-1.414.586l-.828.828a2 2 0 0 1-2.828 0l-.828-.828A2 2 0 0 0 6.172 6H4a1 1 0 0 0-1 1v2.172a2 2 0 0 0 .586 1.414l.828.828a2 2 0 0 1 0 2.828l-.828.828Z\" />\n    <circle cx=\"16.5\" cy=\"7.5\" r=\".5\" fill=\"currentColor\" />\n  </>\n));\nexport const MoonStar = createIcon(\"MoonStar\", () => (\n  <>\n    <path d=\"M18 5h4v4\" />\n    <path d=\"M20.985 12.803a9 9 0 1 1-5.516-5.516l3.57 3.57\" />\n    <path d=\"m16 16 3.5 3.5\" />\n  </>\n));\nexport const ShieldCheck = createIcon(\"ShieldCheck\", () => (\n  <>\n    <path d=\"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\" />\n    <path d=\"m9 12 2 2 4-4\" />\n  </>\n));\nexport const SquareCode = createIcon(\"SquareCode\", () => (\n  <>\n    <path d=\"M10 9.5 8 12l2 2.5\" />\n    <path d=\"m14 9.5 2 2.5-2 2.5\" />\n    <rect width=\"18\" height=\"18\" x=\"3\" y=\"3\" rx=\"2\" />\n  </>\n));\nexport const Sparkles = createIcon(\"Sparkles\", () => (\n  <>\n    <path d=\"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z\" />\n    <path d=\"M20 2v4\" />\n    <path d=\"M22 4h-4\" />\n  </>\n));\n"},{"path":"registry/rck/primitives/slot.tsx","type":"registry:lib","content":"import * as React from \"react\";\n\nfunction mergeRefs<T>(...refs: Array<React.Ref<T> | undefined>) {\n  return (node: T) => {\n    for (const ref of refs) {\n      if (typeof ref === \"function\") ref(node);\n      else if (ref) (ref as React.MutableRefObject<T>).current = node;\n    }\n  };\n}\n\nfunction mergeProps(\n  slotProps: Record<string, unknown>,\n  childProps: Record<string, unknown>,\n) {\n  const merged = { ...slotProps, ...childProps };\n\n  if (slotProps.className || childProps.className) {\n    merged.className = [slotProps.className, childProps.className]\n      .filter(Boolean)\n      .join(\" \");\n  }\n\n  if (slotProps.style || childProps.style) {\n    merged.style = { ...(slotProps.style as object), ...(childProps.style as object) };\n  }\n\n  if (slotProps.onClick && childProps.onClick) {\n    const slotOnClick = slotProps.onClick as React.MouseEventHandler;\n    const childOnClick = childProps.onClick as React.MouseEventHandler;\n    merged.onClick = (event: React.MouseEvent) => {\n      slotOnClick(event);\n      if (!event.defaultPrevented) childOnClick(event);\n    };\n  }\n\n  return merged;\n}\n\nexport interface SlotProps extends React.HTMLAttributes<HTMLElement> {\n  children?: React.ReactNode;\n}\n\nexport const Slot = React.forwardRef<HTMLElement, SlotProps>(\n  ({ children, ...props }, ref) => {\n    if (!React.isValidElement(children)) {\n      throw new Error(\"Slot expects a single valid React element child.\");\n    }\n\n    const child = children as React.ReactElement<Record<string, unknown>>;\n    return React.cloneElement(child, {\n      ...mergeProps(props, child.props),\n      ref: mergeRefs(ref, (child as { ref?: React.Ref<HTMLElement> }).ref),\n    });\n  },\n);\nSlot.displayName = \"Slot\";\n"}],"meta":{"category":"Base","docs":"https://rck.vibeboxph.com//docs/components/button"}}