12 Commits

Author SHA1 Message Date
Jeff Verkoeyen
96cfc7e331 Internal change
PiperOrigin-RevId: 394241967
2021-09-01 08:56:53 -07:00
Jeff Verkoeyen
2a8a6ac1c9 Optimizing imports
PiperOrigin-RevId: 357185734
2021-02-12 07:31:35 -08:00
featherless
a0dd0a34b3
[Chips] Give the ChipsSizing example's sliders a11y labels and values. (#8942)
Stacked on https://github.com/material-components/material-components-ios/pull/8940

Part of https://github.com/material-components/material-components-ios/issues/8868
2019-11-15 15:28:42 -05:00
featherless
e9e913b4dd
[Chips] Fix layout of ChipsSizingExampleViewController. (#8940)
Part of https://github.com/material-components/material-components-ios/issues/8868

| Before | After |
|:--|:--|
| ![Simulator Screen Shot - iPhone Xʀ - 2019-11-15 at 12 20 17](https://user-images.githubusercontent.com/45670/68962319-4c095d80-07a2-11ea-861c-04244f213da1.png) | ![Simulator Screen Shot - iPhone Xʀ - 2019-11-15 at 12 19 39](https://user-images.githubusercontent.com/45670/68962302-40b63200-07a2-11ea-918e-b62c151a176d.png) |
2019-11-15 14:19:33 -05:00
featherless
588024d04f [Chips] Fold supplemental code into the examples. (#8587)
Also aligned the examples to consistently make use of properties instead of ivars.

ivar -> property replacement done using the following regexp:

- Find: `_(\w+)`
- Replace: `self.$1`

Cleaned up the following examples:

- ChipsActionExampleViewController
- ChipsChoiceExampleViewController
- ChipsCustomizedExampleViewController
- ChipsInputExampleViewController
- ChipsSizingExampleViewController
- ChipsShapingExampleViewController

Polish as part of https://github.com/material-components/material-components-ios/issues/8459
2019-10-15 22:02:52 -04:00
featherless
ecba8c89d6
[Chips] Move all example assets to a supplemental file. (#8577)
This reduces method duplication complexity across all of the examples. It also removes a layer of indirection between the examples and the assets.

Polish for https://github.com/material-components/material-components-ios/issues/8459
2019-10-14 09:26:04 -04:00
Andrew Overton
0626ccff89
[Chips] Update chips examples to use container schemes (#6477)
This PR adds a container scheme property to the chips examples that didn't have them.
It also uses the theming extension to theme chips that weren't already being themed with it.

Closes #6439.
2019-01-30 11:36:45 -05:00
Robert Moore
800188a649
{clang-format} Format the components. (#6347)
This is a follow-up to https://github.com/material-components/material-components-ios/pull/6027

```
find components \( -name "*.h" -or -name "*.m" \) | xargs clang-format -i
```
2019-01-23 11:08:43 -05:00
Cody Weaver
12b841aff6
[Chips] Add example to BUILD file (#6273)
Closes #6218
2019-01-11 15:03:14 -05:00
featherless
2181084272
[automated] Standardize our open source license stanza to what Xcode generates. (#4985)
Removes the need to copy-paste stanzas from other files anymore as we'll rely on #4478 to generate the correct stanza for us instead.

This was an automated change generated by running a find-and-replace regular expression:

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at

 http://www\.apache\.org/licenses/LICENSE-2\.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
/\*
Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.

Licensed under the Apache License, Version 2\.0 \(the "License"\);
you may not use this file except in compliance with the License\.
You may obtain a copy of the License at

http://www\.apache\.org/licenses/LICENSE-2\.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
See the License for the specific language governing permissions and
limitations under the License\.
\*/
```

```
/\*
 Copyright ([0-9]+)-present the Material Components for iOS authors\. All Rights Reserved\.
 Licensed under the Apache License, Version 2\.0 \(the "License"\);
 you may not use this file except in compliance with the License\.
 You may obtain a copy of the License at
 http://www\.apache\.org/licenses/LICENSE-2\.0
 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.
 See the License for the specific language governing permissions and
 limitations under the License\.
 \*/
```

```
// Copyright $1-present the Material Components for iOS authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
```
2018-08-31 12:13:07 -04:00
compositeprimes
d8a1dfc919 Adds support for reading contentHorizontalAlignment in MDCChipView. The only supported values so far are Fill (the default now) and Center (the new value). (#4369)
The only supported values so far are Fill (the default now) and Center (the new value).

Also adds an example to the MDCDragon app:
![screen shot 2018-06-05 at 2 03 17 pm](https://user-images.githubusercontent.com/217786/41002659-3aac0714-68c9-11e8-947e-c35641f0a82b.png)


Closes #4277
2018-06-11 08:46:29 -04:00
Sam Morrison
7c8131b672 [Chips] Chip component (#2389)
* [Chips] Chip component

* Update description

* Readme fixes

* NSMutableArray -> NSArray

* Use MDCSlider

* Chips examples CBC

* MDCChipCollectionViewCell.m

* Sanitize example

* Left align single-item rows

* Copy

* Check mark

* Use static inline instead of #define

* initWithFrame:CGRectZero

* encoding decoding

* GGRectGetMinX

* If no title color has been set for a given state...

* Use new icons

* rm init override

* alwaysAnimateCellResize -> alwaysAnimateResize

* MDCChipCollectionViewCell initWithCoder

* Fix MDCChipView encoding

* Fix indent

* Fix sizing images

* Use UIEdgeInsetsInsetRect

* Layout around hidden accessory view

* TODO Pull background color from MDCPalette

* Add The chip uses this property to determine intrinsicContentSize and sizeThatFits.

* Use static functions instead of UIColor extension

* sizeToFit -> setNeedsLayout
2017-11-15 08:29:10 -05:00