{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "object-icon",
  "title": "Object Icon",
  "description": "Object Icon from the Get IT Done design system.",
  "dependencies": [
    "class-variance-authority@^0.7.0"
  ],
  "registryDependencies": [
    "https://zero-design.itdone.de/r/labels-context.json",
    "https://zero-design.itdone.de/r/utils.json",
    "https://zero-design.itdone.de/r/theme.json"
  ],
  "files": [
    {
      "path": "registry/ui/object-icon.tsx",
      "content": "'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { forwardRef, type HTMLAttributes } from 'react';\n\nimport { cn } from '@/lib/utils';\nimport { usePreset } from '@/components/ui/labels-context';\n\n// Full class strings so Tailwind's content scan finds every product token.\n// Extends SidebarObjectIcon (18px, five products) with the `record` object type and three sizes.\nconst objectIconVariants = cva('grid shrink-0 place-items-center rounded-tight', {\n  variants: {\n    app: {\n      workstream: 'bg-product-workstream-default text-product-workstream-on',\n      backoffice: 'bg-product-backoffice-default text-product-backoffice-on',\n      coldcall: 'bg-product-coldcall-default text-product-coldcall-on',\n      vacancy: 'bg-product-vacancy-default text-product-vacancy-on',\n      jobsearch: 'bg-product-jobsearch-default text-product-jobsearch-on',\n      record: 'bg-product-record-default text-product-record-on',\n      // Follows the page product context (data-product on the root element).\n      contextual: 'bg-product-accent-default text-product-accent-on',\n    },\n    // Semantic tones for status and kind tiles that are not a product. Overrides `app` when set.\n    tone: {\n      neutral: 'bg-background-neutral-default text-text-default',\n      info: 'bg-general-info-container text-general-info-on-container',\n      success: 'bg-general-success-container text-general-success-on-container',\n      warning: 'bg-general-warning-container text-general-warning-on-container',\n      destructive: 'bg-general-error-container text-general-error-on-container',\n    },\n    // Product preset (DesignSystemProvider `preset`): the small tile follows the object icon token (18 in zero).\n    preset: { default: '', zero: '' },\n    size: {\n      sm: 'typography-avatar-xs h-icon-md w-icon-md [&>svg]:h-icon-2xs [&>svg]:w-icon-2xs',\n      md: 'typography-avatar-xs h-avatar-xs w-avatar-xs [&>svg]:h-icon-sm [&>svg]:w-icon-sm',\n      lg: 'typography-ui-semibold h-avatar-sm w-avatar-sm [&>svg]:h-icon-md [&>svg]:w-icon-md',\n    },\n  },\n  compoundVariants: [{ preset: 'zero', size: 'sm', className: 'h-object-icon w-object-icon' }],\n  defaultVariants: { app: 'record', size: 'sm', preset: 'default' },\n});\n\nexport interface ObjectIconProps extends HTMLAttributes<HTMLSpanElement>, Omit<VariantProps<typeof objectIconVariants>, 'preset'> {\n  // Provide a label when the icon carries meaning on its own. Decorative by default.\n  label?: string;\n}\n\n// Colored tile for a product or record type. Children are the glyph (an icon element).\nconst ObjectIcon = forwardRef<HTMLSpanElement, ObjectIconProps>(({ className, app, tone, size, label, ...props }, ref) => {\n  const zero = usePreset() === 'zero';\n  return (\n  <span\n    ref={ref}\n    role={label ? 'img' : undefined}\n    aria-label={label}\n    aria-hidden={label ? undefined : true}\n    data-app={tone ? undefined : (app ?? 'record')}\n    data-tone={tone ?? undefined}\n    // A tone replaces the product fill: null switches the app variant and its default off.\n    className={cn(objectIconVariants({ app: tone ? null : app, tone, size, preset: zero ? 'zero' : 'default' }), className)}\n    {...props}\n  />\n  );\n});\nObjectIcon.displayName = 'ObjectIcon';\n\nexport { ObjectIcon, objectIconVariants };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}