31 Commits

Author SHA1 Message Date
Wenyu Zhang
b457b13005 Internal change.
PiperOrigin-RevId: 417635153
2021-12-21 09:32:05 -08:00
Alyssa Weiss
1b69273926 Delete MDCTypography font opacities.
PiperOrigin-RevId: 394494448
2021-09-02 10:44:20 -07:00
Jeff Verkoeyen
29803522c6 Optimizing imports
PiperOrigin-RevId: 357185525
2021-02-12 07:27:05 -08:00
Jeff Verkoeyen
92254ea119 Rename all icons to an ic_<#name#> convention.
PiperOrigin-RevId: 308232277
2020-04-24 04:33:51 -07:00
Robert Moore
8eb7296dab
[Catalog] Fix container scheme properties. (#9192)
Making remaining examples use protocol for container schemes to match the
project's expected convention.

Found while reviewing #9188
2019-12-09 10:48:25 -05:00
Yarden Eitan
db709613cc
[FeatureHighlight] Positions label not hidden behind nav bar. (#8969)
Now label can be seen and voiceover will focus on it in the right order.

Closes #8888 

Before:

![Simulator Screen Shot - iPhone 7 - 2019-11-15 at 14 53 43](https://user-images.githubusercontent.com/4066863/68971687-18393280-07b8-11ea-9b1c-b8139f2946b2.png)


After:

![Simulator Screen Shot - iPhone 7 - 2019-11-15 at 14 53 34](https://user-images.githubusercontent.com/4066863/68971698-1b342300-07b8-11ea-8bca-962f50a31e6d.png)
2019-11-15 15:35:15 -05:00
Robert Moore
8e9eff85f8
[FeatureHighlight] Make "Color" example accessible. (#8957)
Includes the following changes:
1.  Each cell is an accessibility element with the color name as the label.
2.  Shown Feature Highlights no longer include the "double-tap to dismiss"
    hint.

|Before|After|
|---|---|
|![IMG_0099](https://user-images.githubusercontent.com/1753199/68967680-c344ee80-07ae-11ea-8b97-43a0045ffc53.PNG)|![IMG_0098](https://user-images.githubusercontent.com/1753199/68967657-b4f6d280-07ae-11ea-828f-4976f05ce862.PNG)|


Closes #8889
2019-11-15 15:23:08 -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
Wenyu Zhang
6267009748
[Buttons] Update secondary floating action button themer examples (#5922)
Update examples to use secondary floating button theming extension method instead of calling themer's class methods.

Related https://github.com/material-components/material-components-ios/issues/5844
2018-12-05 14:42:55 -05: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
Mohammad Cazi
f1b919ed5b [Catalog] Feature highlight should be triggered from a separate Button. (#3742)
* separating action and feature button.

* separate button to show the feature highlight.

* colors should not be catalog presentable.

* revert.

* removing redundant theming.

* custom view with no morphing.
2018-05-16 09:15:29 -07:00
Mohammad Cazi
8b4c293287
Color Should be a dragon example. (#3743)
https://github.com/material-components/material-components-ios/pull/3743
2018-05-07 14:46:17 -04:00
Mohammad Cazi
6e7ed439ce
[Catalog] FeatureHighlight should be themed according to global theming. (#3738)
* FeatureHighlight should be themed according to global theming.

* lf

https://github.com/material-components/material-components-ios/pull/3738
2018-05-04 15:49:33 -04:00
Mohammad Cazi
a291896f07
[Typography][Color] Make sure our examples only use the new Color/Typography APIs (#3489)
* Replacing ColorThemer and FontThemer with SemanticColorThemer and TypographyThemer.

* Headline 6 is being used for FeatureHighlights not Headline2  (example update).

* Removed Feature Highlight Themer example since it's redundant, no scheme color changes in Feature Highlight Examples.

https://github.com/material-components/material-components-ios/pull/3489
2018-04-26 12:54:57 -04:00
Yarden Eitan
7f7bc36202
[Catalog] Expose colorScheme + typographyScheme properties for all examples to use app wide theming (#3478)
Made colorScheme and typographyScheme properties in the class interfaces for all our examples.
Moved theming away from example inits and into viewDidLoad
Small update for slider example to allow it to grab the theming properly.
Related Pivotal: https://www.pivotaltracker.com/story/show/156616695
2018-04-25 15:15:17 -04:00
ianegordon
5a05ff9f9b
[Typography] Add FontThemer & FontScheme to FeatureHighlight (#2760)
* [Typography] Add FontThemer & FontScheme to FeatureHighlight

* Add Themer Example

* Remove TODO

* Cleanup / Feedback

* Migrate to new type hierarchy
2018-01-10 23:35:36 -05:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
ianegordon
fcf9712d32
[FeatureHighlight] Add custom font support (#2701)
* [FeatureHighlight] Add custom fonts

* Utilize MDCTypography if custom. Add sample.

* Remove extra method

* [FeatureHighlight] Add custom font tests

* Scale MDCTypography defaults if dynamic type is enabled

* Feedback
2017-12-14 08:46:56 -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
Robert Moore
8940d77d6d [Catalog] Verify all examples provide CatalogByConvention methods (#1911)
All examples now have at least the required `+catalogBreadcrumbs` and `+catalogIsPrimaryDemo`.  All examples in the same breadcrumbs path have only one primary demo.  There should be only one `-catalogDescription` attached to the primary demo.

Closes #1897
2017-08-31 08:46:10 -04:00
Robert Moore
7c8778ed75 [FeatureHighlight] Shown views can receive taps (#1889)
Shown views with gesture recognizers or shown buttons with actions
should be able to receive taps while Feature Highlight is active.

Closes #1888
2017-08-24 18:06:09 -04:00
Robert Moore
e03ad370c6 [Math] Align frames to pixel boundaries (#1730)
Adding a new function to realign a CGRect (frame) to pixel boundaries
based on the screen scale. After a review of the catalog, I'm updating
the areas where I found misaligned frames.

Closes #1723
2017-08-07 16:46:32 -04:00
Junius Gunaratne
71d441a065 Component themers and usage example for catalog (#1443)
Adding color scheme component themers.
2017-05-30 17:28:03 -04:00
Martin Petrov
ec1feb81a5 [MDCPalette] Use class properties (#1470)
* Replacing methods with class properties.

* Updating docs to reflect new Swift call style.

* Updating examples.

* Updating ObjC examples to use dot syntax
2017-05-30 08:20:00 -04:00
Randall Li
1c7ca93142 ![ColorThemer] Reorganize source to create separate targets for each color themer. (#1466)
* reorganize the color themer classes so that they are separate targets for each mutator.

* moved source files out of MaterialThemes.

* moved theme examples into their main component locations out of themer’s.

* renamed core subspec to 'Component'
2017-05-26 17:17:55 -04: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
Adrian Secord
7ff646b58a [Swiftlint] Moar swiftlint fixes (#1155)
* Quieted swiftlint down in scripts/format_all.

* BONUS clang-format for ObjC code.

* Fixed two stray ObjC warnings (not swiftlint related).

* Fixed remaning swiftlint warnings.

* Fixed typos in Shrine fixes.

* Swift cleanups, again.

This reverts commit 7489fca4e4741ae02b406cdaacaf1dae26e19837.
2017-01-25 17:23:20 -05:00
Adrian Secord
7ba66bf09c Formatted all Objective-C sources with clang-format. (#1133) 2017-01-05 10:17:24 -05:00
Adrian Secord
8bc7a849ca Remove struct hacks (#992)
* Remove CGRect struct hacks.

* Fixed typo.
2016-12-09 15:59:50 -05:00
Sam Morrison
d4806473e4 MDCFeatureHighlightViewController implementation (#765)
* API Review for Feature Highlight component

Summary:
This is the proposed API for the Feature Highlight component.

For more info see the following links:
Design spec: https://material.googleplex.com/growth-communications/feature-discovery.html#feature-discovery-design
Tracking bug: b/30695049

Example usage
```
MDCFeatureHighlightViewController *vc = [[MDCFeatureHighlightViewController alloc] init];
vc.delegate = self;
vc.hintTitleText = @"...";
vc.hintBodyText = @"...";
[vc highlightView:_button];
[self presentViewController:vc animated:animated completion:completion];
```
In the delegate:
```
- (void)featureHighlightWasAccepted:(MDCFeatureHighlightViewController *)highlight {
  // do accepted things here
  [self dismissViewControllerAnimated:YES completion:nil];
}
- (void)featureHighlightWasIgnored:(MDCFeatureHighlightViewController *)highlight {
  // do ignored things here
  [self dismissViewControllerAnimated:YES completion:nil];
}
```

Reviewers: ajsecord, featherless, iangordon, O1 Material components iOS, randallli

Reviewed By: ajsecord, featherless, iangordon

Subscribers: randallli, iangordon, featherless, ajsecord

Tags: #material_components_ios

Differential Revision: http://codereview.cc/D1465

* Add MDCFeatureHighlightViewController

* Add Feature Highlight typical use

* Get Feature Highlight buildable

* Copy functionality over from prototype

* Accept/Reject highlight with animation

* Rotation

* Tap anywhere in the feature highlight typical use case demo to move the button

* Align highlight center and highlight point

* Layout text correctly

* Use sample text

* Use animated transitioning delegate for presentation and dismissal animations

* Clean up presentation + dismissal animation code

* Move intructional text behind button

* Limit width of text in feature highlight

* Layout text relative to center when noncentered

* Fix rotation

* First pass at feature highlight color example

* Properly map the inner and outer colors to the view

* Use correct license header

* Automatically choose text color based on outer highlight color

* Clean up color usage

* wrap long lines

* Clean up title positioning

* Clean up radius calculation

* Constize values

* Add feature highlight nav bar example

* Move examples up a directory

* Remove nav bar example

* Improve outer highlight color docs and implementation

* Add TODO: Mask the labels during the presentation and dismissal animations.

* Clean up feature highlight view

* Clean up feature highlight examples

* Layout feature highlight labels with support for RTL

* Code review improvements

* Clean up feature highlight samples

* Feature Highlight readme

* Update Podfile.lock for Feature Highlight

* Feature highlight readme improvements
2016-10-28 10:44:31 -04:00