{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "field-label",
  "type": "registry:component",
  "title": "FieldLabel",
  "description": "FieldLabel is the label above a form control, with optional required marker and info tooltip.",
  "dependencies": [
    "@remixicon/react@^4.9.0"
  ],
  "registryDependencies": [
    "https://wideset.co/r/styles.json",
    "https://wideset.co/r/tooltip.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/components/field-label/FieldLabel.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/field-label/FieldLabel.tsx",
      "content": "'use client';\n\nimport { RiInformationFill } from '@remixicon/react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport { Tooltip } from '../tooltip/Tooltip';\nimport type { FieldLabelProps } from './FieldLabel.types';\n\nexport const FieldLabel = ({\n  children,\n  required,\n  suffix,\n  tooltip,\n  aside,\n  className,\n  description,\n  tooltipAriaLabel = 'More information',\n  ...props\n}: FieldLabelProps) => {\n  const content = (\n    <div\n      data-slot={description ? undefined : 'field-label'}\n      className={cn('gap-ws-3 flex flex-wrap items-start', { 'w-fit': !aside })}\n    >\n      <div className=\"gap-ws-3 flex min-w-0 flex-1 items-center\">\n        <label\n          className={cn(\n            'text-ws-static-strong typography-label-strong-sm gap-ws-3 flex min-w-0 flex-wrap items-center',\n            className,\n          )}\n          {...props}\n        >\n          <span className=\"min-w-0 break-words\">{children}</span>\n          {required && (\n            <span className=\"text-ws-semantic-negative typography-label-sm shrink-0\">*</span>\n          )}\n          {suffix && (\n            <span className=\"text-ws-static-subtle typography-label-sm shrink-0\">{suffix}</span>\n          )}\n        </label>\n        {tooltip && (\n          <Tooltip>\n            <Tooltip.Trigger asChild>\n              <RiInformationFill\n                className=\"text-ws-static-subtle focus-visible:wds-focus-visible h-ws-9 w-ws-9 shrink-0 rounded-full\"\n                tabIndex={0}\n                aria-label={tooltipAriaLabel}\n              />\n            </Tooltip.Trigger>\n            <Tooltip.Content>{tooltip}</Tooltip.Content>\n          </Tooltip>\n        )}\n      </div>\n      {aside && (\n        <div className=\"gap-ws-2 flex flex-shrink-0 items-center\">\n          {aside && <div className=\"text-ws-static-subtle typography-label-sm\">{aside}</div>}\n        </div>\n      )}\n    </div>\n  );\n\n  return description ? (\n    <div data-slot=\"field-label\" className={cn('gap-ws-3 flex flex-col', { 'w-fit': !aside })}>\n      {content}\n      {description && <div className=\"text-ws-static-subtle typography-body-md\">{description}</div>}\n    </div>\n  ) : (\n    content\n  );\n};\n"
    },
    {
      "path": "src/components/field-label/FieldLabel.types.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/field-label/FieldLabel.types.ts",
      "content": "import type { LabelHTMLAttributes, ReactNode } from 'react';\n\nexport type FieldLabelProps = LabelHTMLAttributes<HTMLLabelElement> & {\n  children?: ReactNode;\n  required?: boolean;\n  suffix?: string;\n  tooltip?: ReactNode;\n  aside?: ReactNode;\n  description?: ReactNode;\n  /** Accessible label for the tooltip icon. Defaults to `'More information'`. */\n  tooltipAriaLabel?: string;\n};\n"
    }
  ],
  "meta": {
    "version": "1.0.0",
    "commit": "8bb3627"
  }
}
