82 Commits

Author SHA1 Message Date
Galia Kaufman
d55d7ab9f2
[Dialogs] Theming action buttons in DialogThemer (#5416)
Adding semantic emphasis to Dialog actions which allows conditional theming of buttons. The MDCDailogScheme now has a button scheme which can be used to theme buttons according to their action's assigned emphasis.
Issue: b/117608629
Design Review document (go/gmdc-ios-dialogs-design-doc).
2018-10-22 12:31:03 -04:00
Galia Kaufman
0beee09b20
[Dialogs] add scrimColor to MDCAlertController (#5362)
Adding scrimColor property to MDCAlertController, which controls the background color when the alert is presented by a MDCDialogPresentationController. 
Issues: b/116845327, b/117173678.
2018-10-10 10:44:04 -04:00
Cody Weaver
cba82b4d06
[Dialogs] Add shadow elevation (#5296)
### Context
Clients may need to set custom elevation levels for their custom dialogs
### The problem
Currently we don't expose any of the necessary properties to do this.
### The fix
Expose those properties so clients can have a custom elevation for their Dialog.

### Additionally
Test and Examples have been added.


### Screenshots
| Default | Custom |
| - | - |
|![simulator screen shot - iphone x - 2018-10-02 at 15 40 25](https://user-images.githubusercontent.com/7131294/46372705-e7e91000-c659-11e8-875c-132ba70c4b9f.png)|![simulator screen shot - iphone x - 2018-10-02 at 15 40 21](https://user-images.githubusercontent.com/7131294/46372715-ecadc400-c659-11e8-81a7-2f253ebf38e8.png)|
2018-10-02 16:07:49 -04:00
Galia Kaufman
1137a62d92
[Dialogs] Customizing scrim color in presentation controller (#5283)
Adding the API to customize the color of MDCAlertController's background scrim, and to apply the color during theming. Also includes tests & an example.
Issue: #5279
Issue: b/116845327
2018-10-02 04:53:32 -04:00
Galia Kaufman
d065e4536f
[Dialogs] Customize tint color of alert title icon (#5159)
Updating AlertController API to customize the tintColor of the alert's titleIcon. Includes tests and examples.
issue: #5174
issue: Update MDC API to customize MDCAlertController title🐛
2018-09-28 06:31:31 -04:00
Galia Kaufman
dc184ba549
[Dialogs] Customize alert title icon (#5167)
Adding a title icon property to MDCAlertController.

The title icon is an image that is shown above the dialog title, and is automatically aligned with the title, supporting all NSTextAlignment alignment options (center, natural, left, right, etc).

Includes tests and examples using the new property.

Issue: #5174
Issue: Update MDC API to customize MDCAlertController title🐛
2018-09-27 14:32:57 -04:00
Randall Li
2d2c0c8d4d [Dialog/alert] Corrected example import of dialog from scheme 2018-09-26 12:04:44 -04:00
Randall Li
093c7edbd6 [Dialog/alert] Corrected example import of dialog scheme 2018-09-26 10:57:53 -04:00
Randall Li
21f5a44b7d [Dialog/alert] Corrected import of typography scheme 2018-09-26 10:41:53 -04:00
Randall Li
0734061d51 [Dialog/alert] Added import of typography scheme 2018-09-26 10:39:52 -04:00
Randall Li
455fd70155 [Dialog/alert] Added import of collections 2018-09-26 10:34:34 -04:00
Randall Li
036998f60c [Dialog/alert] Added import of dialog color scheme 2018-09-26 10:27:47 -04:00
Randall Li
b3c791e8f2 [Dialog/alert] Added import of color scheme 2018-09-26 10:25:40 -04:00
Randall Li
6e0eeb7d69 [Dialog/Alert] Using umbrella header of themer 2018-09-26 09:52:15 -04:00
Galia Kaufman
80145df58e
[Dialogs] Customize alert title alignment (#5164)
Set title alignment of MDCAlertController with NSTextAlignment options.
Issue: #5174
Issue: Update MDC API to customize MDCAlertController title🐛
2018-09-24 16:12:28 -04:00
Galia Kaufman
5b34c0eb3a
[Dialogs] Add/update examples for dialog themer (#5158)
Adding and updating existing examples that use the new dialog themer (#5102).
Issue: b/113257098.
2018-09-20 17:21:20 -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
Robert Moore
175942d9e0
[Catalog] Fix Swift example imports (#4780)
Many of our Swift examples are either missing imports or are importing all of
MaterialComponents. Both of these will cause failures during internal builds.
2018-08-14 13:26:37 -04:00
Cody Weaver
255dae403b
[Dialogs] Fix button hit areas to match accessibility (#4684)
Update buttons within Dialog to have a minimum 48x48 touch area. 

Also, update example to make sure in an case where there is a large number of buttons, make sure that their is enough room in the scroll view. 

Closes #3664
2018-08-03 13:40:53 -04:00
ianegordon
d2d1cc064f
[Dialogs] Best example description (#4643) 2018-07-27 12:04:59 -04:00
ianegordon
20445a5d85
[Dialogs] Update A11y docs (#4509) 2018-07-11 17:49:33 -04:00
ianegordon
02d19e08ad
[Dialogs] Add customizable cornerRadius to enable proper shadowing (#4233)
* Initial Import

* Pull cornerRadius from the presented view

* FB

* Naming
2018-05-24 10:49:49 -04:00
John Detloff
0c0ce4248e
Initialize default color and typography schemes in examples (#4200)
Ensure a default colorScheme and typographyScheme is initialized for examples.
2018-05-21 12:44:43 -04:00
Robert Moore
b63c534ada [Dialogs] Make "modal" dialog "non-dismissable" (#3736)
* [Dialogs] Make "modal" dialog "non-dismissable"

"Modal" dialogs simply meant that they were non-dismissable. Fixing the
wording in the example to communicate the differences.

Pivotal: https://www.pivotaltracker.com/story/show/157298804

* Fixing line format
2018-05-04 15:07:52 -04:00
featherless
e923d2d928
[Catalog] Make many examples be dragons. (#3642)
Pivotal story: https://www.pivotaltracker.com/story/show/156939988
Pivotal story: https://www.pivotaltracker.com/story/show/156804299
Pivotal story: https://www.pivotaltracker.com/story/show/156939962
Pivotal story: https://www.pivotaltracker.com/story/show/156982119
Closes: https://github.com/material-components/material-components-ios/issues/3183
2018-05-02 08:31:55 -04:00
Adrian Secord
7f09c94e46
s/www.material.io/material.io/g (#3576) 2018-04-28 11:32:54 -04:00
featherless
d406f0fa7c [Dialogs] Replace MDCRaisedButton with themer APIs in DialogWithPreferredContentSizeViewController. (#3495)
* [Dialogs] Replace MDCRaisedButton with themer APIs in DialogWithPreferredContentSizeViewController.

Pivotal story: https://www.pivotaltracker.com/story/show/157096622

* Use global theming.

* Proper theming.
2018-04-26 11:12:21 -04:00
featherless
1da207b483 [Dialogs] Remove unused DialogsTypicalUseViewController.storyboard. (#3496) 2018-04-25 17:12:53 -04:00
Mohammad Cazi
5ee14ab92e
[Catalog] Component descriptions update. (#3490)
* Button Description updated.

* Updating the description of Catalog Components.

* Missing space.

* fixing couple of small issues with catalog descriptions.

https://github.com/material-components/material-components-ios/pull/3490
2018-04-25 16:06:18 -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
featherless
e3dd4c12ce
[Dialogs] Add umbrella headers for all extension targets. (#3465)
Also updated all imports to make use of the umbrella headers.

Pivotal story: https://www.pivotaltracker.com/story/show/157045283
2018-04-24 21:21:33 -04:00
featherless
23110ef116
[Catalog] Make all swift copycat demos be dragons. (#3443)
Also removed "(Swift)" from any examples that remained as non-dragons. The catalog does not need to advertise which language a given demo is in.

Pivotal story: https://www.pivotaltracker.com/story/show/156939611

## Screenshots

Before:
![simulator screen shot - iphone se - 2018-04-23 at 14 04 14](https://user-images.githubusercontent.com/45670/39144588-36095450-46ff-11e8-868d-bdb7e8ee5438.png)

After:
![simulator screen shot - iphone se - 2018-04-23 at 13 53 39](https://user-images.githubusercontent.com/45670/39144567-2ad7bf9a-46ff-11e8-9fd5-ef0739d427b3.png)
2018-04-24 15:52:13 -04:00
featherless
4f1c9fa382
[Dialogs] Implement a semantic color themer. (#3313)
Pivotal story: https://www.pivotaltracker.com/story/show/156169818

Before: 

![simulator screen shot - iphone 8 plus - 2018-04-10 at 13 08 56](https://user-images.githubusercontent.com/45670/38572206-7cdb9382-3cc0-11e8-96ba-14199617596a.png)

After: 

![simulator screen shot - iphone 8 plus - 2018-04-10 at 13 07 54](https://user-images.githubusercontent.com/45670/38572202-79a6a102-3cc0-11e8-9812-8a3c00139ad6.png)
2018-04-12 20:17:53 -04:00
Mohammad Cazi
7716981f1f
[Dialogs] Implement MDCAlertController typography themer. (#3302)
* Implementing MDCAlertTypographyThemer.

* fixed the test.

* Implementing MDCAlertTypographyThemer.

* fixed the test.

* Dialogs: Example for typography added.
2018-04-09 16:08:56 -04:00
ianegordon
481c5f1a2d
[Dialogs] Add a Dragons samples to compare UIKit -vs- Material (#3197)
* Docs

* Add action, toggle for debug

* FB

* Indent

* Revert Project Changes
2018-03-30 18:48:53 -04:00
ianegordon
b22c8c2650
[Dialogs] Enable custom fonts on MDCAlertController (#3097)
* [Dialogs] Break AlertController into View and ViewController

* Enable Dynamic Type at the same time as custom fonts

* Feedback
2018-03-16 13:16:54 -04:00
ianegordon
f88160007e
[Dialogs] Temporarily revert MMotion (#2921)
* Revert "[Dialogs] Migrate to Material Motion. (#2481)"

This reverts commit 211ca772ea0456b56e522c0c67bd44312ddfe4d1.

* Bump animator back to 2.5.0

* Pull in develop project file

* Remove test for MMotion
2018-02-13 14:27:24 -05:00
ianegordon
2a38d42711
[Dialogs] Rounded corner example (#2881)
* [Dialogs] Rounded corner example

* FB
2018-01-31 15:53:02 -05:00
danblakemore
dea8e3c7f4 [Dialogs] Added Example for issue #2860 to Dragons (#2864)
* [Dialogs] Added Example for issue #2860 to Dragons

Added an example to the dialogs examples which shows a dialog from a presented
view controller. Upon dismissal, the content of the view controller (designed to
obviously demark its bounds) shifts due to #2860.

* Changing the dialog content to better illuminate why this example exists.

* Added more informative titles

The presented view controller how has a title which further illustrates the
bounds change since the navigation bar's content shifts too. Also updated the
catalog description.

* Update copyright dates to help kokoro.

Copyright files only during a time range in which they actually existed.
2018-01-26 06:43:33 -08:00
Robert Moore
e03186525d
[Examples/Tests] Convert @imports to imports (#2761)
In order to make the internal build systems happier, @import statements should not be used.
2017-12-22 12:30:25 -05:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
featherless
211ca772ea
[Dialogs] Migrate to Material Motion. (#2481)
This change implements the Material Motion spec for the Dialogs component using the Motion Interchange, Animator, and Transitioning APIs.

Many of the existing APIs will be able to be deprecated or made private in the future, though there is considerable existing downstream client usage of many of these APIs so this will need to be done with some care.

The client migration path for this change will look something like this on average:

```objc
// Old API
_transitionController = [[MDCDialogTransitionController alloc] init];
self.transitioningDelegate = _transitionController;		
self.modalPresentationStyle = UIModalPresentationCustom;

// New API
self.mdm_transitionController.transition = [[MDCDialogTransition alloc] init];
```
2017-11-28 11:08:35 -05:00
Randall Li
2f29f00d86 Fixed some compiler warnings (#2426)
* Added warnings to examples.

* fixed some warnings

* using button sender parameter.

* use button sender in example

* use button sender in example

* removed sender from methods that don’t use it.

* removed sender from methods that don’t use it.

* use button sender in example

* use button sender in example

* use button sender in example

* use button sender in example

* Fixed init of header configurator to use passed in parameter

* removed unused API

* use button sender in example

* Revert "Added warnings to examples."

This reverts commit 91f0480f86cb609c47b00f1346f82de67c31c4e9.

* fixed example: Using the view controllers navigationItem rather than creating a new one.

* removed finished checks from animation blocks in examples.

* reverted id sender checks

* revert id sender check for Flexible header UINavigationBar

* revert clug

* revert clug

* addressing nits

* removed sender check for FeatureHighlightTypicalUseView

* more nits
2017-11-22 10:51:55 -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
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
ianegordon
53929d8594 [Dialogs] Set Dialog example button to open material.io (#2214)
* Change dialog sample to open URL

* Create a saparate view controller to open the external URL
2017-10-19 10:53:05 -04:00
Adrian Secord
479f7b1141 Remove trailing whitespace everywhere. (#2168) 2017-10-13 11:33:35 -04:00
Will Larche
96fb533554 [Catalog] Fixes improper use of Bundle and assets (#2118)
* [Catalog] Fixing bundle usage in some examples.

* [Examples] Correcting use of assets and bundles.

* [Examples] Formatting.
2017-10-08 15:04:48 -04:00
Robert Moore
a5e28488f9 [Dialogs] Size action buttons during layout (#2065)
Buttons were previously being sized during `viewDidLoad`, which caused
problems if UIAppearance caused changes to contentEdgeInsets. Instead,
the buttons should be sized before layout of the dialog's subviews.

Also fixing some examples that were incorrectly sizing buttons before
layout.

Closes #1943
2017-10-01 15:58:48 -07:00