{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "helper-text",
  "type": "registry:component",
  "title": "HelperText",
  "description": "HelperText is the hint or validation message under a form control.",
  "dependencies": [
    "@remixicon/react@^4.9.0",
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "https://wideset.co/r/styles.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/components/helper-text/HelperText.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/helper-text/HelperText.tsx",
      "content": "'use client';\n\nimport { RiAlertFill, RiCheckboxCircleFill, RiErrorWarningFill } from '@remixicon/react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport type { HelperTextProps } from './HelperText.types';\nimport { helperTextIconVariants, helperTextVariants } from './HelperText.variants';\n\nconst iconsByState = {\n  error: RiErrorWarningFill,\n  warning: RiAlertFill,\n  success: RiCheckboxCircleFill,\n};\n\nexport const HelperText = ({ children, state, showIcon, className, ...props }: HelperTextProps) => {\n  if (!children && !showIcon) return null;\n\n  const Icon = iconsByState[state as keyof typeof iconsByState];\n\n  return (\n    <span\n      data-slot=\"helper-text\"\n      role={state === 'error' ? 'alert' : undefined}\n      className={cn(helperTextVariants({ state }), className)}\n      {...props}\n    >\n      {showIcon && state && state !== 'default' && (\n        <Icon aria-hidden=\"true\" focusable=\"false\" className={helperTextIconVariants({ state })} />\n      )}\n      {children}\n    </span>\n  );\n};\n"
    },
    {
      "path": "src/components/helper-text/HelperText.types.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/helper-text/HelperText.types.ts",
      "content": "import type { VariantProps } from 'class-variance-authority';\nimport type { HTMLAttributes } from 'react';\n\nimport type { helperTextVariants } from './HelperText.variants';\n\nexport type HelperTextProps = HTMLAttributes<HTMLSpanElement> &\n  VariantProps<typeof helperTextVariants> & {\n    showIcon?: boolean;\n  };\n"
    },
    {
      "path": "src/components/helper-text/HelperText.variants.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/helper-text/HelperText.variants.ts",
      "content": "import { cva } from 'class-variance-authority';\n\n// Figma gives Helper Text a Gap/3 padding above and below; components that use it space around it.\nexport const helperTextVariants = cva('typography-body-sm gap-ws-3 py-ws-3 flex items-center', {\n  variants: {\n    state: {\n      default: 'text-ws-static-subtle',\n      error: 'text-ws-semantic-negative',\n      warning: 'text-ws-semantic-notice',\n      success: 'text-ws-semantic-positive',\n    },\n  },\n  defaultVariants: {\n    state: 'default',\n  },\n});\n\nexport const helperTextIconVariants = cva('h-ws-control-sm w-ws-control-sm', {\n  variants: {\n    state: {\n      error: 'text-ws-semantic-negative',\n      warning: 'text-ws-semantic-notice',\n      success: 'text-ws-semantic-positive',\n    },\n  },\n});\n"
    }
  ],
  "meta": {
    "version": "1.0.0",
    "commit": "8bb3627"
  }
}
