7 Commits

Author SHA1 Message Date
Yarden Eitan
29d760c7d6
Added isPresentable to catalog files, ported over ZShadow to dragons. (#2726) 2017-12-15 12:20:35 -05:00
Randall Li
00611df7bd
[Buttons] Corrected imports in examples. (#2645)
* [Buttons] Corrected imports in examples.

PiperOrigin-RevId: 175377616

* added import UIKit
2017-12-08 11:40:03 -05:00
Randall Li
b1ec22207f
Fixed float conversion build errors (#2602)
* Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480

* More Fixed float conversion build errors
Implicit conversion loses floating-point precision: 'double' to 'CGFloat' (aka 'float')

Found by turning on warnings via: https://github.com/material-components/material-components-ios/pull/2480
2017-12-06 15:57:04 -05:00
Robert Moore
2d8333d7d8 [Buttons] Extended FAB (#2563)
* [Buttons] Remove .largeIcon shape from FloatingButton (#2513)

The LargeIcon shape is not required, since the same behavior (support
for 36-point images) can be achieved by setting the contentEdgeInsets to
.zero.

Also updates one of the button examples to use a 36-point icon.

* [Buttons] Add extended FAB layout code (#2528)

Creating (internal for now) the required properties and layout code to support
the extended FAB. Unit tests to confirm the behavior and some minor
adjustments to existing values like default contentEdgeInsets values.

Implements #2495

* [Buttons] Expose Extended FAB properties (#2543)

Making the new properties public and also migrating away from simple
property setters to the new forShape:inMode: setters required for
UIAppearance support.

* minimumSize
* maximumSize
* contentEdgeInsets
* hitAreaInsets

Implements #2495

* [Buttons] Add basic Floating Button example (#2554)

Includes automatic adjustment of extended/normal layout depending on size
classes.

Demonstrates #2495

* [Buttons] Update README for Extended FAB (#2561)

The README includes usage examples for the FAB. Adding a section to
demonstrate how to configure the FAB in its different shapes and modes.

Documents #2495
2017-12-04 12:55:55 -05:00
Robert Moore
8940d77d6d [Catalog] Verify all examples provide CatalogByConvention methods (#1911)
All examples now have at least the required `+catalogBreadcrumbs` and `+catalogIsPrimaryDemo`.  All examples in the same breadcrumbs path have only one primary demo.  There should be only one `-catalogDescription` attached to the primary demo.

Closes #1897
2017-08-31 08:46:10 -04:00
Robert Moore
cafcbe3544 [Buttons] Unbounded ink aligns to content insets (#1670)
* [Buttons] Unbounded ink aligns to content insets

Unbounded ink should be centered on the content of buttons, but bounded
ink should remain aligned with the bounds of the button.

* Changing Ink behavior for unbounded ink
* Modified Content Rect Insets example in the Catalog

Closes #1669

* Making example buttons have same width
2017-07-21 13:54:27 -04:00
Robert Moore
cc57a07918 [Buttons] Ink should ignore content edge insets (#1593)
The `contentEdgeInsets` value of an MDCButton causes the `_inkView` to
realign to match the `contentRect`.  This results in a ripple/highlight
that does not match the position of the button on-screen (doesn't align
with the background).

This commit removes the re-alignment code, so `_inkView` will remain
aligned with the rest of the button's view.
2017-06-30 15:01:40 -04:00