21 Commits

Author SHA1 Message Date
Janette James
b5bbb66b58 Delete UnderlinedTextFieldsTheming
PiperOrigin-RevId: 715118099
2025-01-13 14:58:30 -08:00
Janette James
43f701bd61 Delete FilledTextAreasTheming
PiperOrigin-RevId: 715100357
2025-01-13 14:04:54 -08:00
Wenyu Zhang
b457b13005 Internal change.
PiperOrigin-RevId: 417635153
2021-12-21 09:32:05 -08:00
Jeff Verkoeyen
08051b7bda Remove all pre-iOS 12 logic.
PiperOrigin-RevId: 400798440
2021-10-04 13:20:55 -07:00
Jeff Verkoeyen
b64b0ec231 Internal change
PiperOrigin-RevId: 360230236
2021-03-01 11:04:51 -08:00
Jeff Verkoeyen
25c9049d5a Optimizing imports
PiperOrigin-RevId: 356791916
2021-02-10 12:00:57 -08:00
Andrew Overton
a349540e26 [TextControls] Add text areas leading/trailing views
PiperOrigin-RevId: 344113091
2020-11-24 12:45:27 -08:00
Andrew Overton
b8d8690259 [TextControls] consider floating label min Y in - accessibilityPath
PiperOrigin-RevId: 337120665
2020-10-14 10:38:49 -07:00
Andrew Overton
9b6db6fb44 [TextControls] Add typical use example
PiperOrigin-RevId: 323996387
2020-07-30 07:17:01 -07:00
Andrew Overton
93fb883645 [TextControls] Add debug stuff to text controls examples
PiperOrigin-RevId: 322601224
2020-07-22 10:28:08 -07:00
Andrew Overton
9480bf4c88 [TextControls] Make text fields without floating labels shorter
PiperOrigin-RevId: 320432378
2020-07-09 11:06:27 -07:00
Andrew Overton
cfd9b3ff56 [TextControls] Make text areas shorter when there is no floating label
PiperOrigin-RevId: 319228270
2020-07-01 08:22:48 -07:00
Andrew Overton
55f0fead00 [TextControls] Add underlined text field
This CL adds an MDCUnderlinedTextField class and some snapshot tests. Upcoming CLs will make slight visual modifications that will be reflected in snapshot diffs.

PiperOrigin-RevId: 314993621
2020-06-05 14:12:50 -07:00
Dave MacLachlan
ebac2a8eb7 As of iOS 9/macOS 10.11 (circa 2015) removing objective C objects from the NSNotificationCenter in - (void)dealloc. is no longer required (the classic example is: [[NSNotificationCenter defaultCenter] removeObserver:self] but there are several variations).
In many cases this is the only thing being done in - (void)dealloc, so we can remove the whole thing.

PiperOrigin-RevId: 307663440
2020-04-21 13:00:30 -07:00
Andrew Overton
965cde39c8 This change finishes adding TextControls examples to the internal Catalog.
PiperOrigin-RevId: 305470131
2020-04-08 07:11:50 -07:00
Cody Weaver
fdf87c5995 [MDC/ColorScheme] Remove usage of init within MDC.
We recommend using `initWithDefaults` and we should follow the recommendation. This change removes all usage of `init` within MDC components in order to let us remove that initializer from the public surface.

PiperOrigin-RevId: 302958447
2020-03-25 13:36:51 -07:00
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