38 Commits

Author SHA1 Message Date
Jeff Verkoeyen
ec44b12ee9 Internal change
PiperOrigin-RevId: 394725753
2021-09-03 11:44:01 -07:00
Alyssa Weiss
1b69273926 Delete MDCTypography font opacities.
PiperOrigin-RevId: 394494448
2021-09-02 10:44:20 -07:00
Yarden Eitan
8d7bc88a11 [Ink] Official deprecation of Ink.
Please use the Ripple component.

PiperOrigin-RevId: 329771765
2020-09-02 13:07:40 -07:00
featherless
baf74b9336
[Ink] Make the ink views accessibility elements. (#8891)
Stacked on top of https://github.com/material-components/material-components-ios/pull/8890

This allows the ink views to be focused by VoiceOver and tapped as buttons to initiate the ink effect.

Closes https://github.com/material-components/material-components-ios/issues/8883
2019-11-15 11:01:11 -05:00
featherless
cdaf097756
[Ink] Consolidate example code into a single file. (#8890)
Cleanup as part of https://github.com/material-components/material-components-ios/issues/8883
2019-11-15 10:15:15 -05:00
Robert Moore
800188a649
{clang-format} Format the components. (#6347)
This is a follow-up to https://github.com/material-components/material-components-ios/pull/6027

```
find components \( -name "*.h" -or -name "*.m" \) | xargs clang-format -i
```
2019-01-23 11:08:43 -05:00
Cody Weaver
8078a2c639
[Ink] Update example description to only have one space (#5018)
Closes #5015 

| Before | After |
| ------- | ------- |
|![simulator screen shot - iphone 8 - 2018-09-05 at 15 40 55](https://user-images.githubusercontent.com/7131294/45116875-18ed2800-b122-11e8-81d5-936b82daa44b.png)|![simulator screen shot - iphone 8 - 2018-09-05 at 15 39 51](https://user-images.githubusercontent.com/7131294/45116881-1c80af00-b122-11e8-90e0-60714fb55e7e.png)|
2018-09-06 11:25:38 -04:00
featherless
2181084272
[automated] Standardize our open source license stanza to what Xcode generates. (#4985)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at

http://www\.apache\.org/licenses/LICENSE-2\.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at
 http://www\.apache\.org/licenses/LICENSE-2\.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
2018-08-31 12:13:07 -04:00
Yarden Eitan
3480c50c67
updated to newest CbC standard (#4956)
Move to the new CbC standard released in CatalogByConvention v2.5.0. See PR: material-foundation/cocoapods-catalog-by-convention#27 for more info on the change.
2018-08-29 20:45:13 -04:00
Wenyu Zhang
44ca45ceb0
[Ink] Fix demo being clipped by safe area issue (#384) 2018-08-27 16:50:19 -04:00
Robert Moore
bece3086d8
[Catalog] Improve Ink demo color contrast (#4660)
The Ink example's color contrast ratios were too low to pass WCAG 2.1 AA-level
contrast requirements. Specifically the blue-on-white (Ink ripple effect) and
dark grey on light grey (text) were too low.  Switching to using the MDC
Palettes instead of custom colors.

**Before**
![ink-contrast-before](https://user-images.githubusercontent.com/1753199/43405864-dbf1d8d4-93e8-11e8-9342-466d466abb0a.png)

**After**
![ink-contrast-after](https://user-images.githubusercontent.com/1753199/43406137-978a6d9a-93e9-11e8-9b32-52632432a306.png)



Related to #4506
2018-07-31 15:54:05 -04:00
Cody Weaver
f8284cdde4
[Ink] Make example accessible. (#4506)
Changed colors for the example, this should help users with visual impairments see the elements better. Before if the colors were inverted it was hard to see even if a user wasn't visually impaired.
2018-07-11 16:32:24 -04:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Randall Li
b1ec22207f
Fixed float conversion build errors (#2602)
* Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480

* More Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480
2017-12-06 15:57:04 -05:00
Junius Gunaratne
a27d49408a
[Ink] Retrofit new ink layer with updated animation into existing ink API (#2488)
* Add updated ink flag

* Add completion block delegate methods

* Rename existing ink to legacy ink

* Update example with legacy ink as second ink view

* Update comment formatting

* Update formatting

* Update ink unit tests

* Update ink unit tests

* Import UIKit for UIColor support

* Add dependency to Material Math

* Add Material Math dependency

* Use CABasicAnimations where possible

* Add support for maxRippleRadius

* Minor refactoring for timing functions

* Remove unused mark

* Add ink description to comments

* Minor formatting fix

* Nullability updates and clarification comments

* Remove email in comments.

* Add nullability

* Add nullability

* Use year when file was created

* Add float

* Update constant names

* Update formatting

* Update year for legal reasons

* Clarify comment about use of usesCustomInkCenter

* Update cancelAllAnimationsAnimated to stop all active ink ripples

* Remove use of ink layers array and access sublayers directly

* Check layer class in cancelAllAnimationsAnimated

* Use bounds rather than frame in layoutSubviews

* Setting radii in setNeedsLayout
2017-11-28 09:59:25 -05:00
Yurii Samsoniuk
2a96682230 Replace unnecessary imports with forward declarations (#2429)
* [Themes] Remove unnecessary imports.

* [TextFields] Remove unnecessary imports.

* [Typography] Do not use an umbrella header inside of a component.

* [Snackbar] Do not use self umbrella header.

* [ActivityIndicator] Do not use self umbrella header.

* [AppBar] Use umbrella headers.

* [AppBar] Remove self import header.

* [ButtonBar] Removed self umbrella header imports.

* [Buttons] Removed self umbrella header imports.

* [Collections] Update imports.

* [Dialogs] Moved import into an m file.

* [Collections] Fixed imports.

* [FeatureHighlight] Removed self umbrealla imports.

* [HeaderStackView] Reordered imports.

* [Ink] Replaced imports with forward declarations.

* [Slider] Replaced self umbrella import use.

* [Snackbar] Removed self umbrella header import.

* [Tabs] Changed math import. Replaced self umbrella header import.

* [Icons] Removed unnecessary imports.

* [Overlay] Replaced umbrella header import.

* [ShapeLibrary] Replace Shapes imports with an umbrella header.

* [Shapes] Replaced imports with forward declarations.

* [AppBar] Replace import with a forward declaration.

* [Examples] Updated imports.

* Fixed conflicting imports

* Added space between different import categories
2017-11-16 18:25:06 -05:00
Alastair Tse
4a46c8c19e Monochromatic sweep of all catalog components (#1370)
* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* WIP: Updating TabBar example to use black/green theme.

* WIP: Monochoroming all examples.

* Switch MDC Catalog to a black and white theme (#1355)

* Replace MDC all icons

* Update border

* Replace MDCActionExtension icon with new logo

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Update all headers to be white on black

* Make Catalog greyscale to match Material’s style.

* Fix collection tile

* Fix floats

* Make Catalog greyscale to match Material’s style.

* More black and whiting

* WIP: Snackbar and global style

* Simplify snack bar examples.

* Page control
2017-05-05 16:16:47 -04:00
Sam Morrison
dff304e062 Add missing license headers (#900) 2016-11-30 09:43:22 -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
randallli
681cc2b6f7 [Docs] Replaced incorrect name of the product. Material Components *for* iOS
Summary:
s/material components ios/Material Components for iOS/
s/material components for ios/Material Components for iOS/

lint copy edit line length

Reviewers: ajsecord, O1 Material components iOS

Reviewed By: ajsecord, O1 Material components iOS

Subscribers: ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1372
2016-08-01 16:45:12 -07:00
Adrian Secord
65a05eed31 Lowercase "material design" in text.
Summary: "Material design" is not capitalized except when referring to the actual Material Design team at Google.

Reviewers: O1 Material components iOS, randallli

Reviewed By: O1 Material components iOS, randallli

Subscribers: randallli, featherless

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1306
2016-07-25 14:13:08 -04:00
Adrian Secord
3aedace959 Re-enabled 100-character line limit.
Reviewers: randallli, O1 Material components iOS

Reviewed By: randallli, O1 Material components iOS

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D965
2016-06-13 13:34:57 -04:00
Junius Gunaratne
d0683a0e0b [Catalog] Change ink demo shapes to represent pseudo button/FAB, move layout code into supplemental
Summary: Screenshot http://codereview.cc/M26

Reviewers: featherless, #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D711
2016-04-21 16:12:53 -04:00
Will Larche
2ab08f4133 [Catalog & Examples] Added navigationBar example in Swift (Supplemental POC) and corrected slight mistake in Catalog by Convention logic.
Summary: Merge branch 'develop' of https://github.com/google/material-components-ios into develop

Reviewers: ajsecord, featherless, #mdc_ios_owners

Reviewed By: ajsecord, featherless, #mdc_ios_owners

Subscribers: featherless, ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D587
2016-04-13 14:56:49 -04:00
Junius Gunaratne
ecc87e4410 [Catalog] Layout ink examples horizontally in landscape orientation
Summary: Screenshot http://codereview.cc/M17

Reviewers: featherless, ajsecord, #mdc_ios_owners

Reviewed By: ajsecord, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D556
2016-04-11 10:47:41 -04:00
Adrian Secord
9ff47756e2 [Ink] Adds defaultInkView, inkViewAtLocation:.
Fixes https://github.com/google/material-components-ios/issues/55.

Summary:
Deprecates MDCInkTouchController's inkView property, which become confusing after we added the ability for delegates to create and reuse their own ink views.

Also cleared up the docs to message better.

Fixes https://github.com/google/material-components-ios/issues/55.

Reviewers: #mdc_ios_owners, iangordon

Reviewed By: #mdc_ios_owners, iangordon

Subscribers: iangordon

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D511
2016-04-07 16:53:07 -04:00
Junius Gunaratne
0411613c71 [Catalog] Demo selection screen updated with description and primary demo
Summary: Screenshot http://codereview.cc/M13

Reviewers: featherless, jstriegel, ajsecord, #mdc_ios_owners

Reviewed By: jstriegel, ajsecord, #mdc_ios_owners

Subscribers: ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D514
2016-04-07 16:45:52 -04:00
Jeff Verkoeyen
61a895c5b1 [Catalog] Rename catalogHierarchy to catalogBreadcrumbs.
Reviewers: junius, #mdc_ios_owners

Reviewed By: junius, #mdc_ios_owners

Subscribers: junius

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D448
2016-04-01 12:40:17 -04:00
Junius Gunaratne
e1448b5b7f [Ink] Update demo so ink is not obstructed by adjacent views
Reviewers: ajsecord, #mdc_ios_owners

Reviewed By: ajsecord, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D413
2016-03-29 17:54:21 -04:00
Adrian Secord
0fdf15482b [Ink] Changed MDCInkView API to better reflect the modern ink behavior (breaking).
Summary:
Note, please see this before reviewing: https://github.com/google/material-components-ios/issues/216

Also, there is no longer any concept of "canceling" an ink splash where the ink contracts back down to a point, so some if/then branches were collapsed.

Reviewers: junius, #mdc_ios_owners, featherless

Reviewed By: junius, #mdc_ios_owners, featherless

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D353
2016-03-25 16:59:18 -04:00
Junius Gunaratne
b1abd0ece9 [Catalog] Update colors to blue branding color
Reviewers: ajsecord, #mdc_ios_owners, featherless

Reviewed By: #mdc_ios_owners, featherless

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D335
2016-03-24 15:26:10 -04:00
Adrian Secord
5babca7517 [Ink] Updated the ink example to include smaller shapes.
Summary:
[Ink] Updated the ink example to include smaller shapes.

Screen shot: http://codereview.cc/F1445
Video: http://codereview.cc/F1446

There's a problem with the unbounded ink getting clipped by sibling views... not sure what to do about that. We could replace the unbounded example with a single large square again. What do you think?

Reviewers: junius, #mdc_ios_owners

Reviewed By: junius, #mdc_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D312
2016-03-23 10:13:44 -04:00
Jeff Verkoeyen
248b499488 [Catalog] Move Ink, PageControl, and SVDMultiplexer to the catalog convention.
Summary:
This simplifies the examples for each of these components.

The other components have a few extra features that may take a bit more time to migrate over,
notably:

- Swift (ShadowLayer)
- Resources (SpritedAnimationView)
- Unit and UI tests (Switch, Typography)

Reviewers: junius, randallli, #mdc_ios_owners, ajsecord

Reviewed By: #mdc_ios_owners, ajsecord

Subscribers: ajsecord

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D124
2016-03-01 12:42:21 -05:00
Jeff Verkoeyen
15261dfc93 Catalog by convention.
Summary:
Typically speaking, a structured catalog app will show a list of components and allow the user to drill down to a list of examples for each component. Such an app might be built with a UITableView or UICollectionView, such that the following process is followed to add a new example:

1. Create the new view controller.
2. Add a new entry in the respective component's "examples" list.
3. Upon tapping the entry, create an instance of the view controller and push/present it.

## Convention over configuration

In the interest of encouraging the creation of more examples, I'd like to pursue a solution that *minimizes the number of steps required to create new examples*. The ideal outcome of this task: adding a new example to our 'catalog' is a single step:

1. Create a view controller driving your demo.

Notable constraints to satisfy:

- Zero code written outside of the context of the demo view controller by the demo writer. Someone adding a new example should not have to make any changes to the Catalog's structure.

This diff solves the above with approximately 150 lines of code.

## What's going on in this change?

Deleting the Ink example project. In this new "by convention" approach we simply have to add a ViewController.h/m into the component's `examples/` directory. When `pod install` is ran on the catalog, CocoaPods will detect these files and add them to the build.

Introducing the new `catalog/` directory. This is where the code for the new convention-based catalog app lives.

The MDCCatalog app includes an AppDelegate and a NodeViewController. The AppDelegate enumerates the runtime for classes that respond to the `catalogHierarchy` method and then creates a UINavigationController pointing at the root node of the catalog hierarchy. NodeViewController simply represents the children of a node and allows the user to tap a child row to move deeper in the tree.

There are a few methods in the "Runtime" for both Objective-C and Swift. These are the workhorses for enumerating the classes at runtime.

Reviewers: #material_components_ios_owners, randallli

Reviewed By: #material_components_ios_owners, randallli

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D119
2016-02-11 11:54:36 -05:00
randallli
6182b641a5 Added code signing setting to be able to run on device.
Test Plan:
Open an example project
Build and run on device.
It should run without codesigning erros.

Reviewers: junius, featherless, #material_components_ios_owners

Reviewed By: featherless, #material_components_ios_owners

Projects: #material_components_ios

Differential Revision: http://codereview.cc/D103
2016-02-05 12:41:44 -05:00
Louis Romero
483c2f91dc Multiple updates:
Summary:
- Add Pesto and build_tests' xcworkspace to .gitignore.
- Sort the projects in Catalog.xcworkspace.
- Add iPad Pro icon to appiconset's Contents.json.
- Update the storyboard (automatically done by Xcode when opened).
- Update the year in the project template info that is added to new source files.

Reviewers: ajsecord, #material_components_ios_owners, featherless

Reviewed By: #material_components_ios_owners, featherless

Projects: #material_components_ios_owners

Differential Revision: http://codereview.cc/D84
2016-01-23 02:20:04 +01:00
Junius Gunaratne
372f747876 [MDCInk] Update ink layer to use new ripple style and behavior.
Reviewers: #material_components_ios_owners, ajsecord

Reviewed By: #material_components_ios_owners, ajsecord

Subscribers: featherless

Projects: #material_components_ios_owners

Differential Revision: http://codereview.cc/D21
2015-12-14 14:56:31 -05:00
Adrian Secord
92eb3e8fed Adds Ink.
Summary: Adds Ink component. Unit tests and user documentation still to come.

Test Plan: Unit tests, example code.

Reviewers: featherless, #material_components_ios_owners, randallli

Reviewed By: featherless, #material_components_ios_owners, randallli

Projects: #material_components_ios_owners

Differential Revision: http://codereview.cc/D11
2015-12-07 16:41:10 -05:00