Migrate the Angular Material theming API to @use

Proprietary

Material 12 introduced the @use '@angular/material' Sass module and Material 17 deleted the @angular/material/theming file that @import loaded. Replaces @import of @angular/material/theming with @use '@angular/material' as mat, and renames the prefixed mixins, functions and variables it exposed, such as @include mat-core() and mat-palette(...), to the members of the mat module, and the CDK members such as cdk-overlay to the cdk module. Variables the module dropped are replaced by their values. Names a stylesheet of the project declares itself keep referring to that declaration, and stylesheets that override a theming variable the Material styles read are marked. This is the theming API migration of the @angular/material 12 ng update.

org.openrewrite.angular.material.MigrateMaterialThemingApi
mod run . --recipe=org.openrewrite.angular.material.MigrateMaterialThemingApi

Install it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.