Since setting the assistive label text causes the text area's size to change, we should call the -[MDCBaseTextAreaDelegate baseTextArea:shouldChangeSize:] method when it happens.
PiperOrigin-RevId: 341068027
This change makes it so that clients will not have to explicitly trigger a layout pass and resize text fields or text areas when they set assistive label text in Auto Layout.
For Manual Layout, they will not have to trigger a layout pass, but they will still have to resize the view.
PiperOrigin-RevId: 324873963
As I've gone through and replaced all the READMEs I haven't always been good at deleting the markdown files that were stitched together to make the old READMEs. This PR removes all the ones I forgot to remove. All the relevant material in these files is already in the new READMEs, so we're not losing anything by doing this.
Closes https://github.com/material-components/material-components-ios/pull/10029
COPYBARA_INTEGRATE_REVIEW=https://github.com/material-components/material-components-ios/pull/10029 from andrewoverton:delete-unused-docs 65ea55253af300ea7a4c13ea4ce14976097a6253
PiperOrigin-RevId: 318079032
This CL adds two new properties, leadingEdgePaddingOverride and trailingEdgePaddingOverride, to MDCBaseTextField and MDCBaseTextArea. When these properties are set, they will be used as padding values by the text field. When they are not set, the text field will use default values. I decided to make these properties NSNumbers, so there is a distinction between setting them to a @0 and leaving them as nil. This is where optionals would come in handy...
Things to come in upcoming CLs:
* Snapshot tests for text areas
* Will rename MDCTextControlVerticalPositioningReference to MDCTextControlVerticalPositioning, for consistency with its horizontal equivalent
PiperOrigin-RevId: 317349272
This change introduces a new private protocol, MDCTextControlTextField, which inherits from MDCTextControl. This protocol adds one property, of a new enum, MDCTextControlTextFieldSideViewVerticalPosition. This type helps MDCBaseTextFieldLayout determine how to vertically position side views. The purpose is to allow MDCUnderlinedTextField to vertically align its side views with the text rect, as opposed to vertically centering them in the container, like the filled and outlined styles do. I'm not sure about the name `MDCTextControlTextFieldSideViewVerticalPosition`, but other ones I considered that were maybe more clear were too ridiculously long.
PiperOrigin-RevId: 316028095
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
No visible or public API changes. Internal refactor.
This change adds the notion of a horizontal positioning reference. This will make it so that different styles can have different horizontal padding values.
Prior to this change, there was only one "horizontal padding" value. This change separates it into two values: one for the padding between leftmost and rightmost views and the left and right edges of the TextControl, and one for the padding between subviews of the TextControl. These two values live on a horizontal positioning reference object. Different styles will one day have different horizontal positioning reference objects.
For now only TextControl text fields will use this.
It's a lot of files but trivial changes in most, if not all, of them.
PiperOrigin-RevId: 314748534
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
This PR adds the TextControl filled text areas, as well as their theming extensions, and a bunch of unit tests. Snapshot tests to follow.
Related to #9407.
This PR adds the TextControl outlined text areas, as well as their theming extensions, and a bunch of unit tests. Snapshot tests to follow.
Related to #9407.
This follow up PR for #9731 includes the following:
* MDCTextControlLabelState has been renamed to MDCTextControlLabelPosition
* Identical methods in MDCTextField and MDCBaseArea have been consolidated as C functions in shared locations.
* A few methods have been renamed.
* A few pragma marks have been renamed.
Related to #9407.