File size: 1,170 Bytes
5c0175e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import * as React from "react"

import { cn } from "@/lib/utils"

/**

 * Text input per §4: sharp corners (0px radius), transparent background,

 * hairline bottom border that turns Primary Blue on focus, 16px Roboto,

 * #606060 placeholder at 0.7 opacity, muted disabled state.

 */
function Input({ className, type, ...props }: React.ComponentProps<"input">) {
  return (
    <input

      type={type}

      data-slot="input"

      className={cn(

        "flex h-10 w-full min-w-0 rounded-none border-0 border-b border-white/15 bg-transparent px-0 py-1 text-base leading-[22px] text-foreground outline-none transition-colors",

        "placeholder:text-[#606060] placeholder:opacity-70",

        "selection:bg-[#065fd4] selection:text-white",

        "focus-visible:border-b-[#065fd4]",

        "disabled:cursor-not-allowed disabled:border-white/10 disabled:bg-white/[0.05] disabled:text-[#aaaaaa]",

        "aria-invalid:border-b-[#e1002d]",

        "file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground",

        className

      )}

      {...props}

    />
  )
}

export { Input }