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

Commit f6af8a2

Browse files
authored
Update all components (#150)
* Material Dialog: Support a minimum height. * Material Input: Fix disabled color. * Material Popup: Additional merges to prepare for final refactoring. * Material Tree: Update positioning options and borders. * Deprecate LazyEventEmitter and migrate uses to the StreamController model. * Remove use of Compass in SASS files. * Remove unused alignment parameters. * Refactor Angular annotations to inline versions.
1 parent d1b50ef commit f6af8a2

File tree

91 files changed

+795
-1299
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

91 files changed

+795
-1299
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
## 0.6.0-beta
2+
3+
> NOTE: This code is considered production quality, but depends on angular:
4+
> 4.0.0-beta. The alpha tag represents the evolving nature of the AngularDart
5+
> api, not code quality (4.0.0-beta is used in production Google apps).
6+
7+
* Material Dialog: Support a minimum height.
8+
* Material Input: Fix disabled color.
9+
* Material Popup: Additional merges to prepare for final refactoring.
10+
* Material Tree: Update positioning options and borders.
11+
* Deprecate LazyEventEmitter and migrate uses to the StreamController model.
12+
* Remove use of Compass in SASS files.
13+
* Remove unused alignment parameters.
14+
* Refactor Angular annotations to inline versions.
15+
116
## 0.6.0-alpha+3
217

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

lib/src/components/app_layout/README.md

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ Here is an example:
7575

7676
There are three kinds of drawers that are available: _permanent_, _persistent_,
7777
and _temporary_. All drawers are instantiated by the `material-drawer` element.
78-
These drawers are implemented differently to provide the best performance
79-
for each. For the main content outside of the drawer wrap it in a
80-
`material-content` element, or a element with the class `material-content`.
78+
These drawers are implemented differently to provide the best performance for
79+
each. For the main content outside of the drawer wrap it in a `material-content`
80+
element, or a element with the class `material-content`.
8181

8282
### Permanent Drawers
8383

@@ -98,12 +98,13 @@ CSS. To have a permanent drawer add the `permanent` attribute to the
9898

9999
Persistent drawers are drawers which can be open and closed by an action, such
100100
as a button trigger. These drawers reposition the content to fit in with the
101-
flow of the drawer. To use a persistent drawer add the `persistent` attribute
102-
to the `material-drawer` element, and add the
103-
`MaterialPersistentDrawerDirective` to the parent's directives list.
101+
flow of the drawer. To use a persistent drawer add the `persistent` attribute to
102+
the `material-drawer` element, and add the `MaterialPersistentDrawerDirective`
103+
to the parent's directives list.
104104

105105
Lastly, connect the open/close drawer action to the drawer. This is most easily
106-
done using the [reference variable](https://webdev.dartlang.org/angular/guide/template-syntax#!#ref-vars)
106+
done using the [reference
107+
variable](https://webdev.dartlang.org/angular/guide/template-syntax#!#ref-vars)
107108
syntax. The persistent drawer directive exports itself as `drawer` this allows
108109
it to be used easily by other actions. `toggle()` can be used to open/close the
109110
drawer. The drawer supports the `deferredConent` directive allowing a developer
@@ -141,8 +142,8 @@ other drawers. To use a temporary drawer add the `temporary` attribute to the
141142
`material-drawer` element, and add `MaterialTemporaryDrawerComponent` to the
142143
parent's directive list.
143144

144-
The temporary drawer has an optional `overlay` attribute which can be used
145-
to show a transparent overlay above non-drawer content while the drawer is open.
145+
The temporary drawer has an optional `overlay` attribute which can be used to
146+
show a transparent overlay above non-drawer content while the drawer is open.
146147

147148
Here is an example:
148149

@@ -183,10 +184,10 @@ Example:
183184

184185
### App Bar and Drawer interaction
185186

186-
The app bar and the drawer work in tandem to provide an overal app layout for
187-
an application. The app bar can live both inside, or outside of
188-
`material-content`. If it is inside of `material-content` it will live with the
189-
content and if applicable be repositioned with the content. If it is on top of
187+
The app bar and the drawer work in tandem to provide an overal app layout for an
188+
application. The app bar can live both inside, or outside of `material-content`.
189+
If it is inside of `material-content` it will live with the content and if
190+
applicable be repositioned with the content. If it is on top of
190191
`material-content` the drawer and content will be positioned below the app bar
191192
for the `permanent` and `persistent` drawers.
192193

lib/src/components/app_layout/layout.scss

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,10 @@
1414
/// Styles provided to more easily layout an application.
1515
/// This includes:
1616
/// material-drawer (persistent and permanent)
17-
@import 'lib/src/css/material/material';
1817
@import 'lib/src/components/material_shadow/css/shadow';
19-
@import 'lib/src/components/material_list/mixins';
20-
2118
@import 'material_drawer';
19+
@import 'lib/src/css/material/material';
20+
@import 'lib/src/components/material_list/mixins';
2221

2322
$mat-drawer-border: 1px solid $mat-border-light;
2423

lib/src/components/app_layout/material_temporary_drawer.scss

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,10 @@
1111
* to include CSS generation from SASS files during the build process.
1212
*/
1313

14-
@import 'lib/src/css/material/material';
1514
@import 'lib/src/components/material_shadow/css/shadow';
16-
1715
@import 'material_drawer';
16+
@import 'lib/src/css/material/material';
1817

19-
// Nested in host to workaround legacy style encapsulation.
20-
//
21-
// Without use of :host, Angular will insert more encapsulation classes into the
22-
// selector, e.g.:
23-
// `:host .foo .bar` will become `._nghost-abc-1 .foo .bar`
24-
// `.foo .bar` will become `.foo._ngcontent-abc-1 .bar._ngcontent-abc-1`
25-
// Mixing these two behaviours can change the selector ordering so -- since use
26-
// of :host is required for some rules -- using :host for all prevents this.
2718
:host {
2819
@include fit;
2920

@@ -47,7 +38,7 @@
4738
transition: background-color $mat-transition-mobile-leaving $mat-transition-standard;
4839
}
4940

50-
:host .drawer-content {
41+
.drawer-content {
5142
@include material-drawer-common;
5243
@include shadow-none;
5344

lib/src/components/app_layout/material_temporary_drawer.scss.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/src/components/button_decorator/button_decorator.dart

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
// for details. All rights reserved. Use of this source code is governed by a
33
// BSD-style license that can be found in the LICENSE file.
44

5+
import 'dart:async';
56
import 'dart:html';
67

78
import 'package:angular/angular.dart';
89

9-
import '../../utils/async/async.dart';
1010
import '../../utils/browser/events/events.dart';
1111
import '../focus/focus.dart';
1212
import '../mixins/has_tab_index.dart';
@@ -32,8 +32,9 @@ import '../mixins/has_tab_index.dart';
3232
class ButtonDirective extends RootFocusable with HasTabIndex {
3333
/// Will emit Event on mouse click or keyboard activation.
3434
@Output()
35-
final LazyEventEmitter<UIEvent> trigger =
36-
new LazyEventEmitter<UIEvent>.broadcast();
35+
Stream<UIEvent> get trigger => _trigger.stream;
36+
37+
final _trigger = new StreamController<UIEvent>.broadcast(sync: true);
3738

3839
String _hostTabIndex;
3940

@@ -63,15 +64,15 @@ class ButtonDirective extends RootFocusable with HasTabIndex {
6364
/// Triggers if not disabled.
6465
void handleClick(MouseEvent mouseEvent) {
6566
if (disabled) return;
66-
trigger.add(mouseEvent);
67+
_trigger.add(mouseEvent);
6768
}
6869

6970
/// Triggers on enter and space if not disabled.
7071
void handleKeyPress(KeyboardEvent keyboardEvent) {
7172
if (disabled) return;
7273
int keyCode = keyboardEvent.keyCode;
7374
if (keyCode == KeyCode.ENTER || isSpaceKey(keyboardEvent)) {
74-
trigger.add(keyboardEvent);
75+
_trigger.add(keyboardEvent);
7576
// Required to prevent window from scrolling.
7677
keyboardEvent.preventDefault();
7778
}

lib/src/components/focus/focus_trap.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,5 @@
2828
[focusContentWrapper] {
2929
height: inherit;
3030
max-height: inherit;
31+
min-height: inherit;
3132
}

lib/src/components/focus/focus_trap.scss.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
* for details. All rights reserved. Use of this source code is governed by a
44
* BSD-style license that can be found in the LICENSE file.
55
*/
6-
:host{display:block}[focusContentWrapper]{height:inherit;max-height:inherit}
6+
:host{display:block}[focusContentWrapper]{height:inherit;max-height:inherit;min-height:inherit}
77

lib/src/components/glyph/glyph.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
* to include CSS generation from SASS files during the build process.
1212
*/
1313

14-
@import 'lib/src/css/material/material';
1514
@import 'mixins';
15+
@import 'lib/src/css/material/material';
1616

1717
$x-small: $mat-grid-type * 3; // 12px
1818
$small: $mat-body-font-size; // 13px

lib/src/components/glyph/glyph.scss.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)