From 63988b35da1fa5281b4260abd8a075817b19d155 Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Thu, 11 Feb 2021 07:07:03 -0800 Subject: [PATCH] Optimizing imports PiperOrigin-RevId: 356966165 --- catalog/MaterialCatalog/MDCCatalogTiles.m | 2 +- .../AppBar/src/MDCAppBarContainerViewController.m | 1 + .../AppBar/src/MDCAppBarNavigationController.m | 2 ++ components/AppBar/src/MDCAppBarViewController.m | 7 +++---- .../examples/ButtonBarCustomizedFontExample.m | 2 ++ .../ButtonBar/examples/ButtonBarMenuExample.m | 2 ++ .../examples/ButtonBarTypicalUseExample.m | 2 ++ .../Buttons/src/ButtonThemer/MDCButtonScheme.m | 6 ++++++ .../src/ButtonThemer/MDCContainedButtonThemer.m | 2 ++ .../Buttons/src/ButtonThemer/MDCTextButtonThemer.m | 2 ++ components/Cards/src/MDCCard.m | 7 ++++++- components/Cards/src/MDCCardCollectionCell.m | 7 ++++++- .../UICollectionViewController+MDCCardReordering.m | 2 -- .../examples/TextFieldControllerStylesExample.m | 2 ++ .../TextFields/examples/TextFieldOutlinedExample.m | 4 +++- components/Typography/src/MDCFontScaler.m | 1 - .../Typography/src/UIFont+MaterialScalable.m | 1 - .../examples/MDCShapeSchemeExampleViewController.m | 14 +++++++------- .../Shape/examples/MDCShapeWithBorderExample.m | 1 - components/schemes/Shape/src/MDCShapeCategory.m | 1 + components/schemes/Shape/src/MDCShapeScheme.m | 2 ++ 21 files changed, 50 insertions(+), 20 deletions(-) diff --git a/catalog/MaterialCatalog/MDCCatalogTiles.m b/catalog/MaterialCatalog/MDCCatalogTiles.m index 56aa30dc549..b6e56d8436e 100644 --- a/catalog/MaterialCatalog/MDCCatalogTiles.m +++ b/catalog/MaterialCatalog/MDCCatalogTiles.m @@ -15,7 +15,7 @@ #import #import "MDCCatalogTiles.h" -#import "MaterialThemes.h" +#import "MaterialColorScheme.h" UIImage* _Nullable MDCDrawImage(CGRect frame, MDCDrawFunc drawFunc, diff --git a/components/AppBar/src/MDCAppBarContainerViewController.m b/components/AppBar/src/MDCAppBarContainerViewController.m index 7db9bf4a994..5e169b9191b 100644 --- a/components/AppBar/src/MDCAppBarContainerViewController.m +++ b/components/AppBar/src/MDCAppBarContainerViewController.m @@ -16,6 +16,7 @@ #import "MDCAppBarViewController.h" #import "MaterialFlexibleHeader.h" +#import "MaterialNavigationBar.h" @interface MDCAppBarContainerViewController () diff --git a/components/AppBar/src/MDCAppBarNavigationController.m b/components/AppBar/src/MDCAppBarNavigationController.m index 9e23a5c19e7..60887ff7d76 100644 --- a/components/AppBar/src/MDCAppBarNavigationController.m +++ b/components/AppBar/src/MDCAppBarNavigationController.m @@ -16,6 +16,8 @@ #import "MDCAppBarNavigationControllerToBeDeprecatedDelegate.h" #import "MDCAppBarViewController.h" +#import "MaterialFlexibleHeader.h" +#import "MaterialHeaderStackView.h" #import diff --git a/components/AppBar/src/MDCAppBarViewController.m b/components/AppBar/src/MDCAppBarViewController.m index 6777024b456..c843c79672b 100644 --- a/components/AppBar/src/MDCAppBarViewController.m +++ b/components/AppBar/src/MDCAppBarViewController.m @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -#import "MDCAppBar.h" +#import "MDCAppBarViewController.h" #import "MDCAppBarContainerViewController.h" @@ -20,14 +20,13 @@ #import "private/MaterialAppBarStrings_table.h" #import "MDCAppBarViewControllerAccessibilityPerformEscapeDelegate.h" #import "MaterialFlexibleHeader.h" +#import "MaterialHeaderStackView.h" +#import "MaterialNavigationBar.h" #import "MaterialShadowElevations.h" #import "MaterialShadowLayer.h" -#import "MaterialTypography.h" -#import "MaterialApplication.h" #import "MaterialIcons+ic_arrow_back.h" #import "MaterialUIMetrics.h" #import -#import static NSString *const kBarStackKey = @"barStack"; diff --git a/components/ButtonBar/examples/ButtonBarCustomizedFontExample.m b/components/ButtonBar/examples/ButtonBarCustomizedFontExample.m index 4efde4f633d..1849b111fc4 100644 --- a/components/ButtonBar/examples/ButtonBarCustomizedFontExample.m +++ b/components/ButtonBar/examples/ButtonBarCustomizedFontExample.m @@ -15,7 +15,9 @@ #import #import "MaterialButtonBar.h" +#import "MaterialColorScheme.h" #import "MaterialContainerScheme.h" +#import "MaterialTypographyScheme.h" @interface ButtonBarCustomizedFontExample : UIViewController @property(nonatomic, strong) MDCSemanticColorScheme *colorScheme; diff --git a/components/ButtonBar/examples/ButtonBarMenuExample.m b/components/ButtonBar/examples/ButtonBarMenuExample.m index e9621a04ad9..c7b44ecfdb1 100644 --- a/components/ButtonBar/examples/ButtonBarMenuExample.m +++ b/components/ButtonBar/examples/ButtonBarMenuExample.m @@ -16,7 +16,9 @@ #import "MaterialAvailability.h" #import "MaterialButtonBar.h" +#import "MaterialColorScheme.h" #import "MaterialContainerScheme.h" +#import "MaterialTypographyScheme.h" @interface ButtonBarMenuExample : UIViewController @property(nonatomic, strong) MDCSemanticColorScheme *colorScheme; diff --git a/components/ButtonBar/examples/ButtonBarTypicalUseExample.m b/components/ButtonBar/examples/ButtonBarTypicalUseExample.m index ca0607150af..d76d572f1d9 100644 --- a/components/ButtonBar/examples/ButtonBarTypicalUseExample.m +++ b/components/ButtonBar/examples/ButtonBarTypicalUseExample.m @@ -15,7 +15,9 @@ #import #import "MaterialButtonBar.h" +#import "MaterialColorScheme.h" #import "MaterialContainerScheme.h" +#import "MaterialTypographyScheme.h" @interface ButtonBarTypicalUseExample : UIViewController @property(nonatomic, strong) MDCSemanticColorScheme *colorScheme; diff --git a/components/Buttons/src/ButtonThemer/MDCButtonScheme.m b/components/Buttons/src/ButtonThemer/MDCButtonScheme.m index 2a17af1b8ff..55f162cc614 100644 --- a/components/Buttons/src/ButtonThemer/MDCButtonScheme.m +++ b/components/Buttons/src/ButtonThemer/MDCButtonScheme.m @@ -14,6 +14,12 @@ #import "MDCButtonScheme.h" +#import "MaterialColorScheme.h" + +#import "MaterialShapeScheme.h" + +#import "MaterialTypographyScheme.h" + @implementation MDCButtonScheme - (instancetype)init { diff --git a/components/Buttons/src/ButtonThemer/MDCContainedButtonThemer.m b/components/Buttons/src/ButtonThemer/MDCContainedButtonThemer.m index cd56da37482..80f300886b3 100644 --- a/components/Buttons/src/ButtonThemer/MDCContainedButtonThemer.m +++ b/components/Buttons/src/ButtonThemer/MDCContainedButtonThemer.m @@ -14,7 +14,9 @@ #import "MDCContainedButtonThemer.h" +#import "MDCButtonScheme.h" #import "MaterialButtons+ColorThemer.h" +#import "MaterialButtons.h" #import "MaterialButtons+ShapeThemer.h" #import "MaterialButtons+TypographyThemer.h" diff --git a/components/Buttons/src/ButtonThemer/MDCTextButtonThemer.m b/components/Buttons/src/ButtonThemer/MDCTextButtonThemer.m index 919c95b0833..cafa4dd4046 100644 --- a/components/Buttons/src/ButtonThemer/MDCTextButtonThemer.m +++ b/components/Buttons/src/ButtonThemer/MDCTextButtonThemer.m @@ -14,7 +14,9 @@ #import "MDCTextButtonThemer.h" +#import "MDCButtonScheme.h" #import "MaterialButtons+ColorThemer.h" +#import "MaterialButtons.h" #import "MaterialButtons+ShapeThemer.h" #import "MaterialButtons+TypographyThemer.h" diff --git a/components/Cards/src/MDCCard.m b/components/Cards/src/MDCCard.m index 3e88556a5fa..6c48571da5b 100644 --- a/components/Cards/src/MDCCard.m +++ b/components/Cards/src/MDCCard.m @@ -14,8 +14,13 @@ #import "MDCCard.h" -#import "MaterialMath.h" +#import "MaterialElevation.h" +#import "MaterialInk.h" +#import "MaterialRipple.h" +#import "MaterialShadowElevations.h" +#import "MaterialShadowLayer.h" #import "MaterialShapes.h" +#import "MaterialMath.h" static const CGFloat MDCCardShadowElevationNormal = 1; static const CGFloat MDCCardShadowElevationHighlighted = 8; diff --git a/components/Cards/src/MDCCardCollectionCell.m b/components/Cards/src/MDCCardCollectionCell.m index 82f2b863e57..baffd348f41 100644 --- a/components/Cards/src/MDCCardCollectionCell.m +++ b/components/Cards/src/MDCCardCollectionCell.m @@ -14,9 +14,14 @@ #import "MDCCardCollectionCell.h" +#import "MaterialElevation.h" +#import "MaterialInk.h" +#import "MaterialRipple.h" +#import "MaterialShadowElevations.h" +#import "MaterialShadowLayer.h" +#import "MaterialShapes.h" #import "MaterialIcons+ic_check_circle.h" #import "MaterialMath.h" -#import "MaterialShapes.h" static const CGFloat MDCCardCellCornerRadiusDefault = 4; static const CGFloat MDCCardCellSelectedImagePadding = 8; diff --git a/components/Cards/src/UICollectionViewController+MDCCardReordering.m b/components/Cards/src/UICollectionViewController+MDCCardReordering.m index 8359e2ea8b4..948e1224b0e 100644 --- a/components/Cards/src/UICollectionViewController+MDCCardReordering.m +++ b/components/Cards/src/UICollectionViewController+MDCCardReordering.m @@ -14,8 +14,6 @@ #import "UICollectionViewController+MDCCardReordering.h" -#import "MDCCardCollectionCell.h" -#import "MaterialInk.h" @implementation UICollectionViewController (MDCCardReordering) diff --git a/components/TextFields/examples/TextFieldControllerStylesExample.m b/components/TextFields/examples/TextFieldControllerStylesExample.m index e2d737ca6bd..47e3b827ac7 100644 --- a/components/TextFields/examples/TextFieldControllerStylesExample.m +++ b/components/TextFields/examples/TextFieldControllerStylesExample.m @@ -18,6 +18,8 @@ #import "MaterialTextFields.h" #import "supplemental/TextFieldControllerStylesExampleSupplemental.h" +#import "MaterialColorScheme.h" +#import "MaterialContainerScheme.h" @interface TextFieldControllerStylesExample () diff --git a/components/TextFields/examples/TextFieldOutlinedExample.m b/components/TextFields/examples/TextFieldOutlinedExample.m index 986f194c19a..a3d9faf03c2 100644 --- a/components/TextFields/examples/TextFieldOutlinedExample.m +++ b/components/TextFields/examples/TextFieldOutlinedExample.m @@ -12,8 +12,10 @@ // See the License for the specific language governing permissions and // limitations under the License. -#import "MaterialTextFields+Theming.h" #import "MaterialTextFields.h" +#import "MaterialTextFields+Theming.h" +#import "MaterialColorScheme.h" +#import "MaterialContainerScheme.h" @interface TextFieldOutlinedObjectiveCExample : UIViewController diff --git a/components/Typography/src/MDCFontScaler.m b/components/Typography/src/MDCFontScaler.m index dea1d6fd496..dae11f0551b 100644 --- a/components/Typography/src/MDCFontScaler.m +++ b/components/Typography/src/MDCFontScaler.m @@ -17,7 +17,6 @@ #import #import "UIFont+MaterialScalable.h" -#import "private/MDCFontTraits.h" #import "private/MDCTypographyUtilities.h" MDCTextStyle const MDCTextStyleHeadline1 = @"MDC.TextStyle.Headline1"; diff --git a/components/Typography/src/UIFont+MaterialScalable.m b/components/Typography/src/UIFont+MaterialScalable.m index bce998929bb..921e0dbef09 100644 --- a/components/Typography/src/UIFont+MaterialScalable.m +++ b/components/Typography/src/UIFont+MaterialScalable.m @@ -18,7 +18,6 @@ #import "MaterialApplication.h" -#import "MDCTypography.h" #import "private/MDCTypographyUtilities.h" static char MDCFontScaleObjectKey; diff --git a/components/schemes/Shape/examples/MDCShapeSchemeExampleViewController.m b/components/schemes/Shape/examples/MDCShapeSchemeExampleViewController.m index 1b14649654d..f9a4b9cd73b 100644 --- a/components/schemes/Shape/examples/MDCShapeSchemeExampleViewController.m +++ b/components/schemes/Shape/examples/MDCShapeSchemeExampleViewController.m @@ -18,21 +18,21 @@ #import "supplemental/MDCShapeExamplesDummyCollectionViewController.h" #import "MaterialAppBar+ColorThemer.h" -#import "MaterialAppBar+TypographyThemer.h" #import "MaterialAppBar.h" -#import "MaterialBottomSheet+ShapeThemer.h" +#import "MaterialAppBar+TypographyThemer.h" #import "MaterialBottomSheet.h" -#import "MaterialButtons+ButtonThemer.h" +#import "MaterialBottomSheet+ShapeThemer.h" +#import "MaterialButtons.h" #import "MaterialButtons+ShapeThemer.h" #import "MaterialButtons+Theming.h" -#import "MaterialButtons.h" -#import "MaterialCards+Theming.h" #import "MaterialCards.h" -#import "MaterialChips+Theming.h" +#import "MaterialCards+Theming.h" #import "MaterialChips.h" +#import "MaterialChips+Theming.h" +#import "MaterialFlexibleHeader.h" +#import "MaterialShapes.h" #import "MaterialColorScheme.h" #import "MaterialContainerScheme.h" -#import "MaterialShapeLibrary.h" #import "MaterialShapeScheme.h" #import "MaterialTypographyScheme.h" diff --git a/components/schemes/Shape/examples/MDCShapeWithBorderExample.m b/components/schemes/Shape/examples/MDCShapeWithBorderExample.m index 0295c0fa874..230dac8b4f2 100644 --- a/components/schemes/Shape/examples/MDCShapeWithBorderExample.m +++ b/components/schemes/Shape/examples/MDCShapeWithBorderExample.m @@ -13,7 +13,6 @@ // limitations under the License. #import "MaterialCards.h" -#import "MaterialCards+Theming.h" #import "MaterialShapeLibrary.h" #import "MaterialShapes.h" diff --git a/components/schemes/Shape/src/MDCShapeCategory.m b/components/schemes/Shape/src/MDCShapeCategory.m index ca6c911728f..0195ca49514 100644 --- a/components/schemes/Shape/src/MDCShapeCategory.m +++ b/components/schemes/Shape/src/MDCShapeCategory.m @@ -14,6 +14,7 @@ #import "MDCShapeCategory.h" #import "MaterialShapeLibrary.h" +#import "MaterialShapes.h" @implementation MDCShapeCategory diff --git a/components/schemes/Shape/src/MDCShapeScheme.m b/components/schemes/Shape/src/MDCShapeScheme.m index d005c98973f..c6bb5d1f1d1 100644 --- a/components/schemes/Shape/src/MDCShapeScheme.m +++ b/components/schemes/Shape/src/MDCShapeScheme.m @@ -14,6 +14,8 @@ #import "MDCShapeScheme.h" +#import "MDCShapeCategory.h" + @implementation MDCShapeScheme - (instancetype)init {