26 Commits

Author SHA1 Message Date
Andrew Overton
4c75e862d4
[TextFields] Don't use MDCTextFieldTypographyThemer (#9170)
Related to #9168
2019-12-09 10:13:34 -05:00
Robert Moore
b59abd2dd7 [TextFields] Fix example layout. (#7251)
Fixing more example layouts so that the text fields are visible below the
AppBar.

|Before|After|
|---|---|
|![customfont-before](https://user-images.githubusercontent.com/1753199/56601838-27615480-65ca-11e9-85e0-57452e41293d.png)|![customfont-after](https://user-images.githubusercontent.com/1753199/56601846-2b8d7200-65ca-11e9-9571-db1f408a83ed.png)|
|![kitchensink-before](https://user-images.githubusercontent.com/1753199/56601858-2f20f900-65ca-11e9-9abb-84188cbe36bb.png)|![kitchensink-after](https://user-images.githubusercontent.com/1753199/56601882-3ba55180-65ca-11e9-8bd8-10e5ede0bab2.png)|
|![outlinedswift-before](https://user-images.githubusercontent.com/1753199/56601891-41029c00-65ca-11e9-8306-6aa1caf4b221.png)|![outlinedswift-after](https://user-images.githubusercontent.com/1753199/56601910-4b249a80-65ca-11e9-950e-674fc54caebd.png)|

Preparation for #7157
2019-04-23 14:09:45 -04:00
Yarden Eitan
efe61588a6
update (#7246)
We need to add @objc annotations to colorScheme and typographyScheme instances in our Swift examples, because we moved to Swift 4.2, the respondsToSelector won't find `setColorScheme:` and `setTypographyScheme:` setters otherwise.
2019-04-23 10:21:14 -04:00
Andrew Overton
c56d5d76d3
Add @objc annotations to get examples to show up in Dragons (#7168)
This is a follow up PR for #7166 adds @objc annotations to Swift catalogMetadata() methods, because the Swift 4 compiler no longer attempts to infer what methods should be visible to Objective-C. As a result of this change in the compiler, no Swift examples were showing up in Dragons after #7166. See this article: https://useyourloaf.com/blog/objc-warnings-upgrading-to-swift-4/ for additional context.
2019-04-17 21:35:43 -04:00
Andrew Overton
b38372192f
Update to Swift 4.2 (#7166)
This PR updates the Swift version to 4.2.

Partially resolves #6874.
2019-04-17 16:59:02 -04:00
Joe Aguilar
fc7f30d012 [Catalog] Completed audit of swift forced unwrapping in catalog (#6186)
This work closes #3984.

This change audits the rest of the catalog swift examples force unwrapping. I had begun this process with PR #6117.
2019-02-06 11:01:48 -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
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
Will Larche
1f10ae3e3e
[TextFields] Making leading and trailing view layout customizeable (#4434)
Closes the layout part of b/74174981

***Breaks screenshot tests.

Before:
![simulator screen shot - iphone x - 2018-06-24 at 17 39 27](https://user-images.githubusercontent.com/1271525/41823956-2742affe-77d6-11e8-9082-2ccb10071750.png)

After:
![simulator screen shot - iphone x - 2018-06-24 at 17 35 45](https://user-images.githubusercontent.com/1271525/41823875-13f44152-77d5-11e8-8ae8-f23840efe6e1.png)

Also corrects the x of the floating placeholder on a filled text field.
![simulator screen shot - iphone x - 2018-06-24 at 17 45 43](https://user-images.githubusercontent.com/1271525/41823974-7e8c5346-77d6-11e8-88ce-38f4adb32323.png)
2018-06-25 07:59:33 -07: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
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
Yarden Eitan
8717640dbd [Textfields] Added Filled and Outlined themers (#3438)
[Textfields] Added Filled and Outlined themers (#3438)
2018-04-20 18:13:32 -04:00
Yarden Eitan
c88a059640
[Catalog] Remove unwanted warnings from build (#2794)
* fix warnings for .count in Swift strings and duplicate images in Asset folders, also give the Extension target all icons

* update project settings to recommended ones
2018-01-05 16:58:33 -05:00
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Will Larche
62d5a4fa85 [TextFields] Feature branch merge: Clarity, Safety, Docs, Comments, Formatting (#2634)
* [TextFields] Full width changes. (#2590)

* [TextFields] Propagating changes to themers. (#2585)

* [TextFields] Propagating changes to themers.

* [TextFields] Updates to themer examples.

* [TextFields] Base controller class files (#2582)

* [TextFields] New Base class files.

* [TextFields] Naming corrections.

* [TextFields] Formatting.

* [TextFields] Replacing -Default with -Underline (#2583)

* [TextFields] Adding underline controller.

* [TextFields] Changes to umbrella import file and removing default controllers.

* [TextFields] Renaming one file.

* [TextFields] Updated controller headers. (#2584)

* [TextFields] Updating examples. (#2586)

* [TextFields] Running clang-format on the elements. (#2587)

* [TextFields] Running format on the element itself.

* [TextFields] Minor formatting.

* [TextFields] Updating tests and formatting. (#2588)

* [TextFields] Filled controller changes. (#2589)

* [TextFields] Legacy controller comments, naming, and formatting. (#2591)

* [TextFields] Legacy controller comments, naming, and formatting.

* [TextFields] Adding safety to legacy default init.

* [TextFields] Adding safety to Legacy Default init.

* [TextFields] Formatting Legacy Default.

* [TextFields] Formatting Legacy Full Width.

* [TextFields] Text area comments, updated super, naming, formatting. (#2593)

* [TextFields] Text area updates.

* [TextFields] Clarifying comment.

* [TextFields] Outline changes and formatting. (#2592)

* [TextFields] Updates to styling doc. (#2594)

* [TextFields] Updates to styling doc.

* [TextFields] Updating doc.

* [TextFields] Full width comments, safety, formatting, and underline support. (#2633)

* [TextFields] Adding safety to full width.

* [TextFields] Formatting Full Width.

* [TextFields] PR feedback.

* [TextFields] Safety in init of Base (#2632)

* [TextFields] Adding safety to base init.

* [TextFields] Formatting Base.

* [TextFields] Updates to controller header. (#2636)

* [TextFields] Updates to controller header.

* [TextFields] Updating misleading comments.

* [TextFields] Supplemental file name changes. (#2635)
2017-12-12 11:07:48 -05:00
Will Larche
e13fa143a5
[TextFields] Fix multiline placeholder position and transform bug. PR #2 (#2360)
* [TextFields] Adding a multiline message to the example.

* [TextFields] Moving a method to a better place.

* [TextFields] Fixes multiline having set text.

* [TextFields] Adding new line to multi-line examples.

* [TextFields] Floating placeholder comments, organization and bug fix.

* [TextFields] Formatting.

* [TextFields] Adding back in the work I had lost.

* [TextFields] Adding some Xcode 8 support.
2017-11-07 11:52:58 -05:00
Martin Petrov
f98a9d42ed @objc annoaing catalog by convention (#2305) 2017-10-30 10:24:17 -04:00
Will Larche
75cf565fea [TextFields] Fix text fields overlapping labels (#2163)
* [TextFields] Removes ambiguous layout.

* [TextFields] Better code organization and comment.

* [TextFields] Adding a filled in field to the examples.

* [TextFields] Correcting placeholder not rising when text is set programatically. Also better naming.

* [TextFields] Giving examples of each floating style a set .text.

* [TextFields] Adding placeholder float test.
2017-10-12 23:25:50 -04:00
Will Larche
5dae93c6c4 [TextFields] Adding .placeholderText to controllers (#2149)
* [TextFields] Adding .placeholderText to fix bugs and continue moving API to controller.

* [TextFields] PR feedback.

* [TextFields] Removes ambiguous layout.

* [TextFields] Better code organization and comment.
2017-10-12 09:16:07 -04:00
Will Larche
b438856be2 [TextFields] Examples bug and formatting (#2137)
* [TextFields] Formatting correction.

* [TextFields] Example bug.
2017-10-09 21:54:41 -04:00
Will Larche
90e79dd815 [TextFields] iOS 11 example bugs fixed (#2071)
* [TextFields] Example fix for iOS 11.

* [TextFields] iOS 11 bugs fixed.

* [TextFields] Formatting

* [TextFields] Xcode 8 support

* [TextFields] Example layout correction.

* [TextFields] Xcode and iOS safety code.

* [TextFields] typo corrections.

* [TextFields] Code for Xcode conditional.

* [TextFields] Xcode 8 support.

* [TextFields] Pleasing the static analyzer.

* [TextFields] Formatting improvement.

* [TextFields] Swift compiler conditional change and some formatting.

* [TextFields] Swift example notification changes.

* [TextFields] Safer notifcations code in Objc.

* [TextFields] Formatting
2017-10-02 20:30:17 -04:00
Will Larche
cde864f235 [TextFields] Renaming classes to match the MD spec (#2061)
* [TextFields] Renaming classes to match the spec.

* [TextFields] Renaming examples.
2017-09-27 22:10:47 -04:00
Will Larche
0d227f3211 [TextFields] Adding helper text to examples. (#1994)
* [TextFields] Outline example helper text.

* [TextFields] Adding helper text to more examples.

* [TextFields] Correcting helper text in example.
2017-09-18 10:32:46 -04:00
ianegordon
5a83898f06 [Textfields] Remove unused option (#1926) 2017-08-28 16:55:00 -04:00
Will Larche
af58c018d9 [TextFields] Outlined fields (#1914)
* [TextFields] Beginning floating bordered.

* [TextField] Floating bordered work.

* [TextFields] Floating bordered up and running.

* [TextFields] Renaming floating bordered to stroked.

* [TextFields] Correcting typo.

* [TextFields] Renamed stroked again.

* [TextFields] Exposing floating placeholder destination.

* [TextFields] Renamed stroked AGAIN!

* [TextFields] Continuing renaming.

* [TextFields] Removing unused method.

* [TextFields] Making the background of the sample for outlined white.

* [TextFields] Outlined work.

* [TextFields] Corrected outline layout.
2017-08-26 14:43:36 -04:00