Skip to content
This repository was archived by the owner on Oct 7, 2020. It is now read-only.

Commit 6fee7bc

Browse files
authored
feat: Update material-components-web to v0.30.0 (#624)
1 parent 62f97f6 commit 6fee7bc

Some content is hidden

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

65 files changed

+1311
-1641
lines changed

package-lock.json

+175-153
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"@angular/forms": "^5.2.3",
3636
"@angular/platform-browser": "^5.2.3",
3737
"core-js": "^2.5.3",
38-
"material-components-web": "^0.29.0",
38+
"material-components-web": "^0.30.0",
3939
"rxjs": "^5.5.6",
4040
"tsickle": "^0.26.0",
4141
"tslib": "^1.9.0",

src/theme/extend/mdc-button.scss

-8
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
.mdc-button--primary {
22
@include mdc-button-filled-accessible($mdc-theme-primary);
3-
4-
@include mdc-theme-dark(".mdc-button") {
5-
@include mdc-button-filled-accessible($mdc-theme-primary);
6-
}
73
}
84

95
.mdc-button--secondary {
106
@include mdc-button-filled-accessible($mdc-theme-secondary);
11-
12-
@include mdc-theme-dark(".mdc-button") {
13-
@include mdc-button-filled-accessible($mdc-theme-secondary);
14-
}
157
}

src/theme/extend/mdc-theme.scss

-5
This file was deleted.

src/theme/extend/text-field/mdc-text-field.scss

-8
This file was deleted.

src/theme/material-components-web.scss

+2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
@import "material-components-web/line-ripple/mdc-line-ripple";
12
@import "material-components-web/button/mdc-button";
23
@import "material-components-web/card/mdc-card";
34
@import "material-components-web/checkbox/mdc-checkbox";
5+
@import "material-components-web/chips/mdc-chips";
46
@import "material-components-web/dialog/mdc-dialog";
57
@import "material-components-web/drawer/mdc-drawer";
68
@import "material-components-web/elevation/mdc-elevation";

src/theme/material-components-web/button/_mixins.scss

+6-19
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@
8787
@mixin mdc-button-base_() {
8888
@include mdc-typography(button);
8989
@include mdc-ripple-surface;
90-
@include mdc-ripple-radius;
90+
@include mdc-ripple-radius-bounded;
9191

9292
display: inline-block;
9393
position: relative;
@@ -103,6 +103,11 @@
103103
overflow: hidden;
104104
vertical-align: middle;
105105

106+
&::-moz-focus-inner {
107+
padding: 0;
108+
border: 0;
109+
}
110+
106111
// postcss-bem-linter: ignore
107112
&:active {
108113
outline: none;
@@ -112,21 +117,12 @@
112117
cursor: pointer;
113118
}
114119

115-
&::-moz-focus-inner {
116-
padding: 0;
117-
border: 0;
118-
}
119-
120120
&:disabled {
121121
@include mdc-theme-prop(background-color, transparent);
122122
@include mdc-theme-prop(color, text-disabled-on-light);
123123

124124
cursor: default;
125125
pointer-events: none;
126-
127-
@include mdc-theme-dark(".mdc-button") {
128-
@include mdc-theme-prop(color, text-disabled-on-dark);
129-
}
130126
}
131127
}
132128

@@ -145,22 +141,13 @@
145141

146142
&:disabled {
147143
@include mdc-theme-prop(border-color, text-disabled-on-light);
148-
149-
@include mdc-theme-dark(".mdc-button") {
150-
@include mdc-theme-prop(border-color, text-disabled-on-dark);
151-
}
152144
}
153145
}
154146

155147
@mixin mdc-button--filled_() {
156148
&:disabled {
157149
@include mdc-theme-prop(background-color, rgba(black, .12));
158150
@include mdc-theme-prop(color, text-disabled-on-light);
159-
160-
@include mdc-theme-dark(".mdc-button") {
161-
@include mdc-theme-prop(background-color, rgba(white, .12));
162-
@include mdc-theme-prop(color, text-disabled-on-light);
163-
}
164151
}
165152
}
166153

src/theme/material-components-web/button/mdc-button.scss

-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
@import "../ripple/common";
1818
@import "../ripple/mixins";
19-
@import "../theme/mixins";
2019
@import "./mixins";
2120
@import "./variables";
2221

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
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+
19+
//
20+
// Public
21+
//
22+
23+
@mixin mdc-card-fill-color($color) {
24+
@include mdc-theme-prop(background-color, $color);
25+
}
26+
27+
@mixin mdc-card-stroke($color, $thickness: 1px) {
28+
border: $thickness solid mdc-theme-prop-value($color);
29+
}
30+
31+
@mixin mdc-card-corner-radius($radius) {
32+
border-radius: $radius;
33+
}
34+
35+
@mixin mdc-card-media-aspect-ratio($x, $y) {
36+
&::before {
37+
// This clever trick brought to you by: http://www.mademyday.de/css-height-equals-width-with-pure-css.html
38+
margin-top: percentage($y / $x);
39+
}
40+
}
41+
42+
//
43+
// Private
44+
//
45+
46+
@mixin mdc-card-row-layout_($display: flex) {
47+
display: $display;
48+
flex-direction: row;
49+
align-items: center;
50+
}
51+
52+
@mixin mdc-card-media-aspect-ratio-base_ {
53+
&::before {
54+
display: block;
55+
content: "";
56+
}
57+
}

0 commit comments

Comments
 (0)