{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "separator",
  "type": "registry:ui",
  "title": "Separator",
  "description": "Lines that divide content, sections, and timelines.",
  "categories": [
    "layout"
  ],
  "dependencies": [
    "@base-ui/react@1.9.0"
  ],
  "registryDependencies": [
    "https://sprout.tulipfarm.ai/r/sprout-base.json"
  ],
  "files": [
    {
      "path": "registry/sprout/components/ui/separator.tsx",
      "type": "registry:ui",
      "target": "components/ui/separator.tsx",
      "content": "'use client';\n\nimport type { ComponentProps, ReactNode } from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Separator as BaseSeparator } from '@base-ui/react/separator';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn, stateClassName } from '@/lib/sprout/classes';\n\nexport const separatorVariantNames = ['line', 'fade', 'marker', 'marker-border'] as const;\nexport const separatorOrientationNames = ['horizontal', 'vertical'] as const;\nexport const separatorToneNames = ['default', 'input'] as const;\n\nexport type SeparatorVariant = (typeof separatorVariantNames)[number];\nexport type SeparatorOrientation = (typeof separatorOrientationNames)[number];\nexport type SeparatorTone = (typeof separatorToneNames)[number];\n\nexport interface SeparatorLineProps extends Omit<BaseSeparator.Props, 'children'> {\n  variant?: 'line' | undefined;\n  tone?: SeparatorTone | undefined;\n  children?: undefined;\n}\n\nexport interface SeparatorLabelProps extends Omit<ComponentProps<'div'>, 'children'> {\n  variant?: 'line' | undefined;\n  children: ReactNode;\n}\n\nexport interface SeparatorFadeProps extends Omit<BaseSeparator.Props, 'children' | 'orientation'> {\n  variant: 'fade';\n  children: string;\n}\n\nexport interface SeparatorMarkerState extends Record<string, unknown> {\n  slot: 'separator';\n  variant: 'marker' | 'marker-border';\n}\n\nexport interface SeparatorMarkerProps extends useRender.ComponentProps<'div', SeparatorMarkerState> {\n  variant: 'marker' | 'marker-border';\n}\n\nexport type SeparatorProps = SeparatorLineProps | SeparatorLabelProps | SeparatorFadeProps | SeparatorMarkerProps;\n\nexport function Separator(props: SeparatorProps) {\n  if (props.variant === 'fade') return <Fade {...props} />;\n  if (props.variant === 'marker' || props.variant === 'marker-border') return <Marker {...props} />;\n  if (props.children !== undefined) return <Labeled {...(props as SeparatorLabelProps)} />;\n  return <Line {...(props as SeparatorLineProps)} />;\n}\n\nfunction Line({\n  className,\n  orientation = 'horizontal',\n  tone = 'default',\n  variant: _variant,\n  ...props\n}: SeparatorLineProps) {\n  return (\n    <BaseSeparator\n      data-slot=\"separator\"\n      data-variant=\"line\"\n      data-tone={tone}\n      orientation={orientation}\n      className={stateClassName<BaseSeparator.State>('sprout-separator', className)}\n      {...props}\n    />\n  );\n}\n\nfunction Labeled({ children, className, variant: _variant, ...props }: SeparatorLabelProps) {\n  const content = children !== null && children !== false && children !== '';\n  return (\n    <div\n      data-slot=\"separator\"\n      data-variant=\"label\"\n      data-content={content}\n      className={cn('sprout-separator-label', className)}\n      {...props}\n    >\n      <Line className=\"sprout-separator-label-line\" />\n      {content && (\n        <>\n          <span data-slot=\"separator-label-content\" className=\"sprout-separator-label-content\">\n            {children}\n          </span>\n          <span\n            aria-hidden=\"true\"\n            className=\"sprout-separator sprout-separator-label-line\"\n            data-orientation=\"horizontal\"\n          />\n        </>\n      )}\n    </div>\n  );\n}\n\nfunction Fade({ children, className, variant: _variant, ...props }: SeparatorFadeProps) {\n  return (\n    <BaseSeparator\n      aria-label={children}\n      data-slot=\"separator\"\n      data-variant=\"fade\"\n      orientation=\"horizontal\"\n      className={stateClassName<BaseSeparator.State>('sprout-separator-fade', className)}\n      {...props}\n    >\n      <span className=\"sprout-separator-fade-label\">{children}</span>\n      <span aria-hidden=\"true\" className=\"sprout-separator-fade-shine\">\n        <span className=\"sprout-separator-fade-label\">{children}</span>\n      </span>\n    </BaseSeparator>\n  );\n}\n\nfunction Marker({ className, variant, render, ref, ...props }: SeparatorMarkerProps) {\n  return useRender({\n    defaultTagName: 'div',\n    ref,\n    render,\n    props: mergeProps<'div'>(\n      {\n        'data-slot': 'separator',\n        'data-variant': variant,\n        className: cn(\n          'sprout-separator-marker',\n          variant === 'marker-border' && 'sprout-separator-marker-border',\n          className,\n        ),\n      } as ComponentProps<'div'>,\n      props,\n    ),\n    state: { slot: 'separator', variant },\n  });\n}\n\nexport type SeparatorIconProps = ComponentProps<'span'>;\n\nexport function SeparatorIcon({ className, ...props }: SeparatorIconProps) {\n  return (\n    <span data-slot=\"separator-icon\" aria-hidden=\"true\" className={cn('sprout-separator-icon', className)} {...props} />\n  );\n}\n\nexport type SeparatorContentProps = ComponentProps<'span'>;\n\nexport function SeparatorContent({ className, ...props }: SeparatorContentProps) {\n  return <span data-slot=\"separator-content\" className={cn('sprout-separator-content', className)} {...props} />;\n}\n"
    }
  ],
  "css": {
    "@layer components": {
      ".sprout-separator": {
        "background": "var(--sprout-line)",
        "border": "0",
        "flex-shrink": "0"
      },
      ".sprout-separator[data-orientation=\"horizontal\"]": {
        "width": "100%",
        "height": "1px"
      },
      ".sprout-separator[data-orientation=\"vertical\"]": {
        "align-self": "stretch",
        "width": "1px",
        "min-height": "1rem"
      },
      ".sprout-separator[data-tone=\"input\"]": {
        "background": "var(--sprout-input)"
      },
      ".sprout-separator-label": {
        "min-width": "0",
        "min-height": "20px",
        "color": "var(--sprout-muted)",
        "font-size": "var(--sprout-text-sm)",
        "align-items": "center",
        "gap": "8px",
        "line-height": "1.25rem",
        "display": "flex"
      },
      ".sprout-separator-label-line": {
        "flex": "1 1 0",
        "width": "auto",
        "min-width": "12px"
      },
      ".sprout-separator-label-content": {
        "text-align": "center",
        "text-overflow": "ellipsis",
        "white-space": "nowrap",
        "flex": "0 auto",
        "min-width": "0",
        "max-width": "calc(100% - 40px)",
        "overflow": "hidden"
      },
      "@media (prefers-reduced-motion: no-preference)": {
        ".sprout-separator": {
          "transition": "background-color var(--sprout-motion-fast) var(--sprout-motion-ease)"
        },
        ".sprout-separator-marker, .sprout-separator-content > a": {
          "transition": "color var(--sprout-motion-fast) var(--sprout-motion-ease)"
        }
      },
      ".sprout-separator-fade, .sprout-separator-fade-shine": {
        "align-items": "center",
        "gap": "12px",
        "min-width": "0",
        "display": "flex"
      },
      ".sprout-separator-fade": {
        "width": "100%",
        "color": "var(--sprout-muted)",
        "font-size": "var(--sprout-text-xs)",
        "line-height": "1rem",
        "position": "relative"
      },
      ".sprout-separator-fade:before, .sprout-separator-fade:after, .sprout-separator-fade-shine:before, .sprout-separator-fade-shine:after": {
        "content": "\"\"",
        "flex": "1 1 0",
        "min-width": "12px",
        "height": "1px"
      },
      ".sprout-separator-fade:before": {
        "background": "linear-gradient(to right, transparent, var(--sprout-line))"
      },
      ".sprout-separator-fade:after": {
        "background": "linear-gradient(to left, transparent, var(--sprout-line))"
      },
      ".sprout-separator-fade-label": {
        "text-overflow": "ellipsis",
        "white-space": "nowrap",
        "flex": "0 auto",
        "min-width": "0",
        "overflow": "hidden"
      },
      ".sprout-separator-fade-shine": {
        "color": "var(--sprout-text)",
        "opacity": "0",
        "pointer-events": "none",
        "position": "absolute",
        "inset": "0",
        "mask-image": "linear-gradient(to right, #0000, #000, #0000)",
        "mask-position": "-34% 0",
        "mask-size": "25% 100%",
        "mask-repeat": "no-repeat"
      },
      ".sprout-separator-fade-shine:before, .sprout-separator-fade-shine:after": {
        "background": "var(--sprout-text)"
      },
      "@keyframes sprout-separator-fade-shine": {
        "0%": {
          "opacity": "0",
          "mask-position": "-34% 0"
        },
        "20%, 80%": {
          "opacity": ".7"
        },
        "100%": {
          "opacity": "0",
          "mask-position": "134% 0"
        }
      },
      "@media (hover: hover) and (prefers-reduced-motion: no-preference)": {
        ".sprout-separator-fade:hover > .sprout-separator-fade-shine": {
          "animation": ".65s ease-out both sprout-separator-fade-shine"
        }
      },
      ".sprout-separator-marker": {
        "box-sizing": "border-box",
        "width": "100%",
        "min-width": "0",
        "min-height": "16px",
        "color": "var(--sprout-muted)",
        "font-family": "var(--sprout-font)",
        "font-size": "var(--sprout-text-sm)",
        "text-align": "left",
        "align-items": "center",
        "gap": "8px",
        "line-height": "1.25rem",
        "display": "flex",
        "position": "relative"
      },
      ".sprout-separator-marker :where(svg:not([class*=\"size-\"]))": {
        "width": "16px",
        "height": "16px"
      },
      ".sprout-separator-marker-border": {
        "border-bottom": "1px solid var(--sprout-line)",
        "padding-bottom": "8px"
      },
      ".sprout-separator-icon": {
        "flex-shrink": "0",
        "justify-content": "center",
        "align-items": "center",
        "width": "16px",
        "height": "16px",
        "display": "inline-flex"
      },
      ".sprout-separator-icon :where(svg:not([class*=\"size-\"]))": {
        "width": "16px",
        "height": "16px"
      },
      ".sprout-separator-content": {
        "overflow-wrap": "anywhere",
        "min-width": "0"
      },
      "a.sprout-separator-marker, .sprout-separator-content > a": {
        "text-underline-offset": "3px",
        "border-radius": "2px",
        "text-decoration-line": "underline"
      },
      ".sprout-separator-content > a": {
        "color": "inherit"
      },
      "a.sprout-separator-marker:hover, .sprout-separator-content > a:hover": {
        "color": "var(--sprout-text)"
      },
      "a.sprout-separator-marker:focus-visible, .sprout-separator-content > a:focus-visible": {
        "outline": "var(--sprout-focus-width) solid var(--sprout-focus-ring)",
        "outline-offset": "0",
        "color": "var(--sprout-text)"
      },
      "@media (forced-colors: active)": {
        ".sprout-separator-marker-border": {
          "border-bottom-color": "canvastext"
        }
      },
      ".sprout-separator-label-content > .sprout-separator-icon": {
        "vertical-align": "-3px",
        "margin-inline-end": "6px"
      }
    }
  },
  "docs": "Docs and examples: https://sprout.tulipfarm.ai/components/separator/",
  "meta": {
    "source": "packages/sprout/src/components/separator.tsx"
  }
}
