Preheat oven to 350°. Line a standard 12-cup cupcake pan with liners.
In a bowl, whisk together flour, baking powder, and salt.
In another bowl, beat the sugars and butter using an electric mixer until light and fluffy, 3 minutes. Then add eggs and vanilla until well combined.
Add flour mixture in 3 batches alternating with the milk in 2 additions. Beat on low until just combined and scrape down sides of the bowl.
Fill prepared cupcake cups and bake for about 20 minutes until toothpick comes out clean.
Carefully pour cream in a steady stream. The whole thing will bubble and sputter but just keep stirring until completely smooth. Set aside to cool a bit.
While caramel is cooling, using a mixer, cream butter until fluffy and smooth. Add confectioners sugar half a cup at a time.You may not need all 4 cups.
When consistency is how you like it, add a pinch of sea salt and take a spoonful of caramel and add it to the frosting in dollops. Gently swirl.
Leftover caramel can be stored in an airtight container for up to one week. To use, bring to room temperature.