19 Commits

Author SHA1 Message Date
Galia Kaufman
424a02538b
[TextFields] Fix Filled text field rounded bottom corners (#7006)
Fixing bottom corner radius of filled textfield, so it aligns with the textfield's bottom underline.
2019-04-02 16:08:23 -04: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
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
Michelle Dudley
528f46323f [TextFields] Migrate textInputClearButtonTintColor to MDCTextInputController, tests (#4465)
Adding support for theming the clear button tint color in MDCTextInputController. Allows for theming the clear button tint color in legacy, full-width, and underline text fields.

Closes #4453.
2018-07-06 12:09:49 -04:00
Robert Moore
8835a412a2
[TextFields] Support clear button tint color (#4449)
Adding support to change the clearButton's tintColor from the TextInputController. This allows more consistent theming across controllers.

Closes #4447 

## Filled

**Before**
![screen shot 2018-06-29 at 12 23 12 pm](https://user-images.githubusercontent.com/1753199/42103490-427a1e96-7b97-11e8-9410-9d20f5ff6d32.png)


**After**
![screen shot 2018-06-29 at 12 21 51 pm](https://user-images.githubusercontent.com/1753199/42103502-4b1d8c22-7b97-11e8-85be-3997d0e3dee4.png)


## Outlined

**Before**
![screen shot 2018-06-29 at 12 23 01 pm](https://user-images.githubusercontent.com/1753199/42103497-45b2fca4-7b97-11e8-82df-3a01bc3e8240.png)

**After**
![screen shot 2018-06-29 at 12 21 36 pm](https://user-images.githubusercontent.com/1753199/42103498-48b22010-7b97-11e8-8c8e-004cb35d3b6a.png)
2018-06-29 15:44:09 -04:00
Will Larche
128bd79416
[TextFields] Unit tests for more classes of controller (#3436)
* [TextFields] Correcting spelling error.

* [TextFields] Adding tests for filled and outlined text fields.

* [TextFields] Guaranteed variety in the text field unit tests.
2018-04-20 17:34:23 -04:00
Will Larche
b49156ad4d
[TextFields] Adding a floating placeholder active color override. (#3433) 2018-04-20 15:56:41 -04:00
Robert Moore
72283d6b4b
Fixing static analyzer warnings from Xcode 9.3 (#3196)
We had a few static analyzer warnings. Mostly about converting NSNumbers into
primitive BOOL values. A few others regarding nullability problems.
2018-03-30 14:31:22 -04:00
Yarden Eitan
f91317ff04 [MDCTextFields + Kokoro] Making textfields dynamic type off by default (#3149)
* Revert "[TextFields] Adding font themer (#3096)"

This reverts commit 91a376ffe1330c6c96344259d36c837c88188db3.

* made MDCTextFields not have dynamic type turned on by default
2018-03-27 13:28:53 -04: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
f247bae8ba [TextFields] Better custom fonts (#2056)
* [TextFields] Beginning to update label fonts API.

* [TextFields] Default text input controller has font defaults.

* [TextFields] Correcting types.

* [TextFields] More implementation of custom fonts.

* [TextFields] Type correction.

* [TextFields] Adding unit tests for custom fonts.

* [TextFields] Implementing new API.
2017-09-27 16:27:32 -04:00
Will Larche
c70d720e9b [TextFields] Fix for placeholders being colored active when isEditing = NO (#1963)
* [TextFields] Making the floating color parameter only affect the non-active state.

* [TextFields] Correcting comment.

* [TextFields] Removing logging.
2017-09-11 15:45:54 -04:00
Will Larche
c3ed6be9d1 [TextFields] New styles: updated default, box, area (#1908)
* [TextFields] New style's API. (#1812)

* [TextFields] New style's API.

* [TextFields] PR feedback.

* [TextFields] Subclassing header.

* [TextFields] Spelling correction.

* [TextFields] Minor correction to API.

* [TextFields] Naming correction.

* [TextFields] Comment update.

* [TextFields] API correction for style.

* [TextFields] Input changes for new styles. (#1814)

* [TextFields] Input changes for new styles.

* [TextFields] PR feedback.

* [TextFields] Removing typo.

* [TextFields] Input changes for new styles. (#1814)

* [TextFields] Input changes for new styles.

* [TextFields] PR feedback.

* [TextFields] Removing typo.

* [TextFields] New default input controller. (#1816)

* [TextField] New default input controller.

* [TextFields] Properties corrections.

* [TextFields] Removing extra logic.

* [TextFields] Code organization.

* [TextFields] Default controller corrections.

* [TextFields] Updating minor full width issues to match other controllers.

* [TextFields] Correcting typos.

* [TextFields] Renaming legacy tests and examples. (#1817)

* [TextFields] Renaming legacy tests and examples. (#1817)

* [TextFields] New text field box style. (#1818)

* [TextFields] New text field box style.

* [TextFields] Formatting issues.

* [TextFields] Updated and new examples for new styles. (#1822)

* [TextFields] Updating tests for new styles and functionality. (#1820)

* [TextFields] Updating tests for new styles and functionality. (#1820)

* [TextFields] New text area style. (#1819)

* [TextFields] New text area style.

* [TextFields] Adding assert for text area init.

* [TextField] Text area corrections.

* [TextFields] Formatting.

* [TextFields] Type safety.

* [TextFields] Legacy full width controller and example (#1855)

* [TextFields] Legacy full width example.

* [TextFields] Legacy full width.

* [TextFields] Adding legacy full width to text fields import file.

* [TextFields] Adding border view. (#1813)

* [TextFields] Adding border view.

* [TextFields] Making Xcode call out missing cases in the future.

* [TextFields] NSCopying style fix.

* [TextFields] Border view.

* [TextFields] Renaming old default to legacy default. (#1815)

* [TextFields] Renaming old default to legacy default.

* [TextFields] Correcting synthesizing of properties.

* [TextFields] Moving some code so it doesn't stick out.

* [TextFields] Correcting new that should be alloc init.

* [TextFields] Removing unneeded logic.

* [TextFields] Supporting old clear button.

* [TextFields] Rounding out main header with all new files (#1863)

* [TextFields] Forgotten imports.

* [TextFields] Correcting alphabetizing.

* [TextFields] Typo correction. (#1864)

* [TextFields] Clear button tint and tests. (#1861)

* [TextFields] Spelling correction. (#1870)

* [TextFields] Naming lost in rebase 'roundedCorners' (#1871)

* [TextFields] Rounded corners work.

* [TextFields] Updating rounded corners rename.

* [TextFields] Correcting naming typo. (#1872)

* [TextFields] Removing MDCTextInputControllerLegacyDefault from IB example. (#1869)

* [TextFields] Removing MDCTextInputControllerLegacyDefault from IB example. (#1869)

* [TextFields] Using class properties by dot syntax.

* [TextFields] Using class properties by dot syntax.

* [TextFields] Class properties access via dot syntax.

* [TextFields] Cleaning up properties.

* [TextFields] Updating legacy full width controller to support new properties.

* [TextFields] Re-adding a file with no history.

* [TextFields] Rebase.

* [TextFields] Art merge correction.

* [TextFields] Minor merge corrections.

* [TextFields] Corrections and additions to kitchen sink (#1899)

* [TextFields] Kitchen sync updates.

* [TextFields] Adding area to kitchen sink.

* [TextFields] Reversing addSubview and tamic off.

* [TextFields] Example updates due to text inset changes. (#1901)

* [TextFields] Adding text insets mode to kitchen sync example.

* [TextFields] Minor example corrections.

* [TextFields] Example updates.

* [TextFields] Adding area to kitchen sink.

* [TextFields] Correcting an example.

* [TextFields] Adding char max to area.

* [TextFields] Reversing addSubview and tamic off.

* [TextFields] Updating controllers for new text inset logic (#1902)

* [TextFields] Lining up some comments better.

* [TextField] Simplifying text inset math.

* [TextFields] Layout logic revamped in controllers.

* [TextFields] Box fix!

* [TextFields] PR feedback.

* [TextFields] Changing insets to react to new property (#1900)

* [TextFields] Creating MDCTextInputAlignmentRectMode.

* [TextFields] Correcting MDCTextInputAlignmentRectMode API.

* [TextFields] AlignmentRectMode implementation.

* [TextFields] Tests for alignment rect.

* [TextFields] MDCTextInputFundamentTextInsetsMode replacing alignment rect mode.

* [TextFields] Text insets mode boiler plate.

* [TextFields] Adding text insets mode to kitchen sync example.

* Revert "[TextFields] Adding text insets mode to kitchen sync example."

This reverts commit 2d4a3ea302d36fc2f79998456e0fcf009ba020d1.

* [TextFields] Moving text insets logic into fundament and updating it to use the new modes.

* [TextFields] Basic text insets affected by text insets mode.

* [TextFields] Improving the line height estimation. (#1905)

* [TextFields] Box style clear button Y fix (#1906)

* [TextFields] Moving clear button const.

* [TextFields] Box clear button polish.

* [TextFields] Autolayout clarity.

* [TextFields] Formatting. (#1907)

* [TextFields] Fixing copyright stanzas.

* [TextFields] One more copyright stanza correction.

* [TextFields] PR feedback.
2017-08-26 08:04:30 -04:00
Will Larche
3bd23322ad [TextFields] Renaming text field controllers to have 'Legacy' (#1876)
* [TextFields] Renaming text field controllers to have 'Legacy'. Also the consequences.

* [TextFields] Reverting a couple naming changes.
2017-08-22 16:48:34 -04:00
Will Larche
1dcbaeed6b [TextFields] New controller api for leading and trailing colors. (#1846)
* [TextFields] New controller api for leading and trailing colors.

* [TextFields] Added comments on clear coloring in full width.

* [TextFields] Text input controller defaults to dot syntax for class properties.
2017-08-18 20:18:03 -04:00
Will Larche
7830d7eb29 [TextFields] Making a disabled color property on controllers (#1776)
* [TextFields] Tightening up underline.

* [TextFields] Additional tests.

* [TextFields] Comment.

* [TextFields] Disabled color test.
2017-08-10 20:10:43 -04:00
Will Larche
d42f2c7713 [TextFields] Renaming and cleaning up propertys. (#1767)
* [TextFields] Deleting unused underline key.

* [TextFields] Renaming propertys.
2017-08-10 16:53:43 -04:00
Will Larche
7a1ad7b4c4 [TextFields] Correcting active color. (#1640) 2017-07-13 11:04:57 -04:00
Will Larche
36ef081eea [TextFields] Appearance defaults (#1620)
* [TextFields] UIAppearance substitute: class properties.

* [TextFields] Formatting.

* [TextFields] Minor correction to class properties.

* [TextFields] Correcting mistakenly deleted usage of default.

* [TextFields] Correcting defaults.

* [TextFields] Correcting test class.

* [TextFields] Adding tear downs to reset the class properties.

* [TextFields] Corrections to tests.

* [TextFields] Removing Swift 4 syntax.

* [TextFields] Formatting.

* [TextFields] Formatting.

* [TextFields] Correcting property attribute.

* [TextFields] Formatting.

* [TextFields] null_resettable that was missing.

* [TextFields] Better documentation for defaults.

* [TextFields] Documentation improvements.

* [TextFields] Corrections to floating placeholder scale.
2017-07-12 17:31:18 -04:00