Rename the toast button style props to Sonner's singular names

ZE
10h ago
+131-18

Closes #7984 (follow-up to #7786).

Renamed action_button_styles and cancel_button_styles on ToastProps to action_button_style and cancel_button_style to match Sonner's keys directly, and removed the _TOAST_STYLE_PROP_ALIASES rename in dict().

  • The plural props stay declared (so NoExtrasAllowedProps still accepts them) and forward to the singular fields in __init__ with a console.deprecate warning (deprecated in 0.11.1, removed in 1.0).
  • If both the singular and plural name are passed for the same button, the singular one is used and the plural one still logs the deprecation warning.
  • Small behavior note: mutating props.action_button_styles after construction won't get renamed anymore since the dict() rename step is gone.
  • Added tests in test_toast.py, the two props in toast.md, a deprecation news fragment, and regenerated the stubs.

Ran pytest, ruff, and pyright (Linux platform) locally. The only failures were 17 symlink tests (WinError 1314) that also fail on main on Windows.

All Submissions:

  • Have you followed the guidelines stated in CONTRIBUTING.md file?
  • Have you checked to ensure there aren't any other open Pull Requests for the desired changed?

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update