{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "icon-chip",
  "title": "icon-chip",
  "dependencies": [
    "class-variance-authority@^0.7"
  ],
  "registryDependencies": [
    "@dwellir/dwellir-theme",
    "@dwellir/utils"
  ],
  "files": [
    {
      "path": "components/brand/icon-chip.tsx",
      "content": "import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { cn } from '@/lib/utils';\n\nconst iconChipVariants = cva('grid shrink-0 place-items-center', {\n  variants: {\n    /*\n     * One of the four aurora hues: a tint for the ground, the hue's ink for the icon.\n     * neutral: a grey chip for icons that carry no meaning, as on app screens.\n     */\n    tone: {\n      neutral: 'bg-muted text-muted-foreground',\n      green: 'bg-accent text-accent-ink',\n      violet: 'bg-aurora-2/14 text-aurora-2-ink',\n      rose: 'bg-aurora-3/14 text-aurora-3-ink',\n      gold: 'bg-aurora-4/14 text-aurora-4-ink',\n    },\n    size: {\n      sm: 'size-8 rounded-lg',\n      md: 'size-9 rounded-xl',\n      lg: 'size-10 rounded-xl',\n      xl: 'size-11 rounded-xl',\n    },\n    /*\n     * A chip inside a surface with tight corners, such as a link's hover fill\n     * in a dropdown: the chip takes the radius floor, so its corners are never\n     * rounder than the ones around it.\n     */\n    nested: { true: 'rounded-sm', false: '' },\n  },\n  defaultVariants: { tone: 'green', size: 'lg', nested: false },\n});\n\ntype IconChipTone = NonNullable<VariantProps<typeof iconChipVariants>['tone']>;\n\n/** The order a grid of cards cycles the tones in. Neutral does not cycle. */\nconst ICON_CHIP_TONES: readonly IconChipTone[] = ['green', 'violet', 'rose', 'gold'];\n\n/** The tone for the card at `index` in a grid: green, violet, rose, gold, then again. */\nfunction iconChipTone(index: number): IconChipTone {\n  return ICON_CHIP_TONES[index % ICON_CHIP_TONES.length];\n}\n\n/* A tinted square for an icon. It is decorative; the card's title names it. */\nfunction IconChip({\n  className,\n  tone,\n  size,\n  nested,\n  ...props\n}: ComponentProps<'span'> & VariantProps<typeof iconChipVariants>) {\n  return (\n    <span\n      data-slot=\"icon-chip\"\n      className={cn(iconChipVariants({ tone, size, nested }), className)}\n      {...props}\n    />\n  );\n}\n\nexport type { IconChipTone };\nexport { IconChip, iconChipTone, iconChipVariants };\n",
      "type": "registry:component",
      "target": "components/brand/icon-chip.tsx"
    }
  ],
  "type": "registry:component"
}