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

Commit cff7941

Browse files
authored
Update all components (#153)
* Update dependency to angular: ^4.0.0. * App Layout: Fix margins for header icons/links. * Material Button: Refactor raised styling so it can be used in a mixin. * Material Input: Add support for material dark theme. * Material Popup: * Constrain popups to the viewport if both `enforceSpaceConstraints` and `overlayRepositionLoop` are enabled. * Create the material-popup view synchronously. * Remove `animationComplete` event. * Add missing `MaterialIconComponent`, `MaterialPersistentDrawerDirective`, `MaterialTemporaryDrawerDirective`, and `MaterialSelectSearchboxComponent` to `materialDirectives`. * Change DisplayNameDirective to a functional directive. * Additional styling cleanup to support `ng-deep`. * Reduce visibility of common directives/components for smaller code size and better performance. * Refactor Angular annotations to inline versions. * Update documentation.
1 parent f6af8a2 commit cff7941

Some content is hidden

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

43 files changed

+309
-298
lines changed

CHANGELOG.md

Lines changed: 68 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,140 +1,114 @@
1-
## 0.6.0-beta
1+
## 0.6.0
22

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-
16-
## 0.6.0-alpha+3
17-
18-
> NOTE: This code is considered production quality, but depends on angular:
19-
> 4.0.0-alpha+3. The alpha tag represents the evolving nature of the AngularDart
20-
> api, not code quality (4.0.0-alpha is used in production Google apps).
21-
22-
* Add Application Layout styles and directives.
3+
* Update dependency to angular: ^4.0.0.
4+
* Update SDK dependencies.
235
* Add Material Select Searchbox component.
24-
* Material Expansionpanel: Add high density mixin.
6+
* Add Application Layout styles and directives.
7+
* Add Material Icon.
8+
* Deprecate `GlyphComponent` in favor of `MaterialIconComponent`.
9+
* App Layout: Fix margins for header icons/links.
10+
* Dynamic Component: Add ability to use `ComponentFactory` instead of a `Type`.
11+
* Material Button: Refactor raised styling so it can be used in a mixin.
12+
* Material Checkbox:
13+
* Add ability to make readonly.
14+
* Add mixin for checkbox with no left margin.
15+
* Material Chips: Add ability to specify background color for left icon.
16+
* Material Dialog:
17+
* Support a minimum height.
18+
* Fix header mixin.
19+
* Material Expansionpanel:
20+
* Add high density mixin.
21+
* Add mixin to allow changes to panels without affecting nested panels.
2522
* Material Icon: Add back and forward arrows to the list of flipped icons.
26-
* Material Input: Add leading text color mixin.
23+
* Material Input:
24+
* Add support for material dark theme.
25+
* Fix disabled color.
26+
* Add leading text color mixin.
27+
* Make local required errors to make controls invalid even when the control
28+
has not been interacted with.
29+
* Add upper and lower bounds validators.
30+
* Re-calculate text length when custom character counter is set.
31+
* Prevent mirror-text overflow in multiline material input.
32+
* Remove unnecessary selector argument from mixins.
2733
* Material Popup:
34+
* Constrain popups to the viewport if both `enforceSpaceConstraints` and
35+
`overlayRepositionLoop` are enabled.
36+
* Create the material-popup view synchronously.
37+
* Remove `animationComplete` event.
2838
* Integrate with Angular CSS shimming and remove `shadowCssClass`.
2939
* Material design scrollbars by default (instead of the native scrollbars).
3040
* Add ARIA attributes.
31-
* Material Select: Fix selectable menu item property functionality.
32-
* Material Tree:
33-
* Add optional row separator borders.
34-
* Fix dropdown closing on toggle issue.
35-
* Material Tooltips: Add ARIA attributes.
36-
* Improve performance of `TreeSelectionOptions` constructor from O(n^2) to O(n)
37-
in the size of `listOfOptions`.
38-
* Remove uses of 'getBool' in boolean typed inputs.
39-
* Remove use of Compass in SASS files.
40-
* Refactor Angular annotations to inline versions.
41-
42-
## 0.6.0-alpha+2
43-
44-
> NOTE: This code is considered production quality, but depends on angular:
45-
> 4.0.0-alpha+2. The alpha tag represents the evolving nature of the AngularDart
46-
> api, not code quality (4.0.0-alpha is used in production Google apps).
47-
48-
* Dynamic Component: Add ability to use `ComponentFactory` instead of a `Type`.
49-
* Material Dialog: Fix header mixin.
50-
* Material Checkbox: Add ability to make readonly.
51-
* Material Input: Make local required errors to make controls invalid even when
52-
the control has not been interacted with.
53-
* Material Popup:
5441
* Add an option to reposition visible popups every frame with
5542
`trackLayoutChanges`.
5643
* Merge laminate/components/popup into Material Popup.
57-
* Material Select: Allow dropdown to display an error while it's closed.
58-
* Material Tree:
59-
* Added shift selection/deselection.
60-
* Fix glyphs always shown expanded when `expandAll = true`.
61-
* Material Yes/No Buttons: Add dense style.
62-
* Scorecard: Update tab index to prevent scroll errors when going through
63-
buttons with tabs.
64-
* Add new color utils.
65-
* Migrate uses of `GlyphComponent` to `MaterialIconComponent`.
66-
* Migrate uses of `ElementRef` to `Element`.
67-
* Remove duplicate PopupSourceDirective.
68-
* Remove deprecated popup `matchSourceWidth` options.
69-
* Updates to use metadata inheritance.
70-
* Remove unused library statements.
71-
* Update documentation.
72-
73-
## 0.6.0-alpha+1
74-
75-
> NOTE: This code is considered production quality, but depends on angular:
76-
> 4.0.0-alpha+1. The alpha tag represents the evolving nature of the AngularDart
77-
> api, not code quality (4.0.0-alpha is used in production Google apps).
78-
79-
* Add Material Icon.
80-
* Deprecate `GlyphComponent` in favor of `MaterialIconComponent`.
81-
* Update dependency to angular: 4.0.0-alpha+1.
82-
* Material Checkbox: Add mixin for checkbox with no left margin.
83-
* Material Chips: Add ability to specify background color for left icon.
84-
* Material Expansionpanel: Add mixin to allow changes to panels without
85-
affecting nested panels.
86-
* Material Input:
87-
* Add upper and lower bounds validators.
88-
* Re-calculate text length when custom character counter is set.
89-
* Prevent mirror-text overflow in multiline material input.
90-
* Remove unnecessary selector argument from mixins.
91-
* Material Popup: Only set content removed if the popup is still not visible
92-
when the timer is finished.
44+
* Only set content removed if the popup is still not visible when the timer
45+
is finished.
9346
* Material Radio:
9447
* Add mixin for radio button with no left margin.
9548
* Fix mixin to respect disabled status when a theme is applied.
9649
* Material Select:
50+
* Fix selectable menu item property functionality.
51+
* Allow dropdown to display an error while it's closed.
9752
* Fix `MaterialSelectItemComponent` to not cache the label.
9853
* Add input to material-dropdown-select to define custom a renderer for group
9954
labels.
10055
* Fix checkbox display handling and label padding in dropdown.
10156
* Material Toggle: Set the attribute instead of the property to fix a bug with
10257
incorrect type, and not setting the right property.
58+
* Material Tooltips: Add ARIA attributes.
10359
* Material Tree:
60+
* Update positioning options and borders.
61+
* Add optional row separator borders.
62+
* Fix dropdown closing on toggle issue.
63+
* Added shift selection/deselection.
64+
* Fix glyphs always shown expanded when `expandAll = true`.
10465
* Add ability to preserve expansion state.
10566
* Fix indentation of first child group.
10667
* Add input `showDisabledCheckboxes`.
10768
* Add a max-height mixin.
69+
* Material Yes/No Buttons: Add dense style.
10870
* Reorder List:
10971
* Update to recommended syntax for ngFor.
11072
* Migrate from ManagedZone to NgZone.
11173
* Scorecard:
74+
* Update tab index to prevent scroll errors when going through
75+
buttons with tabs.
11276
* Replace deprecated Glyph with Material Icon.
11377
* Invoke inherited click handler from derived click handler.
114-
* Avoid adding placeholder for deferred content if the element is detached.
11578
* Selection Models:
11679
* Add deselect all option.
11780
* Add a limited filtering model.
11881
* Fix `selectAll` to only trigger a selection change event for the values
11982
that were added.
12083
* Add comparator as optional param to tree selection options for custom
12184
sorting.
85+
* Avoid adding placeholder for deferred content if the element is detached.
86+
* Add new color utils.
87+
* Update animations to new Material specs.
88+
* Migrate uses of `GlyphComponent` to `MaterialIconComponent`.
89+
* Migrate uses of `ElementRef` to `Element`.
90+
* Remove duplicate PopupSourceDirective.
91+
* Remove deprecated popup `matchSourceWidth` options.
92+
* Add missing `MaterialIconComponent`, `MaterialPersistentDrawerDirective`,
93+
`MaterialTemporaryDrawerDirective`, and `MaterialSelectSearchboxComponent` to
94+
`materialDirectives`.
95+
* Improve performance of `TreeSelectionOptions` constructor from O(n^2) to O(n)
96+
in the size of `listOfOptions`.
97+
* Change DisplayNameRenderDirective to a functional directive.
98+
* Deprecate LazyEventEmitter and migrate uses to the StreamController model.
99+
* Additional styling cleanup to support `ng-deep`.
100+
* Reduce visibility of common directives/components for smaller code size and
101+
better performance.
102+
* Remove use of Compass in SASS files.
103+
* Remove uses of `getBool` in boolean typed inputs.
104+
* Remove unused alignment parameters.
122105
* Updates to use metadata inheritance.
123106
* Migrate away from comment-style generic syntax.
124107
* Migrate stylesheet combinators `/deep/` and `>>>` to `::ng-deep`.
125108
* Migrate away from use of angular's `@View`.
126-
* Update animations to new Material specs.
127-
* Update documentation.
128109
* Remove unused library statements.
129-
130-
## 0.6.0-alpha
131-
132-
> NOTE: This code is considered production quality, but depends on angular:
133-
> 4.0.0-alpha. The alpha tag represents the evolving nature of the AngularDart
134-
> api, not code quality (4.0.0-alpha is used in production Google apps).
135-
136-
* Update dependency to `angular: 4.0.0-alpha`.
137-
* Update SDK dependencies.
110+
* Refactor Angular annotations to inline versions.
111+
* Update documentation.
138112

139113
### Known Issues
140114
* Warnings are present when building with dart2js. Specifically:

lib/angular_components.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import 'src/all_components.dart';
1111
export 'src/all_components.dart';
1212

1313
/// A convenience list of all Directives exposed by this package.
14-
const List<Type> materialDirectives = const [
14+
const List<dynamic> materialDirectives = const [
1515
AutoDismissDirective,
1616
AutoFocusDirective,
1717
CachingDeferredContentDirective,
@@ -35,6 +35,7 @@ const List<Type> materialDirectives = const [
3535
MaterialExpansionPanel,
3636
MaterialExpansionPanelSet,
3737
MaterialFabComponent,
38+
MaterialIconComponent,
3839
MaterialIconTooltipComponent,
3940
MaterialInkTooltipComponent,
4041
MaterialInputComponent,
@@ -43,13 +44,16 @@ const List<Type> materialDirectives = const [
4344
MaterialListItemComponent,
4445
MaterialMultilineInputComponent,
4546
MaterialPaperTooltipComponent,
47+
MaterialPersistentDrawerDirective,
48+
MaterialTemporaryDrawerComponent,
4649
MaterialPopupComponent,
4750
MaterialProgressComponent,
4851
MaterialRadioComponent,
4952
MaterialRadioGroupComponent,
5053
MaterialRippleComponent,
5154
MaterialSelectComponent,
5255
MaterialSelectItemComponent,
56+
MaterialSelectSearchboxComponent,
5357
MaterialSpinnerComponent,
5458
MaterialTabComponent,
5559
MaterialTabPanelComponent,

lib/src/components/app_layout/README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@ the material spec.
1010
## Setup
1111

1212
The styles are provided by
13-
`package:third_party.dart_src.acx.app_layout/layout.scss.css`. To use these
14-
styles in an angular component simply add it as a `styleUrls` value in your
15-
`Component` annotation. It is suggested that the style is added before any
13+
`package:angular_components/src/components/app_layout/layout.scss.css`. To use
14+
these styles in an angular component simply add it as a `styleUrls` value in
15+
your `Component` annotation. It is suggested that the style is added before any
1616
component specific styling so you can easily override style values as needed.
1717

1818
```dart
1919
@Component(
2020
selector: 'my-component',
2121
templateUrl: 'my_component.html',
2222
styleUrls: const [
23-
'package:third_party.dart_src.acx.app_layout/layout.scss.css',
23+
'package:angular_components/src/components/app_layout/layout.scss.css',
2424
'my_component.scss.css'])
2525
class MyComponent {}
2626
```
@@ -41,7 +41,7 @@ dense-header | Makes the App Bar denser for interfaces that primarily
4141
material-drawer-button | A button within the row that is placed on the left and <br>is used for navigation.
4242
material-header-title | A title for the header.
4343
material-spacer | Consumes space between the title and any navigation <br>links. Needs to be placed after the title and before <br>any navigation elements.
44-
material-navigation | Navigation elements which will be displayed on the <br>left side of the header.
44+
material-navigation | Navigation elements which will be displayed on the <br>left side of the header. Only use with anchor tags, <br>material-button have there own styling built in.
4545

4646
<!-- mdformat on -->
4747

lib/src/components/app_layout/layout.scss

Lines changed: 21 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@
1919
@import 'lib/src/css/material/material';
2020
@import 'lib/src/components/material_list/mixins';
2121

22+
$mat-toolbar-mobile-breakpoint: 599px;
2223
$mat-drawer-border: 1px solid $mat-border-light;
24+
// Desktop spec calls for 24px margins have each element contribute half.
25+
$mat-desktop-drawer-margin: 3 * $mat-grid / 2;
26+
// Mobile spec calls for 16px margins have each element contribute half.
27+
$mat-mobile-drawer-margin: $mat-grid;
2328

2429
material-drawer[persistent],
2530
material-drawer[permanent] {
@@ -168,16 +173,18 @@ $mat-header-dense-height: 48px;
168173
flex-shrink: 0;
169174
flex-wrap: nowrap;
170175
height: $mat-header-height;
171-
margin: 0;
172-
padding: 0 $mat-grid;
176+
margin: 0 $mat-desktop-drawer-margin;
173177
// Allow title, and drawer button to be positioned absolutely.
174178
position: relative;
175179

180+
@media (max-width: $mat-toolbar-mobile-breakpoint) {
181+
margin: 0 $mat-mobile-drawer-margin;
182+
}
183+
176184
// Special drawer button used to open/close the drawer.
177185
// Positioned at the start of the header.
178186
> .material-drawer-button {
179187
cursor: pointer;
180-
margin-left: $mat-grid;
181188
}
182189

183190
/// Class uses for the title inside of a header.
@@ -204,11 +211,20 @@ $mat-header-dense-height: 48px;
204211
}
205212

206213
material-button {
207-
margin: 0 $mat-grid;
214+
// drawer margin - margin from button for ripple.
215+
margin: 0 $mat-desktop-drawer-margin - $mat-grid;
216+
217+
@media (max-width: $mat-toolbar-mobile-breakpoint) {
218+
margin: 0 $mat-mobile-drawer-margin - $mat-grid;
219+
}
208220
}
209221

210222
.material-navigation {
211-
margin: 0 $mat-grid * 3;
223+
margin: 0 $mat-desktop-drawer-margin;
224+
225+
@media (max-width: $mat-toolbar-mobile-breakpoint) {
226+
margin: 0 $mat-mobile-drawer-margin;
227+
}
212228
}
213229

214230
> * {

0 commit comments

Comments
 (0)