11 Commits

Author SHA1 Message Date
Andrew Overton
3e5edeccec
[TextControls] Add text area example (#9772)
This PR adds a text area example. I may refine some layout stuff before I start migrating people to use it. Gradient/top and bottom padding specifically.

Here's a gif:
![text_area_example](https://user-images.githubusercontent.com/8020010/74979556-d7773800-53fc-11ea-8508-cf5458bfe3d9.gif)

Closes #9407.
2020-02-21 11:17:37 -05:00
Andrew Overton
083cf8c12f
[TextControls] Restructure Cocoapods and Blaze targets (#9430)
## UPDATED PR DESCRIPTION:

**NOTE: [cl/290296411](http://cl/290296411) must be patched into whatever release includes this PR.**

There were requests to break it up further. With the latest changes, it will look like this in the future:

//components/TextControls:Shared # shared public types
//components/TextControls:BaseTextFields
//components/TextControls:FilledTextFields
//components/TextControls:FilledTextFieldsTheming
//components/TextControls:OutlinedTextFields
//components/TextControls:OutlinedTextFieldsTheming
//components/TextControls:BaseTextAreas
//components/TextControls:FilledTextAreas
//components/TextControls:FilledTextAreasTheming
//components/TextControls:OutlinedTextAreas
//components/TextControls:OutlinedTextAreasTheming
//components/TextControls:FilledInputChipView
//components/TextControls:FilledInputChipViewTheming
//components/TextControls:OutlinedInputChipView
//components/TextControls:OutlinedInputChipViewTheming
//components/private/TextControlsPrivate: Shared # shared private types
//components/private/TextControlsPrivate:OutlinedStyle
//components/private/TextControlsPrivate:FilledStyle

This would make it easier to sunset/retire a specific style of a specific text control type, for example.

## ORIGINAL PR DESCRIPTION:

This PR is an attempt to satisfy the recent requests to break up the Cocoapods subspecs and Bazel targets for TextControls.

~**NOTE: [cl/289710430](http://cl/289710430) must be patched into whatever release includes this PR.**~

**ANOTHER NOTE: This PR will break any third party people who depend on TextControls via Cocoapods and have not pinned to a specific version of our library.**

This PR takes the following Cocoapods subspecs:
TextControls
TextControls+Theming

And breaks them up into these ones:
TextControls
TextControls+TextFields
TextControls+TextFieldsTheming
private/TextControlsPrivate

Similarly, it takes the following bazel targets:
//components/TextControls
//components/TextControls:Theming

And breaks them up into these ones:
//components/TextControls
//components/TextControls:TextFields
//components/TextControls:TextFieldsTheming
//components/private/TextControlsPrivate

Where before a third party client would have had the following in their Podfile:
`pod 'MaterialComponents/TextControls'`
They would now have:
`pod 'MaterialComponents/TextControls+TextFields'`

When I started this work I originally planned to have there be top level components for each of the TextControls that all depended on a shared private component. However, I quickly remembered that all the text controls shared some public types too. At some point I decided it make make sense to make use of extensions.

In order to satisfy pod lib lint I had to add some dummy source files and dummy test files. The dummy test files could potentially have some stuff in there if we want to validate the enums they refer to somehow...

Closes #9405.
2020-01-17 15:21:08 -05:00
Wenyu Zhang
ab901f7654
Revert "[ColorScheme] deprecate init method and update documentation to reflect its purpose. (#9391)" (#9396)
This reverts commit 5fc6ec2f96e69f1e4c579ca69344557ad83329f2.
2020-01-09 13:54:20 -05:00
Wenyu Zhang
5fc6ec2f96
[ColorScheme] deprecate init method and update documentation to reflect its purpose. (#9391)
closes https://github.com/material-components/material-components-ios/issues/9390
2020-01-08 18:07:01 -05:00
Andrew Overton
dc10fe2d0d
[TextControls] Refactor text control examples (#9358)
This is an attempt at taking the existing text controls example and making it A) abstract, so that similar example can be made for text areas and chip fields, and B) fit in a scrollview, so all of the example is accessible in large content size categories.

It's fully functional, but probably not done changing.

Closes #9359.

Here's a gif:

![example](https://user-images.githubusercontent.com/8020010/71596471-8ab66580-2b0d-11ea-81c5-e1a775d8db14.gif)
2020-01-02 09:58:42 -05:00
Andrew Overton
95889abf03
[TextControls] Add swift storyboard example (#9328)
This PR adds a Swift storyboard example for TextControls.

Here is a screenshot:

![Simulator Screen Shot - iPhone 7 - 2019-12-20 at 15 15 17](https://user-images.githubusercontent.com/8020010/71290693-7b316280-233e-11ea-9029-4097a4d12c46.png)

Closes #9328.
2019-12-27 12:48:00 -05:00
Andrew Overton
f3daf9b498
[TextControls] Add Outlined theming extension (#9002)
This PR adds the theming extension for MDCOutlinedTextField.

Here's a screenshot:

<img width="370" alt="Screen Shot 2019-11-20 at 12 09 06 PM" src="https://user-images.githubusercontent.com/8020010/69260871-91f16780-0b8e-11ea-8e65-b6b8a373cf89.png">

Closes #8682.
2019-11-20 16:16:21 -05:00
Andrew Overton
c806e4b9d0
[TextControls] Add MDCFilledTextField theming extension (#8993)
This PR adds the theming extension for MDCFilledTextField.

Here's a screenshot:

<img width="359" alt="Screen Shot 2019-11-19 at 9 54 59 AM" src="https://user-images.githubusercontent.com/8020010/69157248-b11ac700-0ab2-11ea-9acb-db06d96e94a3.png">


Related to #8682.
2019-11-20 11:32:58 -05:00
Andrew Overton
d93ddfbc1b
[TextControls] Add dynamic type functionality to text controls example (#8847)
This PR adds some dynamic type functionality to the text controls example.
Note that in the largest content sizes the content goes off the screen. This will be addressed in a follow up PR.
 
Here is a gif:

![DynamicType](https://user-images.githubusercontent.com/8020010/68900027-f92b9980-0700-11ea-958e-6965638bdbc5.gif)

Closes #8845.
2019-11-15 11:13:43 -05:00
Andrew Overton
9b9edf9f46
[TextControls] Use system dynamic colors for sensible defaults in iOS 13 (#8818)
MDCFilledTextField and MDCOutlinedTextField are completely unreadable (inaccessible) in iOS 13 dark mode when shown over the system background color. When using `borderStyle`, MDCBaseTextField is completely unreadable in iOS 13 dark mode when shown over _any_ color, because UITextField adds a system background color to the textfield's background. This PR addresses these issues. This PR doesn't affect pre-iOS 13 behavior.

Note that the system placeholder and clear button never pass contrast in dark mode. I know the system clear button doesn't even pass contrast in light mode.

Note that the below gifs are outdated. Here's what it looks like now in dark mode:

<img width="371" alt="Screen Shot 2019-11-14 at 11 40 07 AM" src="https://user-images.githubusercontent.com/8020010/68877158-9a036000-06d3-11ea-8cd2-902a1d2b0eb1.png">

Here's a before gif in iOS 13 dark mode:
![iOS13darkbefore](https://user-images.githubusercontent.com/8020010/68875587-15afdd80-06d1-11ea-8bee-b583a56e4537.gif)

Here's an after gif in iOS 13 light mode:
![iOS13light](https://user-images.githubusercontent.com/8020010/68875641-2c563480-06d1-11ea-8172-5743390bf839.gif)

Here's an after gif in iOS 13 dark mode:

![iOS13Dark](https://user-images.githubusercontent.com/8020010/68875625-282a1700-06d1-11ea-9f3d-2d56d068f3ed.gif)

Closes #8817.
2019-11-14 15:32:45 -05:00
Andrew Overton
02f9c9f01d
Move new TextFields into TextControls directory (#8726)
In this PR I extract the new TextFields from the old TextFields directory. In the future, if we bring over the input chip view and text area, they will go under this new TextControls directory as well.

Closes #8684.
2019-11-07 14:17:56 -05:00