{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "stepper",
  "type": "registry:ui",
  "title": "Stepper",
  "description": "Static and interactive workflow steps with horizontal and vertical layouts.",
  "dependencies": [
    "lucide-react@^1.47.0"
  ],
  "registryDependencies": [
    "https://control-ui.dev/r/core.json"
  ],
  "files": [
    {
      "path": "src/registry/knob-contracts/stepper-knobs.ts",
      "target": "@components/control-ui/knob-contracts/stepper-knobs.ts",
      "type": "registry:component",
      "content": "// Generated from src/registry/sources/control-ui/recipes/stepper.css by scripts/gen-knob-contracts.ts — run `bun run sync:knobs`.\nexport const stepperKnobs = [\n  \"--cui-stepper-indicator-radius\",\n  \"--cui-stepper-indicator-background\",\n  \"--cui-stepper-indicator-foreground\",\n  \"--cui-stepper-indicator-border-color\",\n  \"--cui-stepper-indicator-border-width\",\n  \"--cui-stepper-separator-background\",\n  \"--cui-stepper-title-foreground\",\n  \"--cui-stepper-indicator-size\",\n  \"--cui-stepper-indicator-current-border-width\",\n  \"--cui-stepper-title-current-font-weight\",\n  \"--cui-stepper-indicator-current-border-color\",\n  \"--cui-stepper-indicator-complete-background\",\n  \"--cui-stepper-indicator-complete-foreground\",\n  \"--cui-stepper-separator-complete-background\",\n  \"--cui-stepper-separator-size\",\n] as const;\nexport type StepperKnobStyle = Partial<Record<(typeof stepperKnobs)[number], string>>;\n"
    },
    {
      "path": "src/registry/sources/control-ui/recipes/stepper.css",
      "target": "@components/control-ui/styles/recipes/stepper.css",
      "type": "registry:file",
      "content": "@layer components {\n  :where([data-control-family=\"stepper\"][data-slot=\"root\"]) {\n    --cui-stepper-indicator-size: var(--control-h-sm);\n    --cui-stepper-indicator-radius: 9999px;\n    --cui-stepper-indicator-background: var(--background);\n    --cui-stepper-indicator-foreground: var(--muted-foreground);\n    --cui-stepper-indicator-border-color: var(--border);\n    --cui-stepper-indicator-border-width: var(--control-rim-width);\n    --cui-stepper-indicator-current-border-width: 2px;\n    --cui-stepper-indicator-current-border-color: var(--primary);\n    --cui-stepper-indicator-complete-background: var(--primary);\n    --cui-stepper-indicator-complete-foreground: var(--primary-foreground);\n    --cui-stepper-separator-background: var(--border);\n    --cui-stepper-separator-complete-background: var(--cui-stepper-indicator-complete-background);\n    --cui-stepper-separator-size: 1px;\n    --cui-stepper-title-foreground: var(--foreground);\n    --cui-stepper-title-current-font-weight: var(--font-weight-semibold);\n  }\n  :where([data-control-family=\"stepper\"][data-slot=\"trigger\"]) {\n    border-radius: var(--radius-control);\n    cursor: pointer;\n    transition: color var(--duration-fast) var(--ease-standard);\n    text-align: start;\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"trigger\"]:disabled) {\n    cursor: not-allowed;\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"trigger\"]:disabled),\n  :where(\n    [data-control-family=\"stepper\"][data-slot=\"item\"][data-disabled=\"true\"]\n      > :is([data-slot=\"indicator\"], [data-slot=\"title\"], [data-slot=\"description\"])\n  ) {\n    opacity: var(--disabled-opacity);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"indicator\"]) {\n    --_stepper-indicator-background: var(--cui-stepper-indicator-background);\n    --_stepper-indicator-foreground: var(--cui-stepper-indicator-foreground);\n    --_stepper-indicator-border-color: var(--cui-stepper-indicator-border-color);\n    --_stepper-indicator-border-width: var(--cui-stepper-indicator-border-width);\n    --_stepper-indicator-shadow: 0 0 transparent;\n    inline-size: var(--cui-stepper-indicator-size);\n    block-size: var(--cui-stepper-indicator-size);\n    border: var(--_stepper-indicator-border-width) solid var(--_stepper-indicator-border-color);\n    border-radius: var(--cui-stepper-indicator-radius);\n    background: var(--_stepper-indicator-background);\n    color: var(--_stepper-indicator-foreground);\n    box-shadow: var(--_stepper-indicator-shadow);\n    font-size: var(--text-caption);\n    font-weight: var(--font-weight-semibold);\n    font-variant-numeric: tabular-nums;\n    transition-property: color, background-color, border-color, box-shadow;\n    transition-duration: var(--duration-base);\n    transition-timing-function: var(--ease-standard);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"indicator\"][data-state=\"complete\"]:not([data-invalid])) {\n    --_stepper-indicator-background: var(--cui-stepper-indicator-complete-background);\n    --_stepper-indicator-foreground: var(--cui-stepper-indicator-complete-foreground);\n    --_stepper-indicator-border-color: var(--cui-stepper-indicator-complete-background);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"indicator\"][data-state=\"current\"]:not([data-invalid])) {\n    --_stepper-indicator-foreground: var(--primary-text);\n    --_stepper-indicator-border-color: var(--cui-stepper-indicator-current-border-color);\n    --_stepper-indicator-border-width: var(--cui-stepper-indicator-current-border-width);\n    --_stepper-indicator-shadow: 0 0 0 4px oklch(from var(--cui-stepper-indicator-current-border-color) l c h / 0.1);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"indicator\"][data-invalid]) {\n    --_stepper-indicator-background: oklch(from var(--destructive) l c h / 0.1);\n    --_stepper-indicator-foreground: var(--destructive-text);\n    --_stepper-indicator-border-color: var(--destructive);\n    --_stepper-indicator-shadow: 0 0 transparent;\n    border-style: dashed;\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"separator\"]) {\n    --_stepper-separator-background: var(--cui-stepper-separator-background);\n    background: var(--_stepper-separator-background);\n    transition: background-color var(--duration-base) var(--ease-standard);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"separator\"][data-state=\"complete\"]:not([data-invalid])) {\n    --_stepper-separator-background: var(--cui-stepper-separator-complete-background);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"title\"]) {\n    color: var(--cui-stepper-title-foreground);\n    font-size: var(--text-body);\n    font-weight: var(--font-weight-medium);\n    line-height: var(--leading-tight);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"item\"][aria-current=\"step\"] > [data-slot=\"title\"]),\n  :where([data-control-family=\"stepper\"][data-slot=\"item\"][aria-current=\"step\"] > [data-slot=\"trigger\"] > [data-slot=\"title\"]) {\n    font-weight: var(--cui-stepper-title-current-font-weight);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"description\"]) {\n    color: var(--muted-foreground);\n    font-size: var(--text-body);\n    line-height: var(--leading-relaxed);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"content\"]) {\n    margin-block-start: calc(var(--spacing) * 6);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"item\"][data-orientation=\"vertical\"]) {\n    padding-block-end: calc(var(--spacing) * 6);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"item\"][data-orientation=\"vertical\"]:last-child) {\n    padding-block-end: 0;\n  }\n\n  :where([data-control-family=\"stepper\"]:is([data-slot=\"title\"], [data-slot=\"description\"])[data-orientation=\"vertical\"]) {\n    margin-inline-start: calc(var(--spacing) * 3);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"title\"][data-orientation=\"horizontal\"]) {\n    margin-block-start: calc(var(--spacing) * 2);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"description\"][data-orientation=\"horizontal\"]) {\n    margin-block-start: calc(var(--spacing) * 0.5);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"separator\"][data-orientation=\"horizontal\"]) {\n    block-size: var(--cui-stepper-separator-size);\n  }\n\n  :where([data-control-family=\"stepper\"][data-slot=\"separator\"][data-orientation=\"vertical\"]) {\n    inline-size: var(--cui-stepper-separator-size);\n  }\n\n  @container stepper (width < 28rem) {\n    :where([data-control-family=\"stepper\"][data-slot=\"item\"][data-responsive=\"true\"][data-orientation=\"horizontal\"]) {\n      padding-block-end: calc(var(--spacing) * 6);\n    }\n\n    :where([data-control-family=\"stepper\"][data-slot=\"item\"][data-responsive=\"true\"][data-orientation=\"horizontal\"]:last-child) {\n      padding-block-end: 0;\n    }\n\n    :where(\n        [data-control-family=\"stepper\"]:is(\n          [data-slot=\"title\"],\n          [data-slot=\"description\"]\n        )[data-responsive=\"true\"][data-orientation=\"horizontal\"]\n      ) {\n      margin-block-start: 0;\n      margin-inline-start: calc(var(--spacing) * 3);\n    }\n\n    :where([data-control-family=\"stepper\"][data-slot=\"separator\"][data-responsive=\"true\"][data-orientation=\"horizontal\"]) {\n      block-size: auto;\n      inline-size: var(--cui-stepper-separator-size);\n    }\n  }\n}\n\n@property --cui-stepper-indicator-radius {\n  syntax: \"<length-percentage>\";\n  inherits: true;\n  initial-value: 0px;\n}\n\n@property --cui-stepper-indicator-background {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-indicator-foreground {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-indicator-border-color {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-indicator-border-width {\n  syntax: \"<length>\";\n  inherits: true;\n  initial-value: 0px;\n}\n\n@property --cui-stepper-separator-background {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-title-foreground {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-indicator-size {\n  syntax: \"<length-percentage>\";\n  inherits: true;\n  initial-value: 0px;\n}\n\n@property --cui-stepper-indicator-current-border-width {\n  syntax: \"<length>\";\n  inherits: true;\n  initial-value: 0px;\n}\n\n@property --cui-stepper-title-current-font-weight {\n  syntax: \"<number>\";\n  inherits: true;\n  initial-value: 400;\n}\n\n@property --cui-stepper-indicator-current-border-color {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-indicator-complete-background {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-indicator-complete-foreground {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-separator-complete-background {\n  syntax: \"<color>\";\n  inherits: true;\n  initial-value: transparent;\n}\n\n@property --cui-stepper-separator-size {\n  syntax: \"<length-percentage>\";\n  inherits: true;\n  initial-value: 0px;\n}\n"
    },
    {
      "path": "src/registry/sources/control-ui/ui/stepper.tsx",
      "target": "@components/control-ui/ui/stepper.tsx",
      "type": "registry:ui",
      "content": "\"use client\";\n\nimport { CheckIcon, CircleAlertIcon } from \"lucide-react\";\nimport type { ComponentProps, CSSProperties } from \"react\";\nimport { createContext, useContext, useEffect, useId, useState } from \"react\";\nimport type { StepperKnobStyle } from \"@/components/control-ui/knob-contracts/stepper-knobs\";\nimport { cn } from \"@/components/control-ui/lib/cn\";\n\nexport type StepperOrientation = \"horizontal\" | \"vertical\";\n\nexport type StepperContentMode = \"current\" | \"all\";\n\nexport type StepperState = \"neutral\" | \"complete\" | \"current\" | \"upcoming\";\n\nexport type StepperStatusDetails = {\n  step: number;\n  state: StepperState;\n  invalid: boolean;\n  disabled: boolean;\n};\n\nexport type StepperProps = Omit<ComponentProps<\"div\">, \"defaultValue\" | \"onChange\"> & {\n  value?: number | null;\n  defaultValue?: number | null;\n  onValueChange?: (value: number) => void;\n  orientation?: StepperOrientation;\n  contentMode?: StepperContentMode;\n  responsive?: boolean;\n  getStatusLabel?: (details: StepperStatusDetails) => string;\n} & { style?: CSSProperties & StepperKnobStyle };\n\nexport type StepperListProps = ComponentProps<\"ol\"> & { style?: CSSProperties & StepperKnobStyle };\n\nexport type StepperItemProps = Omit<ComponentProps<\"li\">, \"value\"> & {\n  step: number;\n  disabled?: boolean;\n  invalid?: boolean;\n} & { style?: CSSProperties & StepperKnobStyle };\n\nexport type StepperTriggerProps = Omit<ComponentProps<\"button\">, \"style\"> & { style?: CSSProperties & StepperKnobStyle };\n\nexport type StepperIndicatorProps = Omit<ComponentProps<\"span\">, \"style\"> & { style?: CSSProperties & StepperKnobStyle };\n\nexport type StepperSeparatorProps = Omit<ComponentProps<\"span\">, \"style\"> & { style?: CSSProperties & StepperKnobStyle };\n\nexport type StepperTitleProps = Omit<ComponentProps<\"span\">, \"style\"> & { style?: CSSProperties & StepperKnobStyle };\n\nexport type StepperDescriptionProps = Omit<ComponentProps<\"span\">, \"style\"> & { style?: CSSProperties & StepperKnobStyle };\n\nexport type StepperContentProps = ComponentProps<\"section\"> & {\n  step: number;\n  keepMounted?: boolean;\n} & { style?: CSSProperties & StepperKnobStyle };\n\ntype RegisterId = (id: string) => () => void;\n\ntype StepperContextValue = {\n  value: number | null;\n  orientation: StepperOrientation;\n  contentMode: StepperContentMode;\n  responsive: boolean;\n  baseId: string;\n  selectStep: (step: number) => void;\n  getStatusLabel: (details: StepperStatusDetails) => string;\n  renderedIds: ReadonlySet<string>;\n  registerId: RegisterId;\n};\n\nconst StepperContext = createContext<StepperContextValue | null>(null);\n\nfunction useStepper() {\n  const context = useContext(StepperContext);\n  if (!context) throw new Error(\"Stepper parts must be used within <Stepper>.\");\n  return context;\n}\n\ntype StepperItemContextValue = {\n  step: number;\n  state: StepperState;\n  disabled: boolean;\n  invalid: boolean;\n  titleId: string;\n  descriptionId: string;\n  statusId: string;\n  contentId: string;\n};\n\nconst StepperItemContext = createContext<StepperItemContextValue | null>(null);\n\nfunction useStepperItem() {\n  const context = useContext(StepperItemContext);\n  if (!context) throw new Error(\"Stepper item parts must be used within <StepperItem>.\");\n  return context;\n}\n\nfunction stepPartId(baseId: string, step: number, part: \"title\" | \"description\" | \"status\" | \"content\") {\n  return `${baseId}-step-${step}-${part}`;\n}\n\nfunction useRegisteredId(id: string, rendered = true) {\n  const { registerId } = useStepper();\n  useEffect(() => (rendered ? registerId(id) : undefined), [id, rendered, registerId]);\n}\n\nfunction renderedIdRefs(renderedIds: ReadonlySet<string>, ids: string[]): string | undefined {\n  const refs = ids.filter((id) => renderedIds.has(id));\n  return refs.length > 0 ? refs.join(\" \") : undefined;\n}\n\nfunction stateForStep(value: number | null, step: number): StepperState {\n  if (value === null) return \"neutral\";\n  if (step < value) return \"complete\";\n  if (step === value) return \"current\";\n  return \"upcoming\";\n}\n\nfunction statusStateLabel(state: StepperState, invalid: boolean): string | null {\n  if (invalid) return \"invalid\";\n  if (state === \"neutral\") return null;\n  return state;\n}\n\nfunction defaultStatusLabel({ step, state, invalid, disabled }: StepperStatusDetails): string {\n  const stateLabel = statusStateLabel(state, invalid);\n  return [`Step ${step + 1}`, stateLabel, disabled ? \"disabled\" : null].filter(Boolean).join(\", \");\n}\n\nfunction defaultIndicatorContent(step: number, state: StepperState, invalid: boolean) {\n  if (invalid) return <CircleAlertIcon className=\"size-4\" />;\n  if (state === \"complete\") return <CheckIcon className=\"size-4\" />;\n  return step + 1;\n}\n\nfunction itemLayout(orientation: StepperOrientation, responsive: boolean) {\n  if (orientation === \"vertical\") {\n    return \"grid min-w-0 grid-cols-[var(--cui-stepper-indicator-size)_minmax(0,1fr)]\";\n  }\n  return cn(\n    \"relative grid min-w-0 flex-1 grid-cols-1 justify-items-center\",\n    responsive &&\n      \"@max-md/stepper:w-full @max-md/stepper:flex-none @max-md/stepper:grid-cols-[var(--cui-stepper-indicator-size)_minmax(0,1fr)] @max-md/stepper:justify-items-stretch\",\n  );\n}\n\nfunction partLayout(orientation: StepperOrientation, responsive: boolean, part: \"indicator\" | \"title\" | \"description\") {\n  const vertical = {\n    indicator: \"col-start-1 row-span-2 row-start-1\",\n    title: \"col-start-2 row-start-1\",\n    description: \"col-start-2 row-start-2\",\n  }[part];\n  if (orientation === \"vertical\") return vertical;\n\n  const horizontal = {\n    indicator: \"col-start-1 row-start-1\",\n    title: \"col-start-1 row-start-2\",\n    description: \"col-start-1 row-start-3\",\n  }[part];\n  if (!responsive) return horizontal;\n\n  const narrow = {\n    indicator: \"@max-md/stepper:col-start-1 @max-md/stepper:row-span-2 @max-md/stepper:row-start-1\",\n    title: \"@max-md/stepper:col-start-2 @max-md/stepper:row-start-1\",\n    description: \"@max-md/stepper:col-start-2 @max-md/stepper:row-start-2\",\n  }[part];\n  return cn(horizontal, narrow);\n}\n\nexport function Stepper({\n  value,\n  defaultValue = null,\n  onValueChange,\n  orientation = \"horizontal\",\n  contentMode = \"current\",\n  responsive = true,\n  getStatusLabel = defaultStatusLabel,\n  id,\n  className,\n  children,\n  ...props\n}: StepperProps) {\n  const generatedId = useId();\n  const [internalValue, setInternalValue] = useState<number | null>(defaultValue);\n  const [renderedIds, setRenderedIds] = useState<ReadonlySet<string>>(() => new Set());\n  const [registerId] = useState<RegisterId>(() => (renderedId: string) => {\n    setRenderedIds((current) => (current.has(renderedId) ? current : new Set(current).add(renderedId)));\n    return () =>\n      setRenderedIds((current) => {\n        if (!current.has(renderedId)) return current;\n        const next = new Set(current);\n        next.delete(renderedId);\n        return next;\n      });\n  });\n  const controlled = value !== undefined;\n  const currentValue = value !== undefined ? value : internalValue;\n\n  const selectStep = (step: number) => {\n    if (!controlled) setInternalValue(step);\n    onValueChange?.(step);\n  };\n\n  return (\n    <StepperContext.Provider\n      value={{\n        value: currentValue,\n        orientation,\n        contentMode,\n        responsive,\n        baseId: id ?? generatedId,\n        selectStep,\n        getStatusLabel,\n        renderedIds,\n        registerId,\n      }}\n    >\n      <div\n        {...props}\n        id={id}\n        data-control-ui=\"stepper\"\n        data-control-family=\"stepper\"\n        data-slot=\"root\"\n        data-orientation={orientation}\n        data-content-mode={contentMode}\n        data-responsive={responsive ? \"true\" : undefined}\n        className={cn(responsive && \"@container/stepper\", \"w-full\", className)}\n      >\n        {children}\n      </div>\n    </StepperContext.Provider>\n  );\n}\n\nexport function StepperList({ className, ...props }: StepperListProps) {\n  const { orientation, responsive } = useStepper();\n  return (\n    <ol\n      {...props}\n      data-control-ui=\"stepper\"\n      data-control-family=\"stepper\"\n      data-slot=\"list\"\n      data-orientation={orientation}\n      className={cn(\n        orientation === \"horizontal\" ? \"flex w-full items-start\" : \"flex w-full flex-col\",\n        orientation === \"horizontal\" && responsive && \"@max-md/stepper:flex-col @max-md/stepper:items-stretch\",\n        className,\n      )}\n    />\n  );\n}\n\nexport function StepperItem({ step, disabled = false, invalid = false, className, children, ...props }: StepperItemProps) {\n  const { value, orientation, responsive, baseId } = useStepper();\n  const state = stateForStep(value, step);\n  const contextValue = {\n    step,\n    state,\n    disabled,\n    invalid,\n    titleId: stepPartId(baseId, step, \"title\"),\n    descriptionId: stepPartId(baseId, step, \"description\"),\n    statusId: stepPartId(baseId, step, \"status\"),\n    contentId: stepPartId(baseId, step, \"content\"),\n  } satisfies StepperItemContextValue;\n\n  return (\n    <StepperItemContext.Provider value={contextValue}>\n      <li\n        {...props}\n        data-control-ui=\"stepper\"\n        data-control-family=\"stepper\"\n        data-slot=\"item\"\n        data-step={step}\n        data-state={state}\n        data-orientation={orientation}\n        data-responsive={responsive ? \"true\" : undefined}\n        data-disabled={disabled ? \"true\" : undefined}\n        data-invalid={invalid ? \"true\" : undefined}\n        aria-current={state === \"current\" ? \"step\" : undefined}\n        className={cn(\"relative\", itemLayout(orientation, responsive), className)}\n      >\n        {children}\n      </li>\n    </StepperItemContext.Provider>\n  );\n}\n\nexport function StepperTrigger({ disabled: disabledProp, className, onClick, type = \"button\", ...props }: StepperTriggerProps) {\n  const { orientation, responsive, selectStep, renderedIds } = useStepper();\n  const { step, state, disabled, invalid, titleId, descriptionId, statusId, contentId } = useStepperItem();\n  const isDisabled = disabled || Boolean(disabledProp);\n\n  return (\n    <button\n      aria-labelledby={renderedIdRefs(renderedIds, [titleId])}\n      aria-describedby={renderedIdRefs(renderedIds, [statusId, descriptionId])}\n      aria-controls={renderedIdRefs(renderedIds, [contentId])}\n      {...props}\n      data-control-ui=\"stepper\"\n      data-control-family=\"stepper\"\n      data-slot=\"trigger\"\n      data-state={state}\n      data-invalid={invalid ? \"true\" : undefined}\n      type={type}\n      disabled={isDisabled}\n      aria-current={state === \"current\" ? \"step\" : undefined}\n      className={cn(\n        \"group/stepper-trigger col-span-full row-span-3 row-start-1 grid w-full min-w-0 grid-cols-1 justify-items-center\",\n        orientation === \"vertical\" && \"row-span-2 grid-cols-[var(--cui-stepper-indicator-size)_minmax(0,1fr)] justify-items-stretch\",\n        orientation === \"horizontal\" &&\n          responsive &&\n          \"@max-md/stepper:row-span-2 @max-md/stepper:grid-cols-[var(--cui-stepper-indicator-size)_minmax(0,1fr)] @max-md/stepper:justify-items-stretch\",\n        className,\n      )}\n      onClick={(event) => {\n        onClick?.(event);\n        if (!event.defaultPrevented && !isDisabled) selectStep(step);\n      }}\n    />\n  );\n}\n\nexport function StepperIndicator({ className, children, ...props }: StepperIndicatorProps) {\n  const { orientation, responsive, getStatusLabel } = useStepper();\n  const { step, state, disabled, invalid, statusId } = useStepperItem();\n  useRegisteredId(statusId);\n  const indicatorContent = children ?? defaultIndicatorContent(step, state, invalid);\n\n  return (\n    <span\n      {...props}\n      data-control-ui=\"stepper\"\n      data-control-family=\"stepper\"\n      data-slot=\"indicator\"\n      data-state={state}\n      data-invalid={invalid ? \"true\" : undefined}\n      className={cn(\"relative z-1 flex shrink-0 items-center justify-center\", partLayout(orientation, responsive, \"indicator\"), className)}\n    >\n      <span aria-hidden=\"true\">{indicatorContent}</span>\n      <span id={statusId} className=\"sr-only\">\n        {getStatusLabel({ step, state, invalid, disabled })}\n      </span>\n    </span>\n  );\n}\n\nexport function StepperSeparator({ className, ...props }: StepperSeparatorProps) {\n  const { orientation, responsive } = useStepper();\n  const { state, invalid } = useStepperItem();\n  return (\n    <span\n      {...props}\n      data-control-ui=\"stepper\"\n      data-control-family=\"stepper\"\n      data-slot=\"separator\"\n      data-state={state}\n      data-orientation={orientation}\n      data-responsive={responsive ? \"true\" : undefined}\n      data-invalid={invalid ? \"true\" : undefined}\n      aria-hidden=\"true\"\n      className={cn(\n        \"absolute\",\n        orientation === \"horizontal\" &&\n          \"top-[calc(var(--cui-stepper-indicator-size)/2_-_var(--cui-stepper-separator-size)/2)] start-[calc(50%_+_var(--cui-stepper-indicator-size)/2)] end-[calc(var(--cui-stepper-indicator-size)/2_-_50%)]\",\n        orientation === \"vertical\" &&\n          \"top-(--cui-stepper-indicator-size) bottom-0 start-[calc(var(--cui-stepper-indicator-size)/2_-_var(--cui-stepper-separator-size)/2)]\",\n        orientation === \"horizontal\" &&\n          responsive &&\n          \"@max-md/stepper:top-(--cui-stepper-indicator-size) @max-md/stepper:end-auto @max-md/stepper:bottom-0 @max-md/stepper:start-[calc(var(--cui-stepper-indicator-size)/2_-_var(--cui-stepper-separator-size)/2)]\",\n        className,\n      )}\n    />\n  );\n}\n\nexport function StepperTitle({ className, ...props }: StepperTitleProps) {\n  const { orientation, responsive } = useStepper();\n  const { titleId } = useStepperItem();\n  useRegisteredId(titleId);\n  return (\n    <span\n      {...props}\n      id={titleId}\n      data-control-ui=\"stepper\"\n      data-control-family=\"stepper\"\n      data-slot=\"title\"\n      data-orientation={orientation}\n      data-responsive={responsive ? \"true\" : undefined}\n      className={cn(\"min-w-0\", partLayout(orientation, responsive, \"title\"), className)}\n    />\n  );\n}\n\nexport function StepperDescription({ className, ...props }: StepperDescriptionProps) {\n  const { orientation, responsive } = useStepper();\n  const { descriptionId } = useStepperItem();\n  useRegisteredId(descriptionId);\n  return (\n    <span\n      {...props}\n      id={descriptionId}\n      data-control-ui=\"stepper\"\n      data-control-family=\"stepper\"\n      data-slot=\"description\"\n      data-orientation={orientation}\n      data-responsive={responsive ? \"true\" : undefined}\n      className={cn(\"min-w-0\", partLayout(orientation, responsive, \"description\"), className)}\n    />\n  );\n}\n\nexport function StepperContent({ step, keepMounted = true, className, ...props }: StepperContentProps) {\n  const { value, contentMode, baseId } = useStepper();\n  const active = value === step;\n  const hidden = contentMode === \"current\" && !active;\n  const rendered = !hidden || keepMounted;\n  const contentId = stepPartId(baseId, step, \"content\");\n  useRegisteredId(contentId, rendered);\n  if (!rendered) return null;\n\n  return (\n    <section\n      {...props}\n      id={contentId}\n      data-control-ui=\"stepper\"\n      data-control-family=\"stepper\"\n      data-slot=\"content\"\n      data-state={active ? \"active\" : \"inactive\"}\n      hidden={hidden}\n      aria-labelledby={stepPartId(baseId, step, \"title\")}\n      className={className}\n    />\n  );\n}\n"
    }
  ],
  "css": {
    "@import \"../components/control-ui/styles/recipes/stepper.css\"": {}
  }
}
