{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "swipe-action-row",
  "type": "registry:ui",
  "title": "Swipe Action Row",
  "description": "A coordinated list-row interaction with two-sided actions, keyboard opening, outside dismissal, and action-owned full swipes.",
  "files": [
    {
      "path": "registry/sonaui/swipe-action-row/swipe-action-row.tsx",
      "type": "registry:ui",
      "content": "\"use client\";\n\nimport * as SwipeActionsPrimitive from \"@ncdai/react-swipe-actions\";\nimport type { ComponentProps, ReactNode } from \"react\";\n\nimport { cn } from \"@/lib/sona-utils\";\n\nexport type SwipeActionRowSide = SwipeActionsPrimitive.SwipeSide;\nexport type SwipeActionRowState = SwipeActionsPrimitive.SwipeState;\n\nexport interface SwipeActionRowRootProps\n  extends ComponentProps<typeof SwipeActionsPrimitive.SwipeRoot> {\n  /** Rows coordinated so only one can remain open. */\n  children?: ReactNode;\n}\n\nexport interface SwipeActionRowProps\n  extends ComponentProps<typeof SwipeActionsPrimitive.SwipeItem> {\n  /** Fraction of the action strip crossed before the row opens. @default 0.5 */\n  threshold?: number;\n  /** Seconds of release velocity projected onto the resting position. @default 0.2 */\n  velocityFactor?: number;\n  /** Fraction of row width crossed before a full-swipe action arms. @default 0.5 */\n  fullSwipeThreshold?: number;\n  /** Prevents pointer and keyboard gesture interaction. @default false */\n  disabled?: boolean;\n  /** Closes an open row when the page scrolls. @default false */\n  closeOnScroll?: boolean;\n  /** Called when the row becomes closed, left-open, or right-open. @default undefined */\n  onOpenChange?: (state: SwipeActionRowState) => void;\n}\n\nexport type SwipeActionRowItemProps = SwipeActionRowProps;\n\nexport interface SwipeActionRowActionsProps\n  extends ComponentProps<typeof SwipeActionsPrimitive.SwipeActions> {\n  /** Physical side where this action strip is revealed. */\n  side: SwipeActionRowSide;\n}\n\nexport interface SwipeActionRowActionProps\n  extends ComponentProps<typeof SwipeActionsPrimitive.SwipeAction> {\n  /** Action label, icon, or composed button content. */\n  children?: ReactNode;\n  /** Closes the row after the click handler runs. @default true */\n  closeOnClick?: boolean;\n  /** Runs this action when the row crosses its full-swipe threshold. @default false */\n  fullSwipe?: boolean;\n  /** Semantic visual treatment for the action. @default \"default\" */\n  variant?: \"default\" | \"destructive\";\n}\n\nexport interface SwipeActionRowContentProps\n  extends ComponentProps<typeof SwipeActionsPrimitive.SwipeContent> {\n  /** Opaque foreground content that moves to reveal the action strips. */\n  children?: ReactNode;\n}\n\n/** Coordinates sibling rows so opening one closes the previously open row. */\nexport function SwipeActionRowRoot({\n  className,\n  ...props\n}: SwipeActionRowRootProps) {\n  return (\n    <SwipeActionsPrimitive.SwipeRoot\n      className={cn(\"relative\", className)}\n      {...props}\n    />\n  );\n}\n\n/** Owns the gesture, open state, keyboard behavior, and dismissal lifecycle. */\nexport function SwipeActionRowItem({\n  className,\n  ...props\n}: SwipeActionRowItemProps) {\n  return (\n    <SwipeActionsPrimitive.SwipeItem\n      className={cn(\"group/swipe-row\", className)}\n      {...props}\n    />\n  );\n}\n\n/** Positions and measures a strip of actions behind the row content. */\nexport function SwipeActionRowActions({\n  className,\n  ...props\n}: SwipeActionRowActionsProps) {\n  return (\n    <SwipeActionsPrimitive.SwipeActions\n      className={cn(\"items-stretch overflow-hidden\", className)}\n      {...props}\n    />\n  );\n}\n\n/** A contextual action that can optionally own the side's full swipe. */\nexport function SwipeActionRowAction({\n  children,\n  className,\n  variant = \"default\",\n  ...props\n}: SwipeActionRowActionProps) {\n  return (\n    <SwipeActionsPrimitive.SwipeAction\n      className={cn(\n        \"flex min-w-20 select-none flex-col items-center justify-center gap-1.5 whitespace-nowrap px-4 font-medium text-xs\",\n        \"bg-secondary text-secondary-foreground transition-[filter] duration-150 ease-[cubic-bezier(0.16,1,0.3,1)]\",\n        \"focus-visible:z-10 focus-visible:outline-2 focus-visible:-outline-offset-2 focus-visible:outline-foreground\",\n        \"data-armed:brightness-90 disabled:pointer-events-none disabled:opacity-50 motion-reduce:transition-none\",\n        \"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n        variant === \"destructive\" && \"bg-destructive text-white\",\n        className,\n      )}\n      {...props}\n    >\n      {children}\n    </SwipeActionsPrimitive.SwipeAction>\n  );\n}\n\n/** The opaque foreground surface that tracks pointer and touch movement. */\nexport function SwipeActionRowContent({\n  className,\n  ...props\n}: SwipeActionRowContentProps) {\n  return (\n    <SwipeActionsPrimitive.SwipeContent\n      className={cn(\"bg-background data-dragging:cursor-grabbing\", className)}\n      {...props}\n    />\n  );\n}\n\nexport const SwipeActionRow = {\n  Root: SwipeActionRowRoot,\n  Item: SwipeActionRowItem,\n  Actions: SwipeActionRowActions,\n  Action: SwipeActionRowAction,\n  Content: SwipeActionRowContent,\n};\n\nexport default SwipeActionRow;\n",
      "target": "components/ui/swipe-action-row/swipe-action-row.tsx"
    }
  ],
  "dependencies": [
    "@ncdai/react-swipe-actions",
    "motion"
  ],
  "registryDependencies": [
    "@sona-ui/sona-utils"
  ]
}