Skip to content
This repository was archived by the owner on May 20, 2023. It is now read-only.

Commit 7430103

Browse files
committed
Prep for 0.9.0-beta+1 open source release
- Add Material Card styles. - Update dependencies and SDK constraints. - Deprecate of directives. PiperOrigin-RevId: 204833536
1 parent dceb366 commit 7430103

22 files changed

+2117
-4
lines changed

CHANGELOG.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,70 @@
1+
## 0.9.0-beta+1
2+
3+
> NOTE: This code is considered production quality, but depends on angular:
4+
> 5.0.0-beta+1 (5.0.0-beta+1 is used in production Google apps).
5+
6+
### Updated Dependencies
7+
* Bumped the lower bound of the SDK dependency and widened the upper bound to
8+
include the 2.0.0 stable release.
9+
* angular: 5.0.0-beta+1
10+
* angular_forms: 2.0.0-beta+1
11+
12+
### Add Material Card Styling
13+
Material Card is card styling provided by the Google material team also known as
14+
mdc-web. The styles included in this package are provided as a convenience to
15+
users in the Dart package ecosystem.
16+
17+
### Breaking Changes
18+
* `ActiveItemMixin` has been removed in favor of the new `ActiveItemDirective`.
19+
20+
### Component Updates
21+
22+
#### Material Date Range Picker
23+
* Add the 'popupClass' attribute to allow styling the popup.
24+
25+
#### Material Dropdown Select
26+
* Add back `keyboardOnlyFocusIndicator` to dropdown items.
27+
28+
#### Material Input
29+
* Return `null` when input is `"NaN"` or `null`.
30+
31+
#### Material Slider
32+
* Add touch controls.
33+
* Enable doubles for slider values.
34+
35+
#### Material Tree
36+
* Add `visibleChange` output stream to `MaterialTreeDropdownComponent`.
37+
38+
#### Material Toggle
39+
* Implement `ControlValueAccessor`.
40+
41+
#### Material Yes/No Buttons
42+
* Fix bug where text color was not applying to highlighted/raised yes button.
43+
* Fix no button to not override disabled text label color.
44+
45+
#### Reorder List
46+
* Add ability to specify a handle element in a complex component.
47+
48+
#### Scorecard
49+
* Add mixin for changing the display to flex.
50+
51+
### Other Updates
52+
#### Miscellaneous
53+
* Modify `TextHighlighter` to return separate results for adjacent matches,
54+
rather than concatenating them into a single result.
55+
* Migrate to using event tearoffs.
56+
* Deprecate convenience list for materialDirectives. It has been demonstrated
57+
that it's use increases code size when only some of the components are being
58+
used. It is preferable to use only the directives needed for your application
59+
for improved dart2js tree shaking.
60+
61+
#### Dart 2 Updates
62+
* Migrate from `Stream<Null>` to `Stream<void>`.
63+
64+
#### Documentation
65+
* General documentation cleanup for `@Input`s and `@Output`s. Improves
66+
documentation generated by the component gallery.
67+
168
## 0.9.0-beta
269

370
> NOTE: This code is considered production quality, but depends on angular:

lib/angular_components.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export 'theme/module.dart';
219219
export 'utils/async/async.dart';
220220

221221
/// A convenience list of all Directives exposed by this package.
222+
@Deprecated('Use the specific directives in your app for smaller code size.')
222223
const List<dynamic> materialDirectives = const [
223224
AutoDismissDirective,
224225
AutoFocusDirective,

lib/css/mdc_web/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
The files located here are provided and maintained by the Google material team
2+
also known as mdc-web. They are included here to make their use easier in
3+
AngularDart applications. They sourced from a larger larger set of styles
4+
available on
5+
[GitHub](https://github.com/material-components/material-components-web).
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
//
2+
// Copyright 2017 Google Inc. All Rights Reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
@import "./variables";
18+
19+
@function mdc-animation-enter($name, $duration, $delay: 0ms) {
20+
@return $name $duration $delay $mdc-animation-deceleration-curve-timing-function;
21+
}
22+
23+
@function mdc-animation-exit-permanent($name, $duration, $delay: 0ms) {
24+
@return $name $duration $delay $mdc-animation-acceleration-curve-timing-function;
25+
}
26+
27+
@function mdc-animation-exit-temporary($name, $duration, $delay: 0ms) {
28+
@return $name $duration $delay $mdc-animation-sharp-curve-timing-function;
29+
}
30+
31+
@function mdc-animation-standard($name, $duration, $delay: 0ms) {
32+
@return $name $duration $delay $mdc-animation-standard-curve-timing-function;
33+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// Copyright 2017 Google Inc. All Rights Reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
$mdc-animation-deceleration-curve-timing-function: cubic-bezier(0, 0, .2, 1) !default;
18+
$mdc-animation-standard-curve-timing-function: cubic-bezier(.4, 0, .2, 1) !default;
19+
$mdc-animation-acceleration-curve-timing-function: cubic-bezier(.4, 0, 1, 1) !default;
20+
$mdc-animation-sharp-curve-timing-function: cubic-bezier(.4, 0, .6, 1) !default;

lib/css/mdc_web/card/_mixins.scss

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
//
2+
// Copyright 2017 Google Inc. All Rights Reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
@import "../theme/mixins";
18+
@import "./variables";
19+
20+
//
21+
// Public
22+
//
23+
24+
@mixin mdc-card-fill-color($color) {
25+
@include mdc-theme-prop(background-color, $color);
26+
}
27+
28+
@mixin mdc-card-outline($color, $thickness: $mdc-card-outline-width) {
29+
border: $thickness solid mdc-theme-prop-value($color);
30+
}
31+
32+
@mixin mdc-card-corner-radius($radius) {
33+
border-radius: $radius;
34+
}
35+
36+
@mixin mdc-card-media-aspect-ratio($x, $y) {
37+
&::before {
38+
// This clever trick brought to you by: http://www.mademyday.de/css-height-equals-width-with-pure-css.html
39+
margin-top: percentage($y / $x);
40+
}
41+
}
42+
43+
//
44+
// Private
45+
//
46+
47+
@mixin mdc-card-container-layout_ {
48+
display: flex;
49+
flex-direction: column;
50+
box-sizing: border-box;
51+
}
52+
53+
@mixin mdc-card-actions-layout_($display: flex) {
54+
display: $display;
55+
flex-direction: row;
56+
align-items: center;
57+
box-sizing: border-box;
58+
}
59+
60+
@mixin mdc-card-media-aspect-ratio-base_ {
61+
&::before {
62+
display: block;
63+
content: "";
64+
}
65+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
//
2+
// Copyright 2018 Google Inc. All Rights Reserved.
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
//
16+
17+
@import "../theme/mixins";
18+
19+
$mdc-card-outline-color: mix(mdc-theme-prop-value(on-surface), mdc-theme-prop-value(surface), 12%);
20+
$mdc-card-outline-width: 1px;

0 commit comments

Comments
 (0)