Skip to content

Commit 66435f1

Browse files
author
Robert Moore
authored
[Color] Create umbrella header. (material-components#8091)
All components should have a top-level umbrella header for their includes. This allows easier refactoring of classes and files within the component. Creating an umbrella for Color and using it outside the component. Part of #8086
1 parent 99f2aec commit 66435f1

File tree

7 files changed

+22
-5
lines changed

7 files changed

+22
-5
lines changed

components/Buttons/tests/snapshot/ButtonCustomTraitCollectionSnapshotTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#import <CoreGraphics/CoreGraphics.h>
1818
#import <UIKit/UIKit.h>
1919

20-
#import "../../../private/Color/src/UIColor+MaterialDynamic.h"
2120
#import "MaterialButtons.h"
21+
#import "MaterialColor.h"
2222
#import "MaterialTypography.h"
2323

2424
/** A @c MDCButton test fake to override the @c traitCollection to test for dynamic type. */

components/Dialogs/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ mdc_snapshot_objc_library(
174174
":Dialogs",
175175
":Theming",
176176
":private",
177+
"//components/private/Color",
177178
"//components/schemes/Color",
178179
"//components/schemes/Container",
179180
"//components/schemes/Typography",

components/Dialogs/tests/snapshot/MDCAlertControllerCustomTraitCollectionTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
#import <CoreGraphics/CoreGraphics.h>
1818
#import <UIKit/UIKit.h>
1919

20-
#import "../../../private/Color/src/UIColor+MaterialDynamic.h"
2120
#import "../../src/private/MDCDialogShadowedView.h"
21+
#import "MaterialColor.h"
2222
#import "MaterialDialogs.h"
2323
#import "MaterialTypography.h"
2424

components/Ink/tests/snapshot/MDCInkViewSnapshotTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
#import "MaterialSnapshot.h"
1616

17+
#import "MaterialColor.h"
1718
#import "MaterialInk.h"
18-
#import "UIColor+MaterialDynamic.h"
1919

2020
/**
2121
Creates a fake MDCInkView that has its traitCollection overridden.

components/Ripple/tests/snapshot/MDCRippleViewSnapshotTests.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
// See the License for the specific language governing permissions and
1313
// limitations under the License.
1414

15+
#import "MaterialColor.h"
1516
#import "MaterialRipple.h"
1617
#import "MaterialSnapshot.h"
17-
#import "UIColor+MaterialDynamic.h"
1818

1919
/**
2020
Creates a fake MDCRippleView that has its traitCollection overridden.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright 2019-present the Material Components for iOS authors. All Rights Reserved.
2+
//
3+
// Licensed under the Apache License, Version 2.0 (the "License");
4+
// you may not use this file except in compliance with the License.
5+
// You may obtain a copy of the License at
6+
//
7+
// http://www.apache.org/licenses/LICENSE-2.0
8+
//
9+
// Unless required by applicable law or agreed to in writing, software
10+
// distributed under the License is distributed on an "AS IS" BASIS,
11+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
// See the License for the specific language governing permissions and
13+
// limitations under the License.
14+
15+
#import "UIColor+MaterialBlending.h"
16+
#import "UIColor+MaterialDynamic.h"

components/schemes/Color/src/MDCSemanticColorScheme.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
#import "MDCSemanticColorScheme.h"
1616

17-
#import "UIColor+MaterialDynamic.h"
17+
#import "MaterialColor.h"
1818

1919
static UIColor *ColorFromRGB(uint32_t colorValue) {
2020
return [UIColor colorWithRed:(CGFloat)(((colorValue >> 16) & 0xFF) / 255.0)

0 commit comments

Comments
 (0)