9 Commits

Author SHA1 Message Date
Cody Weaver
3b3d288ea4
[TextFields] Add theming extension for underline controller (#9437)
In #9109  we removed the color themer for the underline controller. This change closes #9371  which will allow clients to theme their underline controller text fields via a theming extension. This change will theme both color and typography.

*Note* [Material](material.io) recommends using a [filled or outlined text field](https://material.io/components/text-fields/).

| Resting | Active |
| --- | --- |
|![Simulator Screen Shot - iPhone 8 Plus - 2020-01-16 at 13 13 28](https://user-images.githubusercontent.com/7131294/72563237-1811ed80-3862-11ea-8788-816c927f03e4.png)|![Simulator Screen Shot - iPhone 8 Plus - 2020-01-16 at 13 13 26](https://user-images.githubusercontent.com/7131294/72563252-1cd6a180-3862-11ea-97c9-6d7c82f6878d.png)|

Closes #9371 
Closes #9242
2020-01-16 14:20:09 -08:00
Robert Moore
0c317f190d
[TextFields] Fix examples layout (#7250)
Fixing the examples layout so the content doesn't overlap the App Bar.

|Before|After|
|---|---|
|![legacy-multi-before](https://user-images.githubusercontent.com/1753199/56600236-3ba35280-65c6-11e9-9276-52acb5cde63b.png)|![legacy-multi-after](https://user-images.githubusercontent.com/1753199/56600242-3f36d980-65c6-11e9-8faf-bc5255bf3bdb.png)|
|![outlined-before](https://user-images.githubusercontent.com/1753199/56600248-42ca6080-65c6-11e9-911f-2cd9828dfb62.png)|![outlined-after](https://user-images.githubusercontent.com/1753199/56600262-49f16e80-65c6-11e9-9775-95d452fec723.png)|
|![controller-styles-before](https://user-images.githubusercontent.com/1753199/56600269-4e1d8c00-65c6-11e9-9359-8e98f0e1cbc1.png)|![controller-styles-after](https://user-images.githubusercontent.com/1753199/56600290-57a6f400-65c6-11e9-9d8f-8f9ac2c243be.png)|

Preparation for #7157
2019-04-23 14:05:34 -04: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
Robert Moore
03f3351ad5
Global replace of single-precision floats with CGFloat casts. (#5718)
Replacing all non-integral, single-precision floating point literals with double-precision values explicitly cast to CGFloat.  For example, `0.1f` should become `(CGFloat)0.1`.

Regex used:
```
([0-9]*\.)([0-9]*?)([1-9]+)([0-9]*?)[fF]
```

PiperOrigin-RevId: 220683126
2018-11-12 10:50:01 -05:00
Robert Moore
74a27253e8
Global replace of integral single-precision literals with integer literals. (#5709)
Global replace of integral single-precision literals with integer literals.

Regular expression used:
```perl
/[^\w]([0-9]+)\.[0]*[fF]/$1/
```
2018-11-08 14:02:04 -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
featherless
bbe4a23fe0
Remove all __IPHONE_11_0 checks now that we no longer support Xcode 8. (#4915)
We can now make use of @available throughout our codebase.

We support Xcode 9 and up, which includes the iOS 11 SDK. This means we can remove any guards for SDKs prior to iOS 11.

This was cleaned up by running a global find-and-replace with the following regular expression:

```
Find:#if defined\(__IPHONE_11_0\) && \(__IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0\)\n(.+if \(@available\(iOS 11.0, \*\)\) \{(?:.|\n)*?)(?:#else(?:.|\n)*?)?\n#endif
Replace:$1
```

With some additional cleanup for stragglers that didn't match this pattern. Note that else clauses were intentionally dropped.

Closes https://github.com/material-components/material-components-ios/issues/4909
2018-08-28 09:57:30 -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
Will Larche
bc119b3b73 [TextFields] Example cleanup. (#4392)
* [TextFields] Example cleanup.

* [TextFields] Copy correction

* [TextFields] Example file rename.
2018-06-12 17:41:02 -04:00