Migrate Angular CDK Sass @import to @use

Proprietary

CDK 17 deleted the @import entry points of @angular/cdk/overlay, @angular/cdk/a11y and @angular/cdk/text-field. Replaces those imports with @use '@angular/cdk' as cdk and renames the cdk- prefixed mixins and variables they exposed, such as @include cdk-overlay() and $cdk-z-index-overlay, to the members of the cdk module. Names that a stylesheet of the project declares itself, as a vendored copy of the CDK styles does, keep referring to that declaration. A partial that other stylesheets @import and that defines members next to its own @import rules is marked instead, since adding @use to it can change which of those members its importers see. This ports the CDK part of the theming API migration of @angular/material 12.

org.openrewrite.angular.cdk.MigrateCdkSassImports
mod run . --recipe=org.openrewrite.angular.cdk.MigrateCdkSassImports

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