25 Commits

Author SHA1 Message Date
Randall Li
c2607a4213 [MDC Color] Graduated color blending component to public folder
PiperOrigin-RevId: 463647015
2022-07-27 12:14:33 -07:00
Jeff Verkoeyen
c34de39e30 Internal change.
PiperOrigin-RevId: 397316843
2021-09-17 07:45:01 -07:00
Alyssa Weiss
924c49e43b Remove all iOS 10 availability checks from material_components_ios now that only iOS 10+ is supported.
PiperOrigin-RevId: 366437050
2021-04-02 06:33:16 -07:00
Wenyu Zhang
45b9b222e3 [Color] Add colorWithAccessibilityContrastHigh:normal: API to support Increase Contrast color.
PiperOrigin-RevId: 313229477
2020-05-26 11:13:36 -07:00
Wenyu Zhang
a3381717f7
Fix the bazel BUILD files and snapshot that were restored unintentionally.(#9983) 2020-04-29 11:00:00 -04:00
Randall Li
0100cfe414 [MDC-iOS/BottomSheet] Fix dismissOnDraggingDownSheet behavior
The bottom sheet incorrectly allowed the sheet to be drag dismissed when `dismissOnDraggingDownSheet` was set to NO.

This change permits the gesture to dismiss to begin but prevents it from actually closing the sheet.

https://github.com/material-components/material-components-ios/issues/9723

Closes https://github.com/material-components/material-components-ios/pull/9885

PiperOrigin-RevId: 307802500
2020-04-22 06:21:26 -07:00
Jeff Verkoeyen
8abbb099a9 Delete all bazel support.
We no longer support bazel.

This PR deletes everything related to bazel support from our repo.

Closes https://github.com/material-components/material-components-ios/pull/9968

PiperOrigin-RevId: 306227127
2020-04-13 07:13:47 -07:00
Andrew Overton
1cc8bb781d
[private] Make private/color use availability (#9738)
Original CL: cl/293702453
2020-02-14 12:21:53 -05:00
featherless
162a063bda
[bazel] Remove all unused mdc_objc_library loads. (#9376)
Found by searching for all references to `\bmdc_objc_library` and removing load statements from files that only returned one result.

Clean up as part of https://github.com/material-components/material-components-ios/issues/9363
2020-01-02 14:34:36 -05:00
featherless
b7cf0de915
[bazel] Remove all unused swift_library load statements. (#9369)
Found by searching for all references to `\bswift_library` and removing load statements from files that only returned one result.

Clean up as part of https://github.com/material-components/material-components-ios/issues/5491
2020-01-02 11:01:31 -05:00
featherless
0a0bc4b47b
[automated] Ran buildifier on all BUILD files. (#9366)
```
find . -name BUILD | xargs buildifier
```

This is in preparation of https://github.com/material-components/material-components-ios/issues/9363
2020-01-02 10:05:07 -05:00
Wenyu Zhang
b843136be3
[MDFTesting] remove MDFTesting references. (#8531)
MDFTesting blocks the release because of b/141850100. This PR removes the reference for now.
2019-09-30 11:20:50 -04:00
Wenyu Zhang
9dfd40427d
[Color] Use XCTAssertEqualColors from MDFTesting to help color testing. (#8497)
closes https://github.com/material-components/material-components-ios/issues/8426.

Related PR: https://github.com/material-components/material-components-ios/pulls
2019-09-25 14:42:27 -04:00
Cody Weaver
a1d1296884
[Color] Add a method for MDC to call resolveColorWithTraitCollection on pre-iOS 13 (#8307)
Currently any time we want to call `resolveColorWithTraitCollection` we have to call the lines below.

```objc
UIColor *foo = [self dynamicColor];
#if defined(__IPHONE_13_0) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_13_0)
  if (@available(iOS 13.0, *)) {
    return [foo resolvedColorWithTraitCollection:traitCollection];
  }
#endif
```

after this change we will just have

```objc
UIColor *foo = [self dynamicColor];
return [foo mdc_resolvedColorWithTraitCollection:traitCollection];
```

This will make the codebase much cleaner as we add these resolve calls throughout the codebase.
2019-08-13 15:23:10 -04:00
Robert Moore
e6389754e1 [Color] Remove use of NS_ASSUME_NONNULL_BEGIN. (#8299)
The project overwhelmingly uses explicit nullability annotations. This PR
switches the Color component to use the same convention.

Part of #8297
2019-08-13 12:51:49 -04:00
Robert Moore
5d42706fda
[Color] Use Starlark macros. (#8201)
Use more Starlark macros in the BUILD file to make releasing easier.

Part of #8150
2019-08-02 16:35:23 -04:00
Robert Moore
37d5b8d87c [Color] Fix Math import. (#8104)
Material Math should be imported via the umbrella header, not any specific
headers.
2019-07-28 22:35:03 -04:00
Robert Moore
66435f1b68
[Color] Create umbrella header. (#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
2019-07-25 15:41:26 -04:00
Wenyu Zhang
997b3b2021
[Color] add method for regular color blending. (#8077)
This method is copied from the one in MDCSemanticColorScheme. 

We need to add it here for a clear structure and to avoid depending on the scheme target for low level elevation classes. (This method intuitively doesn't need to exist under scheme).
2019-07-24 22:58:01 -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
Sam Symons
0efb5539c5 [ThumbTrack] Remove extra UIColor categories (#1122)
* Pull the functionality of UIColor+MDC into MDCThumbTrack.

MDCThumbTrack is now the only class using this behaviour, so three extra files have been removed now that they are no longer necessary.

* Fixed colon alignment.
2017-01-04 10:08:49 -05:00
Adrian Secord
8c3af252be Adding AUTHORS and removing CONTRIBUTORS.txt.
We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has...

Summary:

We can credit any contributor who would like to be credited this way, by adding them on request to the AUTHORS file. The copyright statement changes are required for this to work. Note that this has no legal change, since the contributors always retained their copyright despite the copyright notice, but it's a nice acknowledgement.

Changed copyright statement to include non-Google authors.

Command run:

find * \( -name '*\.m' -or -name '*\.h' -or -name '*\.swift' \) -and -not \( -path 'scripts/external*' -name Pods  \) -print0 | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Added non-source files.

Command run:

grep -Rl 'Copyright .* Google Inc' * --exclude-dir scripts/external --null | xargs -0 sed -i '' 's/Copyright \(.*\) Google Inc/Copyright \1 the Material Components for iOS authors/'

Reviewers: featherless, O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1415
2016-08-08 08:16:37 -07:00
Adrian Secord
a045b07bcc Fix internal builds.
Summary:
- Adds missing dependencies to the podspec.
- Fixes private import paths.
- Adds dummy variable to "empty" static library targets to suppress build warnings.
- Suppresses string concatenation warnings in valid contexts.
- Lint changes.

Reviewers: iangordon, O1 Material components iOS

Reviewed By: iangordon, O1 Material components iOS

Subscribers: junius

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1074
2016-06-30 13:19:16 -04:00
Adrian Secord
1c34c26780 Added further conversions that Junius found. 2016-01-27 06:54:32 -08:00
Ian Gordon
7341af63f8 MDCThumbTrack
Summary:
Initial ThumbTrack commit.

This is a private component.

Note that math functions are not finalized, pending testing in third_party.

Reviewers: randallli, ajsecord, featherless, #material_components_ios_owners

Reviewed By: randallli, ajsecord, featherless, #material_components_ios_owners

Subscribers: randallli, ajsecord

Projects: #material_components_ios_owners

Differential Revision: http://codereview.cc/D17
2015-12-09 15:13:15 -08:00