{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "step-indicator",
  "title": "Step Indicator",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-native/components/step-indicator/StepIndicator.tsx",
      "content": "import * as React from 'react'\nimport { Pressable, View, type PressableProps, type ViewProps } from 'react-native'\nimport { Text, type TextProps } from '@/components/ui/text'\nimport { renderTextChildren } from '@/lib/label-children'\nimport { cn } from '@/lib/utils'\n\nexport type StepIndicatorStatus = 'upcoming' | 'current' | 'complete' | 'error'\nconst StepContext = React.createContext<{\n  value: string | undefined\n  orientation: 'vertical' | 'horizontal'\n  disabled: boolean\n  select: (value: string) => void\n} | null>(null)\nconst ItemContext = React.createContext<{ value: string; status: StepIndicatorStatus; disabled: boolean } | null>(null)\n\nexport interface StepIndicatorProps extends ViewProps {\n  value?: string\n  defaultValue?: string\n  onValueChange?: (value: string) => void\n  orientation?: 'vertical' | 'horizontal'\n  disabled?: boolean\n  className?: string\n}\n\nexport const StepIndicator = React.forwardRef<React.ComponentRef<typeof View>, StepIndicatorProps>(\n  ({ value, defaultValue, onValueChange, orientation = 'vertical', disabled = false, className, ...props }, ref) => {\n    const [internal, setInternal] = React.useState(defaultValue)\n    const resolved = value ?? internal\n    return (\n      <StepContext.Provider\n        value={{\n          value: resolved,\n          orientation,\n          disabled,\n          select(next) {\n            if (disabled || next === resolved) return\n            if (value === undefined) setInternal(next)\n            onValueChange?.(next)\n          },\n        }}\n      >\n        <View\n          ref={ref}\n          {...props}\n          className={cn(\n            orientation === 'vertical' ? 'gap-[4px]' : 'flex-row flex-wrap items-center gap-[8px]',\n            className,\n          )}\n        />\n      </StepContext.Provider>\n    )\n  },\n)\nStepIndicator.displayName = 'StepIndicator'\n\nexport interface StepIndicatorItemProps extends ViewProps {\n  value: string\n  status?: StepIndicatorStatus\n  disabled?: boolean\n  className?: string\n}\n\nexport const StepIndicatorItem = React.forwardRef<React.ComponentRef<typeof View>, StepIndicatorItemProps>(\n  ({ value, status, disabled = false, className, ...props }, ref) => {\n    const steps = React.useContext(StepContext)\n    if (!steps) throw new Error('StepIndicatorItem must be inside StepIndicator')\n    const resolvedStatus = status ?? (steps.value === value ? 'current' : 'upcoming')\n    return (\n      <ItemContext.Provider value={{ value, status: resolvedStatus, disabled: steps.disabled || disabled }}>\n        <View\n          ref={ref}\n          {...props}\n          className={cn('min-w-0', steps.orientation === 'horizontal' && 'max-w-full', className)}\n        />\n      </ItemContext.Provider>\n    )\n  },\n)\nStepIndicatorItem.displayName = 'StepIndicatorItem'\n\nexport interface StepIndicatorTriggerProps extends Omit<PressableProps, 'children'> {\n  children?: React.ReactNode\n  className?: string\n}\n\nexport const StepIndicatorTrigger = React.forwardRef<React.ComponentRef<typeof Pressable>, StepIndicatorTriggerProps>(\n  ({ children, className, disabled, onPress, accessibilityState, ...props }, ref) => {\n    const steps = React.useContext(StepContext)\n    const item = React.useContext(ItemContext)\n    if (!steps || !item) throw new Error('StepIndicatorTrigger must be inside StepIndicatorItem')\n    const isDisabled = !!disabled || item.disabled\n    return (\n      <Pressable\n        ref={ref}\n        {...props}\n        accessibilityRole=\"button\"\n        accessibilityState={{ ...accessibilityState, selected: steps.value === item.value, disabled: isDisabled }}\n        disabled={isDisabled}\n        onPress={(event) => {\n          if (isDisabled) return\n          onPress?.(event)\n          if (!event.defaultPrevented) steps.select(item.value)\n        }}\n        className={cn(\n          'min-h-[48px] flex-row items-center gap-[12px] rounded-md px-[8px] py-[10px] active:bg-muted',\n          isDisabled && 'opacity-50',\n          className,\n        )}\n      >\n        {renderTextChildren(children)}\n      </Pressable>\n    )\n  },\n)\nStepIndicatorTrigger.displayName = 'StepIndicatorTrigger'\n\nexport interface StepIndicatorIndicatorProps extends ViewProps {\n  className?: string\n}\nexport const StepIndicatorIndicator = React.forwardRef<React.ComponentRef<typeof View>, StepIndicatorIndicatorProps>(\n  ({ children, className, ...props }, ref) => {\n    const item = React.useContext(ItemContext)\n    if (!item) throw new Error('StepIndicatorIndicator must be inside StepIndicatorItem')\n    const filled = item.status === 'current' || item.status === 'complete'\n    return (\n      <View\n        ref={ref}\n        {...props}\n        aria-hidden\n        className={cn(\n          'min-h-[32px] min-w-[32px] shrink-0 items-center justify-center rounded-full border border-border px-[6px] py-[4px]',\n          filled && 'border-primary bg-primary',\n          item.status === 'error' && 'border-destructive bg-destructive',\n          className,\n        )}\n      >\n        {renderTextChildren(\n          children,\n          cn(\n            'text-center font-medium',\n            filled && 'text-primary-foreground',\n            item.status === 'error' && 'text-destructive-foreground',\n          ),\n        )}\n      </View>\n    )\n  },\n)\nStepIndicatorIndicator.displayName = 'StepIndicatorIndicator'\n\nexport const StepIndicatorTitle = React.forwardRef<React.ComponentRef<typeof Text>, TextProps>(\n  ({ className, ...props }, ref) => <Text ref={ref} {...props} className={cn('font-medium', className)} />,\n)\nStepIndicatorTitle.displayName = 'StepIndicatorTitle'\n\nexport const StepIndicatorDescription = React.forwardRef<React.ComponentRef<typeof Text>, TextProps>(\n  ({ className, ...props }, ref) => <Text ref={ref} size=\"sm\" variant=\"muted\" {...props} className={cn(className)} />,\n)\nStepIndicatorDescription.displayName = 'StepIndicatorDescription'\n\nexport const StepIndicatorSeparator = React.forwardRef<\n  React.ComponentRef<typeof View>,\n  ViewProps & { className?: string }\n>(({ className, ...props }, ref) => {\n  const steps = React.useContext(StepContext)\n  if (!steps) throw new Error('StepIndicatorSeparator must be inside StepIndicator')\n  return (\n    <View\n      ref={ref}\n      {...props}\n      aria-hidden\n      className={cn(\n        'bg-border',\n        steps.orientation === 'vertical' ? 'ml-[24px] h-[16px] w-px' : 'h-px min-w-[16px] flex-1 self-center',\n        className,\n      )}\n    />\n  )\n})\nStepIndicatorSeparator.displayName = 'StepIndicatorSeparator'\n",
      "type": "registry:ui",
      "target": "~/components/ui/step-indicator/StepIndicator.tsx"
    },
    {
      "path": "packages/registry-native/components/step-indicator/index.ts",
      "content": "export {\n  StepIndicator,\n  StepIndicatorItem,\n  StepIndicatorTrigger,\n  StepIndicatorIndicator,\n  StepIndicatorTitle,\n  StepIndicatorDescription,\n  StepIndicatorSeparator,\n} from './StepIndicator'\nexport type {\n  StepIndicatorProps,\n  StepIndicatorItemProps,\n  StepIndicatorTriggerProps,\n  StepIndicatorIndicatorProps,\n  StepIndicatorStatus,\n} from './StepIndicator'\n",
      "type": "registry:ui",
      "target": "~/components/ui/step-indicator/index.ts"
    }
  ],
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [
    "https://native.uipkge.dev/r/native/text.json",
    "https://native.uipkge.dev/r/native/label-children.json"
  ],
  "description": "Composed progress steps with caller-owned navigation, status indicators and optional triggers.",
  "categories": [
    "control"
  ]
}