This commit adds the ripple maximum radius API to match the inkMaxRippleRadius API that are soon to be deprecated. This also moves those APIs to a "ToBeDeprecated" category. In this commit I set an ivar instead of having pass through properties because in a follow up I think it would be a good optimization to have the ripple be lazy until a user interacts with the button. This will lower initialization time and make the setters potentially faster. Since we don't have pass through properties I defaulted it to 0 to match the legacy API from `MDCStatefulRippleView` to match here.
PiperOrigin-RevId: 323011293
This commit adds the ripple color and ripple style APIs to match the inkColor and inkStyle APIs that are soon to be deprecated. This also moves those APIs to a "ToBeDeprecated" category. In this commit I set an ivar instead of having pass through properties because in a follow up I think it would be a good optimization to have the ripple be lazy until a user interacts with the button. This will lower initialization time and make the setters potentially faster. Since we don't have pass through properties I mirrored the default rippleColor from `MDCStatefulRippleView` to match here.
PiperOrigin-RevId: 322585578
Currently we make the ripple the entire size of the button. This limits clients being able to customize if the ripple is inset or outset on a particular side of the button. Since MDCFloatingButton sets its contentEdgeInsets this API is needed to allow for the two values to be independent.
https://developer.apple.com/documentation/uikit/uibutton/1624036-contentedgeinsets
PiperOrigin-RevId: 322199718
Like the MDCButton, this is opt-in, and the dictionary for the visibleAreaInsets per mode/shape combination is initially empty.
PiperOrigin-RevId: 315152916
This API allows clients to inset the visible content and allow it to be smaller than the frame.
In turn, clients can have a touch target that is bigger than the visible content.
PiperOrigin-RevId: 313556504
Note: MDCButton does not enable pointer interactivity by default.
This also adds an example to demonstrate MDCButtons with the default UIPointerInteraction enabled. The example exposes an issue with MDCFloatButton's collapse/expand animations (b/153666859), which will be addressed in a future CL.
PiperOrigin-RevId: 305872547
This snapshot test demonstrates the incorrect behavior of the title label being visible while the button is in normal mode.
PiperOrigin-RevId: 305668064
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
Introduces a new API to disable the `titleFont:forState:` APIs. This is the
first step toward removing those APIs.
State-based fonts make it impossible to support UIContentSizeCategoryAdjusting
behavior on the button's `titleLabel`. Providing support for automatic font
resizing for Dynamic Type means removing state-based font APIs.
Part of #8595
As part of our work of adding traitCollectionDidChangeBlocks to components, we add self as a parameter to the block, buttons is the only component that seems to be missing it.
This is essentially a breaking change based on our breaking changes conventions.
Updates the BUILD file to use more Starlark macros. This makes it easier to
perform releases. Also fixes a test import so `includes` amendments aren't
required.
Part of #8150
All components should have a top-level umbrella header for their includes.
This allows easier refactoring of classes and files within the component.
Creating an umbrella for Color and using it outside the component.
Part of #8086