Apple has introduced a new feature for iCloud on the web that allows you to restore deleted items. Not only can you recover files that you've deleted, but also restore contacts, calendars, and reminders. This new feature also shows you how long it will be until those items are permanently deleted if you choose not to restore them.
To access these advanced options, sign in to iCloud.com, and head to the Settings section. At the bottom left of the screen, you'll see the Advanced, Restore Files, Restore Contacts, and Restore Calendars and Reminders options. Choosing one of those will open a panel that shows you your deleted documents or archived contacts and calendars.
Picking a document will restore it to iCloud Drive. Contacts and calendars work a bit differently. Rather than restoring a deleted contact, calendar, or reminder, iCloud will replace your current contacts or calendars an archive of your previous setups. You current configurations will be saved in an archive of their own. It's important to note that any shared calendars that are restored will need to be re-shared with other users, as iCloud won't restore that.
You should be able to find these new settings by heading to iCloud.com now.