{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "input",
  "title": "Input",
  "description": "The focus ring closes in around the field on a spring.",
  "dependencies": [
    "@ui-sdk/core@0.1.0-beta.2",
    "@ui-sdk/react@0.1.0-beta.2"
  ],
  "registryDependencies": [
    "@keyframery/motion"
  ],
  "files": [
    {
      "path": "registry/components/keyframery/primitives/input.tsx",
      "content": "\"use client\"\n\n/* Animated drop-in for `@ui-sdk/react/input`: same parts, same props. Swap the import and keep your code.\n   This file adds motion only. Colours, radii, shadows and spacing stay yours. */\n\nimport {\n  Input as InputPart,\n  InputClear as InputClearPart,\n  InputGroup as InputGroupPart,\n} from \"@ui-sdk/react/input\"\nimport * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nexport * from \"@ui-sdk/react/input\"\n\n/* The focus ring is the outline. It starts 10px out and 0px wide and closes in onto the field\n   on a spring, easing from its resting colour to its focus colour as it lands, while the hairline\n   (a box-shadow) changes colour on a short clock of its own. On blur it lets go fast. Give the\n   outline a strong colour at rest and a soft one on focus: `outline-ring focus-visible:outline-[3px] focus-visible:outline-ring/30`. */\nconst ringMotion =\n  \"outline-offset-[10px] \" +\n  \"[transition:outline-offset_calc(160ms*var(--kf-speed,1))_var(--ease-house),outline-width_calc(160ms*var(--kf-speed,1))_var(--ease-house),outline-color_0s_linear_calc(160ms*var(--kf-speed,1)),box-shadow_calc(150ms*var(--kf-speed,1))_var(--ease-house),background-color_calc(150ms*var(--kf-speed,1))_var(--ease-house)] \" +\n  \"motion-reduce:[transition:none]!\"\n\nfunction Input({ className, ...props }: React.ComponentProps<typeof InputPart>) {\n  return (\n    <InputPart className={cn(ringMotion, \"focus-visible:outline-offset-0 focus-visible:[transition:outline-offset_calc(900ms*var(--kf-speed,1))_var(--ease-spring),outline-width_calc(900ms*var(--kf-speed,1))_var(--ease-spring),outline-color_calc(700ms*var(--kf-speed,1))_var(--ease-house),box-shadow_calc(150ms*var(--kf-speed,1))_var(--ease-house),background-color_calc(150ms*var(--kf-speed,1))_var(--ease-house)]\", className)} {...props} />\n  )\n}\n\n/* In a group the ring belongs to the group and follows the input's focus. */\nfunction InputGroup({ className, ...props }: React.ComponentProps<typeof InputGroupPart>) {\n  return (\n    <InputGroupPart\n      className={cn(ringMotion, \"has-[input:focus-visible]:outline-offset-0 has-[input:focus-visible]:[transition:outline-offset_calc(900ms*var(--kf-speed,1))_var(--ease-spring),outline-width_calc(900ms*var(--kf-speed,1))_var(--ease-spring),outline-color_calc(700ms*var(--kf-speed,1))_var(--ease-house),box-shadow_calc(150ms*var(--kf-speed,1))_var(--ease-house),background-color_calc(150ms*var(--kf-speed,1))_var(--ease-house)]\", className)}\n      {...props}\n    />\n  )\n}\n\n/* Only in the page while there is text to clear: it pops in, and presses with a pop release. */\nfunction InputClear({ className, ...props }: React.ComponentProps<typeof InputClearPart>) {\n  return (\n    <InputClearPart\n      className={cn(\n        \"[transition:scale_calc(300ms*var(--kf-speed,1))_var(--ease-pop),opacity_calc(200ms*var(--kf-speed,1))_var(--ease-house),rotate_calc(300ms*var(--kf-speed,1))_var(--ease-pop),color_calc(150ms*var(--kf-speed,1)),background-color_calc(150ms*var(--kf-speed,1))]\",\n        \"starting:scale-50 starting:-rotate-45 starting:opacity-0 active:scale-[0.85]\",\n        \"motion-reduce:[transition:none]!\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { Input, InputClear, InputGroup }\n",
      "type": "registry:component",
      "target": "components/keyframery/primitives/input.tsx"
    },
    {
      "path": "registry/components/keyframery/input.tsx",
      "content": "\"use client\"\n\n/* Styled input: the animated primitive plus the Keyframery look. */\n\nimport * as React from \"react\"\n\nimport {\n  Input as InputPrimitive,\n  InputClear as InputClearPrimitive,\n  InputGroup as InputGroupPrimitive,\n  createInputController,\n} from \"@/components/keyframery/primitives/input\"\nimport { cn } from \"@/lib/utils\"\n\n/* The field look: a hairline and a small drop shadow. The hairline's colour is one\n   variable, so hover, focus and invalid each change a single value. The focus ring is the\n   outline; the primitive makes it close in on a spring. */\nconst fieldBox =\n  \"rounded-[10px] bg-background text-[13px] \" +\n  \"outline-0 outline-ring aria-invalid:outline-destructive \" +\n  \"[--field-line:rgb(0_0_0/0.09)] dark:[--field-line:rgb(255_255_255/0.1)] \" +\n  \"shadow-[0_0_0_1px_var(--field-line),0_1px_2px_rgb(0_0_0/0.05)] dark:shadow-[0_0_0_1px_var(--field-line)] \" +\n  \"hover:[--field-line:rgb(0_0_0/0.16)] dark:hover:[--field-line:rgb(255_255_255/0.18)]\"\n\nfunction Input({ className, ...props }: React.ComponentProps<typeof InputPrimitive>) {\n  return (\n    <InputPrimitive\n      className={cn(\n        fieldBox,\n        \"h-9 w-full min-w-0 px-3 text-foreground placeholder:text-muted-foreground/70\",\n        \"focus-visible:outline-[3px] focus-visible:outline-ring/30 focus-visible:[--field-line:var(--ring)] dark:focus-visible:[--field-line:var(--ring)]\",\n        \"aria-invalid:focus-visible:outline-destructive/30 aria-invalid:[--field-line:var(--destructive)] dark:aria-invalid:[--field-line:var(--destructive)]\",\n        \"data-readonly:bg-muted/50\",\n        \"data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:text-muted-foreground data-disabled:[--field-line:rgb(0_0_0/0.06)] dark:data-disabled:[--field-line:rgb(255_255_255/0.06)]\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\n/* The group is the field: text, icons and buttons sit around the input inside one box,\n   and the input gives up its own. The ring follows the input's focus, not a button's. */\nfunction InputGroup({ className, ...props }: React.ComponentProps<typeof InputGroupPrimitive>) {\n  return (\n    <InputGroupPrimitive\n      className={cn(\n        fieldBox,\n        \"flex h-9 w-full min-w-0 cursor-text items-center gap-2 px-3 text-muted-foreground select-none\",\n        \"[&_svg]:size-4 [&_svg]:shrink-0\",\n        \"has-[input:focus-visible]:outline-[3px] has-[input:focus-visible]:outline-ring/30 has-[input:focus-visible]:[--field-line:var(--ring)] dark:has-[input:focus-visible]:[--field-line:var(--ring)]\",\n        \"has-aria-invalid:outline-destructive has-aria-invalid:has-[input:focus-visible]:outline-destructive/30 has-aria-invalid:[--field-line:var(--destructive)] dark:has-aria-invalid:[--field-line:var(--destructive)]\",\n        \"data-readonly:bg-muted/50\",\n        \"data-disabled:cursor-not-allowed data-disabled:bg-muted data-disabled:[--field-line:rgb(0_0_0/0.06)] dark:data-disabled:[--field-line:rgb(255_255_255/0.06)]\",\n        \"*:data-[slot=input]:h-full! *:data-[slot=input]:flex-1 *:data-[slot=input]:rounded-none! *:data-[slot=input]:bg-transparent! *:data-[slot=input]:px-0! *:data-[slot=input]:[box-shadow:none]! *:data-[slot=input]:outline-0! *:data-[slot=input]:select-text\",\n        className,\n      )}\n      {...props}\n    />\n  )\n}\n\nfunction InputClear({\n  className,\n  children,\n  ...props\n}: React.ComponentProps<typeof InputClearPrimitive>) {\n  return (\n    <InputClearPrimitive\n      className={cn(\n        \"-mr-1.5 grid size-6 shrink-0 cursor-pointer place-items-center rounded-[7px] text-muted-foreground outline-none\",\n        \"hover:bg-foreground/[0.06] hover:text-foreground\",\n        \"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background\",\n        \"[&_svg]:size-3.5\",\n        className,\n      )}\n      {...props}\n    >\n      {children ?? (\n        <svg\n          viewBox=\"0 0 16 16\"\n          fill=\"none\"\n          stroke=\"currentColor\"\n          strokeWidth=\"1.5\"\n          strokeLinecap=\"round\"\n          strokeLinejoin=\"round\"\n          aria-hidden=\"true\"\n        >\n          <path d=\"m4.5 4.5 7 7m0-7-7 7\" />\n        </svg>\n      )}\n    </InputClearPrimitive>\n  )\n}\n\nexport { Input, InputClear, InputGroup, createInputController }\n",
      "type": "registry:component",
      "target": "components/keyframery/input.tsx"
    }
  ],
  "type": "registry:component"
}