672 Commits

Author SHA1 Message Date
Cody Weaver
04cf12c72c [Shapes] Update border color to support dynamic color (#8308)
### Context

Currently the `setBorderColor` method of MDCShapedShadowLayer can receive a dynamic color but will use the light mode color because it doesn't not know about traitCollections since it is a CALayer subclass. This causes a problem for any component that subclasses `UIControl` and updates its visuals based on state. For instance MDCCard within `setHighlighted` calls `updateBorderColor` which then would call `setBorderColor` on the shapedShadowLayer. Since traitCollection was never involved here the border gets render as it's in a light mode even if it happens to be in a dark mode. Additionally, we may need this for other CGColor things but this will unblock card for now.

### Screenshots

| Before | After |
| - | - |
|![before](https://user-images.githubusercontent.com/7131294/62970425-73d0da00-bddd-11e9-8643-6ae5b039a3a2.gif)|![after](https://user-images.githubusercontent.com/7131294/62970438-7d5a4200-bddd-11e9-9a38-45b7e8bb8328.gif)|
2019-08-16 11:41:24 -04:00
Robert Moore
ba29295f59 Bumped version number to 87.0.2. 2019-08-15 15:48:10 -04:00
Robert Moore
7e32b6f04b Bumped version number to 87.0.1. 2019-08-14 18:57:54 -04:00
Robert Moore
716845b74d Bumped version number to 87.0.0. 2019-08-12 22:20:57 -04:00
Robert Moore
4b8e984899 Merge branch 'release-candidate' into develop 2019-08-12 15:28:27 -04:00
Cody Weaver
d73d498d7e
[ActionSheet] Add dark mode support to theming extension (#8245)
This PR adds dark mode support to the theming extension for MDCActionSheetController. In order to support dark mode clients will need to set dynamic colors in their color scheme. 

There is no change to `mdc_elevationDidChangeBlock` because the elevation on an MDCActionSheetController should never change since it is not a settable property. If we later expose a setter then we will need to add that functionality. Additionally unit test were added but since MDCActionSheetController doesn't allow for subclassing I could not test for traitCollection changes. In order to test this more thoroughly do the steps as follows.

1. Launch MDCCatalog on an iOS 13 simulator.
2. Open the ActionSheet example.
3. Switch between light and dark mode in Xcode 11.

Following the steps above, this should be the result.
![actionSheet](https://user-images.githubusercontent.com/7131294/62724608-61bbf980-b9e1-11e9-8979-d586b49d2c58.gif)
2019-08-12 14:33:27 -04:00
Robert Moore
42279abf94
[TextFields] Don't list MDFI18N as dependency twice. (#8290)
Removes a duplicated dependency from the podspec for Text Fields.
2019-08-12 14:25:13 -04:00
Robert Moore
c3b692faac Fix TextFields dependency. 2019-08-12 14:21:51 -04:00
Robert Moore
780851923d Bumped version number to 86.1.0. 2019-08-12 13:05:47 -04:00
Yarden Eitan
d9f1b67647 Bumped version number to 86.0.0. 2019-08-05 16:55:35 -04:00
Robert Moore
2a321fc790 Bumped version number to 85.12.0. 2019-08-01 09:47:55 -04:00
Robert Moore
02892fe0ef Merge branch 'release-candidate' into develop 2019-07-31 13:38:58 -04:00
Cody Weaver
2feb8f96cd
[ActionSheet] Add MaterialElevation support (#8111)
Adds conformance to MDCElevatable and MDCElevationOverriding to
MDCActionSheetController.

Closes #8030
2019-07-31 10:22:30 -07:00
Robert Moore
18a8181bc9 Bumped version number to 85.11.0. 2019-07-31 09:47:41 -04:00
Cody Weaver
c6ab74349d
[Slider] Add MaterialElevation support (#8127)
Adds conformance to MDCElevatable and MDCElevationOverriding to
MDCSlider.

Closes #8014
2019-07-30 21:57:43 -07:00
Robert Moore
b0d75b60ff Merge branch 'release-candidate' into develop 2019-07-30 09:44:04 -04:00
Cody Weaver
a9a0fcadd0
[Tabs] Add MaterialElevation support (#8116)
Adds conformance to MDCElevatable and MDCElevationOverriding to
MDCTabBar.

Closes #8012
2019-07-29 20:48:34 -07:00
Cody Weaver
60c60f288c
[NavigationBar] Add MaterialElevation support. (#8115)
Adds conformance to MDCElevatable and MDCElevationOverriding to
MDCNavigationBar.

Closes #8016
2019-07-29 20:47:46 -07:00
Robert Moore
1ff25354ce Bumped version number to 85.10.0. 2019-07-29 13:52:57 -04:00
Cody Weaver
9654bee873
[BottomSheet] Add CocoaPod dependency to MaterialElevation (#8110)
In #8102 I didn't add the dependency to MaterialElevation in Cocoapods this is a follow up to add that dependency.

Related to #8025
Follow up to #8102
2019-07-29 07:53:11 -07:00
Robert Moore
dce2d98f92
[Dialogs] Add MaterialElevation support to AlertController. (#8098)
Adds conformance to `MDCElevatable` and `MDCElevationOverriding` to
`MDCAlertController`.

Part of #8020
2019-07-28 20:15:49 -04:00
Yarden Eitan
b8ea85d21a
[NavigationDrawer] Adding MDCElevation support (#8100)
This adds elevation conformance and support to the MDCBottomDrawerViewController.

Closes #8015
2019-07-26 17:50:48 -04:00
Yarden Eitan
f1a0665d67
[Snackbar] Supports MaterialElevation. (#8081)
Adds conformance to MDCElevatable and MDCElevationOverriding for snackbar message view.

Closes #8013
2019-07-26 17:50:00 -04:00
Cody Weaver
43dddb988e
[BottomSheet] Add elevation property (#8089)
Adds an elevation property to MDCBottomSheet and MDCBottomSheet presentation controller. Snapshot test have been added for the MDCBottomSheetControlller.view as well as unit test for all public APIs.

Prework for #8025
2019-07-26 14:08:16 -07:00
Wenyu Zhang
c3f8c6adeb
[Elevation] Add a UIColor category to support resolving color with elevation. (#8085)
This PR provides two methods to allow users resolving color with elevation.

closes https://github.com/material-components/material-components-ios/issues/8086.
2019-07-26 16:48:56 -04:00
Bryan Oltman
657483ea40
[FlexibleHeader] Conform to MDCElevatable, MDCElevationOverriding (#8099)
Add elevation property and elevationDidChange block to `MDCFlexibleHeaderView`. Elevation will be set in an upcoming PR by `MDCAppBarViewController`. 

Closes #8018
2019-07-26 16:48:03 -04:00
Robert Moore
e48bf74898 Merge branch 'release-candidate' into develop 2019-07-25 10:54:49 -04:00
Robert Moore
23666efe36 Bumped release version. 2019-07-25 10:01:18 -04:00
Robert Moore
cbeb6f5bc7
[List] Support MaterialElevation. (#8078)
Adds conformance to `MDCElevatable` and `MDCElevationOverriding` for the base
cell and self-sizing stereo cell.

Closes #8017
2019-07-25 09:25:20 -04:00
Robert Moore
403c1b6a29
[Buttons] Support MaterialElevation. (#8073)
Adds protocol conformance for `MDCElevatable` and `MDCElevationOverriding`.

Closes #8023
2019-07-25 09:24:35 -04:00
Wenyu Zhang
95047be49d Merge branch 'release-candidate' into develop 2019-07-24 16:50:27 -04:00
Yarden Eitan
f2b12a10ed
[Cards] MDCCard conforms to MDCElevation and MDCElevationOverride (#8054)
Adds support for the MDCElevation and MDCElevationOverride protocols.
2019-07-24 16:13:32 -04:00
Robert Moore
58aa3402bf
[Chips] Conform to MDCElevatable and MDCElevationOverriding. (#8068)
Adds the necessary properties and implementation to conform to the protocols.

Closes #8021
2019-07-24 13:49:52 -04:00
Robert Moore
4768e610a8
[BottomNavigation] Add MDCElevation support. (#8038)
Adds support for the `MDCElevatable` and `MDCElevationOverriding` protocols.

Closes #8026
2019-07-24 13:30:21 -04:00
Wenyu Zhang
a86ef1e576 Bumped version number to 85.9.0. 2019-07-23 19:18:05 -04:00
Yarden Eitan
6eb335a0f9
[Ink] Dynamic color support (#7974)
Adding dynamic color support to the Ink component.

Ink comprises of multiple MDCInkLayer sublayer instances, and they all should update their colors when the style of the system turns to Dark.

Closes #7871
2019-07-22 10:14:31 -04:00
Yarden Eitan
5cdb7f95f7
[Ripple] Add dynamic color support for ripple. (#7968)
Adds dynamic color support for Ripple and tests using snapshot tests that the dark mode color is correctly applied.

Closes #7867

(this is an un-revert of dfbecc6547 now that https://github.com/material-components/material-components-ios/pull/7949 landed)
2019-07-19 07:50:52 -07:00
Cody Weaver
63eda9bfa0
[Elevation] Add MDCElevation protocol. (#7955)
This change adds a protocol `MDCElevation` for clients to conform to so that their is a consistent API for getting a `UIView` elevation. This is in it's own folder because it can be used as a standalone protocol and is agnostic of ShadowElevations and schemes/Color.

For additional context please see go/material-dark-mode-elevation-support
Closes #7961
2019-07-18 14:16:55 -07:00
Wenyu Zhang
dfbecc6547 Revert "[Ripple] Add dynamic color support for ripple. (#7877)"
This reverts commit edb5f11af1a830e004fdffef536c4b6306b4eb4b.
2019-07-17 12:36:38 -04:00
Wenyu Zhang
ad15a1a450 Bumped version number to 85.8.0. 2019-07-16 18:55:56 -04:00
Cody Weaver
b0b04a2adf
[FlexibleHeader] Add unit test for the shadow layer (#7909)
MDCFlexibleHeader currently doesn't have any tests related to the shadow layer. This adds tests for that property. Since there are no general flexible header tests I added this within it's own file as all other test files seem specific to other tests.
2019-07-14 08:50:55 -04:00
Yarden Eitan
edb5f11af1
[Ripple] Add dynamic color support for ripple. (#7877)
This relies on #7861 .

Adds dynamic color support for Ripple and tests using snapshot tests that the dark mode color is correctly applied.

Closes #7867
2019-07-11 22:13:46 -04:00
Wenyu Zhang
0175300afc
[schemes] Use UIColor method instead of static method to generate (#7894)
Follow up to https://github.com/material-components/material-components-ios/pull/7860.

Replace the original static method used in color scheme.
2019-07-11 18:07:39 -04:00
Andrew Overton
03e4e901b7 Merge branch 'release-candidate' into develop 2019-07-11 15:03:20 -04:00
Cody Weaver
64d5d315ad
[Snackbar] Use MDCShadowLayer instead of UIKit shadows (#7843)
MDCSnackbarMessageView was previously using UIKit to display its shadows. This is a deviation from the rest of our components. This change updates the implementation so that we can later expose an API for `elevation` so that clients can customize the elevation of the snackbar and get its elevation accordingly. No tests were added because this changes the underlying layer class and snapshot tests were already in place to catch the visual diffs.

Closes #7829
2019-07-11 07:17:39 -04:00
Wenyu Zhang
a65f36d4be
[Color] Add UIColor+MaterialDynamic to support dynamic color. (#7860)
DynamicColor is not only useful inside color scheme class, but also in some other classes (dragon controller) as a utility method. A new UIColor category is created in this PR to facilitate it.
2019-07-10 20:58:56 -04:00
Andrew Overton
541767579b Bumped version number to 85.7.0. 2019-07-10 17:23:33 -04:00
Robert Moore
e7df8df4e4 Bumped version number to 85.6.0. 2019-07-10 14:15:08 -04:00
Andrew Overton
930e754112 Bumped version number to 85.5.1. 2019-07-09 20:17:10 -04:00
Andrew Overton
a7b621138b [FlexibleHeader] Add Math dependency to FlexibleHeader (#7833)
Adding a Math dependency to FlexibleHeader. The release hit a snag in the very last step because this wasn't here :(

Closes #7835.
2019-07-09 20:01:53 -04:00