Stripe Front-End Interview Experience

Stripe full-time frontend one-hour phone interview, the task is to create an input field for entering a phone number, without requiring any CSS, just the functionality.
Requirements:

  1. Only allow input of numbers, no symbols or letters.
  2. Format should be: (123)456-7890, automatically adding parentheses after the third digit, and a dash after the sixth digit. After entering 10 digits, no more can be added.
  3. Allow copy-paste, but filter the content. For example, copying “234qwer56,&‍‌‌‌‌‌‌‍‌‌‌‍‍‍‍‍‌‌‍‌‌&&78916” should paste “234567891” into the input field.
  4. Implement using React.