{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "divider",
  "type": "registry:ui",
  "title": "Divider",
  "description": "A horizontal rule used to visually separate content sections.",
  "dependencies": [
    "class-variance-authority@^0.7.1"
  ],
  "registryDependencies": [
    "https://wideset.co/r/styles.json",
    "https://wideset.co/r/utils.json"
  ],
  "files": [
    {
      "path": "src/components/divider/Divider.tsx",
      "type": "registry:ui",
      "target": "components/ui/wideset/divider/Divider.tsx",
      "content": "'use client';\n\nimport { forwardRef } from 'react';\nimport { cn } from '@/lib/wideset/utils';\n\nimport type { DividerProps } from './Divider.types';\nimport {\n  dividerDashedLineVariants,\n  dividerLineVariants,\n  dividerTextVariants,\n  dividerVariants,\n} from './Divider.variants';\n\nconst DIVIDER_WEIGHT_PX = { thin: 1, default: 2, bold: 4 } as const;\n\ntype DividerLineProps = Pick<DividerProps, 'lineStyle' | 'emphasis' | 'weight'>;\n\nconst DividerLine = ({ lineStyle, emphasis, weight }: DividerLineProps) => {\n  if (lineStyle === 'dashed') {\n    const weightPx = DIVIDER_WEIGHT_PX[weight ?? 'default'];\n    return (\n      <svg aria-hidden=\"true\" height={weightPx} className={dividerDashedLineVariants({ emphasis })}>\n        <line\n          x1=\"0\"\n          y1={weightPx / 2}\n          x2=\"100%\"\n          y2={weightPx / 2}\n          strokeWidth={weightPx}\n          strokeDasharray=\"4 4\"\n        />\n      </svg>\n    );\n  }\n\n  return <div className={dividerLineVariants({ emphasis, weight })} />;\n};\n\nexport const Divider = forwardRef<HTMLDivElement, DividerProps>(\n  ({ className, text, lineStyle, emphasis, weight, textAlign = 'center', ...props }, ref) => {\n    const dividerLine = <DividerLine lineStyle={lineStyle} emphasis={emphasis} weight={weight} />;\n\n    return (\n      <div\n        ref={ref}\n        className={cn(dividerVariants({ withText: Boolean(text) }), className)}\n        role=\"separator\"\n        data-slot=\"divider\"\n        {...props}\n      >\n        {text ? (\n          <>\n            {textAlign !== 'left' && dividerLine}\n            <span className={cn(dividerTextVariants({ textAlign }))}>{text}</span>\n            {textAlign !== 'right' && dividerLine}\n          </>\n        ) : (\n          dividerLine\n        )}\n      </div>\n    );\n  },\n);\n\nDivider.displayName = 'Divider';\n"
    },
    {
      "path": "src/components/divider/Divider.types.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/divider/Divider.types.ts",
      "content": "import type { VariantProps } from 'class-variance-authority';\nimport type { HTMLAttributes } from 'react';\n\nimport type { dividerLineVariants, dividerTextVariants } from './Divider.variants';\n\nexport type DividerProps = HTMLAttributes<HTMLDivElement> &\n  VariantProps<typeof dividerLineVariants> &\n  Omit<VariantProps<typeof dividerTextVariants>, 'textAlign'> & {\n    /** Controls whether the divider line is solid or dashed. */\n    lineStyle?: 'solid' | 'dashed';\n    /** Optional label rendered inside the divider line. */\n    text?: string;\n    /** Horizontal alignment of the label text. */\n    textAlign?: 'left' | 'center' | 'right';\n  };\n"
    },
    {
      "path": "src/components/divider/Divider.variants.ts",
      "type": "registry:ui",
      "target": "components/ui/wideset/divider/Divider.variants.ts",
      "content": "import { cva } from 'class-variance-authority';\n\nexport const dividerLineVariants = cva('min-w-ws-14 flex-1 shrink-0 border-solid', {\n  variants: {\n    weight: {\n      thin: 'border-b-1',\n      default: 'border-b-2',\n      bold: 'border-b-4',\n    },\n    emphasis: {\n      subtle: 'border-ws-static-subtle',\n      base: 'border-ws-static-base',\n      strong: 'border-ws-static-strong',\n    },\n  },\n  defaultVariants: {\n    emphasis: 'base',\n    weight: 'default',\n  },\n});\n\n/* Dashed lines render as an SVG stroke, not border-dashed: the CSS dash pitch\n   is UA-defined, while Figma specifies exactly 4/4. The stroke binds to the\n   same --border-color-static-* vars the solid border uses — stroke-* utilities\n   would miss them (semantic colors live outside the Tailwind color theme). */\nexport const dividerDashedLineVariants = cva('min-w-ws-14 flex-1 shrink-0', {\n  variants: {\n    emphasis: {\n      subtle: '[stroke:var(--border-color-ws-static-subtle)]',\n      base: '[stroke:var(--border-color-ws-static-base)]',\n      strong: '[stroke:var(--border-color-ws-static-strong)]',\n    },\n  },\n  defaultVariants: {\n    emphasis: 'base',\n  },\n});\n\nexport const dividerTextVariants = cva(\n  'typography-caption-strong-md text-ws-static-subtle min-w-0 shrink overflow-hidden text-ellipsis whitespace-nowrap',\n  {\n    variants: {\n      textAlign: {\n        left: 'text-left',\n        center: 'text-center',\n        right: 'text-right',\n      },\n    },\n    defaultVariants: {\n      textAlign: 'center',\n    },\n  },\n);\n\nexport const dividerVariants = cva('flex w-full items-center', {\n  variants: {\n    withText: {\n      true: 'h-ws-9 gap-ws-7',\n      false: '',\n    },\n  },\n  defaultVariants: {\n    withText: false,\n  },\n});\n"
    }
  ],
  "meta": {
    "version": "1.0.0",
    "commit": "8bb3627"
  }
}
