material_components_web-sass 0.10.0.1 → 0.11.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -17,6 +17,7 @@
17
17
  @import "@material/elevation/mixins";
18
18
  @import "@material/theme/mixins";
19
19
  @import "@material/typography/mixins";
20
+ @import "@material/rtl/mixins";
20
21
 
21
22
  // postcss-bem-linter: define card
22
23
  .mdc-card {
@@ -78,10 +79,14 @@
78
79
  // Tweak button paddings and margins when they're used as actions
79
80
  .mdc-card__action {
80
81
  margin: 0 8px 0 0;
82
+
83
+ @include mdc-rtl {
84
+ margin: 0 0 0 8px;
85
+ }
81
86
  }
82
87
 
83
88
  .mdc-card__action:last-child {
84
- margin-right: 0;
89
+ @include mdc-rtl-reflexive-box(margin, right, 0);
85
90
  }
86
91
 
87
92
  // Vertical actions (one per line)
@@ -158,8 +163,10 @@
158
163
  flex-direction: row;
159
164
  align-items: flex-start;
160
165
  justify-content: space-between;
161
- padding: 0 16px 0 0;
162
166
  box-sizing: border-box;
167
+ padding: 0;
168
+
169
+ @include mdc-rtl-reflexive-property(padding, 0, 16px);
163
170
 
164
171
  // postcss-bem-linter: ignore
165
172
  .mdc-card__actions--vertical {
@@ -167,7 +174,7 @@
167
174
  }
168
175
 
169
176
  .mdc-card__media-item {
170
- margin-left: 16px;
177
+ @include mdc-rtl-reflexive-box(margin, left, 16px);
171
178
  }
172
179
 
173
180
  // postcss-bem-linter: ignore
@@ -39,6 +39,7 @@ $mdc-simple-menu-item-fade-duration: .3s;
39
39
  overflow: hidden;
40
40
  box-sizing: border-box;
41
41
  will-change: transform, opacity;
42
+ z-index: 4;
42
43
 
43
44
  @include mdc-elevation(2);
44
45
 
@@ -0,0 +1,18 @@
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 "./tab/mdc-tab";
18
+ @import "./tab-bar/mdc-tab-bar";
@@ -0,0 +1,111 @@
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 "@material/animation/functions";
18
+ @import "@material/theme/mixins";
19
+ @import "@material/rtl/mixins";
20
+
21
+ // postcss-bem-linter: define tab-bar
22
+ .mdc-tab-bar {
23
+ display: table;
24
+ height: 48px;
25
+ margin: 0 auto;
26
+ position: relative;
27
+ text-transform: uppercase;
28
+
29
+ &__indicator {
30
+ height: 2px;
31
+ width: 100%;
32
+
33
+ @include mdc-theme-prop(background-color, text-primary-on-light);
34
+
35
+ @include mdc-theme-dark(".mdc-tab-bar") {
36
+ @include mdc-theme-prop(background-color, text-primary-on-dark);
37
+ }
38
+
39
+ position: absolute;
40
+ bottom: 0;
41
+ left: 0;
42
+ transform-origin: left top;
43
+ transition: mdc-animation-enter(transform, 240ms);
44
+ will-change: transform;
45
+ visibility: hidden;
46
+ }
47
+
48
+ // postcss-bem-linter: ignore
49
+ .mdc-toolbar & {
50
+ .mdc-tab {
51
+ @include mdc-theme-prop(color, text-secondary-on-primary);
52
+
53
+ @include mdc-theme-dark(".mdc-tab-bar") {
54
+ @include mdc-theme-prop(color, text-secondary-on-dark);
55
+ }
56
+ }
57
+
58
+ .mdc-tab--active,
59
+ .mdc-tab:hover {
60
+ @include mdc-theme-prop(color, text-primary-on-primary);
61
+
62
+ @include mdc-theme-dark(".mdc-tab-bar") {
63
+ @include mdc-theme-prop(color, text-primary-on-dark);
64
+ }
65
+ }
66
+
67
+ // postcss-bem-linter: ignore
68
+ .mdc-tab-bar__indicator {
69
+ @include mdc-theme-prop(background-color, text-primary-on-primary);
70
+
71
+ @include mdc-theme-dark(".mdc-tab-bar") {
72
+ @include mdc-theme-prop(background-color, text-primary-on-dark);
73
+ }
74
+ }
75
+ }
76
+ }
77
+
78
+ .mdc-tab-bar--icons-with-text {
79
+ height: 72px;
80
+ }
81
+
82
+ .mdc-tab-bar--indicator-primary,
83
+ .mdc-toolbar .mdc-tab-bar--indicator-primary {
84
+ .mdc-tab-bar__indicator {
85
+ @include mdc-theme-prop(background-color, primary);
86
+
87
+ @include mdc-theme-dark(".mdc-tab-bar") {
88
+ @include mdc-theme-prop(background-color, primary);
89
+ }
90
+ }
91
+
92
+ &.mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab::after {
93
+ @include mdc-theme-prop(background-color, primary);
94
+ }
95
+ }
96
+
97
+ .mdc-tab-bar--indicator-accent,
98
+ .mdc-toolbar .mdc-tab-bar--indicator-accent {
99
+ .mdc-tab-bar__indicator {
100
+ @include mdc-theme-prop(background-color, accent);
101
+
102
+ @include mdc-theme-dark(".mdc-tab-bar") {
103
+ @include mdc-theme-prop(background-color, accent);
104
+ };
105
+ }
106
+
107
+ &.mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab::after {
108
+ @include mdc-theme-prop(background-color, accent);
109
+ }
110
+ }
111
+ // postcss-bem-linter: end
@@ -0,0 +1,174 @@
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 "@material/animation/functions";
18
+ @import "@material/typography/mixins";
19
+ @import "@material/theme/mixins";
20
+ @import "@material/ripple/mixins";
21
+ @import "@material/rtl/mixins";
22
+
23
+ $mdc-tab-with-text-height: 48px;
24
+ $mdc-tab-with-icon-and-text-height: 72px;
25
+
26
+ @mixin mdc-tabs-icon-tab-content {
27
+ display: block;
28
+ margin: 0 auto;
29
+ }
30
+
31
+ // postcss-bem-linter: define tab
32
+ .mdc-tab {
33
+ @include mdc-typography(body2);
34
+
35
+ position: relative;
36
+ box-sizing: border-box;
37
+ display: table-cell;
38
+ text-align: center;
39
+ vertical-align: middle;
40
+ min-height: $mdc-tab-with-text-height;
41
+ min-width: 160px;
42
+ overflow: hidden;
43
+ padding: 0 24px;
44
+ text-decoration: none;
45
+ cursor: pointer;
46
+ white-space: nowrap;
47
+
48
+ @include mdc-theme-prop(color, text-secondary-on-light);
49
+
50
+ &:hover {
51
+ @include mdc-theme-prop(color, text-primary-on-light);
52
+ }
53
+
54
+ &:focus {
55
+ @include mdc-theme-prop(outline-color, text-secondary-on-light);
56
+ }
57
+
58
+ @include mdc-theme-dark(".mdc-tab-bar") {
59
+ @include mdc-theme-prop(color, text-secondary-on-dark);
60
+
61
+ &:hover {
62
+ @include mdc-theme-prop(color, text-primary-on-dark);
63
+ }
64
+
65
+ &:focus {
66
+ @include mdc-theme-prop(outline-color, text-secondary-on-dark);
67
+ }
68
+ }
69
+
70
+ // TODO: Replace with breakpoint variable
71
+ @media screen and (max-width: 600px) {
72
+ min-width: 72px;
73
+ padding: 0 12px;
74
+ }
75
+
76
+ &__icon {
77
+ @include mdc-tabs-icon-tab-content;
78
+
79
+ width: 24px;
80
+ height: 24px;
81
+
82
+ // postcss-bem-linter: ignore
83
+ .mdc-tab-bar--icons-with-text & {
84
+ margin-top: 4px;
85
+ }
86
+ }
87
+
88
+ &__icon-text {
89
+ @include mdc-tabs-icon-tab-content;
90
+ }
91
+
92
+ // postcss-bem-linter: ignore
93
+ &__icon + &__icon-text {
94
+ padding-top: 6px;
95
+ }
96
+ }
97
+
98
+ .mdc-tab--active {
99
+ @include mdc-theme-prop(color, text-primary-on-light);
100
+
101
+ @include mdc-theme-dark(".mdc-tab-bar") {
102
+ @include mdc-theme-prop(color, text-primary-on-dark);
103
+ }
104
+
105
+ &::before {
106
+ bottom: 0;
107
+ }
108
+ }
109
+
110
+ .mdc-tab-bar:not(.mdc-tab-bar-upgraded) .mdc-tab {
111
+ position: relative;
112
+
113
+ &::after {
114
+ position: absolute;
115
+ left: 0;
116
+ top: $mdc-tab-with-text-height - 2px;
117
+ content: "";
118
+ width: calc(100% - 4px);
119
+ height: 2px;
120
+ display: none;
121
+ pointer-events: none;
122
+
123
+ @include mdc-theme-prop(background-color, text-primary-on-light);
124
+ @include mdc-theme-dark(".mdc-tab-bar", true) {
125
+ @include mdc-theme-prop(background-color, text-primary-on-dark);
126
+ }
127
+
128
+ .mdc-toolbar & {
129
+ @include mdc-theme-prop(background-color, text-primary-on-primary);
130
+ }
131
+ }
132
+
133
+ &--active,
134
+ &:active,
135
+ &:hover {
136
+ &::after {
137
+ display: block;
138
+ }
139
+ }
140
+
141
+ &:not(.mdc-tab--active):hover::after {
142
+ opacity: .38;
143
+ }
144
+
145
+ &--active,
146
+ &:not(.mdc-tab--active):active::after {
147
+ opacity: .87;
148
+ }
149
+ }
150
+
151
+ .mdc-tab-bar--icons-with-text:not(.mdc-tab-bar-upgraded) .mdc-tab::after {
152
+ top: $mdc-tab-with-icon-and-text-height - 2px;
153
+ }
154
+
155
+ .mdc-tab.mdc-ripple-upgraded {
156
+ @include mdc-ripple-base;
157
+ @include mdc-ripple-fg((pseudo: "::after"));
158
+ @include mdc-ripple-bg((pseudo: "::before"));
159
+ @include mdc-theme-dark(".mdc-tab-bar") {
160
+ @include mdc-ripple-bg((pseudo: "::before", base-color: map-get($mdc-theme-property-values, text-primary-on-dark), opacity: .16));
161
+ @include mdc-ripple-fg((pseudo: "::after", base-color: map-get($mdc-theme-property-values, text-primary-on-dark), opacity: .16));
162
+ }
163
+
164
+ .mdc-toolbar & {
165
+ @include mdc-ripple-bg((pseudo: "::before", base-color: map-get($mdc-theme-property-values, text-primary-on-primary), opacity: .16));
166
+ @include mdc-ripple-fg((pseudo: "::after", base-color: map-get($mdc-theme-property-values, text-primary-on-primary), opacity: .16));
167
+ }
168
+
169
+ &:focus {
170
+ outline: none;
171
+ }
172
+ }
173
+
174
+ // postcss-bem-linter: end
@@ -201,7 +201,8 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
201
201
 
202
202
  .mdc-textfield--invalid {
203
203
  &:not(.mdc-textfield--focused) {
204
- &::after {
204
+ &::after,
205
+ &.mdc-textfield--upgraded::after {
205
206
  background-color: $mdc-textfield-error-on-light;
206
207
  }
207
208
 
@@ -212,7 +213,8 @@ $mdc-textfield-disabled-border-on-dark: rgba(white, .3);
212
213
 
213
214
  @include mdc-theme-dark(".mdc-textfield", true) {
214
215
  &:not(.mdc-textfield--focused) {
215
- &::after {
216
+ &::after,
217
+ &.mdc-textfield--upgraded::after {
216
218
  background-color: $mdc-textfield-error-on-dark;
217
219
  }
218
220
 
@@ -44,13 +44,14 @@ $mdc-toolbar-mobile-breakpoint: 599px;
44
44
  display: flex;
45
45
  position: relative;
46
46
  width: 100%;
47
- height: $mdc-toolbar-row-height;
47
+ height: auto;
48
+ min-height: $mdc-toolbar-row-height;
48
49
  padding: $mdc-toolbar-padding;
49
50
  box-sizing: border-box;
50
51
 
51
52
  // TODO: refactor this out when #23 is implemented
52
53
  @media (max-width: $mdc-toolbar-mobile-breakpoint) {
53
- height: $mdc-toolbar-mobile-row-height;
54
+ min-height: $mdc-toolbar-mobile-row-height;
54
55
  padding: $mdc-toolbar-mobile-padding;
55
56
  }
56
57
  }
@@ -1,18 +1,18 @@
1
- /**
2
- * Copyright 2016 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
- */
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
16
 
17
17
  @import "@material/animation/mdc-animation";
18
18
  @import "@material/button/mdc-button";
@@ -33,6 +33,7 @@
33
33
  @import "@material/select/mdc-select";
34
34
  @import "@material/snackbar/mdc-snackbar";
35
35
  @import "@material/switch/mdc-switch";
36
+ @import "@material/tabs/mdc-tabs";
36
37
  @import "@material/textfield/mdc-textfield";
37
38
  @import "@material/theme/mdc-theme";
38
39
  @import "@material/toolbar/mdc-toolbar";
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: material_components_web-sass
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.0.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitriy Tarasov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-10 00:00:00.000000000 Z
11
+ date: 2017-05-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autoprefixer-rails
@@ -167,6 +167,9 @@ files:
167
167
  - vendor/assets/stylesheets/@material/switch/_mixins.scss
168
168
  - vendor/assets/stylesheets/@material/switch/_variables.scss
169
169
  - vendor/assets/stylesheets/@material/switch/mdc-switch.scss
170
+ - vendor/assets/stylesheets/@material/tabs/mdc-tabs.scss
171
+ - vendor/assets/stylesheets/@material/tabs/tab-bar/mdc-tab-bar.scss
172
+ - vendor/assets/stylesheets/@material/tabs/tab/mdc-tab.scss
170
173
  - vendor/assets/stylesheets/@material/textfield/mdc-textfield.scss
171
174
  - vendor/assets/stylesheets/@material/theme/_constants.scss
172
175
  - vendor/assets/stylesheets/@material/theme/_functions.scss