{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "toggle",
  "title": "toggle",
  "dependencies": [
    "@radix-ui/react-toggle",
    "class-variance-authority@^0.7"
  ],
  "registryDependencies": [
    "@dwellir/dwellir-theme",
    "@dwellir/utils"
  ],
  "files": [
    {
      "path": "components/ui/toggle.tsx",
      "content": "'use client';\n\nimport * as TogglePrimitive from '@radix-ui/react-toggle';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { cn } from '@/lib/utils';\n\n/* One on/off control, such as a filter. On, it takes the accent tint. Several in a row are a ToggleGroup. */\nconst toggleVariants = cva('', {\n  variants: {\n    variant: {\n      default: 'ui-toggle bg-transparent',\n      /* An edge, as the outline Button has; on, it looks like a pressed outline Button. */\n      outline: 'ui-toggle toggle-outline',\n      /*\n       * The children draw the control, such as a chart's bar or a map's pin, and\n       * show its state from data-state: the part adds the pointer and the focus\n       * ring, and no fill, edge or size.\n       */\n      visual: 'toggle-visual',\n    },\n    /* The heights of Button sm, md and lg. */\n    size: {\n      sm: 'h-8 min-w-8 px-2.5 text-sm',\n      default: 'h-10 min-w-10 px-3 text-sm',\n      lg: 'h-12 min-w-12 px-4 text-base',\n    },\n  },\n  defaultVariants: { variant: 'default', size: 'default' },\n});\n\nfunction Toggle({\n  className,\n  variant,\n  size,\n  ...props\n}: ComponentProps<typeof TogglePrimitive.Root> & VariantProps<typeof toggleVariants>) {\n  const sized = sizeFor(variant, size);\n  return (\n    <TogglePrimitive.Root\n      data-slot=\"toggle\"\n      data-variant={variant ?? 'default'}\n      data-size={sized === null ? undefined : (sized ?? 'default')}\n      className={cn(toggleVariants({ variant, size: sized }), className)}\n      {...props}\n    />\n  );\n}\n\n/* A visual toggle takes its size from its children, so it has no size class or data-size. */\nfunction sizeFor(variant: ToggleVariant, size: ToggleSize) {\n  return variant === 'visual' ? null : size;\n}\n\ntype ToggleVariant = VariantProps<typeof toggleVariants>['variant'];\ntype ToggleSize = VariantProps<typeof toggleVariants>['size'];\n\nexport { sizeFor, Toggle, toggleVariants };\n",
      "type": "registry:ui"
    }
  ],
  "type": "registry:ui"
}